Artifact 0987d01d444a747c02aca0c13ae5fd4ee1186ab8:
- File demos/over-translated.tcl — part of check-in [806909ad23] at 2011-11-23 07:49:54 on branch infinite-plane — Modified the alpha over operator to behave like the other binary operators in general. Updated and added demos. (user: andreask size: 569) [more...]
def op_alpha_over_translated { label Over/Translated active { expr { [bases] == 2 } } setup_image { # We use the foreground image's luma as opacity (bright = # opaque, dark = transparent) to merge it with the background # image. At last we force fully opaque to avoid mix effects # against the canvas background color. show_image [crimp convert 2rgb \ [crimp alpha over \ [crimp place \ [crimp alpha set \ [base] \ [crimp convert 2grey8 [base]]] \ -50 -50] \ [crimp place [base 1] 60 70]]] } }