Smart Poke!
[1/1] from: reboler::ifrance::com at: 28-Dec-2002 11:08
Hi List,
In "Easy Draw", Larry Palmiter use this code to display image.
do [i: make image! 2x2
poke i 1 red
poke i 2 yellow
poke i 3 green
poke i 4 blue
; make the image 20 times larger
i: to-image layout [origin 0x0 image i 40x40]
]
Basically after creating a 2 by 2 image, colors are poked in the four available pixels.
I thought I could use this to produce fast display. Doing so I encountered something
odd.
>> i: make image! 2x2
== make image! [2x2 #{000000000000000000000000}]
>> length? i
== 16
>> poke i 2 white
== make image! [2x2 #{000000FFFFFF000000000000}]
Isn't it strange that poke knows that i is a image, and length? does not?
Regards
Patrick
_____________________________________________________________________
GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321
(prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné.
Règlement : http://www.ifrance.com/_reloc/sign.sms