Picasso API  2.8
Typedefs | Enumerations | Functions

Typedefs

typedef enum _ps_wrap_type ps_wrap_type
 Fill type of pattern.
 

Enumerations

enum  _ps_wrap_type { WRAP_TYPE_REPEAT, WRAP_TYPE_REFLECT }
 Fill type of pattern. More...
 

Functions

PEXPORT ps_pattern *PICAPI ps_pattern_create_image (const ps_image *img, ps_wrap_type x_wrap, ps_wrap_type y_wrap, const ps_matrix *transform)
 Create a new pattern with an existing image. More...
 
PEXPORT void PICAPI ps_pattern_transform (ps_pattern *pattern, const ps_matrix *matrix)
 Transform the pattern object. More...
 
PEXPORT ps_pattern *PICAPI ps_pattern_ref (ps_pattern *pattern)
 Increases the reference count of the pattern by 1. More...
 
PEXPORT void PICAPI ps_pattern_unref (ps_pattern *pattern)
 Decrements the reference count for the pattern object. If the reference count on the pattern falls to 0, the pattern is freed. More...
 

Detailed Description

Enumeration Type Documentation

◆ _ps_wrap_type

Fill type of pattern.

Enumerator
WRAP_TYPE_REPEAT 

Wrap repeat, the pattern is repeated.

WRAP_TYPE_REFLECT 

Wrap reflect the pattern is reflected.

Definition at line 864 of file picasso.h.

Function Documentation

◆ ps_pattern_create_image()

ps_pattern * ps_pattern_create_image ( const ps_image img,
ps_wrap_type  x_wrap,
ps_wrap_type  y_wrap,
const ps_matrix transform 
)

Create a new pattern with an existing image.

Parameters
imgAn existing image object which will be a tiled of pattern object.
x_wrapThe horizontal wrap type, of the required pattern.
y_wrapThe vertical wrap type, of the required pattern.
transformA matrix that represents a transform for every tiled. If no transform needed, pass NULL.
Returns
If the function succeeds, the return value is the pointer to a new pattern object. If the function fails, the return value is NULL.
Note
To get extended error information, call ps_last_status.
See also
ps_pattern_ref, ps_pattern_unref

◆ ps_pattern_ref()

ps_pattern * ps_pattern_ref ( ps_pattern pattern)

Increases the reference count of the pattern by 1.

Parameters
patternPointer to an existing pattern object.
Returns
If the function succeeds, the return value is the pointer to the pattern object. If the function fails, the return value is NULL.
Note
To get extended error information, call ps_last_status.
See also
ps_pattern_create_image, ps_pattern_unref

◆ ps_pattern_transform()

void ps_pattern_transform ( ps_pattern pattern,
const ps_matrix matrix 
)

Transform the pattern object.

Parameters
patternPointer to an existing pattern object.
matrixPointer to an existing matrix object.
See also
ps_pattern_create_image, ps_pattern_ref, ps_pattern_unref

◆ ps_pattern_unref()

void ps_pattern_unref ( ps_pattern pattern)

Decrements the reference count for the pattern object. If the reference count on the pattern falls to 0, the pattern is freed.

Parameters
patternPointer to an existing pattern object.
See also
ps_pattern_create_image, ps_pattern_ref