void RG_PixmapSetBlendingMode (RG_Pixmap *pixmap, enum rg_pixel_blend_mode bmode)
int RG_PixmapPutPixel (RG_Tileview *view, RG_TileElement *pixmapElement, int x, int y, Uint32 pixel, int onceFlag)
void RG_PixmapApplyBrush (RG_Tileview *view, RG_TileElement *pixmapElement "int x, int y, Uint32 color)
Uint32 RG_PixmapSourcePixel (RG_Tileview *view, RG_TileElement *pixmapElement, int x, int y)
void RG_PixmapSourceRGBA (RG_Tileview *view, RG_TileElement *pixmapElement, int x, int y, Uint8 *r" "Uint8 *g" "Uint8 *b" "Uint8 *a)
|
RG_PixmapSetBlendingMode() selects the alpha blending function to use for subsequent pixel operations.
Currently implemented are:
enum rg_pixmap_blend_mode {
RG_PIXMAP_OVERLAY_ALPHA, /* dA = sA+dA */
RG_PIXMAP_AVERAGE_ALPHA, /* dA = (sA+dA)/2 */
RG_PIXMAP_DEST_ALPHA, /* dA = dA */
RG_PIXMAP_NO_BLENDING /* No blending done */
};
|
The
RG_PixmapPutPixel() function writes the pixel value
pixel (specified in
agSurfaceFmt format)
at coordinates
x, y. If
onceFlag is 1, the function will check if any other modifications were made to this
pixel in the current undo block.
If the pixel was modified since the last
Nm RG_PixmapBeginUndoBlkcall, the function is a no-op.
RG_PixmapApplyBrush() operates in a similar way, except that instead of a single pixel, a group
of pixel are modified according to the current brush (as set by
RG_PixmapSetBrush()). See
BRUSHES section below for more information.
RG_PixmapSourcePixel() and
RG_PixmapSourceRGBA() return the pixel at given coordinates
x, y in 32-bit
agSurfaceFmt format and component (RGBA) format, respectively.
|