|
NovaSVG 0.10.0
A header-only SVG library
|
Classes | |
| struct | bezier_t |
| struct | canvas |
| struct | color |
| Represents a color with red, green, blue, and alpha components. More... | |
| struct | color_entry_t |
| struct | dasher_t |
| struct | extents_calculator_t |
| struct | font_face |
| struct | font_face_cache |
| struct | font_face_entry |
| struct | glyph |
| struct | glyph_cache_t |
| struct | gradient_data_t |
| struct | gradient_paint_t |
| struct | gradient_stop_t |
| Represents a gradient stop. More... | |
| struct | linear_gradient_values_t |
| struct | matrix |
| A structure representing a 2D transformation matrix. More... | |
| struct | paint |
| struct | path |
| union | path_element |
| struct | path_iterator |
| Iterator for traversing path elements in a path. More... | |
| struct | point |
| A structure representing a point in 2D space. More... | |
| struct | radial_gradient_values_t |
| struct | rect |
| A structure representing a rectangle in 2D space. More... | |
| struct | solid_paint_t |
| struct | span_buffer_t |
| struct | span_t |
| struct | state |
| struct | stroke_dash_t |
| struct | stroke_data_t |
| struct | stroke_style_t |
| struct | surface |
| struct | text_iterator |
| Iterator for traversing code points in text data. More... | |
| struct | texture_data_t |
| struct | texture_paint_t |
Typedefs | |
| typedef void(* | composition_solid_function_t) (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| typedef void(* | composition_function_t) (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| typedef int | mutex_t |
| typedef struct novasvg::render::glyph | glyph_t |
| typedef struct novasvg::render::font_face_entry | font_face_entry_t |
| typedef int | ref_count_t |
| typedef struct novasvg::render::state | state_t |
| typedef void(* | destroy_func_t) (void *closure) |
| A function pointer type for a cleanup callback. | |
| typedef void(* | write_func_t) (void *closure, void *data, int size) |
| A function pointer type for a write callback. | |
| typedef struct novasvg::render::point | point_t |
| A structure representing a point in 2D space. | |
| typedef struct novasvg::render::rect | rect_t |
| A structure representing a rectangle in 2D space. | |
| using | matrix_t = struct novasvg::render::matrix |
| A structure representing a 2D transformation matrix. | |
| typedef struct path | path_t |
| Represents a 2D path for drawing operations. | |
| typedef enum novasvg::render::path_command | path_command_t |
| Enumeration defining path commands. | |
| typedef union novasvg::render::path_element | path_element_t |
| typedef struct novasvg::render::path_iterator | path_iterator_t |
| Iterator for traversing path elements in a path. | |
| typedef void(* | path_traverse_func_t) (void *closure, path_command_t command, const point_t *points, int npoints) |
| Callback function type for traversing a path. | |
| typedef enum novasvg::render::text_encoding | text_encoding_t |
| Text encodings used for converting text data to code points. | |
| typedef struct novasvg::render::text_iterator | text_iterator_t |
| Iterator for traversing code points in text data. | |
| typedef unsigned int | codepoint_t |
| Represents a Unicode code point. | |
| typedef struct font_face | font_face_t |
| Represents a font face. | |
| typedef struct font_face_cache | font_face_cache_t |
| Represents a cache of loaded font faces. | |
| typedef struct novasvg::render::color | color_t |
| Represents a color with red, green, blue, and alpha components. | |
| using | surface_t = struct surface |
| Represents an image surface for drawing operations. | |
| typedef struct paint | paint_t |
| Represents a paint object used for drawing operations. | |
| typedef struct canvas | canvas_t |
| Represents a drawing context. | |
Functions | |
| NOVASVG_INLINE uint32_t | premultiply_color_with_opacity (const color_t *color, float opacity) |
| NOVASVG_INLINE uint32_t | INTERPOLATE_PIXEL_255 (uint32_t x, uint32_t a, uint32_t y, uint32_t b) |
| NOVASVG_INLINE uint32_t | INTERPOLATE_PIXEL_256 (uint32_t x, uint32_t a, uint32_t y, uint32_t b) |
| NOVASVG_INLINE uint32_t | BYTE_MUL (uint32_t x, uint32_t a) |
| NOVASVG_INLINE void | memfill32 (unsigned int *dest, int length, unsigned int value) |
| NOVASVG_INLINE int | gradient_clamp (const gradient_data_t *gradient, int ipos) |
| NOVASVG_INLINE uint32_t | gradient_pixel_fixed (const gradient_data_t *gradient, int fixed_pos) |
| NOVASVG_INLINE uint32_t | gradient_pixel (const gradient_data_t *gradient, float pos) |
| NOVASVG_INLINE void | fetch_linear_gradient (uint32_t *buffer, const linear_gradient_values_t *v, const gradient_data_t *gradient, int y, int x, int length) |
| NOVASVG_INLINE void | fetch_radial_gradient (uint32_t *buffer, const radial_gradient_values_t *v, const gradient_data_t *gradient, int y, int x, int length) |
| NOVASVG_INLINE void | composition_solid_clear (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_source (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_destination (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_source_over (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_destination_over (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_source_in (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_destination_in (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_source_out (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_destination_out (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_source_atop (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_destination_atop (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_solid_xor (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE int | blend_mul255 (int x, int y) |
| template<operator_t Mode> | |
| NOVASVG_INLINE int | blend_mode_channel (int cs, int cb, int as, int ab) |
| template<operator_t Mode> | |
| NOVASVG_INLINE uint32_t | blend_mode_pixel (uint32_t dest, uint32_t src) |
| template<operator_t Mode> | |
| NOVASVG_INLINE void | composition_blend_mode (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| template<operator_t Mode> | |
| NOVASVG_INLINE void | composition_solid_blend_mode (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_clear (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_source (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_destination (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_source_over (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_destination_over (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_source_in (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_destination_in (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_source_out (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_destination_out (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_source_atop (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_destination_atop (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | composition_xor (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| NOVASVG_INLINE void | blend_solid (surface_t *surface, operator_t op, uint32_t solid, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_linear_gradient (surface_t *surface, operator_t op, const gradient_data_t *gradient, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_radial_gradient (surface_t *surface, operator_t op, const gradient_data_t *gradient, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_untransformed_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_transformed_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_untransformed_tiled_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_transformed_tiled_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE uint32_t | interpolate_4_pixels (uint32_t tl, uint32_t tr, uint32_t bl, uint32_t br, uint32_t distx, uint32_t disty) |
| NOVASVG_INLINE void | blend_transformed_bilinear_tiled_argb (surface_t *surface, operator_t op, const texture_data_t *texture, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_color (canvas_t *canvas, const color_t *color, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_gradient (canvas_t *canvas, const gradient_paint_t *gradient, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend_texture (canvas_t *canvas, const texture_paint_t *texture, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE void | blend (canvas_t *canvas, const span_buffer_t *span_buffer) |
| NOVASVG_INLINE int | render_version (void) |
| Gets the version of the novasvg rendering library. | |
| NOVASVG_INLINE const char * | render_version_string (void) |
| Gets the version of the novasvg rendering library as a string. | |
| NOVASVG_INLINE state_t * | state_create (void) |
| NOVASVG_INLINE void | state_reset (state_t *state) |
| NOVASVG_INLINE void | state_copy (state_t *state, const state_t *source) |
| NOVASVG_INLINE void | state_destroy (state_t *state) |
| NOVASVG_INLINE canvas_t * | canvas_create (surface_t *surface) |
| Creates a drawing context on a surface. | |
| NOVASVG_INLINE canvas_t * | canvas_reference (canvas_t *canvas) |
| Increases the reference count of the canvas. | |
| NOVASVG_INLINE void | canvas_destroy (canvas_t *canvas) |
| Decreases the reference count and destroys the canvas when it reaches zero. | |
| NOVASVG_INLINE int | canvas_get_reference_count (const canvas_t *canvas) |
| Retrieves the reference count of the canvas. | |
| NOVASVG_INLINE surface_t * | canvas_get_surface (const canvas_t *canvas) |
| Gets the surface associated with the canvas. | |
| NOVASVG_INLINE void | canvas_save (canvas_t *canvas) |
| Saves the current state of the canvas. | |
| NOVASVG_INLINE void | canvas_restore (canvas_t *canvas) |
| Restores the canvas to the most recently saved state. | |
| NOVASVG_INLINE void | canvas_set_rgb (canvas_t *canvas, float r, float g, float b) |
| Sets the current paint to a solid color. | |
| NOVASVG_INLINE void | canvas_set_rgba (canvas_t *canvas, float r, float g, float b, float a) |
| Sets the current paint to a solid color. | |
| NOVASVG_INLINE void | canvas_set_color (canvas_t *canvas, const color_t *color) |
| Sets the current paint to a solid color. | |
| NOVASVG_INLINE void | canvas_set_linear_gradient (canvas_t *canvas, float x1, float y1, float x2, float y2, spread_method_t spread, const gradient_stop_t *stops, int nstops, const matrix_t *matrix) |
| Sets the current paint to a linear gradient. | |
| NOVASVG_INLINE void | canvas_set_radial_gradient (canvas_t *canvas, float cx, float cy, float cr, float fx, float fy, float fr, spread_method_t spread, const gradient_stop_t *stops, int nstops, const matrix_t *matrix) |
| Sets the current paint to a radial gradient. | |
| NOVASVG_INLINE void | canvas_set_texture (canvas_t *canvas, surface_t *surface, texture_type_t type, float opacity, const matrix_t *matrix) |
| Sets the current paint to a texture. | |
| NOVASVG_INLINE void | canvas_set_paint (canvas_t *canvas, paint_t *paint) |
| Sets the current paint. | |
| NOVASVG_INLINE paint_t * | canvas_get_paint (const canvas_t *canvas, color_t *color) |
| Retrieves the current paint. | |
| NOVASVG_INLINE void | canvas_set_font_face_cache (canvas_t *canvas, font_face_cache_t *cache) |
| Assigns a font-face cache to the canvas for font management. | |
| NOVASVG_INLINE font_face_cache_t * | canvas_get_font_face_cache (const canvas_t *canvas) |
| Returns the font-face cache associated with the canvas. | |
| NOVASVG_INLINE void | canvas_add_font_face (canvas_t *canvas, const char *family, bool bold, bool italic, font_face_t *face) |
| Add a font face to the canvas using the specified family and style. | |
| NOVASVG_INLINE bool | canvas_add_font_file (canvas_t *canvas, const char *family, bool bold, bool italic, const char *filename, int ttcindex) |
| Load a font face from a file and add it to the canvas using the specified family and style. | |
| NOVASVG_INLINE bool | canvas_select_font_face (canvas_t *canvas, const char *family, bool bold, bool italic) |
| Selects and sets the current font face on the canvas. | |
| NOVASVG_INLINE void | canvas_set_font (canvas_t *canvas, font_face_t *face, float size) |
| Sets the font face and size for text rendering on the canvas. | |
| NOVASVG_INLINE void | canvas_set_font_face (canvas_t *canvas, font_face_t *face) |
| Sets the font face for text rendering on the canvas. | |
| NOVASVG_INLINE font_face_t * | canvas_get_font_face (const canvas_t *canvas) |
| Retrieves the current font face used for text rendering on the canvas. | |
| NOVASVG_INLINE void | canvas_set_font_size (canvas_t *canvas, float size) |
| Sets the font size for text rendering on the canvas. | |
| NOVASVG_INLINE float | canvas_get_font_size (const canvas_t *canvas) |
| Retrieves the current font size used for text rendering on the canvas. | |
| NOVASVG_INLINE void | canvas_set_fill_rule (canvas_t *canvas, fill_rule_t winding) |
| Sets the fill rule. | |
| NOVASVG_INLINE fill_rule_t | canvas_get_fill_rule (const canvas_t *canvas) |
| Retrieves the current fill rule. | |
| NOVASVG_INLINE void | canvas_set_operator (canvas_t *canvas, operator_t op) |
| Sets the compositing operator. | |
| NOVASVG_INLINE operator_t | canvas_get_operator (const canvas_t *canvas) |
| Retrieves the current compositing operator. | |
| NOVASVG_INLINE void | canvas_set_opacity (canvas_t *canvas, float opacity) |
| Sets the global opacity. | |
| NOVASVG_INLINE float | canvas_get_opacity (const canvas_t *canvas) |
| Retrieves the current global opacity. | |
| NOVASVG_INLINE void | canvas_set_line_width (canvas_t *canvas, float line_width) |
| Sets the line width. | |
| NOVASVG_INLINE float | canvas_get_line_width (const canvas_t *canvas) |
| Retrieves the current line width. | |
| NOVASVG_INLINE void | canvas_set_line_cap (canvas_t *canvas, line_cap_t line_cap) |
| Sets the line cap style. | |
| NOVASVG_INLINE line_cap_t | canvas_get_line_cap (const canvas_t *canvas) |
| Retrieves the current line cap style. | |
| NOVASVG_INLINE void | canvas_set_line_join (canvas_t *canvas, line_join_t line_join) |
| Sets the line join style. | |
| NOVASVG_INLINE line_join_t | canvas_get_line_join (const canvas_t *canvas) |
| Retrieves the current line join style. | |
| NOVASVG_INLINE void | canvas_set_miter_limit (canvas_t *canvas, float miter_limit) |
| Sets the miter limit. | |
| NOVASVG_INLINE float | canvas_get_miter_limit (const canvas_t *canvas) |
| Retrieves the current miter limit. | |
| NOVASVG_INLINE void | canvas_set_dash (canvas_t *canvas, float offset, const float *dashes, int ndashes) |
| Sets the dash pattern. | |
| NOVASVG_INLINE void | canvas_set_dash_offset (canvas_t *canvas, float offset) |
| Sets the dash offset. | |
| NOVASVG_INLINE float | canvas_get_dash_offset (const canvas_t *canvas) |
| Retrieves the current dash offset. | |
| NOVASVG_INLINE void | canvas_set_dash_array (canvas_t *canvas, const float *dashes, int ndashes) |
| Sets the dash pattern. | |
| NOVASVG_INLINE int | canvas_get_dash_array (const canvas_t *canvas, const float **dashes) |
| Retrieves the current dash pattern. | |
| NOVASVG_INLINE void | canvas_translate (canvas_t *canvas, float tx, float ty) |
Translates the current transformation matrix by offsets tx and ty. | |
| NOVASVG_INLINE void | canvas_scale (canvas_t *canvas, float sx, float sy) |
Scales the current transformation matrix by factors sx and sy. | |
| NOVASVG_INLINE void | canvas_shear (canvas_t *canvas, float shx, float shy) |
Shears the current transformation matrix by factors shx and shy. | |
| NOVASVG_INLINE void | canvas_rotate (canvas_t *canvas, float angle) |
| Rotates the current transformation matrix by the specified angle (in radians). | |
| NOVASVG_INLINE void | canvas_transform (canvas_t *canvas, const matrix_t *matrix) |
Multiplies the current transformation matrix with the specified matrix. | |
| NOVASVG_INLINE void | canvas_reset_matrix (canvas_t *canvas) |
| Resets the current transformation matrix to the identity matrix. | |
| NOVASVG_INLINE void | canvas_set_matrix (canvas_t *canvas, const matrix_t *matrix) |
Resets the current transformation matrix to the specified matrix. | |
| NOVASVG_INLINE void | canvas_get_matrix (const canvas_t *canvas, matrix_t *matrix) |
Stores the current transformation matrix in matrix. | |
| NOVASVG_INLINE void | canvas_map (const canvas_t *canvas, float x, float y, float *xx, float *yy) |
Transforms the point (x, y) using the current transformation matrix and stores the result in (xx, yy). | |
| NOVASVG_INLINE void | canvas_map_point (const canvas_t *canvas, const point_t *src, point_t *dst) |
Transforms the src point using the current transformation matrix and stores the result in dst. | |
| NOVASVG_INLINE void | canvas_map_rect (const canvas_t *canvas, const rect_t *src, rect_t *dst) |
Transforms the src rectangle using the current transformation matrix and stores the result in dst. | |
| NOVASVG_INLINE void | canvas_move_to (canvas_t *canvas, float x, float y) |
| Moves the current point to a new position. | |
| NOVASVG_INLINE void | canvas_line_to (canvas_t *canvas, float x, float y) |
| Adds a straight line segment to the current path. | |
| NOVASVG_INLINE void | canvas_quad_to (canvas_t *canvas, float x1, float y1, float x2, float y2) |
| Adds a quadratic Bézier curve to the current path. | |
| NOVASVG_INLINE void | canvas_cubic_to (canvas_t *canvas, float x1, float y1, float x2, float y2, float x3, float y3) |
| Adds a cubic Bézier curve to the current path. | |
| NOVASVG_INLINE void | canvas_arc_to (canvas_t *canvas, float rx, float ry, float angle, bool large_arc_flag, bool sweep_flag, float x, float y) |
| Adds an elliptical arc to the current path. | |
| NOVASVG_INLINE void | canvas_rect (canvas_t *canvas, float x, float y, float w, float h) |
| Adds a rectangle to the current path. | |
| NOVASVG_INLINE void | canvas_round_rect (canvas_t *canvas, float x, float y, float w, float h, float rx, float ry) |
| Adds a rounded rectangle to the current path. | |
| NOVASVG_INLINE void | canvas_ellipse (canvas_t *canvas, float cx, float cy, float rx, float ry) |
| Adds an ellipse to the current path. | |
| NOVASVG_INLINE void | canvas_circle (canvas_t *canvas, float cx, float cy, float r) |
| Adds a circle to the current path. | |
| NOVASVG_INLINE void | canvas_arc (canvas_t *canvas, float cx, float cy, float r, float a0, float a1, bool ccw) |
| Adds an arc to the current path. | |
| NOVASVG_INLINE void | canvas_add_path (canvas_t *canvas, const path_t *path) |
| Adds a path to the current path. | |
| NOVASVG_INLINE void | canvas_new_path (canvas_t *canvas) |
| Starts a new path on the canvas. | |
| NOVASVG_INLINE void | canvas_close_path (canvas_t *canvas) |
| Closes the current path. | |
| NOVASVG_INLINE void | canvas_get_current_point (const canvas_t *canvas, float *x, float *y) |
| Retrieves the current point of the canvas. | |
| NOVASVG_INLINE path_t * | canvas_get_path (const canvas_t *canvas) |
| Gets the current path from the canvas. | |
| NOVASVG_INLINE bool | canvas_fill_contains (canvas_t *canvas, float x, float y) |
| Tests whether a point lies within the current fill region. | |
| NOVASVG_INLINE bool | canvas_stroke_contains (canvas_t *canvas, float x, float y) |
| Tests whether a point lies within the current stroke region. | |
| NOVASVG_INLINE bool | canvas_clip_contains (canvas_t *canvas, float x, float y) |
| Tests whether a point lies within the current clipping region. | |
| NOVASVG_INLINE void | canvas_fill_extents (canvas_t *canvas, rect_t *extents) |
| Computes the bounding box of the area that would be affected by a fill operation. | |
| NOVASVG_INLINE void | canvas_stroke_extents (canvas_t *canvas, rect_t *extents) |
| Computes the bounding box of the area that would be affected by a stroke operation. | |
| NOVASVG_INLINE void | canvas_clip_extents (canvas_t *canvas, rect_t *extents) |
| Gets the bounding box of the current clipping region. | |
| NOVASVG_INLINE void | canvas_fill (canvas_t *canvas) |
| A drawing operator that fills the current path according to the current fill rule. | |
| NOVASVG_INLINE void | canvas_stroke (canvas_t *canvas) |
| A drawing operator that strokes the current path according to the current stroke settings. | |
| NOVASVG_INLINE void | canvas_clip (canvas_t *canvas) |
| A drawing operator that intersects the current clipping region with the current path according to the current fill rule. | |
| NOVASVG_INLINE void | canvas_paint (canvas_t *canvas) |
| A drawing operator that paints the current clipping region using the current paint. | |
| NOVASVG_INLINE void | canvas_fill_preserve (canvas_t *canvas) |
| A drawing operator that fills the current path according to the current fill rule. | |
| NOVASVG_INLINE void | canvas_stroke_preserve (canvas_t *canvas) |
| A drawing operator that strokes the current path according to the current stroke settings. | |
| NOVASVG_INLINE void | canvas_clip_preserve (canvas_t *canvas) |
| A drawing operator that intersects the current clipping region with the current path according to the current fill rule. | |
| NOVASVG_INLINE void | canvas_fill_rect (canvas_t *canvas, float x, float y, float w, float h) |
| Fills a rectangle according to the current fill rule. | |
| NOVASVG_INLINE void | canvas_fill_path (canvas_t *canvas, const path_t *path) |
| Fills a path according to the current fill rule. | |
| NOVASVG_INLINE void | canvas_stroke_rect (canvas_t *canvas, float x, float y, float w, float h) |
| Strokes a rectangle with the current stroke settings. | |
| NOVASVG_INLINE void | canvas_stroke_path (canvas_t *canvas, const path_t *path) |
| Strokes a path with the current stroke settings. | |
| NOVASVG_INLINE void | canvas_clip_rect (canvas_t *canvas, float x, float y, float w, float h) |
| Intersects the current clipping region with a rectangle according to the current fill rule. | |
| NOVASVG_INLINE void | canvas_clip_path (canvas_t *canvas, const path_t *path) |
| Intersects the current clipping region with a path according to the current fill rule. | |
| NOVASVG_INLINE float | canvas_add_glyph (canvas_t *canvas, codepoint_t codepoint, float x, float y) |
| Adds a glyph to the current path at the specified origin. | |
| NOVASVG_INLINE float | canvas_add_text (canvas_t *canvas, const void *text, int length, text_encoding_t encoding, float x, float y) |
| Adds text to the current path at the specified origin. | |
| NOVASVG_INLINE float | canvas_fill_text (canvas_t *canvas, const void *text, int length, text_encoding_t encoding, float x, float y) |
| Fills a text at the specified origin. | |
| NOVASVG_INLINE float | canvas_stroke_text (canvas_t *canvas, const void *text, int length, text_encoding_t encoding, float x, float y) |
| Strokes a text at the specified origin. | |
| NOVASVG_INLINE float | canvas_clip_text (canvas_t *canvas, const void *text, int length, text_encoding_t encoding, float x, float y) |
| Intersects the current clipping region with text at the specified origin. | |
| NOVASVG_INLINE void | canvas_font_metrics (const canvas_t *canvas, float *ascent, float *descent, float *line_gap, rect_t *extents) |
| Retrieves font metrics for the current font. | |
| NOVASVG_INLINE void | canvas_glyph_metrics (canvas_t *canvas, codepoint_t codepoint, float *advance_width, float *left_side_bearing, rect_t *extents) |
| Retrieves metrics for a specific glyph. | |
| NOVASVG_INLINE float | canvas_text_extents (canvas_t *canvas, const void *text, int length, text_encoding_t encoding, rect_t *extents) |
| Retrieves the extents of a text. | |
| NOVASVG_INLINE void | text_iterator_init (text_iterator_t *it, const void *text, int length, text_encoding_t encoding) |
| Initializes a text iterator. | |
| NOVASVG_INLINE bool | text_iterator_has_next (const text_iterator_t *it) |
| Checks if there are more code points to iterate. | |
| NOVASVG_INLINE codepoint_t | text_iterator_next (text_iterator_t *it) |
| Retrieves the next code point and advances the iterator. | |
| NOVASVG_INLINE font_face_t * | font_face_load_from_file (const char *filename, int ttcindex) |
| Loads a font face from a file. | |
| NOVASVG_INLINE font_face_t * | font_face_load_from_data (const void *data, unsigned int length, int ttcindex, destroy_func_t destroy_func, void *closure) |
| Loads a font face from memory. | |
| NOVASVG_INLINE font_face_t * | font_face_reference (font_face_t *face) |
| Increments the reference count of a font face. | |
| NOVASVG_INLINE void | font_face_destroy (font_face_t *face) |
| Decrements the reference count and potentially destroys the font face. | |
| NOVASVG_INLINE int | font_face_get_reference_count (const font_face_t *face) |
| Retrieves the current reference count of a font face. | |
| NOVASVG_INLINE float | font_face_get_units_per_em (const font_face_t *face) |
| NOVASVG_INLINE void | font_face_enumerate_codepoints (const font_face_t *face, void(*callback)(uint32_t codepoint, void *closure), void *closure) |
| NOVASVG_INLINE void | font_face_get_metrics (const font_face_t *face, float size, float *ascent, float *descent, float *line_gap, rect_t *extents) |
| Retrieves metrics for a font face at a specified size. | |
| NOVASVG_INLINE void | font_face_get_glyph_metrics (font_face_t *face, float size, codepoint_t codepoint, float *advance_width, float *left_side_bearing, rect_t *extents) |
| Retrieves metrics for a specified glyph at a given size. | |
| NOVASVG_INLINE float | font_face_get_kern_advance (font_face_t *face, float size, codepoint_t ch1, codepoint_t ch2) |
| NOVASVG_INLINE float | font_face_get_glyph_path (font_face_t *face, float size, float x, float y, codepoint_t codepoint, path_t *path) |
| Retrieves the path of a glyph and its advance width. | |
| NOVASVG_INLINE float | font_face_traverse_glyph_path (font_face_t *face, float size, float x, float y, codepoint_t codepoint, path_traverse_func_t traverse_func, void *closure) |
| Traverses the path of a glyph and calls a callback for each path element. | |
| NOVASVG_INLINE void | font_face_init_ligatures (font_face_t *face) |
| NOVASVG_INLINE codepoint_t | font_face_apply_ligature (font_face_t *face, text_iterator_t *it, codepoint_t codepoint) |
| NOVASVG_INLINE float | font_face_text_extents (font_face_t *face, float size, const void *text, int length, text_encoding_t encoding, rect_t *extents) |
| Computes the bounding box of a text string and its advance width. | |
| NOVASVG_INLINE font_face_cache_t * | font_face_cache_create (void) |
| Create a new, empty font‐face cache. | |
| NOVASVG_INLINE font_face_cache_t * | font_face_cache_reference (font_face_cache_t *cache) |
| Increments the reference count of a font‐face cache. | |
| NOVASVG_INLINE void | font_face_cache_destroy (font_face_cache_t *cache) |
| Decrement the reference count of a font‐face cache and destroy it when it reaches zero. | |
| NOVASVG_INLINE int | font_face_cache_reference_count (const font_face_cache_t *cache) |
| Retrieve the current reference count of a font‐face cache. | |
| NOVASVG_INLINE void | font_face_cache_reset (font_face_cache_t *cache) |
| Remove all entries from a font‐face cache. | |
| NOVASVG_INLINE void | font_face_cache_add (font_face_cache_t *cache, const char *family, bool bold, bool italic, font_face_t *face) |
| Add a font face to the cache with the specified family and style. | |
| NOVASVG_INLINE bool | font_face_cache_add_file (font_face_cache_t *cache, const char *family, bool bold, bool italic, const char *filename, int ttcindex) |
| Load a font face from a file and add it to the cache with the specified family and style. | |
| NOVASVG_INLINE font_face_t * | font_face_cache_get (font_face_cache_t *cache, const char *family, bool bold, bool italic) |
| Retrieve a font face from the cache by family and style. | |
| NOVASVG_INLINE int | font_face_cache_load_file (font_face_cache_t *cache, const char *filename) |
| Load all font faces from a file and add them to the cache. | |
| NOVASVG_INLINE int | font_face_cache_load_dir (font_face_cache_t *cache, const char *dirname) |
| Load all font faces from files in a directory recursively and add them to the cache. | |
| NOVASVG_INLINE int | font_face_cache_load_sys (font_face_cache_t *cache) |
| Load all available system font faces and add them to the cache. | |
| NOVASVG_INLINE void | matrix_init (matrix_t *matrix, float a, float b, float c, float d, float e, float f) |
| Initializes a 2D transformation matrix. | |
| NOVASVG_INLINE void | matrix_init_identity (matrix_t *matrix) |
| Initializes a 2D transformation matrix to the identity matrix. | |
| NOVASVG_INLINE void | matrix_init_translate (matrix_t *matrix, float tx, float ty) |
| Initializes a 2D transformation matrix for translation. | |
| NOVASVG_INLINE void | matrix_init_scale (matrix_t *matrix, float sx, float sy) |
| Initializes a 2D transformation matrix for scaling. | |
| NOVASVG_INLINE void | matrix_init_rotate (matrix_t *matrix, float angle) |
| Initializes a 2D transformation matrix for rotation. | |
| NOVASVG_INLINE void | matrix_init_shear (matrix_t *matrix, float shx, float shy) |
| Initializes a 2D transformation matrix for shearing. | |
| NOVASVG_INLINE void | matrix_translate (matrix_t *matrix, float tx, float ty) |
Adds a translation with offsets tx and ty to the matrix. | |
| NOVASVG_INLINE void | matrix_scale (matrix_t *matrix, float sx, float sy) |
Scales the matrix by factors sx and sy | |
| NOVASVG_INLINE void | matrix_rotate (matrix_t *matrix, float angle) |
| Rotates the matrix by the specified angle (in radians). | |
| NOVASVG_INLINE void | matrix_shear (matrix_t *matrix, float shx, float shy) |
Shears the matrix by factors shx and shy. | |
| NOVASVG_INLINE void | matrix_multiply (matrix_t *matrix, const matrix_t *left, const matrix_t *right) |
Multiplies left and right matrices and stores the result in matrix. | |
| NOVASVG_INLINE bool | matrix_invert (const matrix_t *matrix, matrix_t *inverse) |
Calculates the inverse of matrix and stores it in inverse. | |
| NOVASVG_INLINE void | matrix_map (const matrix_t *matrix, float x, float y, float *xx, float *yy) |
Transforms the point (x, y) using matrix and stores the result in (xx, yy). | |
| NOVASVG_INLINE void | matrix_map_point (const matrix_t *matrix, const point_t *src, point_t *dst) |
Transforms the src point using matrix and stores the result in dst. | |
| NOVASVG_INLINE void | matrix_map_points (const matrix_t *matrix, const point_t *src, point_t *dst, int count) |
Transforms an array of src points using matrix and stores the results in dst. | |
| NOVASVG_INLINE void | matrix_map_rect (const matrix_t *matrix, const rect_t *src, rect_t *dst) |
Transforms the src rectangle using matrix and stores the result in dst. | |
| NOVASVG_INLINE int | parse_matrix_parameters (const char **begin, const char *end, float values[6], int required, int optional) |
| NOVASVG_INLINE bool | matrix_parse (matrix_t *matrix, const char *data, int length) |
| Parses an SVG transform string into a matrix. | |
| NOVASVG_INLINE void | color_init_rgb (color_t *color, float r, float g, float b) |
| Initializes a color using RGB components in the 0-1 range. | |
| NOVASVG_INLINE void | color_init_rgba (color_t *color, float r, float g, float b, float a) |
| Initializes a color using RGBA components in the 0-1 range. | |
| NOVASVG_INLINE void | color_init_rgb8 (color_t *color, int r, int g, int b) |
| Initializes a color using RGB components in the 0-255 range. | |
| NOVASVG_INLINE void | color_init_rgba8 (color_t *color, int r, int g, int b, int a) |
| Initializes a color using RGBA components in the 0-255 range. | |
| NOVASVG_INLINE void | color_init_rgba32 (color_t *color, unsigned int value) |
| Initializes a color from a 32-bit unsigned RGBA value. | |
| NOVASVG_INLINE void | color_init_argb32 (color_t *color, unsigned int value) |
| Initializes a color from a 32-bit unsigned ARGB value. | |
| NOVASVG_INLINE void | color_init_hsl (color_t *color, float h, float s, float l) |
| Initializes a color with the specified HSL color values. | |
| NOVASVG_INLINE void | color_init_hsla (color_t *color, float h, float s, float l, float a) |
| Initializes a color with the specified HSLA color values. | |
| NOVASVG_INLINE unsigned int | color_to_rgba32 (const color_t *color) |
| Converts a color to a 32-bit unsigned RGBA value. | |
| NOVASVG_INLINE unsigned int | color_to_argb32 (const color_t *color) |
| Converts a color to a 32-bit unsigned ARGB value. | |
| NOVASVG_INLINE int | color_parse (color_t *color, const char *data, int length) |
| Parses a color from a string using CSS color syntax. | |
| NOVASVG_INLINE paint_t * | paint_create_rgb (float r, float g, float b) |
| Creates a solid RGB paint. | |
| NOVASVG_INLINE paint_t * | paint_create_rgba (float r, float g, float b, float a) |
| Creates a solid RGBA paint. | |
| NOVASVG_INLINE paint_t * | paint_create_color (const color_t *color) |
| Creates a solid color paint. | |
| NOVASVG_INLINE paint_t * | paint_create_linear_gradient (float x1, float y1, float x2, float y2, spread_method_t spread, const gradient_stop_t *stops, int nstops, const matrix_t *matrix) |
| Creates a linear gradient paint. | |
| NOVASVG_INLINE paint_t * | paint_create_radial_gradient (float cx, float cy, float cr, float fx, float fy, float fr, spread_method_t spread, const gradient_stop_t *stops, int nstops, const matrix_t *matrix) |
| Creates a radial gradient paint. | |
| NOVASVG_INLINE paint_t * | paint_create_texture (surface_t *surface, texture_type_t type, float opacity, const matrix_t *matrix) |
| Creates a texture paint from a surface. | |
| NOVASVG_INLINE paint_t * | paint_reference (paint_t *paint) |
| Increments the reference count of a paint object. | |
| NOVASVG_INLINE void | paint_destroy (paint_t *paint) |
| Decrements the reference count and destroys the paint if the count reaches zero. | |
| NOVASVG_INLINE int | paint_get_reference_count (const paint_t *paint) |
| Retrieves the reference count of a paint object. | |
| NOVASVG_INLINE void | path_iterator_init (path_iterator_t *it, const path_t *path) |
| Initializes a path iterator for a given path. | |
| NOVASVG_INLINE bool | path_iterator_has_next (const path_iterator_t *it) |
| Checks if there are more elements to iterate over. | |
| NOVASVG_INLINE path_command_t | path_iterator_next (path_iterator_t *it, point_t points[3]) |
| Retrieves the current command and its associated points, then advances the iterator. | |
| NOVASVG_INLINE path_t * | path_create (void) |
| Creates a new path object. | |
| NOVASVG_INLINE path_t * | path_reference (path_t *path) |
| Increases the reference count of a path object. | |
| NOVASVG_INLINE void | path_destroy (path_t *path) |
| Decreases the reference count of a path object. | |
| NOVASVG_INLINE int | path_get_reference_count (const path_t *path) |
| Retrieves the reference count of a path object. | |
| NOVASVG_INLINE int | path_get_elements (const path_t *path, const path_element_t **elements) |
| Retrieves the elements of a path. | |
| NOVASVG_INLINE path_element_t * | path_add_command (path_t *path, path_command_t command, int npoints) |
| NOVASVG_INLINE void | path_move_to (path_t *path, float x, float y) |
| Moves the current point to a new position. | |
| NOVASVG_INLINE void | path_line_to (path_t *path, float x, float y) |
| Adds a straight line segment to the path. | |
| NOVASVG_INLINE void | path_quad_to (path_t *path, float x1, float y1, float x2, float y2) |
| Adds a quadratic Bézier curve to the path. | |
| NOVASVG_INLINE void | path_cubic_to (path_t *path, float x1, float y1, float x2, float y2, float x3, float y3) |
| Adds a cubic Bézier curve to the path. | |
| NOVASVG_INLINE void | path_arc_to (path_t *path, float rx, float ry, float angle, bool large_arc_flag, bool sweep_flag, float x, float y) |
| Adds an elliptical arc to the path. | |
| NOVASVG_INLINE void | path_close (path_t *path) |
| Closes the current sub-path. | |
| NOVASVG_INLINE void | path_get_current_point (const path_t *path, float *x, float *y) |
| Retrieves the current point of the path. | |
| NOVASVG_INLINE void | path_reserve (path_t *path, int count) |
| Reserves space for path elements. | |
| NOVASVG_INLINE void | path_reset (path_t *path) |
| Resets the path. | |
| NOVASVG_INLINE void | path_add_rect (path_t *path, float x, float y, float w, float h) |
| Adds a rectangle to the path. | |
| NOVASVG_INLINE void | path_add_round_rect (path_t *path, float x, float y, float w, float h, float rx, float ry) |
| Adds a rounded rectangle to the path. | |
| NOVASVG_INLINE void | path_add_ellipse (path_t *path, float cx, float cy, float rx, float ry) |
| Adds an ellipse to the path. | |
| NOVASVG_INLINE void | path_add_circle (path_t *path, float cx, float cy, float r) |
| Adds a circle to the path. | |
| NOVASVG_INLINE void | path_add_arc (path_t *path, float cx, float cy, float r, float a0, float a1, bool ccw) |
| Adds an arc to the path. | |
| NOVASVG_INLINE void | path_transform (path_t *path, const matrix_t *matrix) |
| Applies a transformation matrix to the path. | |
| NOVASVG_INLINE void | path_add_path (path_t *path, const path_t *source, const matrix_t *matrix) |
| Adds a sub-path to the path. | |
| NOVASVG_INLINE void | path_traverse (const path_t *path, path_traverse_func_t traverse_func, void *closure) |
| Traverses the path and calls the callback for each element. | |
| NOVASVG_INLINE void | split_bezier (const bezier_t *b, bezier_t *first, bezier_t *second) |
| NOVASVG_INLINE void | path_traverse_flatten (const path_t *path, path_traverse_func_t traverse_func, void *closure) |
| Traverses the path with Bézier curves flattened to line segments. | |
| NOVASVG_INLINE void | dash_traverse_func (void *closure, path_command_t command, const point_t *points, int npoints) |
| NOVASVG_INLINE void | path_traverse_dashed (const path_t *path, float offset, const float *dashes, int ndashes, path_traverse_func_t traverse_func, void *closure) |
| Traverses the path with a dashed pattern and calls the callback for each segment. | |
| NOVASVG_INLINE path_t * | path_clone (const path_t *path) |
| Creates a copy of the path. | |
| NOVASVG_INLINE void | clone_traverse_func (void *closure, path_command_t command, const point_t *points, int npoints) |
| NOVASVG_INLINE path_t * | path_clone_flatten (const path_t *path) |
| Creates a copy of the path with Bézier curves flattened to line segments. | |
| NOVASVG_INLINE path_t * | path_clone_dashed (const path_t *path, float offset, const float *dashes, int ndashes) |
| Creates a copy of the path with a dashed pattern applied. | |
| NOVASVG_INLINE void | extents_traverse_func (void *closure, path_command_t command, const point_t *points, int npoints) |
| NOVASVG_INLINE float | path_extents (const path_t *path, rect_t *extents, bool tight) |
| Computes the bounding box and total length of the path. | |
| NOVASVG_INLINE float | path_length (const path_t *path) |
| Calculates the total length of the path. | |
| NOVASVG_INLINE bool | parse_arc_flag (const char **begin, const char *end, bool *flag) |
| NOVASVG_INLINE bool | parse_path_coordinates (const char **begin, const char *end, float values[6], int offset, int count) |
| NOVASVG_INLINE bool | path_parse (path_t *path, const char *data, int length) |
Parses SVG path data into a path_t object. | |
| void | span_buffer_init (span_buffer_t *span_buffer) |
| void | span_buffer_init_rect (span_buffer_t *span_buffer, int x, int y, int width, int height) |
| void | span_buffer_reset (span_buffer_t *span_buffer) |
| void | span_buffer_destroy (span_buffer_t *span_buffer) |
| void | span_buffer_copy (span_buffer_t *span_buffer, const span_buffer_t *source) |
| bool | span_buffer_contains (const span_buffer_t *span_buffer, float x, float y) |
| void | span_buffer_extents (span_buffer_t *span_buffer, rect_t *extents) |
| void | span_buffer_intersect (span_buffer_t *span_buffer, const span_buffer_t *a, const span_buffer_t *b) |
| void | rasterize (span_buffer_t *span_buffer, const path_t *path, const matrix_t *matrix, const rect_t *clip_rect, const stroke_data_t *stroke_data, fill_rule_t winding) |
| NOVASVG_INLINE void | span_buffer_update_extents (span_buffer_t *span_buffer) |
| NOVASVG_INLINE PVG_FT_Outline * | ft_outline_create (int points, int contours) |
| NOVASVG_INLINE void | ft_outline_destroy (PVG_FT_Outline *outline) |
| NOVASVG_INLINE PVG_FT_Pos | ft_coord_round (float v) |
| NOVASVG_INLINE void | ft_outline_move_to (PVG_FT_Outline *ft, float x, float y) |
| NOVASVG_INLINE void | ft_outline_line_to (PVG_FT_Outline *ft, float x, float y) |
| NOVASVG_INLINE void | ft_outline_cubic_to (PVG_FT_Outline *ft, float x1, float y1, float x2, float y2, float x3, float y3) |
| NOVASVG_INLINE void | ft_outline_close (PVG_FT_Outline *ft) |
| NOVASVG_INLINE void | ft_outline_end (PVG_FT_Outline *ft) |
| NOVASVG_INLINE PVG_FT_Outline * | ft_outline_convert_stroke (const path_t *path, const matrix_t *matrix, const stroke_data_t *stroke_data) |
| NOVASVG_INLINE PVG_FT_Outline * | ft_outline_convert (const path_t *path, const matrix_t *matrix, const stroke_data_t *stroke_data) |
| NOVASVG_INLINE PVG_FT_Outline * | ft_outline_convert_dash (const path_t *path, const matrix_t *matrix, const stroke_dash_t *stroke_dash) |
| NOVASVG_INLINE void | spans_generation_callback (int count, const PVG_FT_Span *spans, void *user) |
| surface_t * | surface_create (int width, int height) |
| Creates a new image surface with the specified dimensions. | |
| surface_t * | surface_create_for_data (unsigned char *data, int width, int height, int stride) |
| Creates an image surface using existing pixel data. | |
| surface_t * | surface_load_from_image_file (const char *filename) |
| Loads an image surface from a file. | |
| surface_t * | surface_load_from_image_data (const void *data, int length) |
| Loads an image surface from raw image data. | |
| surface_t * | surface_load_from_image_base64 (const char *data, int length) |
| Loads an image surface from base64-encoded data. | |
| surface_t * | surface_reference (surface_t *surface) |
| Increments the reference count for a surface. | |
| void | surface_destroy (surface_t *surface) |
| Decrements the reference count and destroys the surface if the count reaches zero. | |
| int | surface_get_reference_count (const surface_t *surface) |
| Gets the current reference count of a surface. | |
| unsigned char * | surface_get_data (const surface_t *surface) |
| Gets the pixel data of the surface. | |
| int | surface_get_width (const surface_t *surface) |
| Gets the width of the surface. | |
| int | surface_get_height (const surface_t *surface) |
| Gets the height of the surface. | |
| int | surface_get_stride (const surface_t *surface) |
| Gets the stride of the surface. | |
| void | surface_clear (surface_t *surface, const color_t *color) |
| Clears the entire surface with the specified color. | |
| void | convert_argb_to_rgba (unsigned char *dst, const unsigned char *src, int width, int height, int stride) |
| Converts pixel data from premultiplied ARGB to RGBA format. | |
| void | convert_rgba_to_argb (unsigned char *dst, const unsigned char *src, int width, int height, int stride) |
| Converts pixel data from RGBA to premultiplied ARGB format. | |
| NOVASVG_INLINE uint8_t * | base64_decode (const char *data, int length, size_t *out_length) |
| NOVASVG_INLINE uint32_t | premultiply_argb (uint32_t color) |
| NOVASVG_INLINE bool | parse_number (const char **begin, const char *end, float *number) |
| NOVASVG_INLINE bool | skip_delim (const char **begin, const char *end, const char delim) |
| NOVASVG_INLINE bool | skip_string (const char **begin, const char *end, const char *data) |
| NOVASVG_INLINE bool | skip_ws (const char **begin, const char *end) |
| NOVASVG_INLINE bool | skip_ws_and_delim (const char **begin, const char *end, char delim) |
| NOVASVG_INLINE bool | skip_ws_and_comma (const char **begin, const char *end) |
| NOVASVG_INLINE bool | skip_ws_or_delim (const char **begin, const char *end, char delim, bool *has_delim) |
| NOVASVG_INLINE bool | skip_ws_or_comma (const char **begin, const char *end, bool *has_comma) |
| NOVASVG_INLINE void | skip_css_unit (const char **begin, const char *end, float *number) |
Variables | |
| NOVASVG_INLINE const composition_solid_function_t | composition_solid_table [] |
| NOVASVG_INLINE const composition_function_t | composition_table [] |
| typedef struct canvas novasvg::render::canvas_t |
Represents a drawing context.
| typedef unsigned int novasvg::render::codepoint_t |
Represents a Unicode code point.
| typedef struct novasvg::render::color novasvg::render::color_t |
Represents a color with red, green, blue, and alpha components.
| typedef void(* novasvg::render::composition_function_t) (uint32_t *dest, int length, const uint32_t *src, uint32_t const_alpha) |
| typedef void(* novasvg::render::composition_solid_function_t) (uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) |
| typedef void(* novasvg::render::destroy_func_t) (void *closure) |
A function pointer type for a cleanup callback.
| closure | A pointer to the resource to be cleaned up. |
| typedef struct font_face_cache novasvg::render::font_face_cache_t |
Represents a cache of loaded font faces.
| typedef struct font_face novasvg::render::font_face_t |
Represents a font face.
| typedef struct novasvg::render::glyph novasvg::render::glyph_t |
| typedef matrix novasvg::render::matrix_t |
A structure representing a 2D transformation matrix.
| typedef int novasvg::render::mutex_t |
| typedef struct paint novasvg::render::paint_t |
Represents a paint object used for drawing operations.
Enumeration defining path commands.
| typedef union novasvg::render::path_element novasvg::render::path_element_t |
| typedef struct novasvg::render::path_iterator novasvg::render::path_iterator_t |
Iterator for traversing path elements in a path.
| typedef struct path novasvg::render::path_t |
Represents a 2D path for drawing operations.
| typedef void(* novasvg::render::path_traverse_func_t) (void *closure, path_command_t command, const point_t *points, int npoints) |
Callback function type for traversing a path.
This function type defines a callback used to traverse path elements.
| closure | A pointer to user-defined data passed to the callback. |
| command | The current path command. |
| points | An array of points associated with the command. |
| npoints | The number of points in the array. |
| typedef struct novasvg::render::point novasvg::render::point_t |
A structure representing a point in 2D space.
| typedef struct novasvg::render::rect novasvg::render::rect_t |
A structure representing a rectangle in 2D space.
| typedef int novasvg::render::ref_count_t |
| typedef struct novasvg::render::state novasvg::render::state_t |
| typedef surface novasvg::render::surface_t |
Represents an image surface for drawing operations.
Stores pixel data in a 32-bit premultiplied ARGB format (0xAARRGGBB), where red, green, and blue channels are multiplied by the alpha channel and divided by 255.
Text encodings used for converting text data to code points.
| typedef struct novasvg::render::text_iterator novasvg::render::text_iterator_t |
Iterator for traversing code points in text data.
| typedef void(* novasvg::render::write_func_t) (void *closure, void *data, int size) |
A function pointer type for a write callback.
| closure | A pointer to user-defined data or context. |
| data | A pointer to the data to be written. |
| size | The size of the data in bytes. |
Defines compositing operations.
Enumeration defining path commands.
| NOVASVG_INLINE uint8_t * novasvg::render::base64_decode | ( | const char * | data, |
| int | length, | ||
| size_t * | out_length | ||
| ) |
Definition at line 7822 of file surface.h.
Referenced by surface_load_from_image_base64().
| void novasvg::render::blend | ( | canvas_t * | canvas, |
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 1215 of file blend.h.
References blend_color(), blend_gradient(), blend_texture(), novasvg::render::solid_paint_t::color, novasvg::render::state::color, NOVASVG_PAINT_TYPE_COLOR, NOVASVG_PAINT_TYPE_GRADIENT, novasvg::render::state::paint, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::canvas::state, and novasvg::render::paint::type.
Referenced by canvas_fill_preserve(), canvas_paint(), canvas_stroke_preserve(), and novasvg::operator<<().
| NOVASVG_INLINE void novasvg::render::blend_color | ( | canvas_t * | canvas, |
| const color_t * | color, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 1094 of file blend.h.
References blend_solid(), novasvg_alpha, NOVASVG_OPERATOR_SRC, NOVASVG_OPERATOR_SRC_OVER, novasvg::render::state::op, novasvg::render::state::opacity, premultiply_color_with_opacity(), novasvg::render::canvas::state, and novasvg::render::canvas::surface.
Referenced by blend().
| NOVASVG_INLINE void novasvg::render::blend_gradient | ( | canvas_t * | canvas, |
| const gradient_paint_t * | gradient, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 1107 of file blend.h.
References blend_linear_gradient(), blend_radial_gradient(), novasvg::render::gradient_stop_t::color, COLOR_TABLE_SIZE, novasvg::render::gradient_data_t::colortable, novasvg::render::gradient_data_t::cr, novasvg::render::gradient_data_t::cx, novasvg::render::gradient_data_t::cy, novasvg::render::gradient_data_t::fr, novasvg::render::gradient_data_t::fx, novasvg::render::gradient_data_t::fy, INTERPOLATE_PIXEL_255(), novasvg::render::gradient_data_t::linear, novasvg::render::gradient_data_t::matrix, novasvg::render::gradient_paint_t::matrix, novasvg::render::state::matrix, matrix_invert(), matrix_multiply(), NOVASVG_GRADIENT_TYPE_LINEAR, novasvg::render::gradient_paint_t::nstops, novasvg::render::gradient_stop_t::offset, novasvg::render::state::op, novasvg::render::state::opacity, premultiply_color_with_opacity(), novasvg::render::gradient_data_t::radial, novasvg::render::gradient_data_t::spread, novasvg::render::gradient_paint_t::spread, novasvg::render::canvas::state, novasvg::render::gradient_paint_t::stops, novasvg::render::canvas::surface, novasvg::render::gradient_paint_t::type, novasvg::render::gradient_data_t::values, novasvg::render::gradient_paint_t::values, novasvg::render::gradient_data_t::x1, novasvg::render::gradient_data_t::x2, novasvg::render::gradient_data_t::y1, and novasvg::render::gradient_data_t::y2.
Referenced by blend().
| NOVASVG_INLINE void novasvg::render::blend_linear_gradient | ( | surface_t * | surface, |
| operator_t | op, | ||
| const gradient_data_t * | gradient, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 756 of file blend.h.
References BUFFER_SIZE, composition_table, novasvg::render::span_t::coverage, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::linear_gradient_values_t::dx, novasvg::render::linear_gradient_values_t::dy, fetch_linear_gradient(), novasvg::render::linear_gradient_values_t::l, novasvg::render::span_t::len, novasvg::render::gradient_data_t::linear, NOVASVG_MIN, novasvg::render::linear_gradient_values_t::off, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::surface::stride, novasvg::render::gradient_data_t::values, novasvg::render::span_t::x, novasvg::render::gradient_data_t::x1, novasvg::render::gradient_data_t::x2, novasvg::render::span_t::y, novasvg::render::gradient_data_t::y1, and novasvg::render::gradient_data_t::y2.
Referenced by blend_gradient().
| NOVASVG_INLINE int novasvg::render::blend_mode_channel | ( | int | cs, |
| int | cb, | ||
| int | as, | ||
| int | ab | ||
| ) |
Definition at line 465 of file blend.h.
References blend_mul255(), NOVASVG_MAX, NOVASVG_MIN, NOVASVG_OPERATOR_DARKEN, NOVASVG_OPERATOR_DIFFERENCE, NOVASVG_OPERATOR_LIGHTEN, NOVASVG_OPERATOR_MULTIPLY, and NOVASVG_OPERATOR_SCREEN.
| NOVASVG_INLINE uint32_t novasvg::render::blend_mode_pixel | ( | uint32_t | dest, |
| uint32_t | src | ||
| ) |
Definition at line 484 of file blend.h.
References blend_mul255(), novasvg_alpha, NOVASVG_MAX, and NOVASVG_MIN.
| NOVASVG_INLINE int novasvg::render::blend_mul255 | ( | int | x, |
| int | y | ||
| ) |
Definition at line 459 of file blend.h.
Referenced by blend_mode_channel(), and blend_mode_pixel().
| NOVASVG_INLINE void novasvg::render::blend_radial_gradient | ( | surface_t * | surface, |
| operator_t | op, | ||
| const gradient_data_t * | gradient, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 790 of file blend.h.
References novasvg::render::radial_gradient_values_t::a, BUFFER_SIZE, composition_table, novasvg::render::span_t::coverage, novasvg::render::gradient_data_t::cr, novasvg::render::gradient_data_t::cx, novasvg::render::gradient_data_t::cy, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::radial_gradient_values_t::dr, novasvg::render::radial_gradient_values_t::dx, novasvg::render::radial_gradient_values_t::dy, novasvg::render::radial_gradient_values_t::extended, fetch_radial_gradient(), novasvg::render::gradient_data_t::fr, novasvg::render::gradient_data_t::fx, novasvg::render::gradient_data_t::fy, novasvg::render::span_t::len, NOVASVG_MIN, novasvg::render::gradient_data_t::radial, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::radial_gradient_values_t::sqrfr, novasvg::render::surface::stride, novasvg::render::gradient_data_t::values, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by blend_gradient().
| NOVASVG_INLINE void novasvg::render::blend_solid | ( | surface_t * | surface, |
| operator_t | op, | ||
| uint32_t | solid, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 743 of file blend.h.
References composition_solid_table, novasvg::render::span_t::coverage, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::span_t::len, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::surface::stride, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by blend_color().
| NOVASVG_INLINE void novasvg::render::blend_texture | ( | canvas_t * | canvas, |
| const texture_paint_t * | texture, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 1181 of file blend.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, blend_transformed_argb(), blend_transformed_bilinear_tiled_argb(), blend_transformed_tiled_argb(), blend_untransformed_argb(), blend_untransformed_tiled_argb(), novasvg::render::matrix::c, novasvg::render::texture_data_t::const_alpha, novasvg::render::matrix::d, novasvg::render::texture_data_t::data, novasvg::render::surface::data, novasvg::render::texture_data_t::height, novasvg::render::surface::height, novasvg::render::texture_data_t::matrix, novasvg::render::texture_paint_t::matrix, novasvg::render::state::matrix, matrix_invert(), matrix_multiply(), NOVASVG_TEXTURE_TYPE_PLAIN, novasvg::render::state::op, novasvg::render::texture_paint_t::opacity, novasvg::render::state::opacity, novasvg::render::canvas::state, novasvg::render::texture_data_t::stride, novasvg::render::surface::stride, novasvg::render::texture_paint_t::surface, novasvg::render::canvas::surface, novasvg::render::texture_paint_t::type, novasvg::render::texture_data_t::width, and novasvg::render::surface::width.
Referenced by blend().
| NOVASVG_INLINE void novasvg::render::blend_transformed_argb | ( | surface_t * | surface, |
| operator_t | op, | ||
| const texture_data_t * | texture, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 860 of file blend.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, BUFFER_SIZE, novasvg::render::matrix::c, composition_table, novasvg::render::texture_data_t::const_alpha, novasvg::render::span_t::coverage, novasvg::render::matrix::d, novasvg::render::texture_data_t::data, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::matrix::e, novasvg::render::matrix::f, FIXED_SCALE, novasvg::render::texture_data_t::height, novasvg::render::span_t::len, novasvg::render::texture_data_t::matrix, NOVASVG_MIN, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::texture_data_t::stride, novasvg::render::surface::stride, novasvg::render::texture_data_t::width, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by blend_texture().
| NOVASVG_INLINE void novasvg::render::blend_transformed_bilinear_tiled_argb | ( | surface_t * | surface, |
| operator_t | op, | ||
| const texture_data_t * | texture, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 1027 of file blend.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, BUFFER_SIZE, novasvg::render::matrix::c, composition_table, novasvg::render::texture_data_t::const_alpha, novasvg::render::span_t::coverage, novasvg::render::matrix::d, novasvg::render::texture_data_t::data, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::matrix::e, novasvg::render::matrix::f, FIXED_SCALE, HALF_POINT, novasvg::render::texture_data_t::height, interpolate_4_pixels(), novasvg::render::span_t::len, novasvg::render::texture_data_t::matrix, NOVASVG_MIN, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::texture_data_t::stride, novasvg::render::surface::stride, novasvg::render::texture_data_t::width, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by blend_texture().
| NOVASVG_INLINE void novasvg::render::blend_transformed_tiled_argb | ( | surface_t * | surface, |
| operator_t | op, | ||
| const texture_data_t * | texture, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 960 of file blend.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, BUFFER_SIZE, novasvg::render::matrix::c, composition_table, novasvg::render::texture_data_t::const_alpha, novasvg::render::span_t::coverage, novasvg::render::matrix::d, novasvg::render::texture_data_t::data, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::matrix::e, novasvg::render::matrix::f, FIXED_SCALE, novasvg::render::texture_data_t::height, novasvg::render::span_t::len, novasvg::render::texture_data_t::matrix, NOVASVG_MIN, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::texture_data_t::stride, novasvg::render::surface::stride, novasvg::render::texture_data_t::width, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by blend_texture().
| NOVASVG_INLINE void novasvg::render::blend_untransformed_argb | ( | surface_t * | surface, |
| operator_t | op, | ||
| const texture_data_t * | texture, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 821 of file blend.h.
References composition_table, novasvg::render::texture_data_t::const_alpha, novasvg::render::span_t::coverage, novasvg::render::texture_data_t::data, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::matrix::e, novasvg::render::matrix::f, novasvg::render::texture_data_t::height, novasvg::render::span_t::len, novasvg::render::texture_data_t::matrix, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::texture_data_t::stride, novasvg::render::surface::stride, novasvg::render::texture_data_t::width, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by blend_texture().
| NOVASVG_INLINE void novasvg::render::blend_untransformed_tiled_argb | ( | surface_t * | surface, |
| operator_t | op, | ||
| const texture_data_t * | texture, | ||
| const span_buffer_t * | span_buffer | ||
| ) |
Definition at line 911 of file blend.h.
References BUFFER_SIZE, composition_table, novasvg::render::texture_data_t::const_alpha, novasvg::render::span_t::coverage, novasvg::render::texture_data_t::data, novasvg::render::surface::data, novasvg::render::span_buffer_t::data, novasvg::render::matrix::e, novasvg::render::matrix::f, novasvg::render::texture_data_t::height, novasvg::render::span_t::len, novasvg::render::texture_data_t::matrix, NOVASVG_MIN, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::texture_data_t::stride, novasvg::render::surface::stride, novasvg::render::texture_data_t::width, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by blend_texture().
| NOVASVG_INLINE uint32_t novasvg::render::BYTE_MUL | ( | uint32_t | x, |
| uint32_t | a | ||
| ) |
Definition at line 88 of file blend.h.
Referenced by composition_blend_mode(), composition_clear(), composition_destination_atop(), composition_destination_in(), composition_destination_out(), composition_destination_over(), composition_solid_blend_mode(), composition_solid_clear(), composition_solid_destination_atop(), composition_solid_destination_in(), composition_solid_destination_out(), composition_solid_destination_over(), composition_solid_source(), composition_solid_source_atop(), composition_solid_source_in(), composition_solid_source_out(), composition_solid_source_over(), composition_solid_xor(), composition_source_atop(), composition_source_in(), composition_source_out(), composition_source_over(), and composition_xor().
| void novasvg::render::canvas_add_font_face | ( | canvas_t * | canvas, |
| const char * | family, | ||
| bool | bold, | ||
| bool | italic, | ||
| font_face_t * | face | ||
| ) |
Add a font face to the canvas using the specified family and style.
| canvas | A pointer to a canvas_t object. |
| family | The font family name to associate with the face. |
| bold | Whether the font is bold. |
| italic | Whether the font is italic. |
| face | A pointer to the font_face_t object to add. |
Definition at line 228 of file canvas.h.
References novasvg::render::canvas::face_cache, font_face_cache_add(), and font_face_cache_create().
| bool novasvg::render::canvas_add_font_file | ( | canvas_t * | canvas, |
| const char * | family, | ||
| bool | bold, | ||
| bool | italic, | ||
| const char * | filename, | ||
| int | ttcindex | ||
| ) |
Load a font face from a file and add it to the canvas using the specified family and style.
| canvas | A pointer to a canvas_t object. |
| family | The font family name to associate with the face. |
| bold | Whether the font is bold. |
| italic | Whether the font is italic. |
| filename | Path to the font file. |
| ttcindex | Index within a TrueType Collection (use 0 for regular font files). |
true on success, or false if the font could not be loaded. Definition at line 235 of file canvas.h.
References novasvg::render::canvas::face_cache, font_face_cache_add_file(), and font_face_cache_create().
| float novasvg::render::canvas_add_glyph | ( | canvas_t * | canvas, |
| codepoint_t | codepoint, | ||
| float | x, | ||
| float | y | ||
| ) |
Adds a glyph to the current path at the specified origin.
| canvas | A pointer to a canvas_t object. |
| codepoint | The glyph codepoint. |
| x | The x-coordinate of the origin. |
| y | The y-coordinate of the origin. |
Definition at line 664 of file canvas.h.
References novasvg::render::state::font_face, font_face_get_glyph_path(), novasvg::render::state::font_size, novasvg::render::canvas::path, and novasvg::render::canvas::state.
Adds a path to the current path.
Appends the elements of the specified path to the current path.
| canvas | A pointer to a canvas_t object. |
| path | A pointer to the path_t object to be added. |
Definition at line 485 of file canvas.h.
References novasvg::render::canvas::path, and path_add_path().
Referenced by canvas_clip_path(), canvas_fill_path(), and canvas_stroke_path().
| float novasvg::render::canvas_add_text | ( | canvas_t * | canvas, |
| const void * | text, | ||
| int | length, | ||
| text_encoding_t | encoding, | ||
| float | x, | ||
| float | y | ||
| ) |
Adds text to the current path at the specified origin.
| canvas | A pointer to a canvas_t object. |
| text | The text data. |
| length | The length of the text data, or -1 if null-terminated. |
| encoding | The encoding of the text data. |
| x | The x-coordinate of the origin. |
| y | The y-coordinate of the origin. |
Definition at line 672 of file canvas.h.
References novasvg::render::state::font_face, font_face_apply_ligature(), font_face_get_glyph_path(), font_face_get_kern_advance(), novasvg::render::state::font_size, novasvg::render::canvas::path, novasvg::render::canvas::state, text, text_iterator_has_next(), text_iterator_init(), and text_iterator_next().
Referenced by canvas_clip_text(), canvas_fill_text(), and canvas_stroke_text().
| void novasvg::render::canvas_arc | ( | canvas_t * | canvas, |
| float | cx, | ||
| float | cy, | ||
| float | r, | ||
| float | a0, | ||
| float | a1, | ||
| bool | ccw | ||
| ) |
Adds an arc to the current path.
Adds an arc centered at the specified coordinates, with a given radius, starting and ending at the specified angles. The direction of the arc is determined by ccw. This arc segment is added to the current path.
| canvas | A pointer to a canvas_t object. |
| cx | The x-coordinate of the arc's center. |
| cy | The y-coordinate of the arc's center. |
| r | The radius of the arc. |
| a0 | The starting angle of the arc in radians. |
| a1 | The ending angle of the arc in radians. |
| ccw | If true, add the arc counter-clockwise; otherwise, clockwise. |
Definition at line 480 of file canvas.h.
References novasvg::render::canvas::path, and path_add_arc().
| void novasvg::render::canvas_arc_to | ( | canvas_t * | canvas, |
| float | rx, | ||
| float | ry, | ||
| float | angle, | ||
| bool | large_arc_flag, | ||
| bool | sweep_flag, | ||
| float | x, | ||
| float | y | ||
| ) |
Adds an elliptical arc to the current path.
Adds an elliptical arc from the current point to the specified end point, defined by radii, rotation angle, and flags for arc type and direction. This arc segment is added to the current path. Equivalent to the SVG A command.
| canvas | A pointer to a canvas_t object. |
| rx | The x-radius of the ellipse. |
| ry | The y-radius of the ellipse. |
| angle | The rotation angle of the ellipse in degrees. |
| large_arc_flag | If true, add the large arc; otherwise, add the small arc. |
| sweep_flag | If true, add the arc in the positive-angle direction; otherwise, in the negative-angle direction. |
| x | The x-coordinate of the end point. |
| y | The y-coordinate of the end point. |
Definition at line 455 of file canvas.h.
References novasvg::render::canvas::path, and path_arc_to().
| void novasvg::render::canvas_circle | ( | canvas_t * | canvas, |
| float | cx, | ||
| float | cy, | ||
| float | r | ||
| ) |
Adds a circle to the current path.
Adds a circle centered at the specified coordinates with the given radius to the current path.
| canvas | A pointer to a canvas_t object. |
| cx | The x-coordinate of the circle's center. |
| cy | The y-coordinate of the circle's center. |
| r | The radius of the circle. |
Definition at line 475 of file canvas.h.
References novasvg::render::canvas::path, and path_add_circle().
| void novasvg::render::canvas_clip | ( | canvas_t * | canvas | ) |
A drawing operator that intersects the current clipping region with the current path according to the current fill rule.
The current path will be cleared after this operation.
| canvas | A pointer to a canvas_t object. |
Definition at line 572 of file canvas.h.
References canvas_clip_preserve(), and canvas_new_path().
Referenced by canvas_clip_path(), canvas_clip_rect(), and canvas_clip_text().
| bool novasvg::render::canvas_clip_contains | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y | ||
| ) |
Tests whether a point lies within the current clipping region.
Determines whether the point at coordinates (x, y) falls within the active clipping region on the canvas.
If no clipping is applied, the default clipping region covers the entire canvas area starting at (0, 0) with width and height equal to the canvas dimensions.
| canvas | A pointer to a canvas_t object. |
| x | The X coordinate of the point, in user space. |
| y | The Y coordinate of the point, in user space. |
true if the point is within the clipping region, false otherwise. Definition at line 522 of file canvas.h.
References novasvg::render::canvas::clip_rect, novasvg::render::state::clip_spans, novasvg::render::state::clipping, novasvg::render::rect::h, span_buffer_contains(), novasvg::render::canvas::state, novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
Gets the bounding box of the current clipping region.
Computes an axis-aligned bounding box in user space that encloses the currently active clipping region on the canvas.
If no clip is applied, the returned rectangle covers the entire canvas area, starting at (0, 0) with width and height equal to the canvas dimensions.
| canvas | A pointer to a canvas_t object. |
| extents | A pointer to a rect_t structure that receives the bounding box. |
Definition at line 548 of file canvas.h.
References novasvg::render::canvas::clip_rect, novasvg::render::state::clip_spans, novasvg::render::state::clipping, novasvg::render::rect::h, span_buffer_extents(), novasvg::render::canvas::state, novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
Intersects the current clipping region with a path according to the current fill rule.
| canvas | A pointer to a canvas_t object. |
| path | The path_t object. |
Definition at line 657 of file canvas.h.
References canvas_add_path(), canvas_clip(), and canvas_new_path().
| void novasvg::render::canvas_clip_preserve | ( | canvas_t * | canvas | ) |
A drawing operator that intersects the current clipping region with the current path according to the current fill rule.
The current path will be preserved after this operation.
| canvas | A pointer to a canvas_t object. |
Definition at line 610 of file canvas.h.
References novasvg::render::canvas::clip_rect, novasvg::render::state::clip_spans, novasvg::render::canvas::clip_spans, novasvg::render::state::clipping, novasvg::render::canvas::fill_spans, novasvg::render::state::matrix, novasvg::render::canvas::path, rasterize(), span_buffer_copy(), span_buffer_intersect(), novasvg::render::canvas::state, and novasvg::render::state::winding.
Referenced by canvas_clip().
| void novasvg::render::canvas_clip_rect | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h | ||
| ) |
Intersects the current clipping region with a rectangle according to the current fill rule.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the rectangle's origin. |
| y | The y-coordinate of the rectangle's origin. |
| w | The width of the rectangle. |
| h | The height of the rectangle. |
Definition at line 650 of file canvas.h.
References canvas_clip(), canvas_new_path(), and canvas_rect().
| float novasvg::render::canvas_clip_text | ( | canvas_t * | canvas, |
| const void * | text, | ||
| int | length, | ||
| text_encoding_t | encoding, | ||
| float | x, | ||
| float | y | ||
| ) |
Intersects the current clipping region with text at the specified origin.
| canvas | A pointer to a canvas_t object. |
| text | The text data. |
| length | The length of the text data, or -1 if null-terminated. |
| encoding | The encoding of the text data. |
| x | The x-coordinate of the origin. |
| y | The y-coordinate of the origin. |
Definition at line 711 of file canvas.h.
References canvas_add_text(), canvas_clip(), canvas_new_path(), and text.
| void novasvg::render::canvas_close_path | ( | canvas_t * | canvas | ) |
Closes the current path.
Closes the current path by adding a straight line back to the starting point.
| canvas | A pointer to a canvas_t object. |
Definition at line 495 of file canvas.h.
References novasvg::render::canvas::path, and path_close().
Creates a drawing context on a surface.
| surface | A pointer to a surface_t object. |
canvas_t object. Definition at line 87 of file canvas.h.
References novasvg::render::canvas::clip_rect, novasvg::render::canvas::clip_spans, novasvg::render::canvas::face_cache, novasvg::render::canvas::fill_spans, novasvg::render::canvas::freed_state, novasvg::render::surface::height, novasvg_init_reference, NOVASVG_MAKE_RECT, novasvg::render::canvas::path, path_create(), span_buffer_init(), novasvg::render::canvas::state, state_create(), novasvg::render::canvas::surface, surface_reference(), and novasvg::render::surface::width.
| void novasvg::render::canvas_cubic_to | ( | canvas_t * | canvas, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3 | ||
| ) |
Adds a cubic Bézier curve to the current path.
Adds a cubic Bézier curve from the current point to the specified end point, using the given control points. This curve is added to the current path. Equivalent to the SVG C command.
| canvas | A pointer to a canvas_t object. |
| x1 | The x-coordinate of the first control point. |
| y1 | The y-coordinate of the first control point. |
| x2 | The x-coordinate of the second control point. |
| y2 | The y-coordinate of the second control point. |
| x3 | The x-coordinate of the end point of the curve. |
| y3 | The y-coordinate of the end point of the curve. |
Definition at line 450 of file canvas.h.
References novasvg::render::canvas::path, and path_cubic_to().
| void novasvg::render::canvas_destroy | ( | canvas_t * | canvas | ) |
Decreases the reference count and destroys the canvas when it reaches zero.
| canvas | A pointer to a canvas_t object. |
Definition at line 108 of file canvas.h.
References novasvg::render::canvas::clip_spans, novasvg::render::canvas::face_cache, novasvg::render::canvas::fill_spans, font_face_cache_destroy(), novasvg::render::canvas::freed_state, novasvg::render::state::next, novasvg_destroy_reference, novasvg::render::canvas::path, path_destroy(), span_buffer_destroy(), novasvg::render::canvas::state, state_destroy(), novasvg::render::canvas::surface, and surface_destroy().
| void novasvg::render::canvas_ellipse | ( | canvas_t * | canvas, |
| float | cx, | ||
| float | cy, | ||
| float | rx, | ||
| float | ry | ||
| ) |
Adds an ellipse to the current path.
Adds an ellipse centered at the specified coordinates with the given radii to the current path.
| canvas | A pointer to a canvas_t object. |
| cx | The x-coordinate of the ellipse's center. |
| cy | The y-coordinate of the ellipse's center. |
| rx | The x-radius of the ellipse. |
| ry | The y-radius of the ellipse. |
Definition at line 470 of file canvas.h.
References novasvg::render::canvas::path, and path_add_ellipse().
| void novasvg::render::canvas_fill | ( | canvas_t * | canvas | ) |
A drawing operator that fills the current path according to the current fill rule.
The current path will be cleared after this operation.
| canvas | A pointer to a canvas_t object. |
Definition at line 560 of file canvas.h.
References canvas_fill_preserve(), and canvas_new_path().
Referenced by canvas_fill_path(), canvas_fill_rect(), and canvas_fill_text().
| bool novasvg::render::canvas_fill_contains | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y | ||
| ) |
Tests whether a point lies within the current fill region.
Determines whether the point at coordinates (x, y) falls within the area that would be filled by a canvas_fill() operation, given the current path, fill rule, and transformation state.
| canvas | A pointer to a canvas_t object. |
| x | The X coordinate of the point, in user space. |
| y | The Y coordinate of the point, in user space. |
true if the point is within the fill region, false otherwise. Definition at line 510 of file canvas.h.
References novasvg::render::canvas::fill_spans, novasvg::render::state::matrix, novasvg::render::canvas::path, rasterize(), span_buffer_contains(), novasvg::render::canvas::state, and novasvg::render::state::winding.
Computes the bounding box of the area that would be affected by a fill operation.
Computes an axis-aligned bounding box in user space that encloses the area which would be affected by a fill operation (canvas_fill()) given the current path, fill rule, and transformation state.
| canvas | A pointer to a canvas_t object. |
| extents | A pointer to a rect_t structure that receives the bounding box. |
Definition at line 536 of file canvas.h.
References novasvg::render::canvas::fill_spans, novasvg::render::state::matrix, novasvg::render::canvas::path, rasterize(), span_buffer_extents(), novasvg::render::canvas::state, and novasvg::render::state::winding.
Fills a path according to the current fill rule.
| canvas | A pointer to a canvas_t object. |
| path | The path_t object. |
Definition at line 629 of file canvas.h.
References canvas_add_path(), canvas_fill(), and canvas_new_path().
| void novasvg::render::canvas_fill_preserve | ( | canvas_t * | canvas | ) |
A drawing operator that fills the current path according to the current fill rule.
The current path will be preserved after this operation.
| canvas | A pointer to a canvas_t object. |
Definition at line 588 of file canvas.h.
References blend(), novasvg::render::canvas::clip_rect, novasvg::render::state::clip_spans, novasvg::render::canvas::clip_spans, novasvg::render::state::clipping, novasvg::render::canvas::fill_spans, novasvg::render::state::matrix, novasvg::render::canvas::path, rasterize(), span_buffer_intersect(), novasvg::render::canvas::state, and novasvg::render::state::winding.
Referenced by canvas_fill().
| void novasvg::render::canvas_fill_rect | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h | ||
| ) |
Fills a rectangle according to the current fill rule.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the rectangle's origin. |
| y | The y-coordinate of the rectangle's origin. |
| w | The width of the rectangle. |
| h | The height of the rectangle. |
Definition at line 622 of file canvas.h.
References canvas_fill(), canvas_new_path(), and canvas_rect().
| float novasvg::render::canvas_fill_text | ( | canvas_t * | canvas, |
| const void * | text, | ||
| int | length, | ||
| text_encoding_t | encoding, | ||
| float | x, | ||
| float | y | ||
| ) |
Fills a text at the specified origin.
| canvas | A pointer to a canvas_t object. |
| text | The text data. |
| length | The length of the text data, or -1 if null-terminated. |
| encoding | The encoding of the text data. |
| x | The x-coordinate of the origin. |
| y | The y-coordinate of the origin. |
Definition at line 695 of file canvas.h.
References canvas_add_text(), canvas_fill(), canvas_new_path(), and text.
| void novasvg::render::canvas_font_metrics | ( | const canvas_t * | canvas, |
| float * | ascent, | ||
| float * | descent, | ||
| float * | line_gap, | ||
| rect_t * | extents | ||
| ) |
Retrieves font metrics for the current font.
| canvas | A pointer to a canvas_t object. |
| ascent | The ascent of the font. |
| descent | The descent of the font. |
| line_gap | The line gap of the font. |
| extents | The bounding box of the font. |
Definition at line 719 of file canvas.h.
References novasvg::render::state::font_face, font_face_get_metrics(), novasvg::render::state::font_size, novasvg::render::rect::h, novasvg::render::canvas::state, novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
| void novasvg::render::canvas_get_current_point | ( | const canvas_t * | canvas, |
| float * | x, | ||
| float * | y | ||
| ) |
Retrieves the current point of the canvas.
Gets the coordinates of the current point in the canvas, which is the last point added or moved to in the current path.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the current point. |
| y | The y-coordinate of the current point. |
Definition at line 500 of file canvas.h.
References novasvg::render::canvas::path, and path_get_current_point().
| int novasvg::render::canvas_get_dash_array | ( | const canvas_t * | canvas, |
| const float ** | dashes | ||
| ) |
Retrieves the current dash pattern.
If not set, the default dash array is NULL.
| canvas | A pointer to a canvas_t object. |
| dashes | Pointer to store the dash array. |
Definition at line 373 of file canvas.h.
References novasvg::render::stroke_dash_t::array, novasvg::render::stroke_data_t::dash, novasvg::render::stroke_dash_t::data, novasvg::render::stroke_dash_t::size, novasvg::render::canvas::state, and novasvg::render::state::stroke.
| float novasvg::render::canvas_get_dash_offset | ( | const canvas_t * | canvas | ) |
Retrieves the current dash offset.
If not set, the default dash offset is 0.
| canvas | A pointer to a canvas_t object. |
Definition at line 362 of file canvas.h.
References novasvg::render::stroke_data_t::dash, novasvg::render::stroke_dash_t::offset, novasvg::render::canvas::state, and novasvg::render::state::stroke.
| fill_rule_t novasvg::render::canvas_get_fill_rule | ( | const canvas_t * | canvas | ) |
Retrieves the current fill rule.
If not set, the default fill rule is NOVASVG_FILL_RULE_NON_ZERO.
| canvas | A pointer to a canvas_t object. |
Definition at line 286 of file canvas.h.
References novasvg::render::canvas::state, and novasvg::render::state::winding.
| font_face_t * novasvg::render::canvas_get_font_face | ( | const canvas_t * | canvas | ) |
Retrieves the current font face used for text rendering on the canvas.
If not set, the default font face is NULL.
| canvas | A pointer to a canvas_t object. |
font_face_t object representing the current font face. Definition at line 266 of file canvas.h.
References novasvg::render::state::font_face, and novasvg::render::canvas::state.
| font_face_cache_t * novasvg::render::canvas_get_font_face_cache | ( | const canvas_t * | canvas | ) |
Returns the font-face cache associated with the canvas.
| canvas | A pointer to a canvas_t object. |
font_face_cache_t object, or NULL if none is set. Definition at line 223 of file canvas.h.
References novasvg::render::canvas::face_cache.
| float novasvg::render::canvas_get_font_size | ( | const canvas_t * | canvas | ) |
Retrieves the current font size used for text rendering on the canvas.
If not set, the default font size is 12.
| canvas | A pointer to a canvas_t object. |
Definition at line 276 of file canvas.h.
References novasvg::render::state::font_size, and novasvg::render::canvas::state.
| line_cap_t novasvg::render::canvas_get_line_cap | ( | const canvas_t * | canvas | ) |
Retrieves the current line cap style.
If not set, the default line cap is NOVASVG_LINE_CAP_BUTT.
| canvas | A pointer to a canvas_t object. |
Definition at line 326 of file canvas.h.
References novasvg::render::stroke_style_t::cap, novasvg::render::canvas::state, novasvg::render::state::stroke, and novasvg::render::stroke_data_t::style.
| line_join_t novasvg::render::canvas_get_line_join | ( | const canvas_t * | canvas | ) |
Retrieves the current line join style.
If not set, the default line join is NOVASVG_LINE_JOIN_MITER.
| canvas | A pointer to a canvas_t object. |
Definition at line 336 of file canvas.h.
References novasvg::render::stroke_style_t::join, novasvg::render::canvas::state, novasvg::render::state::stroke, and novasvg::render::stroke_data_t::style.
| float novasvg::render::canvas_get_line_width | ( | const canvas_t * | canvas | ) |
Retrieves the current line width.
If not set, the default line width is 1.
| canvas | A pointer to a canvas_t object. |
Definition at line 316 of file canvas.h.
References novasvg::render::canvas::state, novasvg::render::state::stroke, novasvg::render::stroke_data_t::style, and novasvg::render::stroke_style_t::width.
Stores the current transformation matrix in matrix.
| canvas | A pointer to a canvas_t object. |
| A | pointer to the matrix_t to store the matrix. |
Definition at line 415 of file canvas.h.
References novasvg::render::state::matrix, and novasvg::render::canvas::state.
| float novasvg::render::canvas_get_miter_limit | ( | const canvas_t * | canvas | ) |
Retrieves the current miter limit.
If not set, the default miter limit is 10.
| canvas | A pointer to a canvas_t object. |
Definition at line 346 of file canvas.h.
References novasvg::render::stroke_style_t::miter_limit, novasvg::render::canvas::state, novasvg::render::state::stroke, and novasvg::render::stroke_data_t::style.
| float novasvg::render::canvas_get_opacity | ( | const canvas_t * | canvas | ) |
Retrieves the current global opacity.
If not set, the default global opacity is 1.
| canvas | A pointer to a canvas_t object. |
Definition at line 306 of file canvas.h.
References novasvg::render::state::opacity, and novasvg::render::canvas::state.
| operator_t novasvg::render::canvas_get_operator | ( | const canvas_t * | canvas | ) |
Retrieves the current compositing operator.
If not set, the default compositing operator is NOVASVG_OPERATOR_SRC_OVER.
| canvas | A pointer to a canvas_t object. |
Definition at line 296 of file canvas.h.
References novasvg::render::state::op, and novasvg::render::canvas::state.
Retrieves the current paint.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| color | A pointer to a color_t object where the current color will be stored. |
paint_t used for drawing operations. If no paint is set, NULL is returned. Definition at line 209 of file canvas.h.
References novasvg::render::state::color, novasvg::render::state::paint, and novasvg::render::canvas::state.
Gets the current path from the canvas.
Retrieves the path object representing the sequence of path commands added to the canvas.
| canvas | A pointer to a canvas_t object. |
Definition at line 505 of file canvas.h.
References novasvg::render::canvas::path.
| int novasvg::render::canvas_get_reference_count | ( | const canvas_t * | canvas | ) |
Retrieves the reference count of the canvas.
| canvas | A pointer to a canvas_t object. |
Definition at line 132 of file canvas.h.
References novasvg_get_reference_count.
Gets the surface associated with the canvas.
| canvas | A pointer to a canvas_t object. |
surface_t object. Definition at line 137 of file canvas.h.
References novasvg::render::canvas::surface.
| void novasvg::render::canvas_glyph_metrics | ( | canvas_t * | canvas, |
| codepoint_t | codepoint, | ||
| float * | advance_width, | ||
| float * | left_side_bearing, | ||
| rect_t * | extents | ||
| ) |
Retrieves metrics for a specific glyph.
| canvas | A pointer to a canvas_t object. |
| codepoint | The glyph codepoint. |
| advance_width | The advance width of the glyph. |
| left_side_bearing | The left side bearing of the glyph. |
| extents | The bounding box of the glyph. |
Definition at line 738 of file canvas.h.
References novasvg::render::state::font_face, font_face_get_glyph_metrics(), novasvg::render::state::font_size, novasvg::render::rect::h, novasvg::render::canvas::state, novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
| void novasvg::render::canvas_line_to | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y | ||
| ) |
Adds a straight line segment to the current path.
Adds a straight line from the current point to the specified coordinates. This segment is added to the current path. Equivalent to the SVG L command.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the end point of the line. |
| y | The y-coordinate of the end point of the line. |
Definition at line 440 of file canvas.h.
References novasvg::render::canvas::path, and path_line_to().
| void novasvg::render::canvas_map | ( | const canvas_t * | canvas, |
| float | x, | ||
| float | y, | ||
| float * | xx, | ||
| float * | yy | ||
| ) |
Transforms the point (x, y) using the current transformation matrix and stores the result in (xx, yy).
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the point to transform. |
| y | The y-coordinate of the point to transform. |
| xx | A pointer to store the transformed x-coordinate. |
| yy | A pointer to store the transformed y-coordinate. |
Definition at line 420 of file canvas.h.
References novasvg::render::state::matrix, matrix_map(), and novasvg::render::canvas::state.
| void novasvg::render::canvas_map_point | ( | const canvas_t * | canvas, |
| const point_t * | src, | ||
| point_t * | dst | ||
| ) |
Transforms the src point using the current transformation matrix and stores the result in dst.
src and dst can be identical. | canvas | A pointer to a canvas_t object. |
| src | A pointer to the point_t point to transform. |
| dst | A pointer to the point_t to store the transformed point. |
Definition at line 425 of file canvas.h.
References novasvg::render::state::matrix, matrix_map_point(), and novasvg::render::canvas::state.
Transforms the src rectangle using the current transformation matrix and stores the result in dst.
src and dst can be identical. | canvas | A pointer to a canvas_t object. |
| src | A pointer to the rect_t rectangle to transform. |
| dst | A pointer to the rect_t to store the transformed rectangle. |
Definition at line 430 of file canvas.h.
References novasvg::render::state::matrix, matrix_map_rect(), and novasvg::render::canvas::state.
| void novasvg::render::canvas_move_to | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y | ||
| ) |
Moves the current point to a new position.
Moves the current point to the specified coordinates without adding a line. This operation is added to the current path. Equivalent to the SVG M command.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the new position. |
| y | The y-coordinate of the new position. |
Definition at line 435 of file canvas.h.
References novasvg::render::canvas::path, and path_move_to().
| void novasvg::render::canvas_new_path | ( | canvas_t * | canvas | ) |
Starts a new path on the canvas.
Begins a new path, clearing any existing path data. The new path starts with no commands.
| canvas | A pointer to a canvas_t object. |
Definition at line 490 of file canvas.h.
References novasvg::render::canvas::path, and path_reset().
Referenced by canvas_clip(), canvas_clip_path(), canvas_clip_rect(), canvas_clip_text(), canvas_fill(), canvas_fill_path(), canvas_fill_rect(), canvas_fill_text(), canvas_stroke(), canvas_stroke_path(), canvas_stroke_rect(), and canvas_stroke_text().
| void novasvg::render::canvas_paint | ( | canvas_t * | canvas | ) |
A drawing operator that paints the current clipping region using the current paint.
| canvas | A pointer to a canvas_t object. |
Definition at line 578 of file canvas.h.
References blend(), novasvg::render::state::clip_spans, novasvg::render::canvas::clip_spans, novasvg::render::state::clipping, novasvg::render::surface::height, span_buffer_init_rect(), novasvg::render::canvas::state, novasvg::render::canvas::surface, and novasvg::render::surface::width.
| void novasvg::render::canvas_quad_to | ( | canvas_t * | canvas, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2 | ||
| ) |
Adds a quadratic Bézier curve to the current path.
Adds a quadratic Bézier curve from the current point to the specified end point, using the given control point. This curve is added to the current path. Equivalent to the SVG Q command.
| canvas | A pointer to a canvas_t object. |
| x1 | The x-coordinate of the control point. |
| y1 | The y-coordinate of the control point. |
| x2 | The x-coordinate of the end point of the curve. |
| y2 | The y-coordinate of the end point of the curve. |
Definition at line 445 of file canvas.h.
References novasvg::render::canvas::path, and path_quad_to().
| void novasvg::render::canvas_rect | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h | ||
| ) |
Adds a rectangle to the current path.
Adds a rectangle with the specified position and dimensions to the current path.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the rectangle's origin. |
| y | The y-coordinate of the rectangle's origin. |
| w | The width of the rectangle. |
| h | The height of the rectangle. |
Definition at line 460 of file canvas.h.
References novasvg::render::canvas::path, and path_add_rect().
Referenced by canvas_clip_rect(), canvas_fill_rect(), and canvas_stroke_rect().
Increases the reference count of the canvas.
| canvas | A pointer to a canvas_t object. |
canvas_t object. Definition at line 102 of file canvas.h.
References novasvg_increment_reference.
| void novasvg::render::canvas_reset_matrix | ( | canvas_t * | canvas | ) |
Resets the current transformation matrix to the identity matrix.
| canvas | A pointer to a canvas_t object. |
Definition at line 405 of file canvas.h.
References novasvg::render::state::matrix, matrix_init_identity(), and novasvg::render::canvas::state.
| void novasvg::render::canvas_restore | ( | canvas_t * | canvas | ) |
Restores the canvas to the most recently saved state.
| canvas | A pointer to a canvas_t object. |
Definition at line 154 of file canvas.h.
References novasvg::render::canvas::freed_state, novasvg::render::state::next, novasvg::render::canvas::state, and state_reset().
| void novasvg::render::canvas_rotate | ( | canvas_t * | canvas, |
| float | angle | ||
| ) |
Rotates the current transformation matrix by the specified angle (in radians).
| canvas | A pointer to a canvas_t object. |
| angle | The rotation angle in radians. |
Definition at line 395 of file canvas.h.
References novasvg::render::state::matrix, matrix_rotate(), and novasvg::render::canvas::state.
| void novasvg::render::canvas_round_rect | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h, | ||
| float | rx, | ||
| float | ry | ||
| ) |
Adds a rounded rectangle to the current path.
Adds a rectangle with rounded corners defined by the specified position, dimensions, and corner radii to the current path.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the rectangle's origin. |
| y | The y-coordinate of the rectangle's origin. |
| w | The width of the rectangle. |
| h | The height of the rectangle. |
| rx | The x-radius of the corners. |
| ry | The y-radius of the corners. |
Definition at line 465 of file canvas.h.
References novasvg::render::canvas::path, and path_add_round_rect().
| void novasvg::render::canvas_save | ( | canvas_t * | canvas | ) |
Saves the current state of the canvas.
| canvas | A pointer to a canvas_t object. |
Definition at line 142 of file canvas.h.
References novasvg::render::canvas::freed_state, novasvg::render::state::next, novasvg::render::canvas::state, state_copy(), and state_create().
| void novasvg::render::canvas_scale | ( | canvas_t * | canvas, |
| float | sx, | ||
| float | sy | ||
| ) |
Scales the current transformation matrix by factors sx and sy.
| canvas | A pointer to a canvas_t object. |
| sx | The scaling factor in the x-direction. |
| sy | The scaling factor in the y-direction. |
Definition at line 385 of file canvas.h.
References novasvg::render::state::matrix, matrix_scale(), and novasvg::render::canvas::state.
| bool novasvg::render::canvas_select_font_face | ( | canvas_t * | canvas, |
| const char * | family, | ||
| bool | bold, | ||
| bool | italic | ||
| ) |
Selects and sets the current font face on the canvas.
| canvas | A pointer to a canvas_t object. |
| family | The font family name to select. |
| bold | Whether to match a bold variant. |
| italic | Whether to match an italic variant. |
true if a matching font was found and set, false otherwise. Definition at line 242 of file canvas.h.
References canvas_set_font_face(), novasvg::render::canvas::face_cache, and font_face_cache_get().
Sets the current paint to a solid color.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| color | A pointer to a color_t object. |
Definition at line 176 of file canvas.h.
References novasvg::render::color::a, novasvg::render::color::b, canvas_set_rgba(), novasvg::render::color::g, and novasvg::render::color::r.
| void novasvg::render::canvas_set_dash | ( | canvas_t * | canvas, |
| float | offset, | ||
| const float * | dashes, | ||
| int | ndashes | ||
| ) |
Sets the dash pattern.
If not set, the default dash offset is 0, and the default dash array is NULL.
| canvas | A pointer to a canvas_t object. |
| offset | The dash offset. |
| dashes | Array of dash lengths. |
| ndashes | Number of dash lengths. |
Definition at line 351 of file canvas.h.
References canvas_set_dash_array(), and canvas_set_dash_offset().
| void novasvg::render::canvas_set_dash_array | ( | canvas_t * | canvas, |
| const float * | dashes, | ||
| int | ndashes | ||
| ) |
Sets the dash pattern.
If not set, the default dash array is NULL.
| canvas | A pointer to a canvas_t object. |
| dashes | Array of dash lengths. |
| ndashes | Number of dash lengths. |
Definition at line 367 of file canvas.h.
References novasvg::render::stroke_dash_t::array, novasvg::render::stroke_data_t::dash, novasvg_array_append_data, novasvg_array_clear, novasvg::render::canvas::state, and novasvg::render::state::stroke.
Referenced by canvas_set_dash().
| void novasvg::render::canvas_set_dash_offset | ( | canvas_t * | canvas, |
| float | offset | ||
| ) |
Sets the dash offset.
If not set, the default dash offset is 0.
| canvas | A pointer to a canvas_t object. |
| offset | The dash offset. |
Definition at line 357 of file canvas.h.
References novasvg::render::stroke_data_t::dash, novasvg::render::stroke_dash_t::offset, novasvg::render::canvas::state, and novasvg::render::state::stroke.
Referenced by canvas_set_dash().
| void novasvg::render::canvas_set_fill_rule | ( | canvas_t * | canvas, |
| fill_rule_t | winding | ||
| ) |
Sets the fill rule.
If not set, the default fill rule is NOVASVG_FILL_RULE_NON_ZERO.
| canvas | A pointer to a canvas_t object. |
| winding | The fill rule. |
Definition at line 281 of file canvas.h.
References novasvg::render::canvas::state, and novasvg::render::state::winding.
| void novasvg::render::canvas_set_font | ( | canvas_t * | canvas, |
| font_face_t * | face, | ||
| float | size | ||
| ) |
Sets the font face and size for text rendering on the canvas.
If not set, the default font face is NULL, and the default face size is 12.
| canvas | A pointer to a canvas_t object. |
| face | A pointer to a font_face_t object representing the font face to use. |
| size | The size of the font, in pixels. This determines the height of the rendered text. |
Definition at line 253 of file canvas.h.
References canvas_set_font_face(), and canvas_set_font_size().
| void novasvg::render::canvas_set_font_face | ( | canvas_t * | canvas, |
| font_face_t * | face | ||
| ) |
Sets the font face for text rendering on the canvas.
If not set, the default font face is NULL.
| canvas | A pointer to a canvas_t object. |
| face | A pointer to a font_face_t object representing the font face to use. |
Definition at line 259 of file canvas.h.
References novasvg::render::state::font_face, font_face_destroy(), font_face_reference(), and novasvg::render::canvas::state.
Referenced by canvas_select_font_face(), and canvas_set_font().
| void novasvg::render::canvas_set_font_face_cache | ( | canvas_t * | canvas, |
| font_face_cache_t * | cache | ||
| ) |
Assigns a font-face cache to the canvas for font management.
| canvas | A pointer to a canvas_t object. |
| cache | A pointer to a font_face_cache_t object, or NULL to unset the current cache. |
Definition at line 216 of file canvas.h.
References novasvg::render::canvas::face_cache, font_face_cache_destroy(), and font_face_cache_reference().
| void novasvg::render::canvas_set_font_size | ( | canvas_t * | canvas, |
| float | size | ||
| ) |
Sets the font size for text rendering on the canvas.
If not set, the default font size is 12.
| canvas | A pointer to a canvas_t object. |
| size | The size of the font, in pixels. This value defines the height of the rendered text. |
Definition at line 271 of file canvas.h.
References novasvg::render::state::font_size, and novasvg::render::canvas::state.
Referenced by canvas_set_font().
| void novasvg::render::canvas_set_line_cap | ( | canvas_t * | canvas, |
| line_cap_t | line_cap | ||
| ) |
Sets the line cap style.
If not set, the default line cap is NOVASVG_LINE_CAP_BUTT.
| canvas | A pointer to a canvas_t object. |
| line_cap | The line cap style. |
Definition at line 321 of file canvas.h.
References novasvg::render::stroke_style_t::cap, novasvg::render::canvas::state, novasvg::render::state::stroke, and novasvg::render::stroke_data_t::style.
| void novasvg::render::canvas_set_line_join | ( | canvas_t * | canvas, |
| line_join_t | line_join | ||
| ) |
Sets the line join style.
If not set, the default line join is NOVASVG_LINE_JOIN_MITER.
| canvas | A pointer to a canvas_t object. |
| line_join | The line join style. |
Definition at line 331 of file canvas.h.
References novasvg::render::stroke_style_t::join, novasvg::render::canvas::state, novasvg::render::state::stroke, and novasvg::render::stroke_data_t::style.
| void novasvg::render::canvas_set_line_width | ( | canvas_t * | canvas, |
| float | line_width | ||
| ) |
Sets the line width.
If not set, the default line width is 1.
| canvas | A pointer to a canvas_t object. |
| line_width | The width of the stroke. |
Definition at line 311 of file canvas.h.
References novasvg::render::canvas::state, novasvg::render::state::stroke, novasvg::render::stroke_data_t::style, and novasvg::render::stroke_style_t::width.
| void novasvg::render::canvas_set_linear_gradient | ( | canvas_t * | canvas, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| spread_method_t | spread, | ||
| const gradient_stop_t * | stops, | ||
| int | nstops, | ||
| const matrix_t * | matrix | ||
| ) |
Sets the current paint to a linear gradient.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| x1 | The x coordinate of the start point. |
| y1 | The y coordinate of the start point. |
| x2 | The x coordinate of the end point. |
| y2 | The y coordinate of the end point. |
| spread | The gradient spread method. |
| stops | Array of gradient stops. |
| nstops | Number of gradient stops. |
| matrix | Optional transformation matrix. |
Definition at line 181 of file canvas.h.
References canvas_set_paint(), paint_create_linear_gradient(), and paint_destroy().
Resets the current transformation matrix to the specified matrix.
| canvas | A pointer to a canvas_t object. |
| matrix | A pointer to the matrix_t object. |
Definition at line 410 of file canvas.h.
References novasvg::render::state::matrix, NOVASVG_IDENTITY_MATRIX, and novasvg::render::canvas::state.
| void novasvg::render::canvas_set_miter_limit | ( | canvas_t * | canvas, |
| float | miter_limit | ||
| ) |
Sets the miter limit.
If not set, the default miter limit is 10.
| canvas | A pointer to a canvas_t object. |
| miter_limit | The miter limit value. |
Definition at line 341 of file canvas.h.
References novasvg::render::stroke_style_t::miter_limit, novasvg::render::canvas::state, novasvg::render::state::stroke, and novasvg::render::stroke_data_t::style.
| void novasvg::render::canvas_set_opacity | ( | canvas_t * | canvas, |
| float | opacity | ||
| ) |
Sets the global opacity.
If not set, the default global opacity is 1.
| canvas | A pointer to a canvas_t object. |
| opacity | The opacity value (0 to 1). |
Definition at line 301 of file canvas.h.
References novasvg::render::state::opacity, and novasvg::render::canvas::state.
| void novasvg::render::canvas_set_operator | ( | canvas_t * | canvas, |
| operator_t | op | ||
| ) |
Sets the compositing operator.
If not set, the default compositing operator is NOVASVG_OPERATOR_SRC_OVER.
| canvas | A pointer to a canvas_t object. |
| op | The compositing operator. |
Definition at line 291 of file canvas.h.
References novasvg::render::state::op, and novasvg::render::canvas::state.
Sets the current paint.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| paint | The paint to be used for subsequent drawing operations. |
Definition at line 202 of file canvas.h.
References novasvg::render::state::paint, paint_destroy(), paint_reference(), and novasvg::render::canvas::state.
Referenced by canvas_set_linear_gradient(), canvas_set_radial_gradient(), canvas_set_rgba(), and canvas_set_texture().
| void novasvg::render::canvas_set_radial_gradient | ( | canvas_t * | canvas, |
| float | cx, | ||
| float | cy, | ||
| float | cr, | ||
| float | fx, | ||
| float | fy, | ||
| float | fr, | ||
| spread_method_t | spread, | ||
| const gradient_stop_t * | stops, | ||
| int | nstops, | ||
| const matrix_t * | matrix | ||
| ) |
Sets the current paint to a radial gradient.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| cx | The x coordinate of the center. |
| cy | The y coordinate of the center. |
| cr | The radius of the gradient. |
| fx | The x coordinate of the focal point. |
| fy | The y coordinate of the focal point. |
| fr | The radius of the focal point. |
| spread | The gradient spread method. |
| stops | Array of gradient stops. |
| nstops | Number of gradient stops. |
| matrix | Optional transformation matrix. |
Definition at line 188 of file canvas.h.
References canvas_set_paint(), paint_create_radial_gradient(), and paint_destroy().
| void novasvg::render::canvas_set_rgb | ( | canvas_t * | canvas, |
| float | r, | ||
| float | g, | ||
| float | b | ||
| ) |
Sets the current paint to a solid color.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| r | The red component (0 to 1). |
| g | The green component (0 to 1). |
| b | The blue component (0 to 1). |
Definition at line 165 of file canvas.h.
References canvas_set_rgba().
| void novasvg::render::canvas_set_rgba | ( | canvas_t * | canvas, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Sets the current paint to a solid color.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| r | The red component (0 to 1). |
| g | The green component (0 to 1). |
| b | The blue component (0 to 1). |
| a | The alpha component (0 to 1). |
Definition at line 170 of file canvas.h.
References canvas_set_paint(), novasvg::render::state::color, color_init_rgba(), and novasvg::render::canvas::state.
Referenced by canvas_set_color(), and canvas_set_rgb().
| void novasvg::render::canvas_set_texture | ( | canvas_t * | canvas, |
| surface_t * | surface, | ||
| texture_type_t | type, | ||
| float | opacity, | ||
| const matrix_t * | matrix | ||
| ) |
Sets the current paint to a texture.
If not set, the default paint is opaque black color.
| canvas | A pointer to a canvas_t object. |
| surface | The texture surface. |
| type | The texture type (plain or tiled). |
| opacity | The opacity of the texture (0 to 1). |
| matrix | Optional transformation matrix. |
Definition at line 195 of file canvas.h.
References canvas_set_paint(), paint_create_texture(), and paint_destroy().
| void novasvg::render::canvas_shear | ( | canvas_t * | canvas, |
| float | shx, | ||
| float | shy | ||
| ) |
Shears the current transformation matrix by factors shx and shy.
| canvas | A pointer to a canvas_t object. |
| shx | The shearing factor in the x-direction. |
| shy | The shearing factor in the y-direction. |
Definition at line 390 of file canvas.h.
References novasvg::render::state::matrix, matrix_shear(), and novasvg::render::canvas::state.
| void novasvg::render::canvas_stroke | ( | canvas_t * | canvas | ) |
A drawing operator that strokes the current path according to the current stroke settings.
The current path will be cleared after this operation.
| canvas | A pointer to a canvas_t object. |
Definition at line 566 of file canvas.h.
References canvas_new_path(), and canvas_stroke_preserve().
Referenced by canvas_stroke_path(), canvas_stroke_rect(), and canvas_stroke_text().
| bool novasvg::render::canvas_stroke_contains | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y | ||
| ) |
Tests whether a point lies within the current stroke region.
Determines whether the point at coordinates (x, y) falls within the area that would be stroked by a canvas_stroke() operation, given the current path, stroke width, joins, caps, miter limit, dash pattern, and transformation state.
| canvas | A pointer to a canvas_t object. |
| x | The X coordinate of the point, in user space. |
| y | The Y coordinate of the point, in user space. |
true if the point is within the stroke region, false otherwise. Definition at line 516 of file canvas.h.
References novasvg::render::canvas::fill_spans, novasvg::render::state::matrix, novasvg::render::canvas::path, rasterize(), span_buffer_contains(), novasvg::render::canvas::state, and novasvg::render::state::winding.
Computes the bounding box of the area that would be affected by a stroke operation.
Computes an axis-aligned bounding box in user space that encloses the area which would be affected by a stroke operation (canvas_stroke()) given the current path, stroke width, joins, caps, miter limit, dash pattern, and transformation state.
| canvas | A pointer to a canvas_t object. |
| extents | A pointer to a rect_t structure that receives the bounding box. |
Definition at line 542 of file canvas.h.
References novasvg::render::canvas::fill_spans, novasvg::render::state::matrix, NOVASVG_FILL_RULE_NON_ZERO, novasvg::render::canvas::path, rasterize(), span_buffer_extents(), novasvg::render::canvas::state, and novasvg::render::state::stroke.
Strokes a path with the current stroke settings.
| canvas | A pointer to a canvas_t object. |
| path | The path_t object. |
Definition at line 643 of file canvas.h.
References canvas_add_path(), canvas_new_path(), and canvas_stroke().
| void novasvg::render::canvas_stroke_preserve | ( | canvas_t * | canvas | ) |
A drawing operator that strokes the current path according to the current stroke settings.
The current path will be preserved after this operation.
| canvas | A pointer to a canvas_t object. |
Definition at line 599 of file canvas.h.
References blend(), novasvg::render::canvas::clip_rect, novasvg::render::state::clip_spans, novasvg::render::canvas::clip_spans, novasvg::render::state::clipping, novasvg::render::canvas::fill_spans, novasvg::render::state::matrix, NOVASVG_FILL_RULE_NON_ZERO, novasvg::render::canvas::path, rasterize(), span_buffer_intersect(), novasvg::render::canvas::state, and novasvg::render::state::stroke.
Referenced by canvas_stroke().
| void novasvg::render::canvas_stroke_rect | ( | canvas_t * | canvas, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h | ||
| ) |
Strokes a rectangle with the current stroke settings.
| canvas | A pointer to a canvas_t object. |
| x | The x-coordinate of the rectangle's origin. |
| y | The y-coordinate of the rectangle's origin. |
| w | The width of the rectangle. |
| h | The height of the rectangle. |
Definition at line 636 of file canvas.h.
References canvas_new_path(), canvas_rect(), and canvas_stroke().
| float novasvg::render::canvas_stroke_text | ( | canvas_t * | canvas, |
| const void * | text, | ||
| int | length, | ||
| text_encoding_t | encoding, | ||
| float | x, | ||
| float | y | ||
| ) |
Strokes a text at the specified origin.
| canvas | A pointer to a canvas_t object. |
| text | The text data. |
| length | The length of the text data, or -1 if null-terminated. |
| encoding | The encoding of the text data. |
| x | The x-coordinate of the origin. |
| y | The y-coordinate of the origin. |
Definition at line 703 of file canvas.h.
References canvas_add_text(), canvas_new_path(), canvas_stroke(), and text.
| float novasvg::render::canvas_text_extents | ( | canvas_t * | canvas, |
| const void * | text, | ||
| int | length, | ||
| text_encoding_t | encoding, | ||
| rect_t * | extents | ||
| ) |
Retrieves the extents of a text.
| canvas | A pointer to a canvas_t object. |
| text | The text data. |
| length | The length of the text data, or -1 if null-terminated. |
| encoding | The encoding of the text data. |
| extents | The bounding box of the text. |
Definition at line 756 of file canvas.h.
References novasvg::render::state::font_face, font_face_text_extents(), novasvg::render::state::font_size, novasvg::render::rect::h, novasvg::render::canvas::state, text, novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
Multiplies the current transformation matrix with the specified matrix.
| canvas | A pointer to a canvas_t object. |
| matrix | A pointer to the matrix_t object. |
Definition at line 400 of file canvas.h.
References novasvg::render::state::matrix, matrix_multiply(), and novasvg::render::canvas::state.
| void novasvg::render::canvas_translate | ( | canvas_t * | canvas, |
| float | tx, | ||
| float | ty | ||
| ) |
Translates the current transformation matrix by offsets tx and ty.
| canvas | A pointer to a canvas_t object. |
| tx | The translation offset in the x-direction. |
| ty | The translation offset in the y-direction. |
Definition at line 380 of file canvas.h.
References novasvg::render::state::matrix, matrix_translate(), and novasvg::render::canvas::state.
| NOVASVG_INLINE void novasvg::render::clone_traverse_func | ( | void * | closure, |
| path_command_t | command, | ||
| const point_t * | points, | ||
| int | npoints | ||
| ) |
Definition at line 630 of file path.h.
References NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, path_close(), path_cubic_to(), path_line_to(), and path_move_to().
Referenced by path_clone_dashed(), and path_clone_flatten().
| void novasvg::render::color_init_argb32 | ( | color_t * | color, |
| unsigned int | value | ||
| ) |
Initializes a color from a 32-bit unsigned ARGB value.
| color | A pointer to a color_t object. |
| value | 32-bit unsigned ARGB value. |
Definition at line 43 of file paint.h.
References color_init_rgba8().
Referenced by color_parse().
| void novasvg::render::color_init_hsl | ( | color_t * | color, |
| float | h, | ||
| float | s, | ||
| float | l | ||
| ) |
Initializes a color with the specified HSL color values.
| color | A pointer to a color_t object. |
| h | Hue component in degrees (0 to 360). |
| s | Saturation component (0 to 1). |
| l | Lightness component (0 to 1). |
Definition at line 52 of file paint.h.
References color_init_hsla().
| void novasvg::render::color_init_hsla | ( | color_t * | color, |
| float | h, | ||
| float | s, | ||
| float | l, | ||
| float | a | ||
| ) |
Initializes a color with the specified HSLA color values.
| color | A pointer to a color_t object. |
| h | Hue component in degrees (0 to 360). |
| s | Saturation component (0 to 1). |
| l | Lightness component (0 to 1). |
| a | Alpha component (0 to 1). |
Definition at line 64 of file paint.h.
References color_init_rgba().
Referenced by color_init_hsl(), and color_parse().
| void novasvg::render::color_init_rgb | ( | color_t * | color, |
| float | r, | ||
| float | g, | ||
| float | b | ||
| ) |
Initializes a color using RGB components in the 0-1 range.
| color | A pointer to a color_t object. |
| r | Red component (0 to 1). |
| g | Green component (0 to 1). |
| b | Blue component (0 to 1). |
Definition at line 11 of file paint.h.
References color_init_rgba().
| void novasvg::render::color_init_rgb8 | ( | color_t * | color, |
| int | r, | ||
| int | g, | ||
| int | b | ||
| ) |
Initializes a color using RGB components in the 0-255 range.
| color | A pointer to a color_t object. |
| r | Red component (0 to 255). |
| g | Green component (0 to 255). |
| b | Blue component (0 to 255). |
Definition at line 24 of file paint.h.
References color_init_rgba8().
| void novasvg::render::color_init_rgba | ( | color_t * | color, |
| float | r, | ||
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Initializes a color using RGBA components in the 0-1 range.
| color | A pointer to a color_t object. |
| r | Red component (0 to 1). |
| g | Green component (0 to 1). |
| b | Blue component (0 to 1). |
| a | Alpha component (0 to 1). |
Definition at line 16 of file paint.h.
References novasvg::render::color::a, novasvg::render::color::b, novasvg::render::color::g, and novasvg::render::color::r.
Referenced by canvas_set_rgba(), color_init_hsla(), color_init_rgb(), color_init_rgba8(), and color_parse().
| void novasvg::render::color_init_rgba32 | ( | color_t * | color, |
| unsigned int | value | ||
| ) |
Initializes a color from a 32-bit unsigned RGBA value.
| color | A pointer to a color_t object. |
| value | 32-bit unsigned RGBA value. |
Definition at line 34 of file paint.h.
References color_init_rgba8().
Referenced by novasvg::Bitmap::clear().
| void novasvg::render::color_init_rgba8 | ( | color_t * | color, |
| int | r, | ||
| int | g, | ||
| int | b, | ||
| int | a | ||
| ) |
Initializes a color using RGBA components in the 0-255 range.
| color | A pointer to a color_t object. |
| r | Red component (0 to 255). |
| g | Green component (0 to 255). |
| b | Blue component (0 to 255). |
| a | Alpha component (0 to 255). |
Definition at line 29 of file paint.h.
References color_init_rgba().
Referenced by color_init_argb32(), color_init_rgb8(), color_init_rgba32(), and color_parse().
| int novasvg::render::color_parse | ( | color_t * | color, |
| const char * | data, | ||
| int | length | ||
| ) |
Parses a color from a string using CSS color syntax.
| color | A pointer to a color_t object to store the parsed color. |
| data | A pointer to the input string containing the color data. |
| length | The length of the input string in bytes, or -1 if the string is null-terminated. |
Definition at line 144 of file paint.h.
References color_init_argb32(), color_init_hsla(), color_init_rgba(), color_init_rgba8(), MAX_NAME, parse_number(), skip_delim(), skip_ws(), skip_ws_and_comma(), skip_ws_and_delim(), and novasvg::render::color_entry_t::value.
Referenced by novasvg::parseColorValue(), and novasvg::Document::render().
| unsigned int novasvg::render::color_to_argb32 | ( | const color_t * | color | ) |
Converts a color to a 32-bit unsigned ARGB value.
| color | A pointer to a color_t object. |
Definition at line 84 of file paint.h.
References novasvg::render::color::a, novasvg::render::color::b, novasvg::render::color::g, and novasvg::render::color::r.
Referenced by novasvg::parseColorValue(), novasvg::Document::render(), and surface_clear().
| unsigned int novasvg::render::color_to_rgba32 | ( | const color_t * | color | ) |
Converts a color to a 32-bit unsigned RGBA value.
| color | A pointer to a color_t object. |
Definition at line 75 of file paint.h.
References novasvg::render::color::a, novasvg::render::color::b, novasvg::render::color::g, and novasvg::render::color::r.
| NOVASVG_INLINE void novasvg::render::composition_blend_mode | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 502 of file blend.h.
References BYTE_MUL().
| NOVASVG_INLINE void novasvg::render::composition_clear | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 542 of file blend.h.
References BYTE_MUL(), and memfill32().
| NOVASVG_INLINE void novasvg::render::composition_destination | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
| NOVASVG_INLINE void novasvg::render::composition_destination_atop | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 684 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_destination_in | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 621 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_destination_out | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 652 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_destination_over | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 589 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_blend_mode | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 511 of file blend.h.
References BYTE_MUL().
| NOVASVG_INLINE void novasvg::render::composition_solid_clear | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 312 of file blend.h.
References BYTE_MUL(), and memfill32().
| NOVASVG_INLINE void novasvg::render::composition_solid_destination | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
| NOVASVG_INLINE void novasvg::render::composition_solid_destination_atop | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 424 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_destination_in | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 377 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_destination_out | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 403 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_destination_over | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 351 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_source | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 324 of file blend.h.
References BYTE_MUL(), and memfill32().
| NOVASVG_INLINE void novasvg::render::composition_solid_source_atop | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 413 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_source_in | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 361 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_source_out | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 387 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_source_over | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 341 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_solid_xor | ( | uint32_t * | dest, |
| int | length, | ||
| uint32_t | color, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 438 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_source | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 554 of file blend.h.
References INTERPOLATE_PIXEL_255().
| NOVASVG_INLINE void novasvg::render::composition_source_atop | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 667 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_source_in | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 605 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_source_out | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 636 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_source_over | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 570 of file blend.h.
References BYTE_MUL(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::composition_xor | ( | uint32_t * | dest, |
| int | length, | ||
| const uint32_t * | src, | ||
| uint32_t | const_alpha | ||
| ) |
Definition at line 703 of file blend.h.
References BYTE_MUL(), INTERPOLATE_PIXEL_255(), and novasvg_alpha.
| NOVASVG_INLINE void novasvg::render::convert_argb_to_rgba | ( | unsigned char * | dst, |
| const unsigned char * | src, | ||
| int | width, | ||
| int | height, | ||
| int | stride | ||
| ) |
Converts pixel data from premultiplied ARGB to RGBA format.
Transforms pixel data from native-endian 32-bit ARGB premultiplied format to a non-premultiplied RGBA byte sequence.
| dst | Pointer to the destination buffer (can overlap with src). |
| src | Pointer to the source buffer in ARGB premultiplied format. |
| width | Image width in pixels. |
| height | Image height in pixels. |
| stride | Number of bytes per image row in the buffers. |
Definition at line 7967 of file surface.h.
Referenced by novasvg::Bitmap::convertToRGBA().
| NOVASVG_INLINE void novasvg::render::convert_rgba_to_argb | ( | unsigned char * | dst, |
| const unsigned char * | src, | ||
| int | width, | ||
| int | height, | ||
| int | stride | ||
| ) |
Converts pixel data from RGBA to premultiplied ARGB format.
Transforms pixel data from a non-premultiplied RGBA byte sequence to a native-endian 32-bit ARGB premultiplied format.
| dst | Pointer to the destination buffer (can overlap with src). |
| src | Pointer to the source buffer in RGBA format. |
| width | Image width in pixels. |
| height | Image height in pixels. |
| stride | Number of bytes per image row in the buffers. |
| NOVASVG_INLINE void novasvg::render::dash_traverse_func | ( | void * | closure, |
| path_command_t | command, | ||
| const point_t * | points, | ||
| int | npoints | ||
| ) |
Definition at line 541 of file path.h.
References novasvg::render::dasher_t::closure, novasvg::render::dasher_t::current_point, novasvg::render::dasher_t::dashes, novasvg::render::dasher_t::index, novasvg::render::dasher_t::ndashes, NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, novasvg::render::dasher_t::phase, novasvg::render::dasher_t::start_index, novasvg::render::dasher_t::start_phase, novasvg::render::dasher_t::start_toggle, novasvg::render::dasher_t::toggle, novasvg::render::dasher_t::traverse_func, novasvg::render::point::x, and novasvg::render::point::y.
Referenced by path_traverse_dashed().
| NOVASVG_INLINE void novasvg::render::extents_traverse_func | ( | void * | closure, |
| path_command_t | command, | ||
| const point_t * | points, | ||
| int | npoints | ||
| ) |
Definition at line 675 of file path.h.
References novasvg::render::extents_calculator_t::current_point, novasvg::render::extents_calculator_t::is_first_point, novasvg::render::extents_calculator_t::length, NOVASVG_MAX, NOVASVG_MIN, NOVASVG_PATH_COMMAND_MOVE_TO, novasvg::render::point::x, novasvg::render::extents_calculator_t::x1, novasvg::render::extents_calculator_t::x2, novasvg::render::point::y, novasvg::render::extents_calculator_t::y1, and novasvg::render::extents_calculator_t::y2.
Referenced by path_extents().
| NOVASVG_INLINE void novasvg::render::fetch_linear_gradient | ( | uint32_t * | buffer, |
| const linear_gradient_values_t * | v, | ||
| const gradient_data_t * | gradient, | ||
| int | y, | ||
| int | x, | ||
| int | length | ||
| ) |
Definition at line 208 of file blend.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, novasvg::render::matrix::c, COLOR_TABLE_SIZE, novasvg::render::matrix::d, novasvg::render::linear_gradient_values_t::dx, novasvg::render::linear_gradient_values_t::dy, novasvg::render::matrix::e, novasvg::render::matrix::f, FIXPT_BITS, FIXPT_SIZE, gradient_pixel(), gradient_pixel_fixed(), novasvg::render::linear_gradient_values_t::l, novasvg::render::gradient_data_t::matrix, memfill32(), and novasvg::render::linear_gradient_values_t::off.
Referenced by blend_linear_gradient().
| NOVASVG_INLINE void novasvg::render::fetch_radial_gradient | ( | uint32_t * | buffer, |
| const radial_gradient_values_t * | v, | ||
| const gradient_data_t * | gradient, | ||
| int | y, | ||
| int | x, | ||
| int | length | ||
| ) |
Definition at line 246 of file blend.h.
References novasvg::render::radial_gradient_values_t::a, novasvg::render::matrix::a, novasvg::render::matrix::b, novasvg::render::matrix::c, novasvg::render::matrix::d, novasvg::render::radial_gradient_values_t::dr, novasvg::render::radial_gradient_values_t::dx, novasvg::render::radial_gradient_values_t::dy, novasvg::render::matrix::e, novasvg::render::radial_gradient_values_t::extended, novasvg::render::matrix::f, novasvg::render::gradient_data_t::fr, novasvg::render::gradient_data_t::fx, novasvg::render::gradient_data_t::fy, gradient_pixel(), novasvg::render::gradient_data_t::matrix, memfill32(), novasvg::render::gradient_data_t::radial, novasvg::render::radial_gradient_values_t::sqrfr, and novasvg::render::gradient_data_t::values.
Referenced by blend_radial_gradient().
| NOVASVG_INLINE codepoint_t novasvg::render::font_face_apply_ligature | ( | font_face_t * | face, |
| text_iterator_t * | it, | ||
| codepoint_t | codepoint | ||
| ) |
Definition at line 5592 of file font.h.
References font_face_init_ligatures(), novasvg::render::font_face::ligature_count, novasvg::render::font_face::ligatures, novasvg::render::font_face::ligatures_ready, text_iterator_has_next(), and text_iterator_next().
Referenced by canvas_add_text(), font_face_text_extents(), and novasvg::Font::glyphBoxes().
| void novasvg::render::font_face_cache_add | ( | font_face_cache_t * | cache, |
| const char * | family, | ||
| bool | bold, | ||
| bool | italic, | ||
| font_face_t * | face | ||
| ) |
Add a font face to the cache with the specified family and style.
| cache | A pointer to a font_face_cache_t object. |
| family | The font family name. |
| bold | Whether the font is bold. |
| italic | Whether the font is italic. |
| face | A pointer to the font_face_t to add. The cache increments its reference count. |
Definition at line 5770 of file font.h.
References novasvg::render::font_face_entry::bold, novasvg::render::font_face_entry::face, novasvg::render::font_face_entry::family, novasvg::render::font_face_entry::filename, font_face_reference(), novasvg::render::font_face_entry::italic, and novasvg::render::font_face_entry::ttcindex.
Referenced by novasvg::FontFaceCache::addFontFace(), canvas_add_font_face(), and font_face_cache_add_file().
| bool novasvg::render::font_face_cache_add_file | ( | font_face_cache_t * | cache, |
| const char * | family, | ||
| bool | bold, | ||
| bool | italic, | ||
| const char * | filename, | ||
| int | ttcindex | ||
| ) |
Load a font face from a file and add it to the cache with the specified family and style.
| cache | A pointer to a font_face_cache_t object. |
| family | The font family name to associate with the face. |
| bold | Whether the font is bold. |
| italic | Whether the font is italic. |
| filename | Path to the font file. |
| ttcindex | Index of the face in a TrueType collection (use 0 for non-TTC fonts). |
true on success, false if the file could not be loaded. Definition at line 5788 of file font.h.
References font_face_cache_add(), font_face_destroy(), and font_face_load_from_file().
Referenced by canvas_add_font_file().
| font_face_cache_t * novasvg::render::font_face_cache_create | ( | void | ) |
Create a new, empty font‐face cache.
font_face_cache_t object. Definition at line 5690 of file font.h.
References novasvg::render::font_face_cache::capacity, novasvg::render::font_face_cache::entries, novasvg::render::font_face_cache::is_sorted, novasvg::render::font_face_cache::mutex, novasvg_init_reference, novasvg_mutex_init, and novasvg::render::font_face_cache::size.
Referenced by canvas_add_font_face(), and canvas_add_font_file().
| void novasvg::render::font_face_cache_destroy | ( | font_face_cache_t * | cache | ) |
Decrement the reference count of a font‐face cache and destroy it when it reaches zero.
| cache | A pointer to a font_face_cache_t object to release. |
Definition at line 5708 of file font.h.
References font_face_cache_reset(), novasvg::render::font_face_cache::mutex, novasvg_destroy_reference, and novasvg_mutex_destroy.
Referenced by canvas_destroy(), and canvas_set_font_face_cache().
| font_face_t * novasvg::render::font_face_cache_get | ( | font_face_cache_t * | cache, |
| const char * | family, | ||
| bool | bold, | ||
| bool | italic | ||
| ) |
Retrieve a font face from the cache by family and style.
| cache | A pointer to a font_face_cache_t object. |
| family | The font family name. |
| bold | Whether the font is bold. |
| italic | Whether the font is italic. |
font_face_t object, or NULL if not found. The returned face is owned by the cache and must not be destroyed by the caller. Definition at line 5812 of file font.h.
References novasvg::render::font_face_cache::entries, novasvg::render::font_face_entry::face, novasvg::render::font_face_entry::family, novasvg::render::font_face_entry::filename, font_face_load_from_file(), novasvg::render::font_face_cache::is_sorted, novasvg::render::font_face_cache::mutex, novasvg::render::font_face_entry::next, novasvg_mutex_lock, novasvg_mutex_unlock, novasvg::render::font_face_cache::size, and novasvg::render::font_face_entry::ttcindex.
Referenced by canvas_select_font_face(), novasvg::FontFaceCache::getFontFace(), and novasvg::FontFaceCache::getFontFaceLocal().
| int novasvg::render::font_face_cache_load_dir | ( | font_face_cache_t * | cache, |
| const char * | dirname | ||
| ) |
Load all font faces from files in a directory recursively and add them to the cache.
This scans the specified directory recursively and loads all supported font files.
| cache | A pointer to a font_face_cache_t object. |
| dirname | Path to the directory containing font files. |
-1 if font face cache loading is disabled. Definition at line 6199 of file font.h.
References font_face_cache_load_dir(), and font_face_cache_load_file().
Referenced by font_face_cache_load_dir(), and font_face_cache_load_sys().
| int novasvg::render::font_face_cache_load_file | ( | font_face_cache_t * | cache, |
| const char * | filename | ||
| ) |
Load all font faces from a file and add them to the cache.
| cache | A pointer to a font_face_cache_t object. |
| filename | Path to the font file (TrueType, OpenType, or font collection). |
-1 if font face cache loading is disabled. Definition at line 5976 of file font.h.
References novasvg::render::font_face_entry::bold, novasvg::render::font_face_entry::face, novasvg::render::font_face_entry::family, novasvg::render::font_face_entry::filename, novasvg::render::font_face_entry::italic, style, and novasvg::render::font_face_entry::ttcindex.
Referenced by font_face_cache_load_dir().
| int novasvg::render::font_face_cache_load_sys | ( | font_face_cache_t * | cache | ) |
Load all available system font faces and add them to the cache.
This scans standard system font directories recursively and loads all supported font files.
| cache | A pointer to a font_face_cache_t object. |
-1 if font face cache loading is disabled. Definition at line 6231 of file font.h.
References font_face_cache_load_dir().
| font_face_cache_t * novasvg::render::font_face_cache_reference | ( | font_face_cache_t * | cache | ) |
Increments the reference count of a font‐face cache.
| cache | A pointer to a font_face_cache_t object. |
font_face_cache_t object with an incremented reference count. Definition at line 5702 of file font.h.
References novasvg_increment_reference.
Referenced by canvas_set_font_face_cache().
| int novasvg::render::font_face_cache_reference_count | ( | const font_face_cache_t * | cache | ) |
Retrieve the current reference count of a font‐face cache.
| cache | A pointer to a font_face_cache_t object. |
Definition at line 5717 of file font.h.
References novasvg_get_reference_count.
| void novasvg::render::font_face_cache_reset | ( | font_face_cache_t * | cache | ) |
Remove all entries from a font‐face cache.
| cache | A pointer to a font_face_cache_t object to reset. |
Definition at line 5722 of file font.h.
References novasvg::render::font_face_cache::capacity, novasvg::render::font_face_cache::entries, novasvg::render::font_face_entry::face, font_face_destroy(), novasvg::render::font_face_cache::is_sorted, novasvg::render::font_face_cache::mutex, novasvg::render::font_face_entry::next, novasvg_mutex_lock, novasvg_mutex_unlock, and novasvg::render::font_face_cache::size.
Referenced by font_face_cache_destroy().
| void novasvg::render::font_face_destroy | ( | font_face_t * | face | ) |
Decrements the reference count and potentially destroys the font face.
| face | A pointer to a font_face_t object. |
Definition at line 5340 of file font.h.
References novasvg::render::font_face::cache, novasvg::render::font_face::closure, novasvg::render::font_face::destroy_func, novasvg::render::font_face::mutex, novasvg_destroy_reference, and novasvg_mutex_destroy.
Referenced by canvas_set_font_face(), font_face_cache_add_file(), font_face_cache_reset(), state_destroy(), state_reset(), and novasvg::FontFace::~FontFace().
| NOVASVG_INLINE void novasvg::render::font_face_enumerate_codepoints | ( | const font_face_t * | face, |
| void(*)(uint32_t codepoint, void *closure) | callback, | ||
| void * | closure | ||
| ) |
Definition at line 5388 of file font.h.
References stbtt_fontinfo::data, stbtt_fontinfo::index_map, and novasvg::render::font_face::info.
Referenced by novasvg::FontFace::codepoints().
| void novasvg::render::font_face_get_glyph_metrics | ( | font_face_t * | face, |
| float | size, | ||
| codepoint_t | codepoint, | ||
| float * | advance_width, | ||
| float * | left_side_bearing, | ||
| rect_t * | extents | ||
| ) |
Retrieves metrics for a specified glyph at a given size.
| face | A pointer to a font_face_t object. |
| size | The font size in pixels. |
| codepoint | The Unicode code point of the glyph. |
| advance_width | Pointer to store the advance width of the glyph. |
| left_side_bearing | Pointer to store the left side bearing of the glyph. |
| extents | Pointer to a rect_t object to store the glyph bounding box. |
Definition at line 5441 of file font.h.
References novasvg::render::glyph::advance_width, novasvg::render::rect::h, novasvg::render::glyph::left_side_bearing, novasvg::render::rect::w, novasvg::render::rect::x, novasvg::render::glyph::x1, novasvg::render::glyph::x2, novasvg::render::rect::y, novasvg::render::glyph::y1, and novasvg::render::glyph::y2.
Referenced by novasvg::FontFace::advanceWidthUnits(), canvas_glyph_metrics(), font_face_text_extents(), novasvg::Font::glyphBoxes(), and novasvg::Font::xHeight().
| float novasvg::render::font_face_get_glyph_path | ( | font_face_t * | face, |
| float | size, | ||
| float | x, | ||
| float | y, | ||
| codepoint_t | codepoint, | ||
| path_t * | path | ||
| ) |
Retrieves the path of a glyph and its advance width.
| face | A pointer to a font_face_t object. |
| size | The font size in pixels. |
| x | The x-coordinate for positioning the glyph. |
| y | The y-coordinate for positioning the glyph. |
| codepoint | The Unicode code point of the glyph. |
| path | Pointer to a path_t object to store the glyph path. |
Definition at line 5490 of file font.h.
References font_face_traverse_glyph_path().
Referenced by canvas_add_glyph(), and canvas_add_text().
| NOVASVG_INLINE float novasvg::render::font_face_get_kern_advance | ( | font_face_t * | face, |
| float | size, | ||
| codepoint_t | ch1, | ||
| codepoint_t | ch2 | ||
| ) |
Definition at line 5466 of file font.h.
References novasvg::render::font_face::info.
Referenced by canvas_add_text(), font_face_text_extents(), novasvg::Font::glyphBoxes(), and novasvg::FontFace::kernAdvanceUnits().
| void novasvg::render::font_face_get_metrics | ( | const font_face_t * | face, |
| float | size, | ||
| float * | ascent, | ||
| float * | descent, | ||
| float * | line_gap, | ||
| rect_t * | extents | ||
| ) |
Retrieves metrics for a font face at a specified size.
| face | A pointer to a font_face_t object. |
| size | The font size in pixels. |
| ascent | Pointer to store the ascent metric. |
| descent | Pointer to store the descent metric. |
| line_gap | Pointer to store the line gap metric. |
| extents | Pointer to a rect_t object to store the font bounding box. |
Definition at line 5422 of file font.h.
References novasvg::render::font_face::ascent, novasvg::render::font_face::descent, novasvg::render::rect::h, novasvg::render::font_face::line_gap, novasvg::render::rect::w, novasvg::render::rect::x, novasvg::render::font_face::x1, novasvg::render::font_face::x2, novasvg::render::rect::y, novasvg::render::font_face::y1, and novasvg::render::font_face::y2.
Referenced by novasvg::FontFace::ascentUnits(), canvas_font_metrics(), novasvg::FontFace::descentUnits(), and novasvg::Font::Font().
| int novasvg::render::font_face_get_reference_count | ( | const font_face_t * | face | ) |
Retrieves the current reference count of a font face.
| face | A pointer to a font_face_t object. |
Definition at line 5351 of file font.h.
References novasvg_get_reference_count.
| NOVASVG_INLINE float novasvg::render::font_face_get_units_per_em | ( | const font_face_t * | face | ) |
Definition at line 5370 of file font.h.
References novasvg::render::font_face::info.
Referenced by novasvg::FontFace::unitsPerEm().
| NOVASVG_INLINE void novasvg::render::font_face_init_ligatures | ( | font_face_t * | face | ) |
Definition at line 5556 of file font.h.
References novasvg::render::font_face::info, novasvg::render::font_face::ligature_count, novasvg::render::font_face::ligatures, novasvg::render::font_face::ligatures_ready, novasvg::render::font_face::mutex, novasvg_mutex_lock, and novasvg_mutex_unlock.
Referenced by font_face_apply_ligature().
| font_face_t * novasvg::render::font_face_load_from_data | ( | const void * | data, |
| unsigned int | length, | ||
| int | ttcindex, | ||
| destroy_func_t | destroy_func, | ||
| void * | closure | ||
| ) |
Loads a font face from memory.
| data | Pointer to the font data. |
| length | Length of the font data. |
| ttcindex | Index of the font face within a TrueType Collection (TTC). |
| destroy_func | Function to free the font data when no longer needed. |
| closure | User-defined data passed to destroy_func. |
font_face_t object, or NULL on failure. Definition at line 5310 of file font.h.
References novasvg::render::font_face::ascent, novasvg::render::font_face::cache, novasvg::render::font_face::closure, novasvg::render::font_face::descent, novasvg::render::font_face::destroy_func, novasvg::render::font_face::info, novasvg::render::font_face::ligature_count, novasvg::render::font_face::ligatures_ready, novasvg::render::font_face::line_gap, novasvg::render::font_face::mutex, novasvg_init_reference, novasvg_mutex_init, novasvg::render::font_face::x1, novasvg::render::font_face::x2, novasvg::render::font_face::y1, and novasvg::render::font_face::y2.
Referenced by font_face_load_from_file().
| font_face_t * novasvg::render::font_face_load_from_file | ( | const char * | filename, |
| int | ttcindex | ||
| ) |
Loads a font face from a file.
| filename | Path to the font file. |
| ttcindex | Index of the font face within a TrueType Collection (TTC). |
font_face_t object, or NULL on failure. Definition at line 5278 of file font.h.
References font_face_load_from_data().
Referenced by font_face_cache_add_file(), and font_face_cache_get().
| font_face_t * novasvg::render::font_face_reference | ( | font_face_t * | face | ) |
Increments the reference count of a font face.
| face | A pointer to a font_face_t object. |
font_face_t object with an incremented reference count. Definition at line 5334 of file font.h.
References novasvg_increment_reference.
Referenced by canvas_set_font_face(), font_face_cache_add(), and state_copy().
| float novasvg::render::font_face_text_extents | ( | font_face_t * | face, |
| float | size, | ||
| const void * | text, | ||
| int | length, | ||
| text_encoding_t | encoding, | ||
| rect_t * | extents | ||
| ) |
Computes the bounding box of a text string and its advance width.
| face | A pointer to a font_face_t object. |
| size | The font size in pixels. |
| text | Pointer to the text data. |
| length | Length of the text data, or -1 if null-terminated. |
| encoding | Encoding of the text data. |
| extents | Pointer to a rect_t object to store the bounding box of the text. |
Definition at line 5616 of file font.h.
References font_face_apply_ligature(), font_face_get_glyph_metrics(), font_face_get_kern_advance(), novasvg::render::rect::h, NOVASVG_MAX, NOVASVG_MIN, text, text_iterator_has_next(), text_iterator_init(), text_iterator_next(), novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
Referenced by canvas_text_extents(), and novasvg::Font::measureText().
| float novasvg::render::font_face_traverse_glyph_path | ( | font_face_t * | face, |
| float | size, | ||
| float | x, | ||
| float | y, | ||
| codepoint_t | codepoint, | ||
| path_traverse_func_t | traverse_func, | ||
| void * | closure | ||
| ) |
Traverses the path of a glyph and calls a callback for each path element.
| face | A pointer to a font_face_t object. |
| size | The font size in pixels. |
| x | The x-coordinate for positioning the glyph. |
| y | The y-coordinate for positioning the glyph. |
| codepoint | The Unicode code point of the glyph. |
| traverse_func | The callback function to be called for each path element. |
| closure | User-defined data passed to the callback function. |
Definition at line 5495 of file font.h.
References novasvg::render::glyph::advance_width, stbtt_vertex::cx, stbtt_vertex::cx1, stbtt_vertex::cy, stbtt_vertex::cy1, matrix_init_translate(), matrix_map_points(), matrix_scale(), NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, novasvg::render::glyph::nvertices, STBTT_vcubic, STBTT_vcurve, STBTT_vline, STBTT_vmove, stbtt_vertex::type, novasvg::render::glyph::vertices, stbtt_vertex::x, novasvg::render::point::x, stbtt_vertex::y, and novasvg::render::point::y.
Referenced by font_face_get_glyph_path().
| NOVASVG_INLINE PVG_FT_Pos novasvg::render::ft_coord_round | ( | float | v | ) |
Definition at line 200 of file rasterize.h.
| NOVASVG_INLINE void novasvg::render::ft_outline_close | ( | PVG_FT_Outline * | ft | ) |
Definition at line 254 of file rasterize.h.
Referenced by ft_outline_convert().
| NOVASVG_INLINE PVG_FT_Outline * novasvg::render::ft_outline_convert | ( | const path_t * | path, |
| const matrix_t * | matrix, | ||
| const stroke_data_t * | stroke_data | ||
| ) |
Definition at line 276 of file rasterize.h.
References ft_outline_close(), ft_outline_convert_stroke(), ft_outline_create(), ft_outline_cubic_to(), ft_outline_end(), ft_outline_line_to(), ft_outline_move_to(), matrix_map_points(), NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, novasvg::render::path::num_contours, novasvg::render::path::num_points, path_iterator_has_next(), path_iterator_init(), and path_iterator_next().
Referenced by ft_outline_convert_dash(), and rasterize().
| NOVASVG_INLINE PVG_FT_Outline * novasvg::render::ft_outline_convert_dash | ( | const path_t * | path, |
| const matrix_t * | matrix, | ||
| const stroke_dash_t * | stroke_dash | ||
| ) |
Definition at line 311 of file rasterize.h.
References novasvg::render::stroke_dash_t::array, novasvg::render::stroke_dash_t::data, ft_outline_convert(), novasvg::render::stroke_dash_t::offset, path_clone_dashed(), path_destroy(), and novasvg::render::stroke_dash_t::size.
Referenced by ft_outline_convert_stroke().
| NOVASVG_INLINE PVG_FT_Outline * novasvg::render::ft_outline_convert_stroke | ( | const path_t * | path, |
| const matrix_t * | matrix, | ||
| const stroke_data_t * | stroke_data | ||
| ) |
Definition at line 321 of file rasterize.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, novasvg::render::matrix::c, novasvg::render::stroke_style_t::cap, novasvg::render::matrix::d, novasvg::render::stroke_data_t::dash, ft_outline_convert_dash(), ft_outline_create(), ft_outline_destroy(), novasvg::render::stroke_style_t::join, novasvg::render::stroke_style_t::miter_limit, NOVASVG_LINE_CAP_ROUND, NOVASVG_LINE_CAP_SQUARE, NOVASVG_LINE_JOIN_BEVEL, NOVASVG_LINE_JOIN_ROUND, NOVASVG_SQRT2, novasvg::render::stroke_data_t::style, and novasvg::render::stroke_style_t::width.
Referenced by ft_outline_convert().
| NOVASVG_INLINE PVG_FT_Outline * novasvg::render::ft_outline_create | ( | int | points, |
| int | contours | ||
| ) |
Definition at line 173 of file rasterize.h.
References ALIGN_SIZE.
Referenced by ft_outline_convert(), and ft_outline_convert_stroke().
| NOVASVG_INLINE void novasvg::render::ft_outline_cubic_to | ( | PVG_FT_Outline * | ft, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3 | ||
| ) |
Definition at line 236 of file rasterize.h.
References FT_COORD.
Referenced by ft_outline_convert().
| NOVASVG_INLINE void novasvg::render::ft_outline_destroy | ( | PVG_FT_Outline * | outline | ) |
Definition at line 192 of file rasterize.h.
Referenced by ft_outline_convert_stroke(), and rasterize().
| NOVASVG_INLINE void novasvg::render::ft_outline_end | ( | PVG_FT_Outline * | ft | ) |
Definition at line 266 of file rasterize.h.
Referenced by ft_outline_convert().
| NOVASVG_INLINE void novasvg::render::ft_outline_line_to | ( | PVG_FT_Outline * | ft, |
| float | x, | ||
| float | y | ||
| ) |
Definition at line 228 of file rasterize.h.
References FT_COORD.
Referenced by ft_outline_convert().
| NOVASVG_INLINE void novasvg::render::ft_outline_move_to | ( | PVG_FT_Outline * | ft, |
| float | x, | ||
| float | y | ||
| ) |
Definition at line 214 of file rasterize.h.
References FT_COORD.
Referenced by ft_outline_convert().
| NOVASVG_INLINE int novasvg::render::gradient_clamp | ( | const gradient_data_t * | gradient, |
| int | ipos | ||
| ) |
Definition at line 173 of file blend.h.
References COLOR_TABLE_SIZE, NOVASVG_SPREAD_METHOD_REFLECT, NOVASVG_SPREAD_METHOD_REPEAT, and novasvg::render::gradient_data_t::spread.
Referenced by gradient_pixel(), and gradient_pixel_fixed().
| NOVASVG_INLINE uint32_t novasvg::render::gradient_pixel | ( | const gradient_data_t * | gradient, |
| float | pos | ||
| ) |
Definition at line 202 of file blend.h.
References COLOR_TABLE_SIZE, novasvg::render::gradient_data_t::colortable, and gradient_clamp().
Referenced by fetch_linear_gradient(), and fetch_radial_gradient().
| NOVASVG_INLINE uint32_t novasvg::render::gradient_pixel_fixed | ( | const gradient_data_t * | gradient, |
| int | fixed_pos | ||
| ) |
Definition at line 196 of file blend.h.
References novasvg::render::gradient_data_t::colortable, FIXPT_BITS, FIXPT_SIZE, and gradient_clamp().
Referenced by fetch_linear_gradient().
| NOVASVG_INLINE uint32_t novasvg::render::interpolate_4_pixels | ( | uint32_t | tl, |
| uint32_t | tr, | ||
| uint32_t | bl, | ||
| uint32_t | br, | ||
| uint32_t | distx, | ||
| uint32_t | disty | ||
| ) |
Definition at line 1017 of file blend.h.
References INTERPOLATE_PIXEL_256().
Referenced by blend_transformed_bilinear_tiled_argb().
| NOVASVG_INLINE uint32_t novasvg::render::INTERPOLATE_PIXEL_255 | ( | uint32_t | x, |
| uint32_t | a, | ||
| uint32_t | y, | ||
| uint32_t | b | ||
| ) |
Definition at line 63 of file blend.h.
Referenced by blend_gradient(), composition_destination_atop(), composition_solid_destination_atop(), composition_solid_source_atop(), composition_solid_source_in(), composition_solid_source_out(), composition_solid_xor(), composition_source(), composition_source_atop(), composition_source_in(), composition_source_out(), and composition_xor().
| NOVASVG_INLINE uint32_t novasvg::render::INTERPOLATE_PIXEL_256 | ( | uint32_t | x, |
| uint32_t | a, | ||
| uint32_t | y, | ||
| uint32_t | b | ||
| ) |
Definition at line 76 of file blend.h.
Referenced by interpolate_4_pixels().
| void novasvg::render::matrix_init | ( | matrix_t * | matrix, |
| float | a, | ||
| float | b, | ||
| float | c, | ||
| float | d, | ||
| float | e, | ||
| float | f | ||
| ) |
Initializes a 2D transformation matrix.
| matrix | A pointer to the matrix_t object to be initialized. |
| a | The horizontal scaling factor. |
| b | The vertical shearing factor. |
| c | The horizontal shearing factor. |
| d | The vertical scaling factor. |
| e | The horizontal translation offset. |
| f | The vertical translation offset. |
Definition at line 8 of file matrix.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, novasvg::render::matrix::c, novasvg::render::matrix::d, novasvg::render::matrix::e, and novasvg::render::matrix::f.
Referenced by matrix_init_identity(), matrix_init_rotate(), matrix_init_scale(), matrix_init_shear(), matrix_init_translate(), matrix_invert(), matrix_multiply(), and novasvg::Transform::Transform().
| void novasvg::render::matrix_init_identity | ( | matrix_t * | matrix | ) |
Initializes a 2D transformation matrix to the identity matrix.
| matrix | A pointer to the matrix_t object to be initialized. |
Definition at line 15 of file matrix.h.
References matrix_init().
Referenced by canvas_reset_matrix(), matrix_parse(), novasvg::Transform::reset(), and novasvg::Transform::Transform().
| void novasvg::render::matrix_init_rotate | ( | matrix_t * | matrix, |
| float | angle | ||
| ) |
Initializes a 2D transformation matrix for rotation.
| matrix | A pointer to the matrix_t object to be initialized. |
| angle | The rotation angle in radians. |
Definition at line 30 of file matrix.h.
References matrix_init().
Referenced by matrix_rotate(), path_arc_to(), and novasvg::Transform::rotated().
| void novasvg::render::matrix_init_scale | ( | matrix_t * | matrix, |
| float | sx, | ||
| float | sy | ||
| ) |
Initializes a 2D transformation matrix for scaling.
| matrix | A pointer to the matrix_t object to be initialized. |
| sx | The scaling factor in the x-direction. |
| sy | The scaling factor in the y-direction. |
Definition at line 25 of file matrix.h.
References matrix_init().
Referenced by matrix_scale(), path_arc_to(), and novasvg::Transform::scaled().
| void novasvg::render::matrix_init_shear | ( | matrix_t * | matrix, |
| float | shx, | ||
| float | shy | ||
| ) |
Initializes a 2D transformation matrix for shearing.
| matrix | A pointer to the matrix_t object to be initialized. |
| shx | The shearing factor in the x-direction. |
| shy | The shearing factor in the y-direction. |
Definition at line 37 of file matrix.h.
References matrix_init().
Referenced by matrix_shear(), and novasvg::Transform::sheared().
| void novasvg::render::matrix_init_translate | ( | matrix_t * | matrix, |
| float | tx, | ||
| float | ty | ||
| ) |
Initializes a 2D transformation matrix for translation.
| matrix | A pointer to the matrix_t object to be initialized. |
| tx | The translation offset in the x-direction. |
| ty | The translation offset in the y-direction. |
Definition at line 20 of file matrix.h.
References matrix_init().
Referenced by font_face_traverse_glyph_path(), matrix_translate(), novasvg::Transform::rotated(), and novasvg::Transform::translated().
Calculates the inverse of matrix and stores it in inverse.
If inverse is NULL, the function only checks if the matrix is invertible.
matrix and inverse can be identical. | matrix | A pointer to the matrix_t object to invert. |
| inverse | A pointer to the matrix_t object to store the result, or NULL. |
true if the matrix is invertible; false otherwise. Definition at line 81 of file matrix.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, novasvg::render::matrix::c, novasvg::render::matrix::d, novasvg::render::matrix::e, novasvg::render::matrix::f, and matrix_init().
Referenced by blend_gradient(), blend_texture(), novasvg::Transform::inverse(), and novasvg::Transform::invert().
| void novasvg::render::matrix_map | ( | const matrix_t * | matrix, |
| float | x, | ||
| float | y, | ||
| float * | xx, | ||
| float * | yy | ||
| ) |
Transforms the point (x, y) using matrix and stores the result in (xx, yy).
| matrix | A pointer to a matrix_t object. |
| x | The x-coordinate of the point to transform. |
| y | The y-coordinate of the point to transform. |
| xx | A pointer to store the transformed x-coordinate. |
| yy | A pointer to store the transformed y-coordinate. |
Definition at line 100 of file matrix.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, novasvg::render::matrix::c, novasvg::render::matrix::d, novasvg::render::matrix::e, and novasvg::render::matrix::f.
Referenced by canvas_map(), novasvg::Transform::mapPoint(), matrix_map_point(), and path_arc_to().
| void novasvg::render::matrix_map_point | ( | const matrix_t * | matrix, |
| const point_t * | src, | ||
| point_t * | dst | ||
| ) |
Transforms the src point using matrix and stores the result in dst.
src and dst can be identical. | matrix | A pointer to a matrix_t object. |
| src | A pointer to the point_t object to transform. |
| dst | A pointer to the point_t to store the transformed point. |
Definition at line 106 of file matrix.h.
References matrix_map(), novasvg::render::point::x, and novasvg::render::point::y.
Referenced by canvas_map_point(), matrix_map_points(), and path_transform().
| void novasvg::render::matrix_map_points | ( | const matrix_t * | matrix, |
| const point_t * | src, | ||
| point_t * | dst, | ||
| int | count | ||
| ) |
Transforms an array of src points using matrix and stores the results in dst.
src and dst can be identical. | matrix | A pointer to a matrix_t object. |
| src | A pointer to the array of point_t objects to transform. |
| dst | A pointer to the array of point_t to store the transformed points. |
| count | The number of points to transform. |
Definition at line 111 of file matrix.h.
References matrix_map_point().
Referenced by font_face_traverse_glyph_path(), ft_outline_convert(), matrix_map_rect(), and path_add_path().
Transforms the src rectangle using matrix and stores the result in dst.
src and dst can be identical. | matrix | A pointer to a matrix_t object. |
| src | A pointer to the rect_t object to transform. |
| dst | A pointer to the rect_t to store the transformed rectangle. |
Definition at line 118 of file matrix.h.
References novasvg::render::rect::h, matrix_map_points(), novasvg::render::rect::w, novasvg::render::point::x, novasvg::render::rect::x, novasvg::render::point::y, and novasvg::render::rect::y.
Referenced by canvas_map_rect(), and novasvg::Transform::mapRect().
| void novasvg::render::matrix_multiply | ( | matrix_t * | matrix, |
| const matrix_t * | left, | ||
| const matrix_t * | right | ||
| ) |
Multiplies left and right matrices and stores the result in matrix.
matrix can be identical to either left or right. | matrix | A pointer to the matrix_t object to store the result. |
| left | A pointer to the first matrix_t matrix. |
| right | A pointer to the second matrix_t matrix. |
Definition at line 70 of file matrix.h.
References novasvg::render::matrix::a, novasvg::render::matrix::b, novasvg::render::matrix::c, novasvg::render::matrix::d, novasvg::render::matrix::e, novasvg::render::matrix::f, and matrix_init().
Referenced by blend_gradient(), blend_texture(), canvas_transform(), matrix_parse(), matrix_rotate(), matrix_scale(), matrix_shear(), matrix_translate(), and novasvg::Transform::operator*().
| bool novasvg::render::matrix_parse | ( | matrix_t * | matrix, |
| const char * | data, | ||
| int | length | ||
| ) |
Parses an SVG transform string into a matrix.
| matrix | A pointer to a matrix_t object to store the result. |
| data | Input SVG transform string. |
| length | Length of the string, or -1 if null-terminated. |
true on success, false on failure. Definition at line 171 of file matrix.h.
References matrix_init_identity(), matrix_multiply(), matrix_rotate(), matrix_scale(), matrix_shear(), matrix_translate(), NOVASVG_DEG2RAD, parse_matrix_parameters(), skip_string(), skip_ws(), and skip_ws_or_comma().
Referenced by novasvg::Transform::parse().
| void novasvg::render::matrix_rotate | ( | matrix_t * | matrix, |
| float | angle | ||
| ) |
Rotates the matrix by the specified angle (in radians).
| matrix | A pointer to the matrix_t object to be modified. |
| angle | The rotation angle in radians. |
Definition at line 56 of file matrix.h.
References matrix_init_rotate(), and matrix_multiply().
Referenced by canvas_rotate(), matrix_parse(), path_arc_to(), and novasvg::Transform::rotated().
| void novasvg::render::matrix_scale | ( | matrix_t * | matrix, |
| float | sx, | ||
| float | sy | ||
| ) |
Scales the matrix by factors sx and sy
| matrix | A pointer to the matrix_t object to be modified. |
| sx | The scaling factor in the x-direction. |
| sy | The scaling factor in the y-direction. |
Definition at line 49 of file matrix.h.
References matrix_init_scale(), and matrix_multiply().
Referenced by canvas_scale(), font_face_traverse_glyph_path(), matrix_parse(), and path_arc_to().
| void novasvg::render::matrix_shear | ( | matrix_t * | matrix, |
| float | shx, | ||
| float | shy | ||
| ) |
Shears the matrix by factors shx and shy.
| matrix | A pointer to the matrix_t object to be modified. |
| shx | The shearing factor in the x-direction. |
| shy | The shearing factor in the y-direction. |
Definition at line 63 of file matrix.h.
References matrix_init_shear(), and matrix_multiply().
Referenced by canvas_shear(), and matrix_parse().
| void novasvg::render::matrix_translate | ( | matrix_t * | matrix, |
| float | tx, | ||
| float | ty | ||
| ) |
Adds a translation with offsets tx and ty to the matrix.
| matrix | A pointer to the matrix_t object to be modified. |
| tx | The translation offset in the x-direction. |
| ty | The translation offset in the y-direction. |
Definition at line 42 of file matrix.h.
References matrix_init_translate(), and matrix_multiply().
Referenced by canvas_translate(), matrix_parse(), and novasvg::Transform::rotated().
| void novasvg::render::memfill32 | ( | unsigned int * | dest, |
| int | length, | ||
| unsigned int | value | ||
| ) |
Definition at line 164 of file blend.h.
Referenced by composition_clear(), composition_solid_clear(), composition_solid_source(), fetch_linear_gradient(), fetch_radial_gradient(), and surface_clear().
Creates a solid color paint.
| color | A pointer to the color_t object. |
paint_t object. Definition at line 422 of file paint.h.
References novasvg::render::color::a, novasvg::render::color::b, novasvg::render::color::g, paint_create_rgba(), and novasvg::render::color::r.
| paint_t * novasvg::render::paint_create_linear_gradient | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| spread_method_t | spread, | ||
| const gradient_stop_t * | stops, | ||
| int | nstops, | ||
| const matrix_t * | matrix | ||
| ) |
Creates a linear gradient paint.
| x1 | The x coordinate of the gradient start. |
| y1 | The y coordinate of the gradient start. |
| x2 | The x coordinate of the gradient end. |
| y2 | The y coordinate of the gradient end. |
| spread | The gradient spread method. |
| stops | Array of gradient stops. |
| nstops | Number of gradient stops. |
| matrix | Optional transformation matrix. |
paint_t object. Definition at line 453 of file paint.h.
References novasvg::render::gradient_paint_t::base, NOVASVG_GRADIENT_TYPE_LINEAR, and novasvg::render::gradient_paint_t::values.
Referenced by canvas_set_linear_gradient().
| paint_t * novasvg::render::paint_create_radial_gradient | ( | float | cx, |
| float | cy, | ||
| float | cr, | ||
| float | fx, | ||
| float | fy, | ||
| float | fr, | ||
| spread_method_t | spread, | ||
| const gradient_stop_t * | stops, | ||
| int | nstops, | ||
| const matrix_t * | matrix | ||
| ) |
Creates a radial gradient paint.
| cx | The x coordinate of the gradient center. |
| cy | The y coordinate of the gradient center. |
| cr | The radius of the gradient. |
| fx | The x coordinate of the focal point. |
| fy | The y coordinate of the focal point. |
| fr | The radius of the focal point. |
| spread | The gradient spread method. |
| stops | Array of gradient stops. |
| nstops | Number of gradient stops. |
| matrix | Optional transformation matrix. |
paint_t object. Definition at line 463 of file paint.h.
References novasvg::render::gradient_paint_t::base, NOVASVG_GRADIENT_TYPE_RADIAL, and novasvg::render::gradient_paint_t::values.
Referenced by canvas_set_radial_gradient().
| paint_t * novasvg::render::paint_create_rgb | ( | float | r, |
| float | g, | ||
| float | b | ||
| ) |
Creates a solid RGB paint.
| r | The red component (0 to 1). |
| g | The green component (0 to 1). |
| b | The blue component (0 to 1). |
paint_t object. Definition at line 404 of file paint.h.
References paint_create_rgba().
| paint_t * novasvg::render::paint_create_rgba | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Creates a solid RGBA paint.
| r | The red component (0 to 1). |
| g | The green component (0 to 1). |
| b | The blue component (0 to 1). |
| a | The alpha component (0 to 1). |
paint_t object. Definition at line 409 of file paint.h.
References novasvg::render::color::a, novasvg::render::color::b, novasvg::render::solid_paint_t::base, novasvg::render::solid_paint_t::color, novasvg::render::color::g, NOVASVG_PAINT_TYPE_COLOR, and novasvg::render::color::r.
Referenced by paint_create_color(), and paint_create_rgb().
| paint_t * novasvg::render::paint_create_texture | ( | surface_t * | surface, |
| texture_type_t | type, | ||
| float | opacity, | ||
| const matrix_t * | matrix | ||
| ) |
Creates a texture paint from a surface.
| surface | The texture surface. |
| type | The texture type (plain or tiled). |
| opacity | The opacity of the texture (0 to 1). |
| matrix | Optional transformation matrix. |
paint_t object. Definition at line 475 of file paint.h.
References novasvg::render::texture_paint_t::base, novasvg::render::texture_paint_t::matrix, NOVASVG_IDENTITY_MATRIX, NOVASVG_PAINT_TYPE_TEXTURE, novasvg::render::texture_paint_t::opacity, novasvg::render::texture_paint_t::surface, surface_reference(), and novasvg::render::texture_paint_t::type.
Referenced by canvas_set_texture().
| void novasvg::render::paint_destroy | ( | paint_t * | paint | ) |
Decrements the reference count and destroys the paint if the count reaches zero.
| paint | A pointer to the paint_t object. |
Definition at line 494 of file paint.h.
References novasvg_destroy_reference, NOVASVG_PAINT_TYPE_TEXTURE, novasvg::render::texture_paint_t::surface, surface_destroy(), and novasvg::render::paint::type.
Referenced by canvas_set_linear_gradient(), canvas_set_paint(), canvas_set_radial_gradient(), canvas_set_texture(), state_destroy(), and state_reset().
| int novasvg::render::paint_get_reference_count | ( | const paint_t * | paint | ) |
Retrieves the reference count of a paint object.
| paint | A pointer to the paint_t object. |
paint_t object. Definition at line 506 of file paint.h.
References novasvg_get_reference_count.
Increments the reference count of a paint object.
| paint | A pointer to the paint_t object. |
paint_t object. Definition at line 488 of file paint.h.
References novasvg_increment_reference.
Referenced by canvas_set_paint(), and state_copy().
| NOVASVG_INLINE bool novasvg::render::parse_arc_flag | ( | const char ** | begin, |
| const char * | end, | ||
| bool * | flag | ||
| ) |
Definition at line 725 of file path.h.
References skip_delim(), and skip_ws_or_comma().
Referenced by path_parse().
| NOVASVG_INLINE int novasvg::render::parse_matrix_parameters | ( | const char ** | begin, |
| const char * | end, | ||
| float | values[6], | ||
| int | required, | ||
| int | optional | ||
| ) |
Definition at line 149 of file matrix.h.
References parse_number(), skip_css_unit(), skip_delim(), skip_ws_and_delim(), and skip_ws_or_comma().
Referenced by matrix_parse().
| NOVASVG_INLINE bool novasvg::render::parse_number | ( | const char ** | begin, |
| const char * | end, | ||
| float * | number | ||
| ) |
Definition at line 88 of file utils.h.
References NOVASVG_IS_NUM.
Referenced by color_parse(), parse_matrix_parameters(), and parse_path_coordinates().
| NOVASVG_INLINE bool novasvg::render::parse_path_coordinates | ( | const char ** | begin, |
| const char * | end, | ||
| float | values[6], | ||
| int | offset, | ||
| int | count | ||
| ) |
Definition at line 737 of file path.h.
References parse_number(), and skip_ws_or_comma().
Referenced by path_parse().
| void novasvg::render::path_add_arc | ( | path_t * | path, |
| float | cx, | ||
| float | cy, | ||
| float | r, | ||
| float | a0, | ||
| float | a1, | ||
| bool | ccw | ||
| ) |
Adds an arc to the path.
Adds an arc defined by the center (cx, cy), radius (r), start angle (a0), end angle (a1), and direction (ccw) to the path.
| path | A pointer to a path_t object. |
| cx | The x-coordinate of the arc's center. |
| cy | The y-coordinate of the arc's center. |
| r | The radius of the arc. |
| a0 | The start angle of the arc in radians. |
| a1 | The end angle of the arc in radians. |
| ccw | If true, the arc is drawn counter-clockwise; if false, clockwise. |
Definition at line 315 of file path.h.
References novasvg::render::path::elements, NOVASVG_HALF_PI, NOVASVG_KAPPA, NOVASVG_TWO_PI, path_cubic_to(), path_line_to(), path_move_to(), path_reserve(), and novasvg::render::path::size.
Referenced by canvas_arc().
| void novasvg::render::path_add_circle | ( | path_t * | path, |
| float | cx, | ||
| float | cy, | ||
| float | r | ||
| ) |
Adds a circle to the path.
Adds a circle defined by its center (cx, cy) and radius (r) to the path.
| path | A pointer to a path_t object. |
| cx | The x-coordinate of the circle's center. |
| cy | The y-coordinate of the circle's center. |
| r | The radius of the circle. |
Definition at line 310 of file path.h.
References path_add_ellipse().
Referenced by canvas_circle().
| NOVASVG_INLINE path_element_t * novasvg::render::path_add_command | ( | path_t * | path, |
| path_command_t | command, | ||
| int | npoints | ||
| ) |
Definition at line 81 of file path.h.
References novasvg::render::path_element::command, novasvg::render::path::data, novasvg::render::path::elements, novasvg::render::path_element::header, novasvg::render::path_element::length, novasvg_array_ensure, novasvg::render::path::num_points, and novasvg::render::path::size.
Referenced by path_close(), path_cubic_to(), path_line_to(), and path_move_to().
| void novasvg::render::path_add_ellipse | ( | path_t * | path, |
| float | cx, | ||
| float | cy, | ||
| float | rx, | ||
| float | ry | ||
| ) |
Adds an ellipse to the path.
Adds an ellipse defined by the center (cx, cy) and radii (rx, ry) to the path.
| path | A pointer to a path_t object. |
| cx | The x-coordinate of the ellipse's center. |
| cy | The y-coordinate of the ellipse's center. |
| rx | The x-radius of the ellipse. |
| ry | The y-radius of the ellipse. |
Definition at line 291 of file path.h.
References NOVASVG_KAPPA, path_close(), path_cubic_to(), path_move_to(), and path_reserve().
Referenced by novasvg::Path::addEllipse(), canvas_ellipse(), and path_add_circle().
| void novasvg::render::path_add_path | ( | path_t * | path, |
| const path_t * | source, | ||
| const matrix_t * | matrix | ||
| ) |
Adds a sub-path to the path.
Adds all elements from another path (source) to the current path, optionally applying a transformation matrix.
| path | A pointer to a path_t object. |
| source | A pointer to the path_t object to copy elements from. |
| matrix | A pointer to a matrix_t object, or NULL to apply no transformation. |
Definition at line 380 of file path.h.
References novasvg::render::path::elements, matrix_map_points(), novasvg_array_append, novasvg_array_ensure, NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, novasvg::render::path::num_contours, novasvg::render::path::num_curves, novasvg::render::path::num_points, path_close(), path_cubic_to(), path_iterator_has_next(), path_iterator_init(), path_iterator_next(), path_line_to(), path_move_to(), novasvg::render::path::size, and novasvg::render::path::start_point.
Referenced by canvas_add_path().
| void novasvg::render::path_add_rect | ( | path_t * | path, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h | ||
| ) |
Adds a rectangle to the path.
Adds a rectangle defined by the top-left corner (x, y) and dimensions (w, h) to the path.
| path | A pointer to a path_t object. |
| x | The x-coordinate of the rectangle's top-left corner. |
| y | The y-coordinate of the rectangle's top-left corner. |
| w | The width of the rectangle. |
| h | The height of the rectangle. |
Definition at line 252 of file path.h.
References path_close(), path_line_to(), path_move_to(), and path_reserve().
Referenced by novasvg::Path::addRect(), canvas_rect(), and path_add_round_rect().
| void novasvg::render::path_add_round_rect | ( | path_t * | path, |
| float | x, | ||
| float | y, | ||
| float | w, | ||
| float | h, | ||
| float | rx, | ||
| float | ry | ||
| ) |
Adds a rounded rectangle to the path.
Adds a rounded rectangle defined by the top-left corner (x, y), dimensions (w, h), and corner radii (rx, ry) to the path.
| path | A pointer to a path_t object. |
| x | The x-coordinate of the rectangle's top-left corner. |
| y | The y-coordinate of the rectangle's top-left corner. |
| w | The width of the rectangle. |
| h | The height of the rectangle. |
| rx | The x-radius of the rectangle's corners. |
| ry | The y-radius of the rectangle's corners. |
Definition at line 263 of file path.h.
References NOVASVG_KAPPA, NOVASVG_MIN, path_add_rect(), path_close(), path_cubic_to(), path_line_to(), path_move_to(), and path_reserve().
Referenced by novasvg::Path::addRoundRect(), and canvas_round_rect().
| void novasvg::render::path_arc_to | ( | path_t * | path, |
| float | rx, | ||
| float | ry, | ||
| float | angle, | ||
| bool | large_arc_flag, | ||
| bool | sweep_flag, | ||
| float | x, | ||
| float | y | ||
| ) |
Adds an elliptical arc to the path.
This function adds an elliptical arc segment from the current point to the specified end point. The arc is defined by the radii, rotation angle, and flags for large arc and sweep. This is equivalent to the A command in SVG path syntax.
| path | A pointer to a path_t object. |
| rx | The x-radius of the ellipse. |
| ry | The y-radius of the ellipse. |
| angle | The rotation angle of the ellipse in radians. |
| large_arc_flag | If true, draw the large arc; otherwise, draw the small arc. |
| sweep_flag | If true, draw the arc in the positive-angle direction; otherwise, in the negative-angle direction. |
| x | The x-coordinate of the end point of the arc. |
| y | The y-coordinate of the end point of the arc. |
Definition at line 131 of file path.h.
References matrix_init_rotate(), matrix_init_scale(), matrix_map(), matrix_rotate(), matrix_scale(), NOVASVG_HALF_PI, NOVASVG_TWO_PI, path_cubic_to(), path_get_current_point(), and path_line_to().
Referenced by novasvg::Path::arcTo(), canvas_arc_to(), and path_parse().
Creates a copy of the path.
| path | A pointer to the path_t object to clone. |
Definition at line 619 of file path.h.
References novasvg::render::path::elements, novasvg_array_append, novasvg::render::path::num_contours, novasvg::render::path::num_curves, novasvg::render::path::num_points, path_create(), and novasvg::render::path::start_point.
| path_t * novasvg::render::path_clone_dashed | ( | const path_t * | path, |
| float | offset, | ||
| const float * | dashes, | ||
| int | ndashes | ||
| ) |
Creates a copy of the path with a dashed pattern applied.
| path | A pointer to the path_t object to clone. |
| offset | The starting offset into the dash pattern. |
| dashes | An array of dash lengths. |
| ndashes | The number of elements in the dashes array. |
Definition at line 657 of file path.h.
References clone_traverse_func(), novasvg::render::path::elements, novasvg::render::path::num_curves, path_create(), path_reserve(), path_traverse_dashed(), and novasvg::render::path::size.
Referenced by ft_outline_convert_dash().
Creates a copy of the path with Bézier curves flattened to line segments.
| path | A pointer to the path_t object to clone. |
Definition at line 649 of file path.h.
References clone_traverse_func(), novasvg::render::path::elements, novasvg::render::path::num_curves, path_create(), path_reserve(), path_traverse_flatten(), and novasvg::render::path::size.
| void novasvg::render::path_close | ( | path_t * | path | ) |
Closes the current sub-path.
This function closes the current sub-path by drawing a straight line back to the start point of the sub-path. This is equivalent to the Z command in SVG path syntax.
| path | A pointer to a path_t object. |
Definition at line 217 of file path.h.
References novasvg::render::path::elements, NOVASVG_PATH_COMMAND_CLOSE, path_add_command(), novasvg::render::path_element::point, novasvg::render::path::size, and novasvg::render::path::start_point.
Referenced by canvas_close_path(), clone_traverse_func(), novasvg::Path::close(), path_add_ellipse(), path_add_path(), path_add_rect(), path_add_round_rect(), and path_parse().
| path_t * novasvg::render::path_create | ( | void | ) |
Creates a new path object.
Definition at line 43 of file path.h.
References novasvg::render::path::elements, novasvg_array_init, NOVASVG_EMPTY_POINT, novasvg_init_reference, novasvg::render::path::num_contours, novasvg::render::path::num_curves, novasvg::render::path::num_points, and novasvg::render::path::start_point.
Referenced by canvas_create(), path_clone(), path_clone_dashed(), and path_clone_flatten().
| void novasvg::render::path_cubic_to | ( | path_t * | path, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3 | ||
| ) |
Adds a cubic Bézier curve to the path.
This function adds a cubic Bézier curve segment from the current point to the specified end point, using the given two control points. This is equivalent to the C command in SVG path syntax.
| path | A pointer to a path_t object. |
| x1 | The x-coordinate of the first control point. |
| y1 | The y-coordinate of the first control point. |
| x2 | The x-coordinate of the second control point. |
| y2 | The y-coordinate of the second control point. |
| x3 | The x-coordinate of the end point of the curve. |
| y3 | The y-coordinate of the end point of the curve. |
Definition at line 120 of file path.h.
References novasvg::render::path::elements, NOVASVG_MAKE_POINT, NOVASVG_PATH_COMMAND_CUBIC_TO, novasvg::render::path::num_curves, path_add_command(), path_move_to(), novasvg::render::path_element::point, and novasvg::render::path::size.
Referenced by canvas_cubic_to(), clone_traverse_func(), novasvg::Path::cubicTo(), path_add_arc(), path_add_ellipse(), path_add_path(), path_add_round_rect(), path_arc_to(), path_parse(), and path_quad_to().
| void novasvg::render::path_destroy | ( | path_t * | path | ) |
Decreases the reference count of a path object.
This function decrements the reference count of the given path object. If the reference count reaches zero, the path object is destroyed and its resources are freed.
| path | A pointer to the path_t object. |
Definition at line 61 of file path.h.
References novasvg::render::path::elements, novasvg_array_destroy, and novasvg_destroy_reference.
Referenced by canvas_destroy(), ft_outline_convert_dash(), novasvg::Path::reset(), and novasvg::Path::~Path().
Computes the bounding box and total length of the path.
| path | A pointer to a path_t object. |
| extents | A pointer to a rect_t object to store the bounding box. |
| tight | If true, computes a precise bounding box; otherwise, aligns to control points. |
Definition at line 701 of file path.h.
References extents_traverse_func(), novasvg::render::rect::h, novasvg::render::extents_calculator_t::length, path_traverse(), path_traverse_flatten(), novasvg::render::rect::w, novasvg::render::rect::x, novasvg::render::extents_calculator_t::x1, novasvg::render::extents_calculator_t::x2, novasvg::render::rect::y, novasvg::render::extents_calculator_t::y1, and novasvg::render::extents_calculator_t::y2.
Referenced by novasvg::Path::boundingRect(), and path_length().
| void novasvg::render::path_get_current_point | ( | const path_t * | path, |
| float * | x, | ||
| float * | y | ||
| ) |
Retrieves the current point of the path.
Gets the current point's coordinates in the path. This point is the last position used or the point where the path was last moved to.
| path | A pointer to a path_t object. |
| x | The x-coordinate of the current point. |
| y | The y-coordinate of the current point. |
Definition at line 225 of file path.h.
References novasvg::render::path::data, novasvg::render::path::elements, novasvg::render::path::num_points, novasvg::render::path_element::point, novasvg::render::path::size, novasvg::render::point::x, and novasvg::render::point::y.
Referenced by canvas_get_current_point(), path_arc_to(), and path_quad_to().
| int novasvg::render::path_get_elements | ( | const path_t * | path, |
| const path_element_t ** | elements | ||
| ) |
Retrieves the elements of a path.
Provides access to the array of path elements.
| path | A pointer to a path_t object. |
| elements | A pointer to a pointer that will be set to the array of path elements. |
Definition at line 74 of file path.h.
References novasvg::render::path::data, novasvg::render::path::elements, and novasvg::render::path::size.
Referenced by novasvg::Path::isEmpty().
| int novasvg::render::path_get_reference_count | ( | const path_t * | path | ) |
Retrieves the reference count of a path object.
| path | A pointer to a path_t object. |
Definition at line 69 of file path.h.
References novasvg_get_reference_count.
Referenced by novasvg::Path::isUnique().
| bool novasvg::render::path_iterator_has_next | ( | const path_iterator_t * | it | ) |
Checks if there are more elements to iterate over.
| it | The path iterator. |
true if there are more elements; otherwise, false. Definition at line 18 of file path.h.
References novasvg::render::path_iterator::index, and novasvg::render::path_iterator::size.
Referenced by ft_outline_convert(), path_add_path(), path_traverse(), and path_traverse_flatten().
| void novasvg::render::path_iterator_init | ( | path_iterator_t * | it, |
| const path_t * | path | ||
| ) |
Initializes a path iterator for a given path.
| it | The path iterator to initialize. |
| path | The path to iterate over. |
Definition at line 11 of file path.h.
References novasvg::render::path::data, novasvg::render::path::elements, novasvg::render::path_iterator::elements, novasvg::render::path_iterator::index, novasvg::render::path::size, and novasvg::render::path_iterator::size.
Referenced by ft_outline_convert(), path_add_path(), path_traverse(), and path_traverse_flatten().
| path_command_t novasvg::render::path_iterator_next | ( | path_iterator_t * | it, |
| point_t | points[3] | ||
| ) |
Retrieves the current command and its associated points, then advances the iterator.
| it | The path iterator. |
| points | An array to store the points for the current command. |
Definition at line 23 of file path.h.
References novasvg::render::path_element::command, novasvg::render::path_iterator::elements, novasvg::render::path_element::header, novasvg::render::path_iterator::index, novasvg::render::path_element::length, NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, and novasvg::render::path_element::point.
Referenced by ft_outline_convert(), path_add_path(), path_traverse(), and path_traverse_flatten().
| float novasvg::render::path_length | ( | const path_t * | path | ) |
Calculates the total length of the path.
| path | A pointer to a path_t object. |
Definition at line 720 of file path.h.
References path_extents().
| void novasvg::render::path_line_to | ( | path_t * | path, |
| float | x, | ||
| float | y | ||
| ) |
Adds a straight line segment to the path.
This function adds a straight line segment from the current point to the specified coordinates. This is equivalent to the L command in SVG path syntax.
| path | A pointer to a path_t object. |
| x | The x-coordinate of the end point of the line segment. |
| y | The y-coordinate of the end point of the line segment. |
Definition at line 101 of file path.h.
References novasvg::render::path::elements, NOVASVG_MAKE_POINT, NOVASVG_PATH_COMMAND_LINE_TO, path_add_command(), path_move_to(), novasvg::render::path_element::point, and novasvg::render::path::size.
Referenced by canvas_line_to(), clone_traverse_func(), novasvg::Path::lineTo(), path_add_arc(), path_add_path(), path_add_rect(), path_add_round_rect(), path_arc_to(), and path_parse().
| void novasvg::render::path_move_to | ( | path_t * | path, |
| float | x, | ||
| float | y | ||
| ) |
Moves the current point to a new position.
This function moves the current point to the specified coordinates without drawing a line. This is equivalent to the M command in SVG path syntax.
| path | A pointer to a path_t object. |
| x | The x-coordinate of the new position. |
| y | The y-coordinate of the new position. |
Definition at line 93 of file path.h.
References NOVASVG_MAKE_POINT, NOVASVG_PATH_COMMAND_MOVE_TO, novasvg::render::path::num_contours, path_add_command(), novasvg::render::path_element::point, and novasvg::render::path::start_point.
Referenced by canvas_move_to(), clone_traverse_func(), novasvg::Path::moveTo(), path_add_arc(), path_add_ellipse(), path_add_path(), path_add_rect(), path_add_round_rect(), path_cubic_to(), path_line_to(), and path_parse().
| bool novasvg::render::path_parse | ( | path_t * | path, |
| const char * | data, | ||
| int | length | ||
| ) |
Parses SVG path data into a path_t object.
| path | A pointer to the path_t object to populate. |
| data | The SVG path data string. |
| length | The length of data, or -1 for null-terminated data. |
true if successful; false otherwise. Definition at line 748 of file path.h.
References NOVASVG_DEG2RAD, NOVASVG_IS_ALPHA, parse_arc_flag(), parse_path_coordinates(), path_arc_to(), path_close(), path_cubic_to(), path_line_to(), path_move_to(), path_quad_to(), and skip_ws().
Referenced by novasvg::Path::parse().
| void novasvg::render::path_quad_to | ( | path_t * | path, |
| float | x1, | ||
| float | y1, | ||
| float | x2, | ||
| float | y2 | ||
| ) |
Adds a quadratic Bézier curve to the path.
This function adds a quadratic Bézier curve segment from the current point to the specified end point, using the given control point. This is equivalent to the Q command in SVG path syntax.
| path | A pointer to a path_t object. |
| x1 | The x-coordinate of the control point. |
| y1 | The y-coordinate of the control point. |
| x2 | The x-coordinate of the end point of the curve. |
| y2 | The y-coordinate of the end point of the curve. |
Definition at line 109 of file path.h.
References path_cubic_to(), and path_get_current_point().
Referenced by canvas_quad_to(), path_parse(), and novasvg::Path::quadTo().
Increases the reference count of a path object.
| path | A pointer to a path_t object. |
path_t object. Definition at line 55 of file path.h.
References novasvg_increment_reference.
| void novasvg::render::path_reserve | ( | path_t * | path, |
| int | count | ||
| ) |
Reserves space for path elements.
Reserves space for a specified number of elements in the path. This helps optimize memory allocation for future path operations.
| path | A pointer to a path_t object. |
| count | The number of path elements to reserve space for. |
Definition at line 238 of file path.h.
References novasvg::render::path::elements, and novasvg_array_ensure.
Referenced by path_add_arc(), path_add_ellipse(), path_add_rect(), path_add_round_rect(), path_clone_dashed(), and path_clone_flatten().
| void novasvg::render::path_reset | ( | path_t * | path | ) |
Resets the path.
Clears all path data, effectively resetting the path_t object to its initial state.
| path | A pointer to a path_t object. |
Definition at line 243 of file path.h.
References novasvg::render::path::elements, novasvg_array_clear, NOVASVG_EMPTY_POINT, novasvg::render::path::num_contours, novasvg::render::path::num_curves, novasvg::render::path::num_points, and novasvg::render::path::start_point.
Referenced by canvas_new_path(), novasvg::Path::parse(), and novasvg::Path::reset().
Applies a transformation matrix to the path.
Transforms the entire path using the provided transformation matrix.
| path | A pointer to a path_t object. |
| matrix | A pointer to a matrix_t object. |
Definition at line 361 of file path.h.
References novasvg::render::path_element::command, novasvg::render::path::data, novasvg::render::path::elements, novasvg::render::path_element::header, novasvg::render::path_element::length, matrix_map_point(), NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, and novasvg::render::path::size.
| void novasvg::render::path_traverse | ( | const path_t * | path, |
| path_traverse_func_t | traverse_func, | ||
| void * | closure | ||
| ) |
Traverses the path and calls the callback for each element.
| path | A pointer to a path_t object. |
| traverse_func | The callback function to be called for each element of the path. |
| closure | User-defined data passed to the callback. |
Definition at line 417 of file path.h.
References NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, path_iterator_has_next(), path_iterator_init(), and path_iterator_next().
Referenced by path_extents(), path_traverse_dashed(), and path_traverse_flatten().
| void novasvg::render::path_traverse_dashed | ( | const path_t * | path, |
| float | offset, | ||
| const float * | dashes, | ||
| int | ndashes, | ||
| path_traverse_func_t | traverse_func, | ||
| void * | closure | ||
| ) |
Traverses the path with a dashed pattern and calls the callback for each segment.
| path | A pointer to a path_t object. |
| offset | The starting offset into the dash pattern. |
| dashes | An array of dash lengths. |
| ndashes | The number of elements in the dashes array. |
| traverse_func | The callback function to be called for each element of the path. |
| closure | User-defined data passed to the callback. |
Definition at line 584 of file path.h.
References novasvg::render::dasher_t::closure, novasvg::render::dasher_t::current_point, dash_traverse_func(), novasvg::render::dasher_t::dashes, novasvg::render::dasher_t::index, novasvg::render::dasher_t::ndashes, NOVASVG_EMPTY_POINT, path_traverse(), path_traverse_flatten(), novasvg::render::dasher_t::phase, novasvg::render::dasher_t::start_index, novasvg::render::dasher_t::start_phase, novasvg::render::dasher_t::start_toggle, novasvg::render::dasher_t::toggle, and novasvg::render::dasher_t::traverse_func.
Referenced by path_clone_dashed().
| void novasvg::render::path_traverse_flatten | ( | const path_t * | path, |
| path_traverse_func_t | traverse_func, | ||
| void * | closure | ||
| ) |
Traverses the path with Bézier curves flattened to line segments.
| path | A pointer to a path_t object. |
| traverse_func | The callback function to be called for each element of the path. |
| closure | User-defined data passed to the callback. |
Definition at line 469 of file path.h.
References NOVASVG_PATH_COMMAND_CLOSE, NOVASVG_PATH_COMMAND_CUBIC_TO, NOVASVG_PATH_COMMAND_LINE_TO, NOVASVG_PATH_COMMAND_MOVE_TO, novasvg::render::path::num_curves, path_iterator_has_next(), path_iterator_init(), path_iterator_next(), path_traverse(), split_bezier(), novasvg::render::point::x, novasvg::render::bezier_t::x1, novasvg::render::bezier_t::x2, novasvg::render::bezier_t::x3, novasvg::render::bezier_t::x4, novasvg::render::point::y, novasvg::render::bezier_t::y1, novasvg::render::bezier_t::y2, novasvg::render::bezier_t::y3, and novasvg::render::bezier_t::y4.
Referenced by path_clone_flatten(), path_extents(), and path_traverse_dashed().
| NOVASVG_INLINE uint32_t novasvg::render::premultiply_argb | ( | uint32_t | color | ) |
Definition at line 73 of file utils.h.
References novasvg_alpha, novasvg_blue, novasvg_green, and novasvg_red.
Referenced by surface_clear().
| NOVASVG_INLINE uint32_t novasvg::render::premultiply_color_with_opacity | ( | const color_t * | color, |
| float | opacity | ||
| ) |
Definition at line 54 of file blend.h.
References novasvg::render::color::a, novasvg::render::color::b, novasvg::render::color::g, and novasvg::render::color::r.
Referenced by blend_color(), and blend_gradient().
| NOVASVG_INLINE void novasvg::render::rasterize | ( | span_buffer_t * | span_buffer, |
| const path_t * | path, | ||
| const matrix_t * | matrix, | ||
| const rect_t * | clip_rect, | ||
| const stroke_data_t * | stroke_data, | ||
| fill_rule_t | winding | ||
| ) |
Definition at line 383 of file rasterize.h.
References ft_outline_convert(), ft_outline_destroy(), novasvg::render::rect::h, NOVASVG_FILL_RULE_EVEN_ODD, span_buffer_reset(), spans_generation_callback(), novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
Referenced by canvas_clip_preserve(), canvas_fill_contains(), canvas_fill_extents(), canvas_fill_preserve(), canvas_stroke_contains(), canvas_stroke_extents(), and canvas_stroke_preserve().
| int novasvg::render::render_version | ( | void | ) |
Gets the version of the novasvg rendering library.
Definition at line 9 of file canvas.h.
References NOVASVG_RENDER_VERSION.
| const char * novasvg::render::render_version_string | ( | void | ) |
Gets the version of the novasvg rendering library as a string.
Definition at line 14 of file canvas.h.
References NOVASVG_RENDER_VERSION_STRING.
| NOVASVG_INLINE void novasvg::render::skip_css_unit | ( | const char ** | begin, |
| const char * | end, | ||
| float * | number | ||
| ) |
Definition at line 236 of file utils.h.
Referenced by parse_matrix_parameters().
| NOVASVG_INLINE bool novasvg::render::skip_delim | ( | const char ** | begin, |
| const char * | end, | ||
| const char | delim | ||
| ) |
Definition at line 147 of file utils.h.
Referenced by color_parse(), parse_arc_flag(), parse_matrix_parameters(), skip_ws_and_delim(), and skip_ws_or_delim().
| NOVASVG_INLINE bool novasvg::render::skip_string | ( | const char ** | begin, |
| const char * | end, | ||
| const char * | data | ||
| ) |
Definition at line 158 of file utils.h.
Referenced by matrix_parse().
| NOVASVG_INLINE bool novasvg::render::skip_ws | ( | const char ** | begin, |
| const char * | end | ||
| ) |
Definition at line 174 of file utils.h.
References NOVASVG_IS_WS.
Referenced by color_parse(), matrix_parse(), path_parse(), skip_ws_and_delim(), and skip_ws_or_delim().
| NOVASVG_INLINE bool novasvg::render::skip_ws_and_comma | ( | const char ** | begin, |
| const char * | end | ||
| ) |
Definition at line 198 of file utils.h.
References skip_ws_and_delim().
Referenced by color_parse().
| NOVASVG_INLINE bool novasvg::render::skip_ws_and_delim | ( | const char ** | begin, |
| const char * | end, | ||
| char | delim | ||
| ) |
Definition at line 183 of file utils.h.
References skip_delim(), and skip_ws().
Referenced by color_parse(), parse_matrix_parameters(), and skip_ws_and_comma().
| NOVASVG_INLINE bool novasvg::render::skip_ws_or_comma | ( | const char ** | begin, |
| const char * | end, | ||
| bool * | has_comma | ||
| ) |
Definition at line 222 of file utils.h.
References skip_ws_or_delim().
Referenced by matrix_parse(), parse_arc_flag(), parse_matrix_parameters(), and parse_path_coordinates().
| NOVASVG_INLINE bool novasvg::render::skip_ws_or_delim | ( | const char ** | begin, |
| const char * | end, | ||
| char | delim, | ||
| bool * | has_delim | ||
| ) |
Definition at line 203 of file utils.h.
References skip_delim(), and skip_ws().
Referenced by skip_ws_or_comma().
| NOVASVG_INLINE bool novasvg::render::span_buffer_contains | ( | const span_buffer_t * | span_buffer, |
| float | x, | ||
| float | y | ||
| ) |
Definition at line 63 of file rasterize.h.
References novasvg::render::span_buffer_t::data, novasvg::render::span_t::len, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by canvas_clip_contains(), canvas_fill_contains(), and canvas_stroke_contains().
| NOVASVG_INLINE void novasvg::render::span_buffer_copy | ( | span_buffer_t * | span_buffer, |
| const span_buffer_t * | source | ||
| ) |
Definition at line 53 of file rasterize.h.
References novasvg::render::span_buffer_t::h, novasvg_array_append, novasvg_array_clear, novasvg::render::span_buffer_t::spans, novasvg::render::span_buffer_t::w, novasvg::render::span_buffer_t::x, and novasvg::render::span_buffer_t::y.
Referenced by canvas_clip_preserve(), and state_copy().
| NOVASVG_INLINE void novasvg::render::span_buffer_destroy | ( | span_buffer_t * | span_buffer | ) |
Definition at line 48 of file rasterize.h.
References novasvg_array_destroy, and novasvg::render::span_buffer_t::spans.
Referenced by canvas_destroy(), and state_destroy().
| NOVASVG_INLINE void novasvg::render::span_buffer_extents | ( | span_buffer_t * | span_buffer, |
| rect_t * | extents | ||
| ) |
Definition at line 108 of file rasterize.h.
References novasvg::render::span_buffer_t::h, novasvg::render::rect::h, span_buffer_update_extents(), novasvg::render::span_buffer_t::w, novasvg::render::rect::w, novasvg::render::span_buffer_t::x, novasvg::render::rect::x, novasvg::render::span_buffer_t::y, and novasvg::render::rect::y.
Referenced by canvas_clip_extents(), canvas_fill_extents(), and canvas_stroke_extents().
| NOVASVG_INLINE void novasvg::render::span_buffer_init | ( | span_buffer_t * | span_buffer | ) |
Definition at line 14 of file rasterize.h.
References novasvg_array_init, span_buffer_reset(), and novasvg::render::span_buffer_t::spans.
Referenced by canvas_create(), and state_create().
| NOVASVG_INLINE void novasvg::render::span_buffer_init_rect | ( | span_buffer_t * | span_buffer, |
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height | ||
| ) |
Definition at line 20 of file rasterize.h.
References novasvg::render::span_t::coverage, novasvg::render::span_buffer_t::data, novasvg::render::span_buffer_t::h, novasvg::render::span_t::len, novasvg_array_clear, novasvg_array_ensure, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::span_buffer_t::w, novasvg::render::span_t::x, novasvg::render::span_buffer_t::x, novasvg::render::span_t::y, and novasvg::render::span_buffer_t::y.
Referenced by canvas_paint().
| NOVASVG_INLINE void novasvg::render::span_buffer_intersect | ( | span_buffer_t * | span_buffer, |
| const span_buffer_t * | a, | ||
| const span_buffer_t * | b | ||
| ) |
Definition at line 117 of file rasterize.h.
References novasvg::render::span_t::coverage, novasvg::render::span_buffer_t::data, novasvg::render::span_t::len, novasvg_array_ensure, NOVASVG_MAX, NOVASVG_MIN, novasvg::render::span_buffer_t::size, span_buffer_reset(), novasvg::render::span_buffer_t::spans, novasvg::render::span_t::x, and novasvg::render::span_t::y.
Referenced by canvas_clip_preserve(), canvas_fill_preserve(), and canvas_stroke_preserve().
| NOVASVG_INLINE void novasvg::render::span_buffer_reset | ( | span_buffer_t * | span_buffer | ) |
Definition at line 39 of file rasterize.h.
References novasvg::render::span_buffer_t::h, novasvg_array_clear, novasvg::render::span_buffer_t::spans, novasvg::render::span_buffer_t::w, novasvg::render::span_buffer_t::x, and novasvg::render::span_buffer_t::y.
Referenced by rasterize(), span_buffer_init(), span_buffer_intersect(), and state_reset().
| NOVASVG_INLINE void novasvg::render::span_buffer_update_extents | ( | span_buffer_t * | span_buffer | ) |
Definition at line 80 of file rasterize.h.
References novasvg::render::span_buffer_t::data, novasvg::render::span_buffer_t::h, novasvg::render::span_t::len, novasvg::render::span_buffer_t::size, novasvg::render::span_buffer_t::spans, novasvg::render::span_buffer_t::w, novasvg::render::span_t::x, novasvg::render::span_buffer_t::x, novasvg::render::span_t::y, and novasvg::render::span_buffer_t::y.
Referenced by span_buffer_extents().
| NOVASVG_INLINE void novasvg::render::spans_generation_callback | ( | int | count, |
| const PVG_FT_Span * | spans, | ||
| void * | user | ||
| ) |
Definition at line 377 of file rasterize.h.
References novasvg_array_append_data, and novasvg::render::span_buffer_t::spans.
Referenced by rasterize().
| NOVASVG_INLINE void novasvg::render::split_bezier | ( | const bezier_t * | b, |
| bezier_t * | first, | ||
| bezier_t * | second | ||
| ) |
Definition at line 448 of file path.h.
References novasvg::render::bezier_t::x1, novasvg::render::bezier_t::x2, novasvg::render::bezier_t::x3, novasvg::render::bezier_t::x4, novasvg::render::bezier_t::y1, novasvg::render::bezier_t::y2, novasvg::render::bezier_t::y3, and novasvg::render::bezier_t::y4.
Referenced by path_traverse_flatten().
| NOVASVG_INLINE void novasvg::render::state_copy | ( | state_t * | state, |
| const state_t * | source | ||
| ) |
Definition at line 60 of file canvas.h.
References novasvg::render::stroke_dash_t::array, novasvg::render::state::clip_spans, novasvg::render::state::clipping, novasvg::render::state::color, novasvg::render::stroke_data_t::dash, novasvg::render::state::font_face, font_face_reference(), novasvg::render::state::font_size, novasvg::render::state::matrix, novasvg_array_append, novasvg_array_clear, novasvg::render::stroke_dash_t::offset, novasvg::render::state::op, novasvg::render::state::opacity, novasvg::render::state::paint, paint_reference(), span_buffer_copy(), novasvg::render::state::stroke, novasvg::render::stroke_data_t::style, and novasvg::render::state::winding.
Referenced by canvas_save().
| NOVASVG_INLINE state_t * novasvg::render::state_create | ( | void | ) |
Definition at line 21 of file canvas.h.
References novasvg::render::stroke_dash_t::array, novasvg::render::state::clip_spans, novasvg::render::state::clipping, novasvg::render::state::color, novasvg::render::stroke_data_t::dash, novasvg::render::state::font_face, novasvg::render::state::font_size, novasvg::render::state::matrix, novasvg::render::state::next, novasvg_array_init, NOVASVG_BLACK_COLOR, NOVASVG_DEFAULT_STROKE_STYLE, NOVASVG_FILL_RULE_NON_ZERO, NOVASVG_IDENTITY_MATRIX, NOVASVG_OPERATOR_SRC_OVER, novasvg::render::stroke_dash_t::offset, novasvg::render::state::op, novasvg::render::state::opacity, novasvg::render::state::paint, span_buffer_init(), novasvg::render::state::stroke, novasvg::render::stroke_data_t::style, and novasvg::render::state::winding.
Referenced by canvas_create(), and canvas_save().
| NOVASVG_INLINE void novasvg::render::state_destroy | ( | state_t * | state | ) |
Definition at line 78 of file canvas.h.
References novasvg::render::stroke_dash_t::array, novasvg::render::state::clip_spans, novasvg::render::stroke_data_t::dash, novasvg::render::state::font_face, font_face_destroy(), novasvg_array_destroy, novasvg::render::state::paint, paint_destroy(), span_buffer_destroy(), and novasvg::render::state::stroke.
Referenced by canvas_destroy().
| NOVASVG_INLINE void novasvg::render::state_reset | ( | state_t * | state | ) |
Definition at line 41 of file canvas.h.
References novasvg::render::stroke_dash_t::array, novasvg::render::state::clip_spans, novasvg::render::state::clipping, novasvg::render::state::color, novasvg::render::stroke_data_t::dash, novasvg::render::state::font_face, font_face_destroy(), novasvg::render::state::font_size, novasvg::render::state::matrix, novasvg_array_clear, NOVASVG_BLACK_COLOR, NOVASVG_DEFAULT_STROKE_STYLE, NOVASVG_FILL_RULE_NON_ZERO, NOVASVG_IDENTITY_MATRIX, NOVASVG_OPERATOR_SRC_OVER, novasvg::render::stroke_dash_t::offset, novasvg::render::state::op, novasvg::render::state::opacity, novasvg::render::state::paint, paint_destroy(), span_buffer_reset(), novasvg::render::state::stroke, novasvg::render::stroke_data_t::style, and novasvg::render::state::winding.
Referenced by canvas_restore().
| NOVASVG_INLINE void novasvg::render::surface_clear | ( | surface_t * | surface, |
| const color_t * | color | ||
| ) |
Clears the entire surface with the specified color.
| surface | Pointer to the target surface. |
| color | Pointer to the color used for clearing. |
Definition at line 7958 of file surface.h.
References color_to_argb32(), novasvg::render::surface::data, novasvg::render::surface::height, memfill32(), premultiply_argb(), novasvg::render::surface::stride, and novasvg::render::surface::width.
Referenced by novasvg::Bitmap::clear().
| NOVASVG_INLINE surface_t * novasvg::render::surface_create | ( | int | width, |
| int | height | ||
| ) |
Creates a new image surface with the specified dimensions.
| width | The width of the surface in pixels. |
| height | The height of the surface in pixels. |
surface_t object. Definition at line 7753 of file surface.h.
References novasvg::render::surface::data, novasvg::render::surface::height, and novasvg::render::surface::stride.
| NOVASVG_INLINE surface_t * novasvg::render::surface_create_for_data | ( | unsigned char * | data, |
| int | width, | ||
| int | height, | ||
| int | stride | ||
| ) |
Creates an image surface using existing pixel data.
| data | Pointer to the pixel data. |
| width | The width of the surface in pixels. |
| height | The height of the surface in pixels. |
| stride | The number of bytes per row in the pixel data. |
surface_t object. Definition at line 7761 of file surface.h.
References novasvg::render::surface::data, novasvg::render::surface::height, novasvg_init_reference, novasvg::render::surface::stride, and novasvg::render::surface::width.
| NOVASVG_INLINE void novasvg::render::surface_destroy | ( | surface_t * | surface | ) |
Decrements the reference count and destroys the surface if the count reaches zero.
| surface | Pointer to the surface_t object . |
Definition at line 7926 of file surface.h.
References novasvg_destroy_reference.
Referenced by canvas_destroy(), paint_destroy(), and novasvg::Bitmap::~Bitmap().
| NOVASVG_INLINE unsigned char * novasvg::render::surface_get_data | ( | const surface_t * | surface | ) |
Gets the pixel data of the surface.
| surface | Pointer to the surface_t object. |
Definition at line 7938 of file surface.h.
References novasvg::render::surface::data.
Referenced by novasvg::Bitmap::convertToRGBA(), and novasvg::Bitmap::data().
| NOVASVG_INLINE int novasvg::render::surface_get_height | ( | const surface_t * | surface | ) |
Gets the height of the surface.
| surface | Pointer to the surface_t object. |
Definition at line 7948 of file surface.h.
References novasvg::render::surface::height.
Referenced by novasvg::Bitmap::convertToRGBA(), and novasvg::Bitmap::height().
| NOVASVG_INLINE int novasvg::render::surface_get_reference_count | ( | const surface_t * | surface | ) |
Gets the current reference count of a surface.
| surface | Pointer to the surface_t object. |
Definition at line 7933 of file surface.h.
References novasvg_get_reference_count.
| NOVASVG_INLINE int novasvg::render::surface_get_stride | ( | const surface_t * | surface | ) |
Gets the stride of the surface.
| surface | Pointer to the surface_t object. |
Definition at line 7953 of file surface.h.
References novasvg::render::surface::stride.
Referenced by novasvg::Bitmap::convertToRGBA(), and novasvg::Bitmap::stride().
| NOVASVG_INLINE int novasvg::render::surface_get_width | ( | const surface_t * | surface | ) |
Gets the width of the surface.
| surface | Pointer to the surface_t object. |
Definition at line 7943 of file surface.h.
References novasvg::render::surface::width.
Referenced by novasvg::Bitmap::convertToRGBA(), and novasvg::Bitmap::width().
| NOVASVG_INLINE surface_t * novasvg::render::surface_load_from_image_base64 | ( | const char * | data, |
| int | length | ||
| ) |
Loads an image surface from base64-encoded data.
| data | Pointer to the base64-encoded image data. |
| length | Length of the data in bytes, or -1 if null-terminated. |
NULL on failure. Definition at line 7909 of file surface.h.
References base64_decode(), and surface_load_from_image_data().
Referenced by novasvg::loadImageResource().
| NOVASVG_INLINE surface_t * novasvg::render::surface_load_from_image_data | ( | const void * | data, |
| int | length | ||
| ) |
Loads an image surface from raw image data.
| data | Pointer to the image data. |
| length | Length of the data in bytes. |
NULL on failure. Definition at line 7790 of file surface.h.
References STBI_rgb_alpha.
Referenced by surface_load_from_image_base64().
| NOVASVG_INLINE surface_t * novasvg::render::surface_load_from_image_file | ( | const char * | filename | ) |
Loads an image surface from a file.
| filename | Path to the image file. |
NULL on failure. Definition at line 7781 of file surface.h.
References STBI_rgb_alpha.
Referenced by novasvg::loadImageResource().
| NOVASVG_INLINE surface_t * novasvg::render::surface_reference | ( | surface_t * | surface | ) |
Increments the reference count for a surface.
| surface | Pointer to the surface_t object. |
surface_t object. Definition at line 7920 of file surface.h.
References novasvg_increment_reference.
Referenced by canvas_create(), and paint_create_texture().
| bool novasvg::render::text_iterator_has_next | ( | const text_iterator_t * | it | ) |
Checks if there are more code points to iterate.
| it | Pointer to the text iterator. |
true if more code points are available; otherwise, false. Definition at line 5041 of file font.h.
References novasvg::render::text_iterator::index, and novasvg::render::text_iterator::length.
Referenced by canvas_add_text(), font_face_apply_ligature(), font_face_text_extents(), and novasvg::Font::glyphBoxes().
| void novasvg::render::text_iterator_init | ( | text_iterator_t * | it, |
| const void * | text, | ||
| int | length, | ||
| text_encoding_t | encoding | ||
| ) |
Initializes a text iterator.
| it | Pointer to the text iterator. |
| text | Pointer to the text data. |
| length | Length of the text data, or -1 if the data is null-terminated. |
| encoding | Encoding of the text data. |
Definition at line 5031 of file font.h.
References novasvg::render::text_iterator::encoding, novasvg::render::text_iterator::index, novasvg::render::text_iterator::length, novasvg::render::text_iterator::text, and text.
Referenced by canvas_add_text(), font_face_text_extents(), and novasvg::Font::glyphBoxes().
| codepoint_t novasvg::render::text_iterator_next | ( | text_iterator_t * | it | ) |
Retrieves the next code point and advances the iterator.
| it | Pointer to the text iterator. |
Definition at line 5046 of file font.h.
References novasvg::render::text_iterator::encoding, novasvg::render::text_iterator::index, novasvg::render::text_iterator::length, NOVASVG_TEXT_ENCODING_LATIN1, NOVASVG_TEXT_ENCODING_UTF16, NOVASVG_TEXT_ENCODING_UTF32, NOVASVG_TEXT_ENCODING_UTF8, novasvg::render::text_iterator::text, and text.
Referenced by canvas_add_text(), font_face_apply_ligature(), font_face_text_extents(), and novasvg::Font::glyphBoxes().
| NOVASVG_INLINE const composition_solid_function_t novasvg::render::composition_solid_table[] |
Definition at line 521 of file blend.h.
Referenced by blend_solid().
| NOVASVG_INLINE const composition_function_t novasvg::render::composition_table[] |
Definition at line 722 of file blend.h.
Referenced by blend_linear_gradient(), blend_radial_gradient(), blend_transformed_argb(), blend_transformed_bilinear_tiled_argb(), blend_transformed_tiled_argb(), blend_untransformed_argb(), and blend_untransformed_tiled_argb().