Re: Win32dib?
- Posted by mraley2 Jul 24, 2009
- 868 views
I am using Win32lib v0.70.3 and Win32Dib 0.5.1.
In the docs for Win32Dib it says:
Creating and deleting a bitmap A Win32Dib-bitmap is a sequence of length 7:
dib[DibHandle] is the bitmap handle (integer) you can use in Win32Lib-routines.
dib[DibMemory] is the address (atom) of the memory block of the bitmap.
dib[DibWidth] is the width of the bitmap in pixels.
dib[DibHeight] is the height of the bitmap in pixels.
dib[DibBytesPerLine] is the amount of bytes per line of the bitmap.
dib[DibBytesTotal] is the total amount of bytes of the bitmap.
dib[DibPadding] is the amount of bytes of padding after each scanline.
This is not true.
mydib = newDib(410 200)
dib=myDib[1]
dib is 1124402745 (an atom)
Don Cole
functions like colorizeDib() drawDib() and saveDib() use the sequence mydib not just the handle in the first position. I guess it could be called a reference instance of a bitmap, not the bitmap.
This is what I used in Photuki2
scrndib =newDib(cc*8+1,cc*8+1) -- create a off screen control to hold completed image pixmap = subClassControl({Pixmap, 0}, scrndib[DibHandle]) -- fill the pixmap with background color setBackColor (pixmap, template_bgcolor )