Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Radial / Irregular Menu Implementation

From: rotenca:telvia:it at: 20-May-2003 17:43

Hi James This code demonstrates the trick: to adapt your code to double-key, you must convert our mask in a two colors (black/white) mask, one color for the first image and one color for the second image to merge. You can draw your masks by scratch or calculate them with a rebol program like this, which create a white/black mask: for every color ;transform the color in white m1: make image! layout [ origin 0x0 backcolor white image mask effect compose [key (color)] ] ;luma key: not white pixels become black newmask: make image! layout [ origin 0x0 backcolor black image m1 effect [key 254] ] now you can do: double-key source1 source2 newmask black white ;or black white This works only if the original mask does not contain pure black and pure white points (also this can be esay changed with a key 0.0.0 -> 0.0.1 and 255.255.255 -> 255.255.254) Obviously you should calculate masks only one time at the start of the program. --- Ciao Romano