Picasso API  2.2
Typedefs | Enumerations | Functions
Attribute
Drawing

Typedefs

typedef enum _ps_composite ps_composite
 Compositing operations for graphics context.
typedef enum _ps_filter ps_filter
 Graphics quality for rendering an image.
typedef enum _ps_fill_rule ps_fill_rule
 Fill rules for graphics.

Enumerations

enum  _ps_composite {
  COMPOSITE_CLEAR, COMPOSITE_SRC, COMPOSITE_SRC_OVER, COMPOSITE_SRC_IN,
  COMPOSITE_SRC_OUT, COMPOSITE_SRC_ATOP, COMPOSITE_DST, COMPOSITE_DST_OVER,
  COMPOSITE_DST_IN, COMPOSITE_DST_OUT, COMPOSITE_DST_ATOP, COMPOSITE_XOR,
  COMPOSITE_DARKEN, COMPOSITE_LIGHTEN, COMPOSITE_OVERLAY, COMPOSITE_SCREEN,
  COMPOSITE_MULTIPLY, COMPOSITE_PLUS, COMPOSITE_MINUS, COMPOSITE_EXCLUSION,
  COMPOSITE_DIFFERENCE, COMPOSITE_SOFTLIGHT, COMPOSITE_HARDLIGHT, COMPOSITE_BURN,
  COMPOSITE_DODGE, COMPOSITE_CONTRAST, COMPOSITE_INVERT, COMPOSITE_INVERT_BLEND,
  COMPOSITE_HUE, COMPOSITE_SATURATION, COMPOSITE_COLOR, COMPOSITE_LUMINOSITY,
  COMPOSITE_ERROR
}
 Compositing operations for graphics context. More...
enum  _ps_filter { FILTER_NEAREST, FILTER_BILINEAR, FILTER_GAUSSIAN, FILTER_UNKNOWN }
 Graphics quality for rendering an image. More...
enum  _ps_fill_rule { FILL_RULE_WINDING, FILL_RULE_EVEN_ODD, FILL_RULE_ERROR }
 Fill rules for graphics. More...

Functions

PEXPORT ps_composite PICAPI ps_set_composite_operator (ps_context *ctx, ps_composite composite)
 Set composites opertaions for graphics context.
PEXPORT ps_filter PICAPI ps_set_filter (ps_context *ctx, ps_filter filter)
 Set interpolation filter for graphic context.
PEXPORT ps_fill_rule PICAPI ps_set_fill_rule (ps_context *ctx, ps_fill_rule rule)
 Set fill rule for graphic context.
PEXPORT float PICAPI ps_set_alpha (ps_context *ctx, float alpha)
 Set the opacity level for objects drawn in graphic context.
PEXPORT float PICAPI ps_set_gamma (ps_context *ctx, float gamma)
 Set the gamma value for the graphic context.
PEXPORT void PICAPI ps_set_antialias (ps_context *ctx, ps_bool antialias)
 Set whether the Anti-aliasing should be turn on.
PEXPORT float PICAPI ps_set_blur (ps_context *ctx, float blur)
 Set the blur level for the graphic context.

Enumeration Type Documentation

Compositing operations for graphics context.

Enumerator:
COMPOSITE_CLEAR 

Clear operation.

COMPOSITE_SRC 

Source operation.

COMPOSITE_SRC_OVER 

Source over operation. (Default)

COMPOSITE_SRC_IN 

Source in operation.

COMPOSITE_SRC_OUT 

Source out operation.

COMPOSITE_SRC_ATOP 

Source atop operation.

COMPOSITE_DST 

Destination operation.

COMPOSITE_DST_OVER 

Destination over operation.

COMPOSITE_DST_IN 

Destination in operation.

COMPOSITE_DST_OUT 

Destination out operation.

COMPOSITE_DST_ATOP 

Destination atop operation.

COMPOSITE_XOR 

Xor operation.

COMPOSITE_DARKEN 

Source darker operation.

COMPOSITE_LIGHTEN 

Source lighter operation.

COMPOSITE_OVERLAY 

Overlay operation.

COMPOSITE_SCREEN 

Screen operation.

COMPOSITE_MULTIPLY 

Multiply operation.

COMPOSITE_PLUS 

Plus operation.

COMPOSITE_MINUS 

Minus operation.

COMPOSITE_EXCLUSION 

Exclusion operation.

