void hw_RawBltBitMap(APTR src, APTR dst, struct hwRawBltBitMapCtrl *ctrl, ULONG flags, struct hwTagList *tags);
hw_RawBltBitMap()
in lots of
different contexts. If you want to use hw_RawBltBitMap()
on Hollywood bitmaps, you need
to lock those bitmaps first using hw_LockBitMap() and then
pass the raw pixel buffer pointer obtained by hw_LockBitMap()
to hw_RawBltBitMap()
.
Optionally, hw_RawBltBitMap()
can take a mask or alpha channel pixel buffer into account.
In case an alpha channel pixel buffer is specified, hw_RawBltBitMap()
will also do the
blending for you.
You have to pass source and destination pixel buffer pointers as well as a pointer
to a struct hwRawBltBitMapCtrl
to this function. struct hwRawBltBitMapCtrl
looks like this:
struct hwRawBltBitMapCtrl { int SrcX; // [in] int SrcY; // [in] int DstX; // [in] int DstY; // [in] int Width; // [in] int Height; // [in] int PixFmt; // [in] UBYTE *MaskData; // [in] UBYTE *AlphaData; // [in] int SrcModulo; // [in] int DstModulo; // [in] int MaskModulo; // [in] int AlphaModulo; // [in] }; |
Here's an explanation of the individual structure members:
SrcX:
SrcY:
DstX:
DstY:
Width:
Height:
PixFmt:
SrcModulo:
DstModulo:
MaskData:
MaskModulo
bytes wide and must match the source buffer's height. If you don't
want to use masked blitting, set this to NULL
.
MaskModulo:
MaskData
, you need to set this member to the number
of bytes that is used for one row of mask data. Note that this value is specified in bytes
and often needs to use some padding. For example, if the source buffer is 123 pixels
wide, the MaskModulo
value would usually be set to 16 because 15 bytes are not enough for
123 pixels.
AlphaData:
AlphaModulo
member (see below). If this member is specified, hw_RawBltBitMap()
will do blit the
source pixel buffer to the destination pixel buffer with alpha blending. If you don't
want to use alpha blending, set this to NULL
.
AlphaModulo:
AlphaData
has been provided, this member must be set to the number of pixels stored
in one row of the AlphaData
array. This can be more than the source buffer's width
in case you need padding.
The following tags are recognized by hw_RawBltBitMap()
:
HWRBBTAG_CLIPRECT:
hw_RawBltBitMap()
clip its output to the specified clipping
rectangle. If you pass this tag, you must set the pData
member of the tag to a
struct hwRect
containing the desired clipping rectangle. Note that by default
there is no clipping at all, so you must make sure that the destination raw pixel buffer
is large enough. (V8.0)
struct hwRawBltBitMapCtrl
containing the blit parametersNULL