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

[REBOL] Re: point, plot, pixel ?

From: santilli:gabriele:gma:il at: 5-Aug-2010 12:38

2010/8/5 =C5=9Eemseddin Moldibi <semseddinm-bircom.com>:
> img: make image! 100x50 > lay: layout [image img] > putpixel: func [x y] [change skip img 100 * y + x white] > putpixel 40 20 > view lay
It's easier than that:
>> img: make image! 100x100
== make image! [100x100 #{ 000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000...
>> poke img 5x5 white
== 255.255.255
>> view layout [image img]
Ie. use POKE with a pair! and a color. You can use the fourth element of the tuple to set the alpha channel.