Picasso API
2.2
|
Functions | |
PEXPORT ps_mask *PICAPI | ps_mask_create_with_data (ps_byte *data, int width, int height) |
Create a new mask using a given data block. | |
PEXPORT ps_mask *PICAPI | ps_mask_ref (ps_mask *mask) |
Increases the reference count of the mask by 1. | |
PEXPORT void PICAPI | ps_mask_unref (ps_mask *mask) |
Decrements the reference count for the mask object. If the reference count on the mask falls to 0, the mask is freed. | |
PEXPORT void PICAPI | ps_mask_add_color_filter (ps_mask *mask, const ps_color *color) |
Add a color filter to a mask. | |
PEXPORT void PICAPI | ps_mask_clear_color_filters (ps_mask *mask) |
Clear all colors from mask's filter. |
void ps_mask_add_color_filter | ( | ps_mask * | mask, |
const ps_color * | color | ||
) |
Add a color filter to a mask.
mask | Pointer to an existing mask object. |
color | A color for be masked. Only the colors specified by filter can be masked. If no color is specified, all colors can be masked. |
void ps_mask_clear_color_filters | ( | ps_mask * | mask | ) |
Clear all colors from mask's filter.
mask | Pointer to an existing mask object. |
ps_mask * ps_mask_create_with_data | ( | ps_byte * | data, |
int | width, | ||
int | height | ||
) |
Create a new mask using a given data block.
data | A pointer to the mask data block in memory. Each byte of data is a aplha value, from transparent to opaque (0 ~ 255). The size of this memory block should be at least (width * height) bytes. |
width | The width, in pixels, of the required mask. |
height | The height, in pixels, of the required mask. |
ps_mask * ps_mask_ref | ( | ps_mask * | mask | ) |
Increases the reference count of the mask by 1.
mask | Pointer to an existing mask object. |
void ps_mask_unref | ( | ps_mask * | mask | ) |
Decrements the reference count for the mask object. If the reference count on the mask falls to 0, the mask is freed.
mask | Pointer to an existing mask object. |