ftp.nice.ch/pub/next/graphics/vector/PencilTWO.s.tar.gz#/PencilTWO/Source/PencilLibrary/Transparency.tcl

This is Transparency.tcl in view mode; [Download] [Up]

proc getcols {o} {
	return [lrange $o 10 15]
}

proc mixColors {C p} {
	P_forSelection {
		set OBJ [setcols $OBJ [doBlend $C [getcols $OBJ] $p]]
	}
}

proc duplicateSel {} {
	set s [P_selection]
	foreach i $s {
		P_writeObject $i -
		P_readObject -
	}
}

proc doMix {f} {
	P_hideDisplay {
	set st [P_objectcount]
	duplicateSel
	set en [P_objectcount]
	out $st,$en
	P_delete [expr $en-1]
	P_select1 [expr $st-1]
	P_back
	set S ""
	set en [expr $en-1]
	for {set i $st} {$i<$en} {incr i} {
		lappend S $i
	}
	eval "P_select $S"
	mixColors [getcols [P_getobject 0]] $f
	set S [concat "0" $S]
	eval "P_select $S"
	P_clipgroup
	P_select1 -1
	}
	P_display
}

P_addMenuItem 2 "Make transparent" "7" {doMix .5}
P_addMenuItem 2 "Make transp. (0.2)" "" {doMix .2}
P_addMenuItem 2 "Make transp. (0.8)" "" {doMix .8}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.