Picasso API
2.2
|
Functions | |
PEXPORT ps_image *PICAPI | ps_image_create (ps_color_format fmt, int width, int height) |
Create a new image using the given parameters. | |
PEXPORT ps_image *PICAPI | ps_image_create_with_data (ps_byte *data, ps_color_format fmt, int width, int height, int pitch) |
Create a new image using a given address in memory. | |
PEXPORT ps_image *PICAPI | ps_image_create_from_data (ps_byte *data, ps_color_format fmt, int width, int height, int pitch) |
Create a new image using a copy of given address in memory. | |
PEXPORT ps_image *PICAPI | ps_image_create_compatible (const ps_canvas *canvas, int width, int height) |
Create a new image to compatible with an existing canvas. | |
PEXPORT ps_image *PICAPI | ps_image_create_from_canvas (ps_canvas *canvas, const ps_rect *rect) |
Create a new image using part of an existing canvas in same pixel buffer. | |
PEXPORT ps_image *PICAPI | ps_image_create_from_image (ps_image *img, const ps_rect *rect) |
Create a new image using part of an existing ps_image object in same pixel buffer. | |
PEXPORT ps_image *PICAPI | ps_image_ref (ps_image *img) |
Increases the reference count of the image by 1. | |
PEXPORT void PICAPI | ps_image_unref (ps_image *img) |
Decrements the reference count for the image object. If the reference count on the image falls to 0, the image is freed. | |
PEXPORT void PICAPI | ps_image_set_allow_transparent (ps_image *img, ps_bool allow) |
Set whether the image allowed be transparent, False is default. | |
PEXPORT void PICAPI | ps_image_set_transparent_color (ps_image *img, const ps_color *color) |
Set the transparent color for the image. | |
PEXPORT ps_bool PICAPI | ps_image_get_size (const ps_image *img, ps_size *rsize) |
Return the size of the image. | |
PEXPORT ps_color_format PICAPI | ps_image_get_format (const ps_image *img) |
Return the pixel format of the image. |
ps_image * ps_image_create | ( | ps_color_format | fmt, |
int | width, | ||
int | height | ||
) |
Create a new image using the given parameters.
fmt | The Pixel format to use for the image. |
width | The width, in pixels, of the required image. |
height | The height, in pixels, of the required image. |
ps_image * ps_image_create_compatible | ( | const ps_canvas * | canvas, |
int | width, | ||
int | height | ||
) |
Create a new image to compatible with an existing canvas.
canvas | A pointer to an existing canvas. |
width | The width, in pixels, of the required canvas. If it is not more than zero, the width will be equal to the width of the reference canvas. |
height | The height, in pixels, of the required canvas. If it is not more than zero, the height will be equal to the height of the reference canvas. |
ps_image * ps_image_create_from_canvas | ( | ps_canvas * | canvas, |
const ps_rect * | rect | ||
) |
Create a new image using part of an existing canvas in same pixel buffer.
canvas | A pointer to an existing canvas. |
rect | The rectangle area of the image from the ps_canvas. If it is NULL, the image's width and height will be equal to the parant canvas. |
ps_image * ps_image_create_from_data | ( | ps_byte * | data, |
ps_color_format | fmt, | ||
int | width, | ||
int | height, | ||
int | pitch | ||
) |
Create a new image using a copy of given address in memory.
data | A pointer to the destination in memory where the drawing is to be rendered. The size of this memory block should be at least (pitch * height) bytes. |
fmt | The Pixel format to use for the image. |
width | The width, in pixels, of the required image. |
height | The height, in pixels, of the required image. |
pitch | The number of bytes per row, of the required image. |
ps_image * ps_image_create_from_image | ( | ps_image * | img, |
const ps_rect * | rect | ||
) |
Create a new image using part of an existing ps_image object in same pixel buffer.
img | A pointer to an existing ps_image object. |
rect | The rectangle area of the image from the parent image. If it is NULL, the image's width and height will be equal to parent image object. |
ps_image * ps_image_create_with_data | ( | ps_byte * | data, |
ps_color_format | fmt, | ||
int | width, | ||
int | height, | ||
int | pitch | ||
) |
Create a new image using a given address in memory.
data | A pointer to the destination in memory where the drawing is to be rendered. The size of this memory block should be at least (pitch * height) bytes. |
fmt | The Pixel format to use for the image. |
width | The width, in pixels, of the required image. |
height | The height, in pixels, of the required image. |
pitch | The number of bytes per row, of the required image. |
ps_color_format ps_image_get_format | ( | const ps_image * | img | ) |
Return the pixel format of the image.
img | Pointer to an existing image object. |
ps_bool ps_image_get_size | ( | const ps_image * | img, |
ps_size * | rsize | ||
) |
Return the size of the image.
img | Pointer to an existing image object. |
rsize | Pointer to a buffer to receiving the size. |
ps_image * ps_image_ref | ( | ps_image * | img | ) |
Increases the reference count of the image by 1.
img | Pointer to an existing image object. |
void ps_image_set_allow_transparent | ( | ps_image * | img, |
ps_bool | allow | ||
) |
Set whether the image allowed be transparent, False is default.
img | Pointer to an existing image object. |
allow | Boolean value whether transparent is allowed. |
void ps_image_set_transparent_color | ( | ps_image * | img, |
const ps_color * | color | ||
) |
Set the transparent color for the image.
img | Pointer to an existing image object. |
color | The color for the transparent, NULL for disable. |
void ps_image_unref | ( | ps_image * | img | ) |
Decrements the reference count for the image object. If the reference count on the image falls to 0, the image is freed.
img | Pointer to an existing image object. |