Picasso API  2.8
picasso.h
Go to the documentation of this file.
1 
19 #ifndef _PICASSO_H_
20 #define _PICASSO_H_
21 
22 #ifdef DLL_EXPORT
23  #if defined(WIN32) || defined(WINCE)
24  #ifdef EXPORT
25  #define PICAPI
26  #define PEXPORT __declspec(dllexport)
27  #else
28  #define PICAPI
29  #define PEXPORT __declspec(dllimport)
30  #endif
31  #else
32  #define PICAPI
33  #if (defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) || (defined(__clang__))
34  #define PEXPORT __attribute__((visibility("default")))
35  #else
36  #define PEXPORT
37  #endif
38  #endif
39 #else
40  #define PICAPI
41  #define PEXPORT
42 #endif
43 
44 #include <stdint.h>
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
49 
60 typedef int32_t ps_bool;
61 
67 #define True 1
68 
74 #define False 0
75 
81 typedef uint16_t ps_uchar16;
82 
88 typedef int16_t ps_schar16;
89 
95 typedef uint8_t ps_byte;
96 
109 typedef struct _ps_context ps_context;
110 
116 typedef struct _ps_canvas ps_canvas;
117 
123 typedef struct _ps_image ps_image;
124 
130 typedef struct _ps_pattern ps_pattern;
131 
137 typedef struct _ps_gradient ps_gradient;
138 
144 typedef struct _ps_matrix ps_matrix;
145 
151 typedef struct _ps_path ps_path;
152 
158 typedef struct _ps_mask ps_mask;
159 
165 typedef struct _ps_font ps_font;
166 
170 typedef struct _ps_glyph {
172  void* glyph;
173 } ps_glyph;
174 
178 typedef struct _ps_size {
180  float w;
182  float h;
183 } ps_size;
184 
188 typedef struct _ps_rect {
190  float x;
192  float y;
194  float w;
196  float h;
197 } ps_rect;
198 
202 typedef struct _ps_point {
204  float x;
206  float y;
207 } ps_point;
208 
212 typedef struct _ps_color {
214  float r;
216  float g;
218  float b;
220  float a;
221 } ps_color;
222 
235 PEXPORT int32_t PICAPI ps_version(void);
236 
247 PEXPORT ps_bool PICAPI ps_initialize(void);
248 
257 PEXPORT void PICAPI ps_shutdown(void);
258 
262 typedef enum _ps_status {
291 } ps_status;
292 
298 PEXPORT ps_status PICAPI ps_last_status(void);
325 PEXPORT ps_context* PICAPI ps_context_create(ps_canvas* canvas, ps_context* shared_context);
326 
340 PEXPORT ps_context* PICAPI ps_context_ref(ps_context* ctx);
341 
351 PEXPORT void PICAPI ps_context_unref(ps_context* ctx);
352 
367 PEXPORT ps_canvas* PICAPI ps_context_set_canvas(ps_context* ctx, ps_canvas* canvas);
368 
382 PEXPORT ps_canvas* PICAPI ps_context_get_canvas(ps_context* ctx);
383 
394 typedef enum _ps_color_format {
436 
453 PEXPORT ps_canvas* PICAPI ps_canvas_create(ps_color_format fmt, int32_t width, int32_t height);
454 
475  int32_t width, int32_t height, int32_t pitch);
476 
495 PEXPORT ps_canvas* PICAPI ps_canvas_create_compatible(const ps_canvas* canvas,
496  int32_t width, int32_t height);
497 
514 PEXPORT ps_canvas* PICAPI ps_canvas_create_from_canvas(ps_canvas* canvas, const ps_rect* rect);
515 
532 PEXPORT ps_canvas* PICAPI ps_canvas_create_from_image(ps_image* img, const ps_rect* rect);
533 
550 PEXPORT ps_canvas* PICAPI ps_canvas_create_from_mask(ps_mask* mask, const ps_rect* rect);
551 
574 PEXPORT ps_canvas* PICAPI ps_canvas_replace_data(ps_canvas* canvas, ps_byte* data,
575  ps_color_format fmt, int32_t width, int32_t height, int32_t pitch);
576 
591 PEXPORT ps_canvas* PICAPI ps_canvas_ref(ps_canvas* canvas);
592 
603 PEXPORT void PICAPI ps_canvas_unref(ps_canvas* canvas);
604 
618 PEXPORT ps_bool PICAPI ps_canvas_get_size(const ps_canvas* canvas, ps_size* rsize);
619 
633 PEXPORT ps_color_format PICAPI ps_canvas_get_format(const ps_canvas* canvas);
634 
644 PEXPORT void PICAPI ps_canvas_set_mask(ps_canvas* canvas, const ps_mask* mask);
645 
654 PEXPORT void PICAPI ps_canvas_reset_mask(ps_canvas* canvas);
655 
671 PEXPORT void PICAPI ps_canvas_bitblt(ps_canvas* src, const ps_rect* rect,
672  ps_canvas* dst, const ps_point* location);
696 PEXPORT ps_image* PICAPI ps_image_create(ps_color_format fmt, int32_t width, int32_t height);
697 
717 PEXPORT ps_image* PICAPI ps_image_create_with_data(ps_byte* data, ps_color_format fmt,
718  int32_t width, int32_t height, int32_t pitch);
738 PEXPORT ps_image* PICAPI ps_image_create_from_data(ps_byte* data, ps_color_format fmt,
739  int32_t width, int32_t height, int32_t pitch);
758 PEXPORT ps_image* PICAPI ps_image_create_compatible(const ps_canvas* canvas, int32_t width, int32_t height);
759 
776 PEXPORT ps_image* PICAPI ps_image_create_from_canvas(ps_canvas* canvas, const ps_rect* rect);
777 
794 PEXPORT ps_image* PICAPI ps_image_create_from_image(ps_image* img, const ps_rect* rect);
795 
810 PEXPORT ps_image* PICAPI ps_image_ref(ps_image* img);
811 
822 PEXPORT void PICAPI ps_image_unref(ps_image* img);
823 
833 PEXPORT void PICAPI ps_image_set_allow_transparent(ps_image* img, ps_bool allow);
834 
844 PEXPORT void PICAPI ps_image_set_transparent_color(ps_image* img, const ps_color* color);
845 
859 PEXPORT ps_bool PICAPI ps_image_get_size(const ps_image* img, ps_size* rsize);
860 
874 PEXPORT ps_color_format PICAPI ps_image_get_format(const ps_image* img);
875 
886 typedef enum _ps_wrap_type {
895 } ps_wrap_type;
896 
914 PEXPORT ps_pattern* PICAPI ps_pattern_create_image(const ps_image* img, ps_wrap_type x_wrap,
915  ps_wrap_type y_wrap, const ps_matrix* transform);
916 
926 PEXPORT void PICAPI ps_pattern_transform(ps_pattern* pattern, const ps_matrix* matrix);
927 
941 PEXPORT ps_pattern* PICAPI ps_pattern_ref(ps_pattern* pattern);
942 
952 PEXPORT void PICAPI ps_pattern_unref(ps_pattern* pattern);
953 
964 typedef enum _ps_gradient_spread {
978 
996  const ps_point* start, const ps_point* end);
997 
1017  const ps_point* start, float sradius, const ps_point* end, float eradius);
1018 
1037  const ps_point* origin, float sangle);
1038 
1049 PEXPORT void PICAPI ps_gradient_transform(ps_gradient* gradient, const ps_matrix* matrix);
1050 
1065 PEXPORT ps_gradient* PICAPI ps_gradient_ref(ps_gradient* gradient);
1066 
1077 PEXPORT void PICAPI ps_gradient_unref(ps_gradient* gradient);
1078 
1089 PEXPORT void PICAPI ps_gradient_add_color_stop(ps_gradient* gradient,
1090  float offset, const ps_color* color);
1091 
1100 PEXPORT void PICAPI ps_gradient_clear_color_stops(ps_gradient* gradient);
1101 
1123 PEXPORT ps_mask* PICAPI ps_mask_create(int32_t width, int32_t height);
1124 
1142 PEXPORT ps_mask* PICAPI ps_mask_create_with_data(ps_byte* data, int32_t width, int32_t height);
1143 
1157 PEXPORT ps_mask* PICAPI ps_mask_ref(ps_mask* mask);
1158 
1168 PEXPORT void PICAPI ps_mask_unref(ps_mask* mask);
1169 
1180 PEXPORT void PICAPI ps_mask_add_color_filter(ps_mask* mask, const ps_color* color);
1181 
1190 PEXPORT void PICAPI ps_mask_clear_color_filters(ps_mask* mask);
1191 
1213 PEXPORT void PICAPI ps_set_source_color(ps_context* ctx, const ps_color* color);
1214 
1224 PEXPORT void PICAPI ps_set_source_image(ps_context* ctx, const ps_image* image);
1225 
1235 PEXPORT void PICAPI ps_set_source_pattern(ps_context* ctx, const ps_pattern* pattern);
1236 
1246 PEXPORT void PICAPI ps_set_source_gradient(ps_context* ctx, const ps_gradient* gradient);
1247 
1257 PEXPORT void PICAPI ps_set_source_canvas(ps_context* ctx, const ps_canvas* canvas);
1258 
1269 typedef enum _ps_line_cap {
1282 } ps_line_cap;
1283 
1294 PEXPORT void PICAPI ps_set_line_cap(ps_context* ctx, ps_line_cap line_cap);
1295 
1299 typedef enum _ps_line_join {
1320 } ps_line_join;
1321 
1332 PEXPORT void PICAPI ps_set_line_join(ps_context* ctx, ps_line_join line_join);
1333 
1337 typedef enum _ps_line_inner_join {
1355 
1366 PEXPORT void PICAPI ps_set_line_inner_join(ps_context* ctx, ps_line_inner_join line_inner_join);
1367 
1384 PEXPORT float PICAPI ps_set_line_width(ps_context* ctx, float width);
1385 
1402 PEXPORT float PICAPI ps_set_miter_limit(ps_context* ctx, float limit);
1403 
1415 PEXPORT void PICAPI ps_set_stroke_color(ps_context* ctx, const ps_color* color);
1416 
1428 PEXPORT void PICAPI ps_set_stroke_image(ps_context* ctx, const ps_image* image);
1429 
1441 PEXPORT void PICAPI ps_set_stroke_pattern(ps_context* ctx, const ps_pattern* pattern);
1442 
1454 PEXPORT void PICAPI ps_set_stroke_gradient(ps_context* ctx, const ps_gradient* gradient);
1455 
1467 PEXPORT void PICAPI ps_set_stroke_canvas(ps_context* ctx, const ps_canvas* canvas);
1468 
1482 PEXPORT void PICAPI ps_set_line_dash(ps_context* ctx, float start,
1483  const float* dashes, uint32_t num_dashes);
1484 
1494 PEXPORT void PICAPI ps_reset_line_dash(ps_context* ctx);
1495 
1514 PEXPORT void PICAPI ps_set_shadow(ps_context* ctx, float x_offset, float y_offset, float blur);
1515 
1525 PEXPORT void PICAPI ps_set_shadow_color(ps_context* ctx, const ps_color* color);
1526 
1535 PEXPORT void PICAPI ps_reset_shadow(ps_context* ctx);
1536 
1546 typedef enum _ps_composite {
1613 } ps_composite;
1614 
1629 PEXPORT ps_composite PICAPI ps_set_composite_operator(ps_context* ctx, ps_composite composite);
1630 
1634 typedef enum _ps_filter {
1659 } ps_filter;
1660 
1675 PEXPORT ps_filter PICAPI ps_set_filter(ps_context* ctx, ps_filter filter);
1676 
1680 typedef enum _ps_fill_rule {
1693 } ps_fill_rule;
1694 
1709 PEXPORT ps_fill_rule PICAPI ps_set_fill_rule(ps_context* ctx, ps_fill_rule rule);
1710 
1726 PEXPORT float PICAPI ps_set_alpha(ps_context* ctx, float alpha);
1727 
1743 PEXPORT float PICAPI ps_set_gamma(ps_context* ctx, float gamma);
1744 
1754 PEXPORT void PICAPI ps_set_antialias(ps_context* ctx, ps_bool antialias);
1755 
1771 PEXPORT float PICAPI ps_set_blur(ps_context* ctx, float blur);
1772 
1789 PEXPORT void PICAPI ps_stroke(ps_context* ctx);
1790 
1800 PEXPORT void PICAPI ps_fill(ps_context* ctx);
1801 
1811 PEXPORT void PICAPI ps_paint(ps_context* ctx);
1812 
1821 PEXPORT void PICAPI ps_clear(ps_context* ctx);
1822 
1839 PEXPORT void PICAPI ps_clip(ps_context* ctx);
1840 
1851 PEXPORT void PICAPI ps_clip_path(ps_context* ctx, const ps_path* path, ps_fill_rule rule);
1852 
1862 PEXPORT void PICAPI ps_clip_rect(ps_context* ctx, const ps_rect* rect);
1863 
1876 PEXPORT void PICAPI ps_scissor_rect(ps_context* ctx, const ps_rect* rect);
1877 
1888 PEXPORT void PICAPI ps_clip_rects(ps_context* ctx, const ps_rect* rects, uint32_t num_rects);
1889 
1898 PEXPORT void PICAPI ps_reset_clip(ps_context* ctx);
1899 
1934 PEXPORT void PICAPI ps_save(ps_context* ctx);
1935 
1944 PEXPORT void PICAPI ps_restore(ps_context* ctx);
1945 
1957 typedef enum _ps_charset {
1966 } ps_charset;
1967 
1971 typedef enum _ps_font_weight {
1988 } ps_font_weight;
1989 
2007 PEXPORT ps_font* PICAPI ps_font_create(const char* name, ps_charset charset,
2008  float size, int32_t weight, ps_bool italic);
2009 
2023 PEXPORT ps_font* PICAPI ps_font_create_copy(const ps_font* font);
2024 
2038 PEXPORT ps_font* PICAPI ps_font_ref(ps_font* font);
2039 
2049 PEXPORT void PICAPI ps_font_unref(ps_font* font);
2050 
2061 PEXPORT void PICAPI ps_font_set_size(ps_font* font, float size);
2062 
2073 PEXPORT void PICAPI ps_font_set_weight(ps_font* font, int32_t weight);
2074 
2085 PEXPORT void PICAPI ps_font_set_italic(ps_font* font, ps_bool italic);
2086 
2097 PEXPORT void PICAPI ps_font_set_charset(ps_font* font, ps_charset charset);
2098 
2109 PEXPORT void PICAPI ps_font_set_hint(ps_font* font, ps_bool hint);
2110 
2121 PEXPORT void PICAPI ps_font_set_flip(ps_font* font, ps_bool flip);
2122 
2126 typedef struct _ps_font_info {
2130  float size;
2134  float ascent;
2138  float descent;
2142  float leading;
2146  uint32_t unitsEM;
2147 } ps_font_info;
2148 
2160 PEXPORT ps_bool PICAPI ps_get_font_info(ps_context* ctx, ps_font_info* info);
2161 
2176 PEXPORT ps_font* PICAPI ps_set_font(ps_context* ctx, const ps_font* font);
2177 
2188 typedef enum _ps_text_type {
2201 } ps_text_type;
2202 
2218 PEXPORT ps_bool PICAPI ps_get_text_extent(ps_context* ctx, const void* text, uint32_t length, ps_size* rsize);
2219 
2230 PEXPORT void PICAPI ps_set_text_color(ps_context* ctx, const ps_color* color);
2231 
2242 PEXPORT void PICAPI ps_set_text_stroke_color(ps_context* ctx, const ps_color* color);
2243 
2256 PEXPORT void PICAPI ps_text_transform(ps_context* ctx, const ps_matrix* matrix);
2257 
2270 PEXPORT void PICAPI ps_set_text_matrix(ps_context* ctx, const ps_matrix* matrix);
2271 
2282 PEXPORT void PICAPI ps_set_text_render_type(ps_context* ctx, ps_text_type type);
2283 
2294 PEXPORT void PICAPI ps_set_text_antialias(ps_context* ctx, ps_bool antialias);
2295 
2306 PEXPORT void PICAPI ps_set_text_kerning(ps_context* ctx, ps_bool kerning);
2307 
2320 PEXPORT void PICAPI ps_text_out_length(ps_context* ctx, float x, float y,
2321  const char* text, uint32_t length);
2322 
2335 PEXPORT void PICAPI ps_wide_text_out_length(ps_context* ctx, float x, float y,
2336  const ps_uchar16* text, uint32_t length);
2340 typedef enum _ps_draw_text_type {
2354 
2358 typedef enum _ps_text_align {
2379 } ps_text_align;
2380 
2395 PEXPORT void PICAPI ps_draw_text(ps_context* ctx, const ps_rect* area, const void* text,
2396  uint32_t length, ps_draw_text_type type, ps_text_align align);
2397 
2410 PEXPORT ps_bool PICAPI ps_get_glyph(ps_context* ctx, int32_t ch, ps_glyph* glyph);
2411 
2424 PEXPORT void PICAPI ps_show_glyphs(ps_context* ctx, float x, float y,
2425  ps_glyph* glyphs, uint32_t length);
2426 
2439 PEXPORT ps_bool PICAPI ps_get_path_from_glyph(ps_context* ctx,
2440  const ps_glyph* glyph, ps_path* path);
2441 
2455 PEXPORT ps_bool PICAPI ps_glyph_get_extent(const ps_glyph* glyph, ps_size* rsize);
2456 
2474 PEXPORT void PICAPI ps_translate(ps_context* ctx, float tx, float ty);
2475 
2486 PEXPORT void PICAPI ps_scale(ps_context* ctx, float sx, float sy);
2487 
2498 PEXPORT void PICAPI ps_shear(ps_context* ctx, float shx, float shy);
2499 
2509 PEXPORT void PICAPI ps_rotate(ps_context* ctx, float angle);
2510 
2519 PEXPORT void PICAPI ps_identity(ps_context* ctx);
2520 
2530 PEXPORT void PICAPI ps_transform(ps_context* ctx, const ps_matrix* matrix);
2531 
2541 PEXPORT void PICAPI ps_set_matrix(ps_context* ctx, const ps_matrix* matrix);
2542 
2554 PEXPORT ps_bool PICAPI ps_get_matrix(ps_context* ctx, ps_matrix* matrix);
2555 
2565 PEXPORT void PICAPI ps_world_to_viewport(ps_context* ctx, ps_point* point);
2566 
2576 PEXPORT void PICAPI ps_viewport_to_world(ps_context* ctx, ps_point* point);
2577 
2596 PEXPORT ps_matrix* PICAPI ps_matrix_create(void);
2597 
2617 PEXPORT ps_matrix* PICAPI ps_matrix_create_init(float sx, float shy, float shx,
2618  float sy, float tx, float ty);
2619 
2633 PEXPORT ps_matrix* PICAPI ps_matrix_create_copy(const ps_matrix* matrix);
2634 
2648 PEXPORT ps_matrix* PICAPI ps_matrix_ref(ps_matrix* matrix);
2649 
2659 PEXPORT void PICAPI ps_matrix_unref(ps_matrix* matrix);
2660 
2676 PEXPORT void PICAPI ps_matrix_init(ps_matrix* matrix, float sx, float shy,
2677  float shx, float sy, float tx, float ty);
2678 
2689 PEXPORT void PICAPI ps_matrix_translate(ps_matrix* matrix, float tx, float ty);
2690 
2701 PEXPORT void PICAPI ps_matrix_scale(ps_matrix* matrix, float sx, float sy);
2702 
2712 PEXPORT void PICAPI ps_matrix_rotate(ps_matrix* matrix, float angle);
2713 
2724 PEXPORT void PICAPI ps_matrix_shear(ps_matrix* matrix, float shx, float shy);
2725 
2734 PEXPORT void PICAPI ps_matrix_invert(ps_matrix* matrix);
2735 
2744 PEXPORT void PICAPI ps_matrix_identity(ps_matrix* matrix);
2745 
2754 PEXPORT void PICAPI ps_matrix_flip_x(ps_matrix* matrix);
2755 
2764 PEXPORT void PICAPI ps_matrix_flip_y(ps_matrix* matrix);
2765 
2776 PEXPORT void PICAPI ps_matrix_multiply(ps_matrix* result, const ps_matrix* a, const ps_matrix* b);
2777 
2788 PEXPORT ps_bool PICAPI ps_matrix_is_identity(const ps_matrix* matrix);
2789 
2801 PEXPORT ps_bool PICAPI ps_matrix_is_equal(const ps_matrix* a, const ps_matrix* b);
2802 
2813 PEXPORT float PICAPI ps_matrix_get_determinant(const ps_matrix* matrix);
2814 
2825 PEXPORT void PICAPI ps_matrix_set_translate_factor(ps_matrix* matrix, float tx, float ty);
2826 
2839 PEXPORT ps_bool PICAPI ps_matrix_get_translate_factor(ps_matrix* matrix, float* tx, float* ty);
2840 
2851 PEXPORT void PICAPI ps_matrix_set_scale_factor(ps_matrix* matrix, float sx, float sy);
2852 
2865 PEXPORT ps_bool PICAPI ps_matrix_get_scale_factor(ps_matrix* matrix, float* sx, float* sy);
2866 
2877 PEXPORT void PICAPI ps_matrix_set_shear_factor(ps_matrix* matrix, float shx, float shy);
2878 
2891 PEXPORT ps_bool PICAPI ps_matrix_get_shear_factor(ps_matrix* matrix, float* shx, float* shy);
2892 
2902 PEXPORT void PICAPI ps_matrix_transform_point(const ps_matrix* matrix, ps_point* point);
2903 
2913 PEXPORT void PICAPI ps_matrix_transform_rect(const ps_matrix* matrix, ps_rect* rect);
2914 
2924 PEXPORT void PICAPI ps_matrix_transform_path(const ps_matrix* matrix, ps_path* path);
2925 
2941 PEXPORT void PICAPI ps_new_path(ps_context* ctx);
2942 
2951 PEXPORT void PICAPI ps_new_sub_path(ps_context* ctx);
2952 
2962 PEXPORT void PICAPI ps_add_sub_path(ps_context* ctx, const ps_path* path);
2963 
2973 PEXPORT void PICAPI ps_set_path(ps_context* ctx, const ps_path* path);
2974 
2986 PEXPORT ps_bool PICAPI ps_get_path(ps_context* ctx, ps_path* path);
2987 
2996 PEXPORT void PICAPI ps_close_path(ps_context* ctx);
2997 
3008 PEXPORT void PICAPI ps_move_to(ps_context* ctx, const ps_point* point);
3009 
3020 PEXPORT void PICAPI ps_line_to(ps_context* ctx, const ps_point* point);
3021 
3035 PEXPORT void PICAPI ps_bezier_curve_to(ps_context* ctx, const ps_point* fcp,
3036  const ps_point* scp, const ps_point* ep);
3037 
3049 PEXPORT void PICAPI ps_quad_curve_to(ps_context* ctx, const ps_point* cp, const ps_point* ep);
3050 
3066 PEXPORT void PICAPI ps_arc(ps_context* ctx, const ps_point* cp, float radius,
3067  float sangle, float eangle, ps_bool clockwise);
3068 
3081 PEXPORT void PICAPI ps_tangent_arc(ps_context* ctx, const ps_rect* rect, float sangle, float sweep);
3082 
3093 PEXPORT void PICAPI ps_rectangle(ps_context* ctx, const ps_rect* rect);
3094 
3114 PEXPORT void PICAPI ps_rounded_rect(ps_context* ctx, const ps_rect* rect, float ltx,
3115  float lty, float rtx, float rty, float lbx, float lby, float rbx, float rby);
3116 
3127 PEXPORT void PICAPI ps_ellipse(ps_context* ctx, const ps_rect* rect);
3128 
3147 PEXPORT ps_path* PICAPI ps_path_create(void);
3148 
3162 PEXPORT ps_path* PICAPI ps_path_create_copy(const ps_path* path);
3163 
3177 PEXPORT ps_path* PICAPI ps_path_ref(ps_path* path);
3178 
3188 PEXPORT void PICAPI ps_path_unref(ps_path* path);
3189 
3200 PEXPORT void PICAPI ps_path_move_to(ps_path* path, const ps_point* point);
3201 
3212 PEXPORT void PICAPI ps_path_line_to(ps_path* path, const ps_point* point);
3213 
3226 PEXPORT void PICAPI ps_path_tangent_arc_to(ps_path* path, float radius,
3227  const ps_point* tp, const ps_point* ep);
3228 
3245 PEXPORT void PICAPI ps_path_arc_to(ps_path* path, float radiusX, float radiusY, float angle,
3246  ps_bool large_arc, ps_bool clockwise, const ps_point* ep);
3247 
3260 PEXPORT void PICAPI ps_path_bezier_to(ps_path* path, const ps_point* fcp,
3261  const ps_point* scp, const ps_point* ep);
3262 
3274 PEXPORT void PICAPI ps_path_quad_to(ps_path* path, const ps_point* cp, const ps_point* ep);
3275 
3284 PEXPORT void PICAPI ps_path_sub_close(ps_path* path);
3285 
3299 PEXPORT float PICAPI ps_path_get_length(const ps_path* path);
3300 
3309 PEXPORT void PICAPI ps_path_clear(ps_path* path);
3310 
3319 PEXPORT ps_bool PICAPI ps_path_is_empty(const ps_path* path);
3320 
3334 PEXPORT uint32_t PICAPI ps_path_get_vertex_count(const ps_path* path);
3335 
3339 typedef enum _ps_path_cmd {
3364 } ps_path_cmd;
3365 
3381 PEXPORT ps_path_cmd PICAPI ps_path_get_vertex(const ps_path* path,
3382  uint32_t index, ps_point* point);
3383 
3397 PEXPORT ps_bool PICAPI ps_path_bounding_rect(const ps_path* path, ps_rect* rect);
3398 
3411 PEXPORT ps_bool PICAPI ps_path_contains(const ps_path* path,
3412  const ps_point* point, ps_fill_rule rule);
3413 
3426 PEXPORT ps_bool PICAPI ps_path_stroke_contains(const ps_path* path,
3427  const ps_point* point, float width);
3428 
3439 PEXPORT void PICAPI ps_path_add_line(ps_path* path, const ps_point* p1, const ps_point* p2);
3440 
3455 PEXPORT void PICAPI ps_path_add_arc(ps_path* path, const ps_point* cp, float radius,
3456  float sangle, float eangle, ps_bool clockwise);
3457 
3467 PEXPORT void PICAPI ps_path_add_rect(ps_path* path, const ps_rect* rect);
3468 
3478 PEXPORT void PICAPI ps_path_add_ellipse(ps_path* path, const ps_rect* rect);
3479 
3498 PEXPORT void PICAPI ps_path_add_rounded_rect(ps_path* path, const ps_rect* rect, float ltx,
3499  float lty, float rtx, float rty, float lbx, float lby, float rbx, float rby);
3500 
3510 PEXPORT void PICAPI ps_path_add_sub_path(ps_path* path, const ps_path* spath);
3511 
3515 typedef enum _ps_path_op {
3533 
3546 PEXPORT void PICAPI ps_path_clipping(ps_path* result, ps_path_operation op,
3547  const ps_path* a, const ps_path* b);
3548 
3552 #ifdef __cplusplus
3553 }
3554 #endif /* __cplusplus */
3555 
3556 #endif /*_PICASSO_H_*/
COMPOSITE_OVERLAY
@ COMPOSITE_OVERLAY
Definition: picasso.h:1576
_ps_font_info::unitsEM
uint32_t unitsEM
Definition: picasso.h:2146
PATH_OP_INTERSECT
@ PATH_OP_INTERSECT
Definition: picasso.h:3523
_ps_point
A structure that contains a point in a two-dimensional coordinate system.
Definition: picasso.h:202
ps_image_unref
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,...
FONT_WEIGHT_MEDIUM
@ FONT_WEIGHT_MEDIUM
Definition: picasso.h:1979
ps_stroke
PEXPORT void PICAPI ps_stroke(ps_context *ctx)
Stroke the current path according to the line attributes. After called, the current path will be clea...
ps_set_composite_operator
PEXPORT ps_composite PICAPI ps_set_composite_operator(ps_context *ctx, ps_composite composite)
Set composites opertaions for graphics context.
ps_context_get_canvas
PEXPORT ps_canvas *PICAPI ps_context_get_canvas(ps_context *ctx)
Get the canvas from the context.
ps_path_contains
PEXPORT ps_bool PICAPI ps_path_contains(const ps_path *path, const ps_point *point, ps_fill_rule rule)
Check whether a point is contained in the path by fill method.
FILTER_NEAREST
@ FILTER_NEAREST
Definition: picasso.h:1638
ps_line_to
PEXPORT void PICAPI ps_line_to(ps_context *ctx, const ps_point *point)
Add a line to the current path from the current point to given point.
ps_path_get_vertex
PEXPORT ps_path_cmd PICAPI ps_path_get_vertex(const ps_path *path, uint32_t index, ps_point *point)
Get a vertex from the path by index, and return the vertex command.
TEXT_TYPE_SMOOTH
@ TEXT_TYPE_SMOOTH
Definition: picasso.h:2192
ps_close_path
PEXPORT void PICAPI ps_close_path(ps_context *ctx)
Close the current path in the graphic context.
ps_set_source_gradient
PEXPORT void PICAPI ps_set_source_gradient(ps_context *ctx, const ps_gradient *gradient)
Set a gradient to the context, it is used to fill a graphic object.
ps_font_set_flip
PEXPORT void PICAPI ps_font_set_flip(ps_font *font, ps_bool flip)
Set flip for a font object.
ps_path
struct _ps_path ps_path
An opaque type represents a graphic path.
Definition: picasso.h:151
ps_set_filter
PEXPORT ps_filter PICAPI ps_set_filter(ps_context *ctx, ps_filter filter)
Set interpolation filter for graphic context.
COMPOSITE_DST_OVER
@ COMPOSITE_DST_OVER
Definition: picasso.h:1562
ps_context_unref
PEXPORT void PICAPI ps_context_unref(ps_context *ctx)
Decrements the reference count for the context object. If the reference count on the context falls to...
COLOR_FORMAT_BGR
@ COLOR_FORMAT_BGR
Definition: picasso.h:418
ps_image_create_from_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.
ps_text_type
enum _ps_text_type ps_text_type
Text rendering type.
COMPOSITE_EXCLUSION
@ COMPOSITE_EXCLUSION
Definition: picasso.h:1586
ps_fill_rule
enum _ps_fill_rule ps_fill_rule
Fill rules for graphics.
ps_canvas
struct _ps_canvas ps_canvas
An opaque type represents a pixel buffer.
Definition: picasso.h:116
ps_canvas_create_compatible
PEXPORT ps_canvas *PICAPI ps_canvas_create_compatible(const ps_canvas *canvas, int32_t width, int32_t height)
Create a new canvas to compatible with an existing canvas.
ps_image
struct _ps_image ps_image
An opaque type represents an image.
Definition: picasso.h:123
ps_paint
PEXPORT void PICAPI ps_paint(ps_context *ctx)
Fill and stroke the current path according to the source and line attributes. After called,...
ps_path_unref
PEXPORT void PICAPI ps_path_unref(ps_path *path)
Decrements the reference count for the path object. If the reference count on the path falls to 0,...
ps_path_quad_to
PEXPORT void PICAPI ps_path_quad_to(ps_path *path, const ps_point *cp, const ps_point *ep)
Add a quadratic bezier spline to the path from current point to end point.
ps_set_miter_limit
PEXPORT float PICAPI ps_set_miter_limit(ps_context *ctx, float limit)
Set the miter limit for the joins of connected lines in a graphics context.
ps_set_alpha
PEXPORT float PICAPI ps_set_alpha(ps_context *ctx, float alpha)
Set the opacity level for objects drawn in graphic context.
ps_set_line_join
PEXPORT void PICAPI ps_set_line_join(ps_context *ctx, ps_line_join line_join)
Set the style for the joins of connected lines in a graphics context.
_ps_rect::y
float y
Definition: picasso.h:192
ps_charset
enum _ps_charset ps_charset
Charset for a font.
ps_image_set_allow_transparent
PEXPORT void PICAPI ps_image_set_allow_transparent(ps_image *img, ps_bool allow)
Set whether the image allowed be transparent, False is default.
_ps_text_align
_ps_text_align
Text align mode for drawing text.
Definition: picasso.h:2358
STATUS_DEVICE_ERROR
@ STATUS_DEVICE_ERROR
Definition: picasso.h:282
TEXT_ALIGN_TOP
@ TEXT_ALIGN_TOP
Definition: picasso.h:2366
LINE_INNER_JAG
@ LINE_INNER_JAG
Definition: picasso.h:1349
ps_context_set_canvas
PEXPORT ps_canvas *PICAPI ps_context_set_canvas(ps_context *ctx, ps_canvas *canvas)
Set a new canvas into a context, and return the old one.
ps_image_get_size
PEXPORT ps_bool PICAPI ps_image_get_size(const ps_image *img, ps_size *rsize)
Return the size of the image.
ps_set_source_color
PEXPORT void PICAPI ps_set_source_color(ps_context *ctx, const ps_color *color)
Set a Color to the context, it is used to fill a graphic object.
FILTER_BILINEAR
@ FILTER_BILINEAR
Definition: picasso.h:1642
ps_font_create_copy
PEXPORT ps_font *PICAPI ps_font_create_copy(const ps_font *font)
Create a copy from an existing font object.
COMPOSITE_LUMINOSITY
@ COMPOSITE_LUMINOSITY
Definition: picasso.h:1610
_ps_glyph::glyph
void * glyph
Definition: picasso.h:172
PATH_CMD_STOP
@ PATH_CMD_STOP
Definition: picasso.h:3343
_ps_color::a
float a
Definition: picasso.h:220
ps_image_create
PEXPORT ps_image *PICAPI ps_image_create(ps_color_format fmt, int32_t width, int32_t height)
Create a new image using the given parameters.
LINE_INNER_MITER
@ LINE_INNER_MITER
Definition: picasso.h:1341
ps_set_line_inner_join
PEXPORT void PICAPI ps_set_line_inner_join(ps_context *ctx, ps_line_inner_join line_inner_join)
Set the style for the inner joins of connected lines in a graphics context.
_ps_rect::x
float x
Definition: picasso.h:190
ps_reset_line_dash
PEXPORT void PICAPI ps_reset_line_dash(ps_context *ctx)
Clear the dashs from the context, and set to solid.
ps_gradient_clear_color_stops
PEXPORT void PICAPI ps_gradient_clear_color_stops(ps_gradient *gradient)
Clear color stops from gradient's control vector.
_ps_font_info::leading
float leading
Definition: picasso.h:2142
ps_matrix_get_translate_factor
PEXPORT ps_bool PICAPI ps_matrix_get_translate_factor(ps_matrix *matrix, float *tx, float *ty)
Get the translate factors from the matrix.
ps_matrix_transform_point
PEXPORT void PICAPI ps_matrix_transform_point(const ps_matrix *matrix, ps_point *point)
Transform an existing point using the matrix.
ps_mask_ref
PEXPORT ps_mask *PICAPI ps_mask_ref(ps_mask *mask)
Increases the reference count of the mask by 1.
ps_set_path
PEXPORT void PICAPI ps_set_path(ps_context *ctx, const ps_path *path)
Replace the current path in the graphic context.
_ps_composite
_ps_composite
Compositing operations for graphics context.
Definition: picasso.h:1546
ps_clip_path
PEXPORT void PICAPI ps_clip_path(ps_context *ctx, const ps_path *path, ps_fill_rule rule)
Clipping specified path, using the given fill rule.
ps_mask_add_color_filter
PEXPORT void PICAPI ps_mask_add_color_filter(ps_mask *mask, const ps_color *color)
Add a color filter to a mask.
_ps_glyph
A character glyph of a font.
Definition: picasso.h:170
ps_line_inner_join
enum _ps_line_inner_join ps_line_inner_join
Inner junction types for stroked lines.
ps_identity
PEXPORT void PICAPI ps_identity(ps_context *ctx)
Reset the current transformation matrix to identity matrix.
ps_font_create
PEXPORT ps_font *PICAPI ps_font_create(const char *name, ps_charset charset, float size, int32_t weight, ps_bool italic)
Create a font object using the given parameters.
ps_path_sub_close
PEXPORT void PICAPI ps_path_sub_close(ps_path *path)
Close the sub path, and begin a new one.
ps_font_weight
enum _ps_font_weight ps_font_weight
Font weight.
ps_viewport_to_world
PEXPORT void PICAPI ps_viewport_to_world(ps_context *ctx, ps_point *point)
Transform a coordinate from user space to device space.
TEXT_ALIGN_RIGHT
@ TEXT_ALIGN_RIGHT
Definition: picasso.h:2378
PATH_CMD_MOVE_TO
@ PATH_CMD_MOVE_TO
Definition: picasso.h:3347
COMPOSITE_LIGHTEN
@ COMPOSITE_LIGHTEN
Definition: picasso.h:1574
_ps_filter
_ps_filter
Graphics quality for rendering an image.
Definition: picasso.h:1634
ps_version
PEXPORT int32_t PICAPI ps_version(void)
Return current version of picasso.
ps_font_set_hint
PEXPORT void PICAPI ps_font_set_hint(ps_font *font, ps_bool hint)
Set hiting for a font object.
ps_rounded_rect
PEXPORT void PICAPI ps_rounded_rect(ps_context *ctx, const ps_rect *rect, float ltx, float lty, float rtx, float rty, float lbx, float lby, float rbx, float rby)
Add a rounded rectangle to the current path.
ps_matrix_get_scale_factor
PEXPORT ps_bool PICAPI ps_matrix_get_scale_factor(ps_matrix *matrix, float *sx, float *sy)
Get the scale factors from the matrix.
_ps_status
_ps_status
Status code return by call ps_last_status function.
Definition: picasso.h:262
COLOR_FORMAT_RGBA
@ COLOR_FORMAT_RGBA
Definition: picasso.h:398
ps_matrix_translate
PEXPORT void PICAPI ps_matrix_translate(ps_matrix *matrix, float tx, float ty)
Modify a matrix by translating.
ps_world_to_viewport
PEXPORT void PICAPI ps_world_to_viewport(ps_context *ctx, ps_point *point)
Transform a coordinate from device space to user space.
COMPOSITE_COLOR
@ COMPOSITE_COLOR
Definition: picasso.h:1608
ps_initialize
PEXPORT ps_bool PICAPI ps_initialize(void)
Initialize the picasso drawing environment.
ps_font_info
struct _ps_font_info ps_font_info
A structure that contains font information.
COMPOSITE_DST_IN
@ COMPOSITE_DST_IN
Definition: picasso.h:1564
ps_path_add_line
PEXPORT void PICAPI ps_path_add_line(ps_path *path, const ps_point *p1, const ps_point *p2)
Add a line to the path.
_ps_wrap_type
_ps_wrap_type
Fill type of pattern.
Definition: picasso.h:886
ps_path_bezier_to
PEXPORT void PICAPI ps_path_bezier_to(ps_path *path, const ps_point *fcp, const ps_point *scp, const ps_point *ep)
Add a cubic bezier spline to the path from current point to end point.
TEXT_ALIGN_BOTTOM
@ TEXT_ALIGN_BOTTOM
Definition: picasso.h:2370
COMPOSITE_SRC_OVER
@ COMPOSITE_SRC_OVER
Definition: picasso.h:1552
_ps_draw_text_type
_ps_draw_text_type
Draw mode for rending text.
Definition: picasso.h:2340
ps_set_line_width
PEXPORT float PICAPI ps_set_line_width(ps_context *ctx, float width)
Set the line width for a graphics context.
ps_matrix_scale
PEXPORT void PICAPI ps_matrix_scale(ps_matrix *matrix, float sx, float sy)
Modify a matrix by scaling.
COMPOSITE_INVERT
@ COMPOSITE_INVERT
Definition: picasso.h:1600
DRAW_TEXT_STROKE
@ DRAW_TEXT_STROKE
Definition: picasso.h:2348
FONT_WEIGHT_HEAVY
@ FONT_WEIGHT_HEAVY
Definition: picasso.h:1987
PATH_OP_XOR
@ PATH_OP_XOR
Definition: picasso.h:3527
COMPOSITE_SRC_IN
@ COMPOSITE_SRC_IN
Definition: picasso.h:1554
ps_matrix_create
PEXPORT ps_matrix *PICAPI ps_matrix_create(void)
Create a identity matrix object.
ps_rect
struct _ps_rect ps_rect
A structure that contains location and dimensions of a rectangle.
PATH_CMD_CURVE3
@ PATH_CMD_CURVE3
Definition: picasso.h:3355
ps_mask_create_with_data
PEXPORT ps_mask *PICAPI ps_mask_create_with_data(ps_byte *data, int32_t width, int32_t height)
Create a new mask using a given data block.
STATUS_INVALID_ARGUMENT
@ STATUS_INVALID_ARGUMENT
Definition: picasso.h:274
DRAW_TEXT_BOTH
@ DRAW_TEXT_BOTH
Definition: picasso.h:2352
ps_mask_create
PEXPORT ps_mask *PICAPI ps_mask_create(int32_t width, int32_t height)
Create a new mask.
_ps_path_op
_ps_path_op
Path clipping operations.
Definition: picasso.h:3515
ps_get_matrix
PEXPORT ps_bool PICAPI ps_get_matrix(ps_context *ctx, ps_matrix *matrix)
Get the current transformation matrix from graphic context.
ps_matrix_shear
PEXPORT void PICAPI ps_matrix_shear(ps_matrix *matrix, float shx, float shy)
Modify a matrix by shearing.
ps_glyph
struct _ps_glyph ps_glyph
A character glyph of a font.
LINE_JOIN_MITER_ROUND
@ LINE_JOIN_MITER_ROUND
Definition: picasso.h:1311
ps_uchar16
uint16_t ps_uchar16
16 bit unsigned unicode character
Definition: picasso.h:81
ps_bool
int32_t ps_bool
boolean type
Definition: picasso.h:60
ps_text_align
enum _ps_text_align ps_text_align
Text align mode for drawing text.
ps_set_gamma
PEXPORT float PICAPI ps_set_gamma(ps_context *ctx, float gamma)
Set the gamma value for the graphic context.
_ps_point::y
float y
Definition: picasso.h:206
ps_path_bounding_rect
PEXPORT ps_bool PICAPI ps_path_bounding_rect(const ps_path *path, ps_rect *rect)
Get the bounding rectangle of the path.
_ps_rect::h
float h
Definition: picasso.h:196
STATUS_OUT_OF_MEMORY
@ STATUS_OUT_OF_MEMORY
Definition: picasso.h:270
ps_matrix_transform_rect
PEXPORT void PICAPI ps_matrix_transform_rect(const ps_matrix *matrix, ps_rect *rect)
Transform an existing rectangle using the matrix.
ps_gradient_ref
PEXPORT ps_gradient *PICAPI ps_gradient_ref(ps_gradient *gradient)
Increases the reference count of the gradient by 1.
_ps_font_info::descent
float descent
Definition: picasso.h:2138
COMPOSITE_SOFTLIGHT
@ COMPOSITE_SOFTLIGHT
Definition: picasso.h:1590
PATH_CMD_LINE_TO
@ PATH_CMD_LINE_TO
Definition: picasso.h:3351
COMPOSITE_DST_OUT
@ COMPOSITE_DST_OUT
Definition: picasso.h:1566
LINE_JOIN_MITER
@ LINE_JOIN_MITER
Definition: picasso.h:1303
_ps_color
A structure that contains rgba values for a color.
Definition: picasso.h:212
ps_matrix_create_init
PEXPORT ps_matrix *PICAPI ps_matrix_create_init(float sx, float shy, float shx, float sy, float tx, float ty)
Create a matrix with given parameters.
ps_matrix_flip_y
PEXPORT void PICAPI ps_matrix_flip_y(ps_matrix *matrix)
Flip a matrix in the vertical direction.
LINE_INNER_BEVEL
@ LINE_INNER_BEVEL
Definition: picasso.h:1345
ps_scissor_rect
PEXPORT void PICAPI ps_scissor_rect(ps_context *ctx, const ps_rect *rect)
The fast way to clipping specified rectangle, the clip rect can not be transformed by world matrix.
PATH_CMD_CURVE4
@ PATH_CMD_CURVE4
Definition: picasso.h:3359
ps_rotate
PEXPORT void PICAPI ps_rotate(ps_context *ctx, float angle)
Rotates the user coordinate system in graphic context.
LINE_CAP_ROUND
@ LINE_CAP_ROUND
Definition: picasso.h:1277
ps_set_line_dash
PEXPORT void PICAPI ps_set_line_dash(ps_context *ctx, float start, const float *dashes, uint32_t num_dashes)
Set the pattern for dashed lines in the context.
ps_set_line_cap
PEXPORT void PICAPI ps_set_line_cap(ps_context *ctx, ps_line_cap line_cap)
Set the style for the endpoint of lines in a graphics context.
_ps_fill_rule
_ps_fill_rule
Fill rules for graphics.
Definition: picasso.h:1680
ps_matrix_invert
PEXPORT void PICAPI ps_matrix_invert(ps_matrix *matrix)
Modify a matrix by inverting.
ps_clip_rects
PEXPORT void PICAPI ps_clip_rects(ps_context *ctx, const ps_rect *rects, uint32_t num_rects)
Clipping specified area defined by an array of rectangles.
COMPOSITE_DODGE
@ COMPOSITE_DODGE
Definition: picasso.h:1596
_ps_font_weight
_ps_font_weight
Font weight.
Definition: picasso.h:1971
ps_fill
PEXPORT void PICAPI ps_fill(ps_context *ctx)
Fill the current path according to the source attributes. After called, the current path will be clea...
ps_wrap_type
enum _ps_wrap_type ps_wrap_type
Fill type of pattern.
COMPOSITE_BURN
@ COMPOSITE_BURN
Definition: picasso.h:1594
ps_context_ref
PEXPORT ps_context *PICAPI ps_context_ref(ps_context *ctx)
Increases the reference count of the context by 1.
CHARSET_ANSI
@ CHARSET_ANSI
Definition: picasso.h:1961
FILTER_BICUBIC
@ FILTER_BICUBIC
Definition: picasso.h:1650
LINE_JOIN_MITER_REVERT
@ LINE_JOIN_MITER_REVERT
Definition: picasso.h:1307
ps_mask_unref
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,...
ps_set_source_image
PEXPORT void PICAPI ps_set_source_image(ps_context *ctx, const ps_image *image)
Set a image to the context, it is used to fill a graphic object.
ps_matrix_get_shear_factor
PEXPORT ps_bool PICAPI ps_matrix_get_shear_factor(ps_matrix *matrix, float *shx, float *shy)
Get the shear factors from the matrix.
ps_set_stroke_canvas
PEXPORT void PICAPI ps_set_stroke_canvas(ps_context *ctx, const ps_canvas *canvas)
Set a canvas to the context, it is used to stroke a graphic object.
ps_path_add_rounded_rect
PEXPORT void PICAPI ps_path_add_rounded_rect(ps_path *path, const ps_rect *rect, float ltx, float lty, float rtx, float rty, float lbx, float lby, float rbx, float rby)
Add a rounded rectangle to the path.
ps_canvas_create_from_image
PEXPORT ps_canvas *PICAPI ps_canvas_create_from_image(ps_image *img, const ps_rect *rect)
Create a new canvas using part of an existing ps_image object in same pixel buffer.
FILTER_QUADRIC
@ FILTER_QUADRIC
Definition: picasso.h:1654
ps_matrix_rotate
PEXPORT void PICAPI ps_matrix_rotate(ps_matrix *matrix, float angle)
Modify a matrix by rotating.
ps_draw_text
PEXPORT void PICAPI ps_draw_text(ps_context *ctx, const ps_rect *area, const void *text, uint32_t length, ps_draw_text_type type, ps_text_align align)
Draw text in a rectangle area, using font object which is selected in graphic context.
ps_text_transform
PEXPORT void PICAPI ps_text_transform(ps_context *ctx, const ps_matrix *matrix)
Transform text matrix for the graphic context. The text matrix is not a part of graphic state – savin...
ps_set_fill_rule
PEXPORT ps_fill_rule PICAPI ps_set_fill_rule(ps_context *ctx, ps_fill_rule rule)
Set fill rule for graphic context.
ps_set_stroke_gradient
PEXPORT void PICAPI ps_set_stroke_gradient(ps_context *ctx, const ps_gradient *gradient)
Set a gradient to the context, it is used to stroke a graphic object.
GRADIENT_SPREAD_REPEAT
@ GRADIENT_SPREAD_REPEAT
Definition: picasso.h:972
ps_set_source_canvas
PEXPORT void PICAPI ps_set_source_canvas(ps_context *ctx, const ps_canvas *canvas)
Set a canvas to the context, it is used to fill a graphic object.
_ps_charset
_ps_charset
Charset for a font.
Definition: picasso.h:1957
ps_path_arc_to
PEXPORT void PICAPI ps_path_arc_to(ps_path *path, float radiusX, float radiusY, float angle, ps_bool large_arc, ps_bool clockwise, const ps_point *ep)
Add an arc to the path, using radius, angle and end point.
_ps_font_info::ascent
float ascent
Definition: picasso.h:2134
COMPOSITE_MINUS
@ COMPOSITE_MINUS
Definition: picasso.h:1584
COMPOSITE_ERROR
@ COMPOSITE_ERROR
Definition: picasso.h:1612
COLOR_FORMAT_UNKNOWN
@ COLOR_FORMAT_UNKNOWN
Definition: picasso.h:434
ps_new_sub_path
PEXPORT void PICAPI ps_new_sub_path(ps_context *ctx)
Close the current path, and add a new empty sub path in the graphic context.
PATH_OP_DIFF
@ PATH_OP_DIFF
Definition: picasso.h:3531
ps_add_sub_path
PEXPORT void PICAPI ps_add_sub_path(ps_context *ctx, const ps_path *path)
Add a new sub path to current path in the graphic context.
ps_matrix_set_translate_factor
PEXPORT void PICAPI ps_matrix_set_translate_factor(ps_matrix *matrix, float tx, float ty)
Set the translate factors to the matrix.
ps_set_text_color
PEXPORT void PICAPI ps_set_text_color(ps_context *ctx, const ps_color *color)
Set the text fill color for the graphic context.
ps_matrix
struct _ps_matrix ps_matrix
An opaque type represents a transform matrix.
Definition: picasso.h:144
ps_tangent_arc
PEXPORT void PICAPI ps_tangent_arc(ps_context *ctx, const ps_rect *rect, float sangle, float sweep)
Add a circular arc which is inner tangent from a rectangle.
ps_gradient_create_linear
PEXPORT ps_gradient *PICAPI ps_gradient_create_linear(ps_gradient_spread spread, const ps_point *start, const ps_point *end)
Create a new gradient that varies along the line defined by provided starting and ending points.
ps_path_operation
enum _ps_path_op ps_path_operation
Path clipping operations.
ps_clear
PEXPORT void PICAPI ps_clear(ps_context *ctx)
Clear the current context with source color.
STATUS_NOT_SUPPORT
@ STATUS_NOT_SUPPORT
Definition: picasso.h:278
ps_matrix_unref
PEXPORT void PICAPI ps_matrix_unref(ps_matrix *matrix)
Decrements the reference count for the matrix object. If the reference count on the matrix falls to 0...
ps_matrix_create_copy
PEXPORT ps_matrix *PICAPI ps_matrix_create_copy(const ps_matrix *matrix)
Create a matrix copy from an exist one.
_ps_line_join
_ps_line_join
Junction types for stroked lines.
Definition: picasso.h:1299
ps_path_add_rect
PEXPORT void PICAPI ps_path_add_rect(ps_path *path, const ps_rect *rect)
Add a rectangle to the path.
ps_clip_rect
PEXPORT void PICAPI ps_clip_rect(ps_context *ctx, const ps_rect *rect)
Clipping specified rectangle.
ps_shear
PEXPORT void PICAPI ps_shear(ps_context *ctx, float shx, float shy)
Changes the shear of the user coordinate system in graphic context.
ps_get_path
PEXPORT ps_bool PICAPI ps_get_path(ps_context *ctx, ps_path *path)
Get the current path in the graphic context.
ps_path_add_ellipse
PEXPORT void PICAPI ps_path_add_ellipse(ps_path *path, const ps_rect *rect)
Add an ellipse to the path.
COMPOSITE_INVERT_BLEND
@ COMPOSITE_INVERT_BLEND
Definition: picasso.h:1602
ps_path_tangent_arc_to
PEXPORT void PICAPI ps_path_tangent_arc_to(ps_path *path, float radius, const ps_point *tp, const ps_point *ep)
Add an arc to the path which tangent at two line.
ps_pattern
struct _ps_pattern ps_pattern
An opaque type represents a pattern.
Definition: picasso.h:130
FONT_WEIGHT_REGULAR
@ FONT_WEIGHT_REGULAR
Definition: picasso.h:1975
FILL_RULE_EVEN_ODD
@ FILL_RULE_EVEN_ODD
Definition: picasso.h:1688
ps_image_ref
PEXPORT ps_image *PICAPI ps_image_ref(ps_image *img)
Increases the reference count of the image by 1.
ps_canvas_ref
PEXPORT ps_canvas *PICAPI ps_canvas_ref(ps_canvas *canvas)
Increases the reference count of the canvas by 1.
ps_set_shadow
PEXPORT void PICAPI ps_set_shadow(ps_context *ctx, float x_offset, float y_offset, float blur)
Enables shadowing in a context.
COLOR_FORMAT_RGB565
@ COLOR_FORMAT_RGB565
Definition: picasso.h:422
_ps_font_info
A structure that contains font information.
Definition: picasso.h:2126
_ps_font_info::size
float size
Definition: picasso.h:2130
ps_gradient_create_radial
PEXPORT ps_gradient *PICAPI ps_gradient_create_radial(ps_gradient_spread spread, const ps_point *start, float sradius, const ps_point *end, float eradius)
Create a new gradient that varies along the area defined by provided starting and ending circles.
ps_canvas_create
PEXPORT ps_canvas *PICAPI ps_canvas_create(ps_color_format fmt, int32_t width, int32_t height)
Create a new canvas using the given parameters.
COLOR_FORMAT_RGB
@ COLOR_FORMAT_RGB
Definition: picasso.h:414
ps_glyph_get_extent
PEXPORT ps_bool PICAPI ps_glyph_get_extent(const ps_glyph *glyph, ps_size *rsize)
Get extent for a glyph object.
_ps_line_cap
_ps_line_cap
Styles for rendering the endpoint of a stroked line.
Definition: picasso.h:1269
COMPOSITE_CLEAR
@ COMPOSITE_CLEAR
Definition: picasso.h:1548
_ps_line_inner_join
_ps_line_inner_join
Inner junction types for stroked lines.
Definition: picasso.h:1337
ps_matrix_ref
PEXPORT ps_matrix *PICAPI ps_matrix_ref(ps_matrix *matrix)
Increases the reference count of the matrix by 1.
ps_path_move_to
PEXPORT void PICAPI ps_path_move_to(ps_path *path, const ps_point *point)
Begin a new sub path, and set the current point in the path.
ps_color
struct _ps_color ps_color
A structure that contains rgba values for a color.
ps_reset_clip
PEXPORT void PICAPI ps_reset_clip(ps_context *ctx)
Clear the clipping area from the context.
ps_matrix_set_shear_factor
PEXPORT void PICAPI ps_matrix_set_shear_factor(ps_matrix *matrix, float shx, float shy)
Set the shear factors to the matrix.
ps_pattern_unref
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...
ps_path_get_length
PEXPORT float PICAPI ps_path_get_length(const ps_path *path)
Return The length of the path.
ps_font
struct _ps_font ps_font
An opaque type represents a font.
Definition: picasso.h:165
ps_matrix_get_determinant
PEXPORT float PICAPI ps_matrix_get_determinant(const ps_matrix *matrix)
Return the determinant from a matrix.
ps_image_create_from_image
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.
ps_text_out_length
PEXPORT void PICAPI ps_text_out_length(ps_context *ctx, float x, float y, const char *text, uint32_t length)
Draw single byte characters (latin-1) at location in user space.
ps_font_set_italic
PEXPORT void PICAPI ps_font_set_italic(ps_font *font, ps_bool italic)
Set italic for a font object.
ps_mask
struct _ps_mask ps_mask
An opaque type represents an alpha mask.
Definition: picasso.h:158
ps_point
struct _ps_point ps_point
A structure that contains a point in a two-dimensional coordinate system.
ps_set_blur
PEXPORT float PICAPI ps_set_blur(ps_context *ctx, float blur)
Set the blur level for the graphic context.
CHARSET_UNICODE
@ CHARSET_UNICODE
Definition: picasso.h:1965
COMPOSITE_HUE
@ COMPOSITE_HUE
Definition: picasso.h:1604
COMPOSITE_DST_ATOP
@ COMPOSITE_DST_ATOP
Definition: picasso.h:1568
ps_canvas_set_mask
PEXPORT void PICAPI ps_canvas_set_mask(ps_canvas *canvas, const ps_mask *mask)
Set a new mask into an existing canvas object.
ps_path_clipping
PEXPORT void PICAPI ps_path_clipping(ps_path *result, ps_path_operation op, const ps_path *a, const ps_path *b)
Clipping two path with the operation and get the result path.
ps_set_text_stroke_color
PEXPORT void PICAPI ps_set_text_stroke_color(ps_context *ctx, const ps_color *color)
Set the text stroke color for the graphic context.
_ps_rect
A structure that contains location and dimensions of a rectangle.
Definition: picasso.h:188
FILL_RULE_ERROR
@ FILL_RULE_ERROR
Definition: picasso.h:1692
GRADIENT_SPREAD_PAD
@ GRADIENT_SPREAD_PAD
Definition: picasso.h:968
ps_path_create
PEXPORT ps_path *PICAPI ps_path_create(void)
Create a new empty path object.
ps_canvas_unref
PEXPORT void PICAPI ps_canvas_unref(ps_canvas *canvas)
Decrements the reference count for the canvas object. If the reference count on the canvas falls to 0...
ps_path_get_vertex_count
PEXPORT uint32_t PICAPI ps_path_get_vertex_count(const ps_path *path)
Return the count of vertices in the path.
ps_path_add_sub_path
PEXPORT void PICAPI ps_path_add_sub_path(ps_path *path, const ps_path *spath)
Add an sub path to the path.
GRADIENT_SPREAD_REFLECT
@ GRADIENT_SPREAD_REFLECT
Definition: picasso.h:976
ps_matrix_transform_path
PEXPORT void PICAPI ps_matrix_transform_path(const ps_matrix *matrix, ps_path *path)
Transform an existing path using the matrix.
ps_set_text_render_type
PEXPORT void PICAPI ps_set_text_render_type(ps_context *ctx, ps_text_type type)
Set rendering type for text.
ps_canvas_replace_data
PEXPORT ps_canvas *PICAPI ps_canvas_replace_data(ps_canvas *canvas, ps_byte *data, ps_color_format fmt, int32_t width, int32_t height, int32_t pitch)
Replace a canvas target rendering buffer address in memory, which is only use for canvas create by ps...
ps_gradient_transform
PEXPORT void PICAPI ps_gradient_transform(ps_gradient *gradient, const ps_matrix *matrix)
Transform the gradient object.
LINE_JOIN_BEVEL
@ LINE_JOIN_BEVEL
Definition: picasso.h:1319
ps_new_path
PEXPORT void PICAPI ps_new_path(ps_context *ctx)
Create a new empty path in the graphic context, clear the old one.
ps_set_stroke_color
PEXPORT void PICAPI ps_set_stroke_color(ps_context *ctx, const ps_color *color)
Set a color to the context, it is used to stroke a graphic object.
ps_status
enum _ps_status ps_status
Status code return by call ps_last_status function.
ps_canvas_get_format
PEXPORT ps_color_format PICAPI ps_canvas_get_format(const ps_canvas *canvas)
Return the pixel format of the canvas.
ps_set_text_matrix
PEXPORT void PICAPI ps_set_text_matrix(ps_context *ctx, const ps_matrix *matrix)
Set text matrix for the graphic context. The text matrix is not a part of graphic state – saving and ...
TEXT_TYPE_MONO
@ TEXT_TYPE_MONO
Definition: picasso.h:2196
ps_pattern_create_image
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.
TEXT_ALIGN_CENTER
@ TEXT_ALIGN_CENTER
Definition: picasso.h:2362
ps_image_create_with_data
PEXPORT ps_image *PICAPI ps_image_create_with_data(ps_byte *data, ps_color_format fmt, int32_t width, int32_t height, int32_t pitch)
Create a new image using a given address in memory.
COMPOSITE_SATURATION
@ COMPOSITE_SATURATION
Definition: picasso.h:1606
COMPOSITE_SRC_OUT
@ COMPOSITE_SRC_OUT
Definition: picasso.h:1556
ps_move_to
PEXPORT void PICAPI ps_move_to(ps_context *ctx, const ps_point *point)
Begin a new sub path, and set the current point.
ps_matrix_identity
PEXPORT void PICAPI ps_matrix_identity(ps_matrix *matrix)
Reset a matrix to identity matrix.
ps_canvas_create_with_data
PEXPORT ps_canvas *PICAPI ps_canvas_create_with_data(ps_byte *data, ps_color_format fmt, int32_t width, int32_t height, int32_t pitch)
Create a new canvas using a given address in memory.
ps_set_antialias
PEXPORT void PICAPI ps_set_antialias(ps_context *ctx, ps_bool antialias)
Set whether the Anti-aliasing should be turn on.
ps_set_shadow_color
PEXPORT void PICAPI ps_set_shadow_color(ps_context *ctx, const ps_color *color)
Set the color of shadow. Default is a black color with 1/3 alpha.
ps_line_join
enum _ps_line_join ps_line_join
Junction types for stroked lines.
ps_path_create_copy
PEXPORT ps_path *PICAPI ps_path_create_copy(const ps_path *path)
Create a copy from an existing path object.
LINE_INNER_ROUND
@ LINE_INNER_ROUND
Definition: picasso.h:1353
ps_gradient
struct _ps_gradient ps_gradient
An opaque type represents a gradient.
Definition: picasso.h:137
ps_context_create
PEXPORT ps_context *PICAPI ps_context_create(ps_canvas *canvas, ps_context *shared_context)
Create a new graphic context for a canvas.
ps_image_create_compatible
PEXPORT ps_image *PICAPI ps_image_create_compatible(const ps_canvas *canvas, int32_t width, int32_t height)
Create a new image to compatible with an existing canvas.
ps_image_create_from_data
PEXPORT ps_image *PICAPI ps_image_create_from_data(ps_byte *data, ps_color_format fmt, int32_t width, int32_t height, int32_t pitch)
Create a new image using a copy of given address in memory.
COLOR_FORMAT_ABGR
@ COLOR_FORMAT_ABGR
Definition: picasso.h:406
ps_image_set_transparent_color
PEXPORT void PICAPI ps_image_set_transparent_color(ps_image *img, const ps_color *color)
Set the transparent color for the image.
ps_shutdown
PEXPORT void PICAPI ps_shutdown(void)
Shutdown the picasso drawing environment.
_ps_gradient_spread
_ps_gradient_spread
Fill type of outside the gradient area.
Definition: picasso.h:964
ps_get_font_info
PEXPORT ps_bool PICAPI ps_get_font_info(ps_context *ctx, ps_font_info *info)
Return the font information from the graphics context.
ps_matrix_is_identity
PEXPORT ps_bool PICAPI ps_matrix_is_identity(const ps_matrix *matrix)
Checks whether the matrix is the identity transform matrix.
ps_set_stroke_pattern
PEXPORT void PICAPI ps_set_stroke_pattern(ps_context *ctx, const ps_pattern *pattern)
Set a pattern to the context, it is used to stroke a graphic object.
LINE_CAP_SQUARE
@ LINE_CAP_SQUARE
Definition: picasso.h:1281
ps_set_source_pattern
PEXPORT void PICAPI ps_set_source_pattern(ps_context *ctx, const ps_pattern *pattern)
Set a pattern to the context, it is used to fill a graphic object.
_ps_size::w
float w
Definition: picasso.h:180
COLOR_FORMAT_A8
@ COLOR_FORMAT_A8
Definition: picasso.h:430
ps_draw_text_type
enum _ps_draw_text_type ps_draw_text_type
Draw mode for rending text.
ps_arc
PEXPORT void PICAPI ps_arc(ps_context *ctx, const ps_point *cp, float radius, float sangle, float eangle, ps_bool clockwise)
Add a circular arc to the current path.
STATUS_MISMATCHING_FORMAT
@ STATUS_MISMATCHING_FORMAT
Definition: picasso.h:286
FONT_WEIGHT_BOLD
@ FONT_WEIGHT_BOLD
Definition: picasso.h:1983
COMPOSITE_XOR
@ COMPOSITE_XOR
Definition: picasso.h:1570
STATUS_UNKNOWN_ERROR
@ STATUS_UNKNOWN_ERROR
Definition: picasso.h:290
_ps_text_type
_ps_text_type
Text rendering type.
Definition: picasso.h:2188
COMPOSITE_PLUS
@ COMPOSITE_PLUS
Definition: picasso.h:1582
ps_matrix_is_equal
PEXPORT ps_bool PICAPI ps_matrix_is_equal(const ps_matrix *a, const ps_matrix *b)
Checks whether two matrix are equal.
ps_byte
uint8_t ps_byte
byte data type
Definition: picasso.h:95
COMPOSITE_SRC
@ COMPOSITE_SRC
Definition: picasso.h:1550
ps_pattern_ref
PEXPORT ps_pattern *PICAPI ps_pattern_ref(ps_pattern *pattern)
Increases the reference count of the pattern by 1.
ps_reset_shadow
PEXPORT void PICAPI ps_reset_shadow(ps_context *ctx)
Disables shadowing in a context.
ps_font_ref
PEXPORT ps_font *PICAPI ps_font_ref(ps_font *font)
Increases the reference count of the font by 1.
ps_canvas_bitblt
PEXPORT void PICAPI ps_canvas_bitblt(ps_canvas *src, const ps_rect *rect, ps_canvas *dst, const ps_point *location)
Copy raster data between two canvas objects.
FILTER_UNKNOWN
@ FILTER_UNKNOWN
Definition: picasso.h:1658
COMPOSITE_DST
@ COMPOSITE_DST
Definition: picasso.h:1560
FILTER_GAUSSIAN
@ FILTER_GAUSSIAN
Definition: picasso.h:1646
ps_mask_clear_color_filters
PEXPORT void PICAPI ps_mask_clear_color_filters(ps_mask *mask)
Clear all colors from mask's filter.
COMPOSITE_DARKEN
@ COMPOSITE_DARKEN
Definition: picasso.h:1572
ps_set_stroke_image
PEXPORT void PICAPI ps_set_stroke_image(ps_context *ctx, const ps_image *image)
Set a image to the context, it is used to stroke a graphic object.
COLOR_FORMAT_RGB555
@ COLOR_FORMAT_RGB555
Definition: picasso.h:426
ps_matrix_init
PEXPORT void PICAPI ps_matrix_init(ps_matrix *matrix, float sx, float shy, float shx, float sy, float tx, float ty)
Initialize an existing matrix object with given parameters.
ps_last_status
PEXPORT ps_status PICAPI ps_last_status(void)
Return the last status code of picasso.
COMPOSITE_DIFFERENCE
@ COMPOSITE_DIFFERENCE
Definition: picasso.h:1588
ps_gradient_add_color_stop
PEXPORT void PICAPI ps_gradient_add_color_stop(ps_gradient *gradient, float offset, const ps_color *color)
Add a color stop to a gradient. The offset specifies the location along the gradient's control vector...
TEXT_TYPE_STROKE
@ TEXT_TYPE_STROKE
Definition: picasso.h:2200
ps_quad_curve_to
PEXPORT void PICAPI ps_quad_curve_to(ps_context *ctx, const ps_point *cp, const ps_point *ep)
Add a quadratic bezier spline to the current path from current point to end point.
_ps_path_cmd
_ps_path_cmd
Path command for vertices.
Definition: picasso.h:3339
ps_set_matrix
PEXPORT void PICAPI ps_set_matrix(ps_context *ctx, const ps_matrix *matrix)
Modifies the current transformation matrix to the given matrix.
ps_context
struct _ps_context ps_context
An opaque type represents a Picasso drawing environment.
Definition: picasso.h:109
PATH_OP_UNION
@ PATH_OP_UNION
Definition: picasso.h:3519
ps_ellipse
PEXPORT void PICAPI ps_ellipse(ps_context *ctx, const ps_rect *rect)
Adds an ellipse to the current path which fits inside the specified rectangle.
ps_save
PEXPORT void PICAPI ps_save(ps_context *ctx)
Pushes a copy of the current graphics state on to stack for context.
ps_path_add_arc
PEXPORT void PICAPI ps_path_add_arc(ps_path *path, const ps_point *cp, float radius, float sangle, float eangle, ps_bool clockwise)
Add a arc to the path.
DRAW_TEXT_FILL
@ DRAW_TEXT_FILL
Definition: picasso.h:2344
ps_clip
PEXPORT void PICAPI ps_clip(ps_context *ctx)
Clipping the current path, using the current fill rule. After called, the current path will be cleare...
ps_get_path_from_glyph
PEXPORT ps_bool PICAPI ps_get_path_from_glyph(ps_context *ctx, const ps_glyph *glyph, ps_path *path)
Get the path from a given glyph object.
ps_scale
PEXPORT void PICAPI ps_scale(ps_context *ctx, float sx, float sy)
Changes the scale of the user coordinate system in graphic context.
ps_gradient_unref
PEXPORT void PICAPI ps_gradient_unref(ps_gradient *gradient)
Decrements the reference count for the gradient object. If the reference count on the gradient falls ...
ps_show_glyphs
PEXPORT void PICAPI ps_show_glyphs(ps_context *ctx, float x, float y, ps_glyph *glyphs, uint32_t length)
Draw an array of glyphs at location in user space.
LINE_JOIN_ROUND
@ LINE_JOIN_ROUND
Definition: picasso.h:1315
TEXT_ALIGN_LEFT
@ TEXT_ALIGN_LEFT
Definition: picasso.h:2374
ps_path_ref
PEXPORT ps_path *PICAPI ps_path_ref(ps_path *path)
Increases the reference count of the path by 1.
STATUS_SUCCEED
@ STATUS_SUCCEED
Definition: picasso.h:266
_ps_point::x
float x
Definition: picasso.h:204
ps_path_cmd
enum _ps_path_cmd ps_path_cmd
Path command for vertices.
ps_size
struct _ps_size ps_size
A structure that contains width and height values.
ps_wide_text_out_length
PEXPORT void PICAPI ps_wide_text_out_length(ps_context *ctx, float x, float y, const ps_uchar16 *text, uint32_t length)
Draw unicode characters (ucs-2) at location in user space.
ps_transform
PEXPORT void PICAPI ps_transform(ps_context *ctx, const ps_matrix *matrix)
Transforms the user coordinate system in graphic context using a specified matrix.
WRAP_TYPE_REPEAT
@ WRAP_TYPE_REPEAT
Definition: picasso.h:890
ps_rectangle
PEXPORT void PICAPI ps_rectangle(ps_context *ctx, const ps_rect *rect)
Add a rectangle to the current path.
ps_set_text_antialias
PEXPORT void PICAPI ps_set_text_antialias(ps_context *ctx, ps_bool antialias)
Set whether the font allowed be anti-aliasing.
ps_font_set_charset
PEXPORT void PICAPI ps_font_set_charset(ps_font *font, ps_charset charset)
Set charset for a font object.
COMPOSITE_CONTRAST
@ COMPOSITE_CONTRAST
Definition: picasso.h:1598
ps_path_stroke_contains
PEXPORT ps_bool PICAPI ps_path_stroke_contains(const ps_path *path, const ps_point *point, float width)
Check whether a point is contained in the path by stroke method.
ps_set_font
PEXPORT ps_font *PICAPI ps_set_font(ps_context *ctx, const ps_font *font)
Set a new font to graphics context.
WRAP_TYPE_REFLECT
@ WRAP_TYPE_REFLECT
Definition: picasso.h:894
COMPOSITE_HARDLIGHT
@ COMPOSITE_HARDLIGHT
Definition: picasso.h:1592
ps_schar16
int16_t ps_schar16
16 bit signed unicode character
Definition: picasso.h:88
ps_line_cap
enum _ps_line_cap ps_line_cap
Styles for rendering the endpoint of a stroked line.
ps_canvas_get_size
PEXPORT ps_bool PICAPI ps_canvas_get_size(const ps_canvas *canvas, ps_size *rsize)
Return the size of the canvas.
ps_composite
enum _ps_composite ps_composite
Compositing operations for graphics context.
_ps_color::r
float r
Definition: picasso.h:214
_ps_size
A structure that contains width and height values.
Definition: picasso.h:178
ps_gradient_create_conic
PEXPORT ps_gradient *PICAPI ps_gradient_create_conic(ps_gradient_spread spread, const ps_point *origin, float sangle)
Create a new gradient that varies along the area defined by provided concentric circles.
ps_matrix_multiply
PEXPORT void PICAPI ps_matrix_multiply(ps_matrix *result, const ps_matrix *a, const ps_matrix *b)
Multiplies the matrix in a and b together and stores the result in result.
ps_font_set_size
PEXPORT void PICAPI ps_font_set_size(ps_font *font, float size)
Set size for a font object.
ps_canvas_create_from_canvas
PEXPORT ps_canvas *PICAPI ps_canvas_create_from_canvas(ps_canvas *canvas, const ps_rect *rect)
Create a new canvas using part of an existing canvas in same pixel buffer.
ps_font_unref
PEXPORT void PICAPI ps_font_unref(ps_font *font)
Decrements the reference count for the font object. If the reference count on the font falls to 0,...
_ps_rect::w
float w
Definition: picasso.h:194
ps_image_get_format
PEXPORT ps_color_format PICAPI ps_image_get_format(const ps_image *img)
Return the pixel format of the image.
COLOR_FORMAT_ARGB
@ COLOR_FORMAT_ARGB
Definition: picasso.h:402
ps_get_glyph
PEXPORT ps_bool PICAPI ps_get_glyph(ps_context *ctx, int32_t ch, ps_glyph *glyph)
Get the glyph from a given character, using font object which is selected in graphic context.
_ps_color_format
_ps_color_format
Pixel formats of canvas or image.
Definition: picasso.h:394
FILL_RULE_WINDING
@ FILL_RULE_WINDING
Definition: picasso.h:1684
COMPOSITE_MULTIPLY
@ COMPOSITE_MULTIPLY
Definition: picasso.h:1580
PATH_CMD_END_POLY
@ PATH_CMD_END_POLY
Definition: picasso.h:3363
_ps_size::h
float h
Definition: picasso.h:182
ps_filter
enum _ps_filter ps_filter
Graphics quality for rendering an image.
ps_matrix_flip_x
PEXPORT void PICAPI ps_matrix_flip_x(ps_matrix *matrix)
Flip a matrix in the horizontal direction.
ps_matrix_set_scale_factor
PEXPORT void PICAPI ps_matrix_set_scale_factor(ps_matrix *matrix, float sx, float sy)
Set the scale factors to the matrix.
ps_set_text_kerning
PEXPORT void PICAPI ps_set_text_kerning(ps_context *ctx, ps_bool kerning)
Set whether the font auto kerning is allowed.
COMPOSITE_SRC_ATOP
@ COMPOSITE_SRC_ATOP
Definition: picasso.h:1558
ps_gradient_spread
enum _ps_gradient_spread ps_gradient_spread
Fill type of outside the gradient area.
ps_restore
PEXPORT void PICAPI ps_restore(ps_context *ctx)
Set the current graphics state to the state most recently saved.
ps_canvas_reset_mask
PEXPORT void PICAPI ps_canvas_reset_mask(ps_canvas *canvas)
Clear the mask from the canvas object.
_ps_color::b
float b
Definition: picasso.h:218
ps_bezier_curve_to
PEXPORT void PICAPI ps_bezier_curve_to(ps_context *ctx, const ps_point *fcp, const ps_point *scp, const ps_point *ep)
Add a cubic bezier spline to the current path from current point to end point.
_ps_color::g
float g
Definition: picasso.h:216
LINE_CAP_BUTT
@ LINE_CAP_BUTT
Definition: picasso.h:1273
COLOR_FORMAT_BGRA
@ COLOR_FORMAT_BGRA
Definition: picasso.h:410
ps_translate
PEXPORT void PICAPI ps_translate(ps_context *ctx, float tx, float ty)
Changes the origin of the user coordinate system in graphic context.
ps_get_text_extent
PEXPORT ps_bool PICAPI ps_get_text_extent(ps_context *ctx, const void *text, uint32_t length, ps_size *rsize)
Get extent for text using current font which selected to graphic context.
ps_font_set_weight
PEXPORT void PICAPI ps_font_set_weight(ps_font *font, int32_t weight)
Set weight for a font object.
ps_path_is_empty
PEXPORT ps_bool PICAPI ps_path_is_empty(const ps_path *path)
Checks whether the path is empty.
ps_path_line_to
PEXPORT void PICAPI ps_path_line_to(ps_path *path, const ps_point *point)
Add a line to the path from the current point to given point.
ps_color_format
enum _ps_color_format ps_color_format
Pixel formats of canvas or image.
COMPOSITE_SCREEN
@ COMPOSITE_SCREEN
Definition: picasso.h:1578
ps_path_clear
PEXPORT void PICAPI ps_path_clear(ps_path *path)
Clear the path to empty.
ps_pattern_transform
PEXPORT void PICAPI ps_pattern_transform(ps_pattern *pattern, const ps_matrix *matrix)
Transform the pattern object.