Szymek wrote:

>How to create new bitmap and put on some pixels.
>Because below script don't work. The bitmap is created but where is pixel?
>
>on makeNewBitmap
>   memb = new( #bitmap )
>   memb.setpixel( 0,0,rgb(100,23,44) )
>end

'setPixel' only works within the rect of already defined pixels.
'setPixel' directly on the member only works with the old integer 
value, not with colorObjects.
In order to use a colorObject with 'setPixel' you need to work on an 'image'.
Here is one way to do it:

on t1
   theImage = image(1, 1, 32)
   theImage.setpixel(0, 0, rgb(100,23,44))
   theNewMbr = new(#bitmap)
   theNewMbr.image = theImage
end

Jakob


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to