Blitz (39/172)

From:David McMinn
Date:11 Sep 2000 at 12:47:10
Subject:Re: Shape -> OS Bitmap

Hi Damir

> To use it, I need the data in the OS Bitmap struct (newtype if you want).
> Could anybody please tell me how to get the image data from Blitz's Shape
> object to the OS Bitmap structure and back?

You could use ShapesBitMap and then use the Blitz bitmap structure (it is
compatible with the OS structure).

However, if that doesn't work due to the same problem with Scale, you could do
this:

; need amigalibs.res and bb2objtypes.res
DEFTYPE.BitMap bmp
*s.shape = Addr Shape(x)
bmp\BytesPerRow = *s\ebwidth
bmp\Rows = *s\pixheight
bmp\Depth = *s\depth
For i.w=0 to *s\depth-1
bmp\Planes[i] = *s\data + i * *s\ebwidth * *s\pixheight
Next

I think that should do it.



|) /\ \/ ][ |) |\/| c |\/| ][ |\| |\| | dave@satanicdreams.com
http://members.xoom.com/David_McMinn | ICQ=16827694
/* You're not supposed to understand this bit */

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie