ULONG *rgb = hw_GetARGBBrush(lua_ID *id, struct hwTagList *tags);
hw_GetARGBBrush() will convert the pixels
to the 32-bit ARGB format automatically and it will also mix any potential alpha
channel or monochrome transparency mask into the pixel map. All this is of course
overhead which makes hw_GetARGBBrush() slower than hw_LockBrush().
You have to pass the object identifier of the brush whose pixels you want to obtain.
The object identifier must be passed as a lua_ID. See Object identifiers for details.
Additionally, you can specify a taglist in the second parameter. The following tags are currently recognized:
HWGAB_WIDTH:pData member to a pointer to
an int. hw_GetARGBBrush() will then write the brush's width in pixels to this int.
HWGAB_HEIGHT:pData member to a pointer to
an int. hw_GetARGBBrush() will then write the brush's height in pixels to this int.
HWGAB_OPAQUE:pData member to a pointer to
an int. hw_GetARGBBrush() will then write True to this int if the brush doesn't
have a mask or an alpha channel, or False otherwise.
HWGAB_FLAGS:hw_GetARGBBrush(). The iData member
of this tag must be set to a ULONG containing one or more of the following flags:
HWGABFLAGS_SCALE:
HWGABFLAGS_INTERPOLATE:hw_GetARGBBrush() scales the brush pixels because HWGABFLAGS_SCALE is set, you can
activate bilinear interpolation by setting this flag.
(V8.0)
Note that currently you always have to pass a taglist to this function as it does
not check against NULL. So just pass an empty taglist if you don't need to use
any of the tags above.
Please note that alpha byte will always be set, even if the brush doesn't have any transparency information. In that case the alpha byte for every pixel will be set to 255, i.e. fully opaque.
The memory buffer that is returned by this function must be freed by using the hw_FreeARGBBrush() function. See hw_FreeARGBBrush for details.
Note that hw_GetARGBBrush() can only be used with software brushes. It is not possible
to get the raw pixels of hardware brushes.
NULLNULL on error