COMPOSITE_DIFFERENCE 

Difference operation.

COMPOSITE_SOFTLIGHT 

Softlight operation.

COMPOSITE_HARDLIGHT 

Hardlight operation.

COMPOSITE_BURN 

Burn operation.

COMPOSITE_DODGE 

Dodge operation.

COMPOSITE_CONTRAST 

Contrast operation.

COMPOSITE_INVERT 

Invert operation.

COMPOSITE_INVERT_BLEND 

Invert blend operation.

COMPOSITE_HUE 

Hue operation.

COMPOSITE_SATURATION 

Saturation operation.

COMPOSITE_COLOR 

Color operation.

COMPOSITE_LUMINOSITY 

Luminosity operation.

COMPOSITE_ERROR 

Error value.

Definition at line 1536 of file picasso.h.

Fill rules for graphics.

Enumerator:
FILL_RULE_WINDING 

Nonzero winding fill rule. (Default)

FILL_RULE_EVEN_ODD 

Even-odd fill rule.

FILL_RULE_ERROR 

Error value.

Definition at line 1662 of file picasso.h.

enum _ps_filter

Graphics quality for rendering an image.

Enumerator:
FILTER_NEAREST 

No interpolation filter.

FILTER_BILINEAR 

Bilinear interpolation filter. (Default)

FILTER_GAUSSIAN 

Gaussian interpolation filter.

FILTER_UNKNOWN 

Error value.

Definition at line 1624 of file picasso.h.


Function Documentation

float ps_set_alpha ( ps_context ctx,
float  alpha 
)

Set the opacity level for objects drawn in graphic context.

Parameters:
ctxPointer to an existing context object.
alphaA value that specifies the opacity level from transparent to opaque(0 ~ 1). Default level is opaque (1).
Returns:
If the function succeeds, the return value is the old level. If the function fails, the return value is 0.
Note:
To get extended error information, call ps_last_status.
See also:
ps_set_gamma, ps_set_blur, ps_set_antialias
void ps_set_antialias ( ps_context ctx,
ps_bool  antialias 
)

Set whether the Anti-aliasing should be turn on.

Parameters:
ctxPointer to an existing context object.
antialiasBoolean value whether the anti-aliasing is turn on. (True default)
See also:
ps_set_alpha, ps_set_blur, ps_set_gamma
float ps_set_blur ( ps_context ctx,
float  blur 
)

Set the blur level for the graphic context.

Parameters:
ctxPointer to an existing context object.
blurA value that specifies the blur level (0 ~ 1). Default value is none blur (0).
Returns:
If the function succeeds, the return value is the old level. If the function fails, the return value is 0.
Note:
To get extended error information, call ps_last_status.
See also:
ps_set_alpha, ps_set_gamma, ps_set_antialias

Set composites opertaions for graphics context.

Parameters:
ctxPointer to an existing context object.
compositeThe Composite operation to be set.
Returns:
If the function succeeds, the return value is the old operation. If the function fails, the return value is COMPOSITE_ERROR.
Note:
To get extended error information, call ps_last_status.
See also:
ps_set_filter, ps_set_fill_rule

Set fill rule for graphic context.

Parameters:
ctxPointer to an existing context object.
ruleThe fill rule to be set.
Returns:
If the function succeeds, the return value is the old rule. If the function fails, the return value is FILL_RULE_ERROR.
Note:
To get extended error information, call ps_last_status.
See also:
ps_set_composite_operator, ps_set_filter
ps_filter ps_set_filter ( ps_context ctx,
ps_filter  filter 
)

Set interpolation filter for graphic context.

Parameters:
ctxPointer to an existing context object.
filterThe interpolation filter to be set.
Returns:
If the function succeeds, the return value is the old filter. If the function fails, the return value is FILTER_UNKNOWN.
Note:
To get extended error information, call ps_last_status.
See also:
ps_set_composite_operator, ps_set_fill_rule
float ps_set_gamma ( ps_context ctx,
float  gamma 
)

Set the gamma value for the graphic context.

Parameters:
ctxPointer to an existing context object.
gammaA value that specifies the gamma (0 ~ 3). Default value is 1.
Returns:
If the function succeeds, the return value is the old one. If the function fails, the return value is 0.
Note:
To get extended error information, call ps_last_status.
See also:
ps_set_alpha, ps_set_blur, ps_set_antialias