CRIMP
Artifact [c0ec105aa1]
Not logged in

Artifact c0ec105aa11ea0879e7ea92a3cabf8e8179da266:


def op_subtract {
    label Subtract
    active { expr { [bases] == 2 } }
    setup_image {
	show
    }
    setup {
	variable scale  1
	variable offset 0

	proc show {args} {
	    variable scale
	    variable offset

	    show_image [crimp alpha opaque \
			    [crimp subtract [base 0] [base 1] $scale $offset]]
	    return
	}

	scale .left.s -variable ::DEMO::scale  -from 1 -to 255 -orient vertical -command ::DEMO::show
	scale .left.o -variable ::DEMO::offset -from 0 -to 255 -orient vertical -command ::DEMO::show

	pack .left.s -side left -expand 1 -fill both
	pack .left.o -side left -expand 1 -fill both
    }
}