Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Enumerations | Functions | Variables
cairoint.h File Reference
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <math.h>
#include <limits.h>
#include <stdio.h>
#include "cairo.h"
#include "cairo-debug.h"
#include <pixman.h>
#include "cairo-wideint.h"
#include "cairo-hash-private.h"

Go to the source code of this file.

Classes

struct  _cairo_point
struct  _cairo_slope
struct  _cairo_point_double
struct  _cairo_distance_double
struct  _cairo_line
struct  _cairo_trapezoid
struct  _cairo_rectangle
struct  _cairo_edge
struct  _cairo_polygon
struct  _cairo_spline
struct  _cairo_pen_vertex
struct  _cairo_pen
struct  _cairo_array
struct  _cairo_cache_backend
struct  cairo_cache_entry_base_t
struct  cairo_cache_arrangement_t
struct  cairo_cache_t
struct  _cairo_unscaled_font
struct  _cairo_font_options
struct  _cairo_scaled_font
struct  _cairo_font_face
struct  cairo_glyph_cache_key_t
struct  cairo_image_glyph_cache_entry_t
struct  _cairo_unscaled_font_backend
struct  _cairo_toy_font_face
struct  _cairo_scaled_font_backend
struct  _cairo_font_face_backend
struct  _cairo_surface_backend
struct  _cairo_format_masks
struct  _cairo_surface
struct  _cairo_image_surface
struct  _cairo_color
struct  _cairo_color_stop
struct  _cairo_pattern
struct  _cairo_solid_pattern
struct  _cairo_surface_pattern
struct  _cairo_gradient_pattern
struct  _cairo_linear_pattern
struct  _cairo_radial_pattern
union  cairo_gradient_pattern_union_t
union  cairo_pattern_union_t
struct  _cairo_surface_attributes
struct  _cairo_traps
struct  _cairo_stroke_face

Defines

#define slim_hidden_proto(name)
#define slim_hidden_def(name)
#define CAIRO_PRINTF_FORMAT(fmt_index, va_index)
#define cairo_private
#define CAIRO_FUNCTION_ALIAS(old, new)
#define __attribute__(x)
#define INLINE
#define CAIRO_MUTEX_DECLARE(name)
#define CAIRO_MUTEX_DECLARE_GLOBAL(name)
#define CAIRO_MUTEX_LOCK(name)
#define CAIRO_MUTEX_UNLOCK(name)
#define MIN(a, b)   ((a) < (b) ? (a) : (b))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define FALSE   0
#define TRUE   1
#define ASSERT_NOT_REACHED
#define M_PI   3.14159265358979323846
#define CAIRO_MAXSHORT   SHRT_MAX
#define CAIRO_MINSHORT   SHRT_MIN
#define CAIRO_ALPHA_IS_OPAQUE(alpha)   ((alpha) >= ((double)0xff00 / (double)0xffff))
#define CAIRO_ALPHA_IS_ZERO(alpha)   ((alpha) <= 0.0)
#define CAIRO_IMAGE_GLYPH_CACHE_MEMORY_DEFAULT   0x100000
#define CAIRO_XLIB_GLYPH_CACHE_MEMORY_DEFAULT   0x100000
#define CAIRO_EXTEND_DEFAULT   CAIRO_EXTEND_NONE
#define CAIRO_FILTER_DEFAULT   CAIRO_FILTER_BEST
#define CAIRO_FONT_SLANT_DEFAULT   CAIRO_FONT_SLANT_NORMAL
#define CAIRO_FONT_WEIGHT_DEFAULT   CAIRO_FONT_WEIGHT_NORMAL
#define CAIRO_WIN32_FONT_FAMILY_DEFAULT   "Arial"
#define CAIRO_ATSUI_FONT_FAMILY_DEFAULT   "Monaco"
#define CAIRO_FT_FONT_FAMILY_DEFAULT   ""
#define CAIRO_GSTATE_OPERATOR_DEFAULT   CAIRO_OPERATOR_OVER
#define CAIRO_GSTATE_TOLERANCE_DEFAULT   0.1
#define CAIRO_GSTATE_FILL_RULE_DEFAULT   CAIRO_FILL_RULE_WINDING
#define CAIRO_GSTATE_LINE_WIDTH_DEFAULT   2.0
#define CAIRO_GSTATE_LINE_CAP_DEFAULT   CAIRO_LINE_CAP_BUTT
#define CAIRO_GSTATE_LINE_JOIN_DEFAULT   CAIRO_LINE_JOIN_MITER
#define CAIRO_GSTATE_MITER_LIMIT_DEFAULT   10.0
#define CAIRO_GSTATE_DEFAULT_FONT_SIZE   10.0
#define CAIRO_COLOR_WHITE   _cairo_stock_color (CAIRO_STOCK_WHITE)
#define CAIRO_COLOR_BLACK   _cairo_stock_color (CAIRO_STOCK_BLACK)
#define CAIRO_COLOR_TRANSPARENT   _cairo_stock_color (CAIRO_STOCK_TRANSPARENT)
#define CAIRO_FORMAT_VALID(format)
#define CAIRO_CONTENT_VALID(content)

Typedefs

typedef int32_t cairo_fixed_16_16_t
typedef cairo_int64_t cairo_fixed_32_32_t
typedef cairo_int64_t cairo_fixed_48_16_t
typedef cairo_int128_t cairo_fixed_64_64_t
typedef cairo_int128_t cairo_fixed_96_32_t
typedef cairo_fixed_16_16_t cairo_fixed_t
typedef struct _cairo_point cairo_point_t
typedef struct _cairo_slope cairo_slope_t
typedef struct _cairo_slope cairo_distance_t
typedef struct _cairo_point_double cairo_point_double_t
typedef struct
_cairo_distance_double 
cairo_distance_double_t
typedef struct _cairo_line cairo_line_t
typedef struct _cairo_line cairo_box_t
typedef struct _cairo_trapezoid cairo_trapezoid_t
typedef struct _cairo_rectangle cairo_rectangle_t
typedef struct _cairo_rectangle cairo_glyph_size_t
typedef enum cairo_int_status cairo_int_status_t
typedef enum cairo_direction cairo_direction_t
typedef struct _cairo_path_fixed
typedef typedeftypedef enum
_cairo_clip_mode struct 
_cairo_clip_path
typedef struct _cairo_clip
typedef struct _cairo_edge cairo_edge_t
typedef struct _cairo_polygon cairo_polygon_t
typedef struct _cairo_spline cairo_spline_t
typedef struct _cairo_pen_vertex cairo_pen_vertex_t
typedef struct _cairo_pen cairo_pen_t
typedef struct _cairo_color
typedef struct _cairo_image_surface
typedef struct _cairo_array
typedef cairo_array_t cairo_user_data_array_t
typedef struct _cairo_cache_backend cairo_cache_backend_t
typedef struct _cairo_unscaled_font_backend
typedef struct _cairo_scaled_font_backend
typedef struct _cairo_font_face_backend
typedef struct _cairo_unscaled_font cairo_unscaled_font_t
typedef struct _cairo_toy_font_face cairo_toy_font_face_t
typedef struct
_cairo_surface_backend 
cairo_surface_backend_t
typedef struct _cairo_format_masks cairo_format_masks_t
typedef struct _cairo_color_stop cairo_color_stop_t
typedef struct _cairo_solid_pattern cairo_solid_pattern_t
typedef struct
_cairo_surface_pattern 
cairo_surface_pattern_t
typedef struct
_cairo_gradient_pattern 
cairo_gradient_pattern_t
typedef struct
_cairo_linear_pattern 
cairo_linear_pattern_t
typedef struct
_cairo_radial_pattern 
cairo_radial_pattern_t
typedef struct
_cairo_surface_attributes 
cairo_surface_attributes_t
typedef struct _cairo_traps cairo_traps_t
typedef struct _cairo_gstate
typedef struct _cairo_stroke_face cairo_stroke_face_t
typedef cairo_status_tcairo_path_fixed_move_to_func_t )(void *closure, cairo_point_t *point)
typedef cairo_status_tcairo_path_fixed_line_to_func_t )(void *closure, cairo_point_t *point)
typedef cairo_status_tcairo_path_fixed_curve_to_func_t )(void *closure, cairo_point_t *p0, cairo_point_t *p1, cairo_point_t *p2)
typedef cairo_status_tcairo_path_fixed_close_path_func_t )(void *closure)
typedef struct _cairo_output_stream

Enumerations

enum  cairo_int_status { CAIRO_INT_STATUS_DEGENERATE = 1000, CAIRO_INT_STATUS_UNSUPPORTED, CAIRO_INT_STATUS_NOTHING_TO_DO }
enum  cairo_direction { CAIRO_DIRECTION_FORWARD, CAIRO_DIRECTION_REVERSE }
enum  cairo_stock_t { CAIRO_STOCK_WHITE, CAIRO_STOCK_BLACK, CAIRO_STOCK_TRANSPARENT }
enum  cairo_pattern_type_t { CAIRO_PATTERN_SOLID, CAIRO_PATTERN_SURFACE, CAIRO_PATTERN_LINEAR, CAIRO_PATTERN_RADIAL }

Functions

cairo_private void _cairo_box_round_to_rectangle (cairo_box_t *box, cairo_rectangle_t *rectangle)
cairo_private void _cairo_rectangle_intersect (cairo_rectangle_t *dest, cairo_rectangle_t *src)
cairo_private void _cairo_array_init (cairo_array_t *array, int element_size)
cairo_private void _cairo_array_fini (cairo_array_t *array)
cairo_private cairo_status_t _cairo_array_grow_by (cairo_array_t *array, int additional)
cairo_private void _cairo_array_truncate (cairo_array_t *array, int length)
cairo_private void_cairo_array_append (cairo_array_t *array, const void *elements, int num_elements)
cairo_private void_cairo_array_index (cairo_array_t *array, int index)
cairo_private void _cairo_array_copy_element (cairo_array_t *array, int index, void *dst)
cairo_private int _cairo_array_num_elements (cairo_array_t *array)
cairo_private void _cairo_user_data_array_init (cairo_user_data_array_t *array)
 _cairo_user_data_array_init: : a cairo_user_data_array_t
cairo_private void _cairo_user_data_array_fini (cairo_user_data_array_t *array)
 _cairo_user_data_array_fini: : a cairo_user_data_array_t
cairo_private void_cairo_user_data_array_get_data (cairo_user_data_array_t *array, const cairo_user_data_key_t *key)
 _cairo_user_data_array_get_data: : a cairo_user_data_array_t : the address of the cairo_user_data_key_t the user data was attached to
cairo_private cairo_status_t _cairo_user_data_array_set_data (cairo_user_data_array_t *array, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
 _cairo_user_data_array_set_data: : a cairo_user_data_array_t : the address of a cairo_user_data_key_t to attach the user data to : the user data to attach : a cairo_destroy_func_t which will be called when the user data array is destroyed or when new user data is attached using the same key.
cairo_private cairo_status_t _cairo_cache_init (cairo_cache_t *cache, const cairo_cache_backend_t *backend, unsigned long max_memory)
cairo_private void _cairo_cache_destroy (cairo_cache_t *cache)
cairo_private void _cairo_cache_shrink_to (cairo_cache_t *cache, unsigned long max_memory)
cairo_private cairo_status_t _cairo_cache_lookup (cairo_cache_t *cache, void *key, void **entry_return, int *created_entry)
cairo_private cairo_status_t _cairo_cache_remove (cairo_cache_t *cache, void *key)
cairo_private void_cairo_cache_random_entry (cairo_cache_t *cache, int(*predicate)(void *))
cairo_private unsigned long _cairo_hash_string (const char *c)
cairo_private void _cairo_lock_global_image_glyph_cache (void)
cairo_private void _cairo_unlock_global_image_glyph_cache (void)
cairo_private cairo_cache_t_cairo_get_global_image_glyph_cache (void)
cairo_private void _cairo_font_reset_static_data (void)
cairo_private void _cairo_ft_font_reset_static_data (void)
cairo_private void _cairo_xlib_surface_reset_static_data (void)
cairo_private void _cairo_xlib_screen_reset_static_data (void)
cairo_private unsigned long _cairo_glyph_cache_hash (void *cache, void *key)
cairo_private int _cairo_glyph_cache_keys_equal (void *cache, void *k1, void *k2)
cairo_private void _cairo_restrict_value (double *value, double min, double max)
cairo_private cairo_fixed_t _cairo_fixed_from_int (int i)
cairo_private cairo_fixed_t _cairo_fixed_from_double (double d)
cairo_private cairo_fixed_t _cairo_fixed_from_26_6 (uint32_t i)
cairo_private double _cairo_fixed_to_double (cairo_fixed_t f)
cairo_private int _cairo_fixed_is_integer (cairo_fixed_t f)
cairo_private int _cairo_fixed_integer_part (cairo_fixed_t f)
cairo_private int _cairo_fixed_integer_floor (cairo_fixed_t f)
cairo_private int _cairo_fixed_integer_ceil (cairo_fixed_t f)
cairo_private cairo_gstate_t * _cairo_gstate_create (cairo_surface_t *target)
cairo_private void _cairo_gstate_destroy (cairo_gstate_t *gstate)
cairo_private cairo_gstate_t * _cairo_gstate_clone (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_begin_group (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_end_group (cairo_gstate_t *gstate)
cairo_private cairo_surface_t * _cairo_gstate_get_target (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_source (cairo_gstate_t *gstate, cairo_pattern_t *source)
cairo_private cairo_pattern_t * _cairo_gstate_get_source (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t operator)
cairo_private cairo_operator_t _cairo_gstate_get_operator (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_tolerance (cairo_gstate_t *gstate, double tolerance)
cairo_private double _cairo_gstate_get_tolerance (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_fill_rule (cairo_gstate_t *gstate, cairo_fill_rule_t fill_rule)
cairo_private cairo_fill_rule_t _cairo_gstate_get_fill_rule (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_line_width (cairo_gstate_t *gstate, double width)
cairo_private double _cairo_gstate_get_line_width (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_line_cap (cairo_gstate_t *gstate, cairo_line_cap_t line_cap)
cairo_private cairo_line_cap_t _cairo_gstate_get_line_cap (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_line_join (cairo_gstate_t *gstate, cairo_line_join_t line_join)
cairo_private cairo_line_join_t _cairo_gstate_get_line_join (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_set_dash (cairo_gstate_t *gstate, double *dash, int num_dashes, double offset)
cairo_private cairo_status_t _cairo_gstate_set_miter_limit (cairo_gstate_t *gstate, double limit)
cairo_private double _cairo_gstate_get_miter_limit (cairo_gstate_t *gstate)
cairo_private void _cairo_gstate_get_matrix (cairo_gstate_t *gstate, cairo_matrix_t *matrix)
cairo_private cairo_status_t _cairo_gstate_translate (cairo_gstate_t *gstate, double tx, double ty)
cairo_private cairo_status_t _cairo_gstate_scale (cairo_gstate_t *gstate, double sx, double sy)
cairo_private cairo_status_t _cairo_gstate_rotate (cairo_gstate_t *gstate, double angle)
cairo_private cairo_status_t _cairo_gstate_transform (cairo_gstate_t *gstate, const cairo_matrix_t *matrix)
cairo_private cairo_status_t _cairo_gstate_set_matrix (cairo_gstate_t *gstate, const cairo_matrix_t *matrix)
cairo_private cairo_status_t _cairo_gstate_identity_matrix (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_user_to_device (cairo_gstate_t *gstate, double *x, double *y)
cairo_private cairo_status_t _cairo_gstate_user_to_device_distance (cairo_gstate_t *gstate, double *dx, double *dy)
cairo_private cairo_status_t _cairo_gstate_device_to_user (cairo_gstate_t *gstate, double *x, double *y)
cairo_private cairo_status_t _cairo_gstate_device_to_user_distance (cairo_gstate_t *gstate, double *dx, double *dy)
cairo_private void _cairo_gstate_user_to_backend (cairo_gstate_t *gstate, double *x, double *y)
cairo_private void _cairo_gstate_backend_to_user (cairo_gstate_t *gstate, double *x, double *y)
cairo_private cairo_status_t _cairo_gstate_paint (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_mask (cairo_gstate_t *gstate, cairo_pattern_t *mask)
cairo_private cairo_status_t _cairo_gstate_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
cairo_private cairo_status_t _cairo_gstate_fill (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
cairo_private cairo_status_t _cairo_gstate_copy_page (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_show_page (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_stroke_extents (cairo_gstate_t *gstate, cairo_path_fixed_t *path, double *x1, double *y1, double *x2, double *y2)
cairo_private cairo_status_t _cairo_gstate_fill_extents (cairo_gstate_t *gstate, cairo_path_fixed_t *path, double *x1, double *y1, double *x2, double *y2)
cairo_private cairo_status_t _cairo_gstate_in_stroke (cairo_gstate_t *gstate, cairo_path_fixed_t *path, double x, double y, cairo_bool_t *inside_ret)
cairo_private cairo_status_t _cairo_gstate_in_fill (cairo_gstate_t *gstate, cairo_path_fixed_t *path, double x, double y, cairo_bool_t *inside_ret)
cairo_private cairo_status_t _cairo_gstate_clip (cairo_gstate_t *gstate, cairo_path_fixed_t *path)
cairo_private cairo_status_t _cairo_gstate_reset_clip (cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_gstate_show_surface (cairo_gstate_t *gstate, cairo_surface_t *surface, double x, double y, double width, double height)
cairo_private cairo_status_t _cairo_gstate_select_font_face (cairo_gstate_t *gstate, const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight)
cairo_private cairo_status_t _cairo_gstate_set_font_size (cairo_gstate_t *gstate, double size)
cairo_private void _cairo_gstate_get_font_matrix (cairo_gstate_t *gstate, cairo_matrix_t *matrix)
cairo_private cairo_status_t _cairo_gstate_set_font_matrix (cairo_gstate_t *gstate, const cairo_matrix_t *matrix)
cairo_private void _cairo_gstate_get_font_options (cairo_gstate_t *gstate, cairo_font_options_t *options)
cairo_private cairo_status_t _cairo_gstate_set_font_options (cairo_gstate_t *gstate, const cairo_font_options_t *options)
cairo_private cairo_status_t _cairo_gstate_get_font_face (cairo_gstate_t *gstate, cairo_font_face_t **font_face)
cairo_private cairo_status_t _cairo_gstate_get_font_extents (cairo_gstate_t *gstate, cairo_font_extents_t *extents)
cairo_private cairo_status_t _cairo_gstate_set_font_face (cairo_gstate_t *gstate, cairo_font_face_t *font_face)
cairo_private cairo_status_t _cairo_gstate_text_to_glyphs (cairo_gstate_t *font, const char *utf8, double x, double y, cairo_glyph_t **glyphs, int *num_glyphs)
cairo_private cairo_status_t _cairo_gstate_glyph_extents (cairo_gstate_t *gstate, cairo_glyph_t *glyphs, int num_glyphs, cairo_text_extents_t *extents)
cairo_private cairo_status_t _cairo_gstate_show_glyphs (cairo_gstate_t *gstate, cairo_glyph_t *glyphs, int num_glyphs)
cairo_private cairo_status_t _cairo_gstate_glyph_path (cairo_gstate_t *gstate, cairo_glyph_t *glyphs, int num_glyphs, cairo_path_fixed_t *path)
cairo_private cairo_bool_t _cairo_operator_bounded (cairo_operator_t operator)
 _cairo_operator_bounded: : a cairo_operator_t
cairo_private const cairo_color_t * _cairo_stock_color (cairo_stock_t stock)
cairo_private void _cairo_color_init (cairo_color_t *color)
cairo_private void _cairo_color_init_rgb (cairo_color_t *color, double red, double green, double blue)
cairo_private void _cairo_color_init_rgba (cairo_color_t *color, double red, double green, double blue, double alpha)
cairo_private void _cairo_color_multiply_alpha (cairo_color_t *color, double alpha)
cairo_private void _cairo_color_get_rgba (cairo_color_t *color, double *red, double *green, double *blue, double *alpha)
cairo_private void _cairo_color_get_rgba_premultiplied (cairo_color_t *color, double *red, double *green, double *blue, double *alpha)
cairo_private void _cairo_scaled_font_set_error (cairo_scaled_font_t *scaled_font, cairo_status_t status)
 _cairo_scaled_font_set_error: : a scaled_font : a status value indicating an error, (eg.
cairo_private void _cairo_font_face_init (cairo_font_face_t *font_face, const cairo_font_face_backend_t *backend)
cairo_private cairo_font_face_t * _cairo_toy_font_face_create (const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight)
 _cairo_toy_font_face_create: : a font family name, encoded in UTF-8 : the slant for the font : the weight for the font
cairo_private void _cairo_unscaled_font_init (cairo_unscaled_font_t *font, const cairo_unscaled_font_backend_t *backend)
cairo_private
cairo_unscaled_font_t
_cairo_unscaled_font_reference (cairo_unscaled_font_t *font)
cairo_private void _cairo_unscaled_font_destroy (cairo_unscaled_font_t *font)
cairo_private void _cairo_scaled_font_init (cairo_scaled_font_t *scaled_font, cairo_font_face_t *font_face, const cairo_matrix_t *font_matrix, const cairo_matrix_t *ctm, const cairo_font_options_t *options, const cairo_scaled_font_backend_t *backend)
void _cairo_scaled_font_fini (cairo_scaled_font_t *scaled_font)
cairo_private cairo_status_t _cairo_scaled_font_font_extents (cairo_scaled_font_t *scaled_font, cairo_font_extents_t *extents)
cairo_private cairo_status_t _cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font, const char *utf8, cairo_glyph_t **glyphs, int *num_glyphs)
cairo_private cairo_status_t _cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font, cairo_glyph_t *glyphs, int num_glyphs, cairo_text_extents_t *extents)
cairo_private cairo_status_t _cairo_scaled_font_glyph_bbox (cairo_scaled_font_t *scaled_font, cairo_glyph_t *glyphs, int num_glyphs, cairo_box_t *bbox)
cairo_private cairo_status_t _cairo_scaled_font_show_glyphs (cairo_scaled_font_t *scaled_font, cairo_operator_t operator, cairo_pattern_t *source, cairo_surface_t *surface, int source_x, int source_y, int dest_x, int dest_y, unsigned int width, unsigned int height, cairo_glyph_t *glyphs, int num_glyphs)
cairo_private cairo_status_t _cairo_scaled_font_glyph_path (cairo_scaled_font_t *scaled_font, cairo_glyph_t *glyphs, int num_glyphs, cairo_path_fixed_t *path)
cairo_private cairo_status_t _cairo_scaled_font_get_glyph_cache_key (cairo_scaled_font_t *scaled_font, cairo_glyph_cache_key_t *key)
cairo_private void _cairo_font_options_init_default (cairo_font_options_t *options)
 _cairo_font_options_init_default: : a #cairo_font_options_t
cairo_private cairo_status_t _cairo_hull_compute (cairo_pen_vertex_t *vertices, int *num_vertices)
cairo_private void _cairo_path_fixed_init (cairo_path_fixed_t *path)
cairo_private cairo_status_t _cairo_path_fixed_init_copy (cairo_path_fixed_t *path, cairo_path_fixed_t *other)
cairo_private void _cairo_path_fixed_fini (cairo_path_fixed_t *path)
cairo_private cairo_status_t _cairo_path_fixed_move_to (cairo_path_fixed_t *path, cairo_fixed_t x, cairo_fixed_t y)
cairo_private cairo_status_t _cairo_path_fixed_rel_move_to (cairo_path_fixed_t *path, cairo_fixed_t dx, cairo_fixed_t dy)
cairo_private cairo_status_t _cairo_path_fixed_line_to (cairo_path_fixed_t *path, cairo_fixed_t x, cairo_fixed_t y)
cairo_private cairo_status_t _cairo_path_fixed_rel_line_to (cairo_path_fixed_t *path, cairo_fixed_t dx, cairo_fixed_t dy)
cairo_private cairo_status_t _cairo_path_fixed_curve_to (cairo_path_fixed_t *path, cairo_fixed_t x0, cairo_fixed_t y0, cairo_fixed_t x1, cairo_fixed_t y1, cairo_fixed_t x2, cairo_fixed_t y2)
cairo_private cairo_status_t _cairo_path_fixed_rel_curve_to (cairo_path_fixed_t *path, cairo_fixed_t dx0, cairo_fixed_t dy0, cairo_fixed_t dx1, cairo_fixed_t dy1, cairo_fixed_t dx2, cairo_fixed_t dy2)
cairo_private cairo_status_t _cairo_path_fixed_close_path (cairo_path_fixed_t *path)
cairo_private cairo_status_t _cairo_path_fixed_get_current_point (cairo_path_fixed_t *path, cairo_fixed_t *x, cairo_fixed_t *y)
cairo_private cairo_status_t _cairo_path_fixed_interpret (cairo_path_fixed_t *path, cairo_direction_t dir, cairo_path_fixed_move_to_func_t *move_to, cairo_path_fixed_line_to_func_t *line_to, cairo_path_fixed_curve_to_func_t *curve_to, cairo_path_fixed_close_path_func_t *close_path, void *closure)
cairo_private cairo_status_t _cairo_path_fixed_bounds (cairo_path_fixed_t *path, double *x1, double *y1, double *x2, double *y2)
cairo_private cairo_status_t _cairo_path_fixed_fill_to_traps (cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, double tolerance, cairo_traps_t *traps)
cairo_private cairo_status_t _cairo_path_fixed_stroke_to_traps (cairo_path_fixed_t *path, cairo_gstate_t *gstate, cairo_traps_t *traps)
cairo_private cairo_surface_t * _cairo_surface_create_similar_scratch (cairo_surface_t *other, cairo_content_t content, int width, int height)
cairo_private cairo_surface_t * _cairo_surface_create_similar_solid (cairo_surface_t *other, cairo_content_t content, int width, int height, const cairo_color_t *color)
cairo_private void _cairo_surface_init (cairo_surface_t *surface, const cairo_surface_backend_t *backend)
cairo_private cairo_clip_mode_t _cairo_surface_get_clip_mode (cairo_surface_t *surface)
cairo_private cairo_status_t _cairo_surface_composite (cairo_operator_t operator, cairo_pattern_t *src, cairo_pattern_t *mask, cairo_surface_t *dst, int src_x, int src_y, int mask_x, int mask_y, int dst_x, int dst_y, unsigned int width, unsigned int height)
cairo_private cairo_status_t _cairo_surface_fill_rectangle (cairo_surface_t *surface, cairo_operator_t operator, const cairo_color_t *color, int x, int y, int width, int height)
 _cairo_surface_fill_rectangle: : a #cairo_surface_t : the operator to apply to the rectangle : the source color : X coordinate of rectangle, in backend coordinates : Y coordinate of rectangle, in backend coordinates : width of rectangle, in backend coordinates : height of rectangle, in backend coordinates
cairo_private cairo_status_t _cairo_surface_fill_region (cairo_surface_t *surface, cairo_operator_t operator, const cairo_color_t *color, pixman_region16_t *region)
 _cairo_surface_fill_region: : a #cairo_surface_t : the operator to apply to the region : the source color : the region to modify, in backend coordinates
cairo_private cairo_status_t _cairo_surface_fill_rectangles (cairo_surface_t *surface, cairo_operator_t operator, const cairo_color_t *color, cairo_rectangle_t *rects, int num_rects)
 _cairo_surface_fill_rectangles: : a #cairo_surface_t : the operator to apply to the region : the source color : the rectangles to modify, in backend coordinates : the number of rectangles in
cairo_private cairo_int_status_t _cairo_surface_fill_path (cairo_operator_t operator, cairo_pattern_t *pattern, cairo_surface_t *dst, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, double tolerance)
cairo_private cairo_status_t _cairo_surface_composite_trapezoids (cairo_operator_t operator, cairo_pattern_t *pattern, cairo_surface_t *dst, cairo_antialias_t antialias, int src_x, int src_y, int dst_x, int dst_y, unsigned int width, unsigned int height, cairo_trapezoid_t *traps, int ntraps)
cairo_private cairo_status_t _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src, cairo_operator_t operator, cairo_surface_t *dst, cairo_traps_t *traps, cairo_clip_t *clip, cairo_antialias_t antialias)
cairo_private cairo_status_t _cairo_surface_copy_page (cairo_surface_t *surface)
cairo_private cairo_status_t _cairo_surface_show_page (cairo_surface_t *surface)
cairo_private cairo_status_t _cairo_surface_acquire_source_image (cairo_surface_t *surface, cairo_image_surface_t **image_out, void **image_extra)
 _cairo_surface_acquire_source_image: : a #cairo_surface_t : location to store a pointer to an image surface that has identical contents to .
cairo_private void _cairo_surface_release_source_image (cairo_surface_t *surface, cairo_image_surface_t *image, void *image_extra)
 _cairo_surface_release_source_image: : a #cairo_surface_t : same as return from the matching _cairo_surface_acquire_source_image()
cairo_private cairo_status_t _cairo_surface_acquire_dest_image (cairo_surface_t *surface, cairo_rectangle_t *interest_rect, cairo_image_surface_t **image_out, cairo_rectangle_t *image_rect, void **image_extra)
 _cairo_surface_acquire_dest_image: : a #cairo_surface_t : area of for which fallback drawing is being done.
cairo_private void _cairo_surface_release_dest_image (cairo_surface_t *surface, cairo_rectangle_t *interest_rect, cairo_image_surface_t *image, cairo_rectangle_t *image_rect, void *image_extra)
 _cairo_surface_release_dest_image: : a #cairo_surface_t : same as passed to the matching _cairo_surface_acquire_dest_image()
cairo_private cairo_status_t _cairo_surface_clone_similar (cairo_surface_t *surface, cairo_surface_t *src, cairo_surface_t **clone_out)
 _cairo_surface_clone_similar: : a #cairo_surface_t : the source image : location to store a surface compatible with and with contents identical to .
cairo_private unsigned int _cairo_surface_get_current_clip_serial (cairo_surface_t *surface)
 _cairo_surface_get_current_clip_serial: : the #cairo_surface_t to return the serial number for
cairo_private unsigned int _cairo_surface_allocate_clip_serial (cairo_surface_t *surface)
 _cairo_surface_allocate_clip_serial: : the #cairo_surface_t to allocate a serial number from
cairo_private cairo_status_t _cairo_surface_reset_clip (cairo_surface_t *surface)
 _cairo_surface_reset_clip: : the #cairo_surface_t to reset the clip on
cairo_private cairo_status_t _cairo_surface_set_clip_region (cairo_surface_t *surface, pixman_region16_t *region, unsigned int serial)
 _cairo_surface_set_clip_region: : the #cairo_surface_t to reset the clip on : the #pixman_region16_t to use for clipping : the clip serial number associated with the region
cairo_private cairo_int_status_t _cairo_surface_intersect_clip_path (cairo_surface_t *surface, cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, double tolerance, cairo_antialias_t antialias)
cairo_private cairo_status_t _cairo_surface_set_clip (cairo_surface_t *surface, cairo_clip_t *clip)
cairo_private cairo_status_t _cairo_surface_get_extents (cairo_surface_t *surface, cairo_rectangle_t *rectangle)
 _cairo_surface_get_extents: : the #cairo_surface_t to fetch extents for
cairo_private cairo_status_t _cairo_surface_show_glyphs (cairo_scaled_font_t *scaled_font, cairo_operator_t operator, cairo_pattern_t *pattern, cairo_surface_t *surface, int source_x, int source_y, int dest_x, int dest_y, unsigned int width, unsigned int height, const cairo_glyph_t *glyphs, int num_glyphs)
cairo_private cairo_status_t _cairo_surface_composite_fixup_unbounded (cairo_surface_t *dst, cairo_surface_attributes_t *src_attr, int src_width, int src_height, cairo_surface_attributes_t *mask_attr, int mask_width, int mask_height, int src_x, int src_y, int mask_x, int mask_y, int dst_x, int dst_y, unsigned int width, unsigned int height)
 _cairo_surface_composite_fixup_unbounded: : the destination surface : source surface attributes (from _cairo_pattern_acquire_surface()) : width of source surface : height of source surface : mask surface attributes or NULL if no mask : width of mask surface : height of mask surface : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite()
cairo_private cairo_status_t _cairo_surface_composite_shape_fixup_unbounded (cairo_surface_t *dst, cairo_surface_attributes_t *src_attr, int src_width, int src_height, int mask_width, int mask_height, int src_x, int src_y, int mask_x, int mask_y, int dst_x, int dst_y, unsigned int width, unsigned int height)
 _cairo_surface_composite_shape_fixup_unbounded: : the destination surface : source surface attributes (from _cairo_pattern_acquire_surface()) : width of source surface : height of source surface : width of mask surface : height of mask surface : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite() : from _cairo_surface_composite()
cairo_private cairo_format_t _cairo_format_from_content (cairo_content_t content)
cairo_private cairo_content_t _cairo_content_from_format (cairo_format_t format)
cairo_private cairo_surface_t * _cairo_image_surface_create_with_masks (unsigned char *data, cairo_format_masks_t *format, int width, int height, int stride)
cairo_private void _cairo_image_surface_assume_ownership_of_data (cairo_image_surface_t *surface)
cairo_private cairo_int_status_t _cairo_image_surface_set_clip_region (cairo_image_surface_t *surface, pixman_region16_t *region)
cairo_private cairo_bool_t _cairo_surface_is_image (cairo_surface_t *surface)
 _cairo_surface_is_image: : a #cairo_surface_t
cairo_private cairo_status_t _cairo_pen_init (cairo_pen_t *pen, double radius, cairo_gstate_t *gstate)
cairo_private cairo_status_t _cairo_pen_init_empty (cairo_pen_t *pen)
cairo_private cairo_status_t _cairo_pen_init_copy (cairo_pen_t *pen, cairo_pen_t *other)
cairo_private void _cairo_pen_fini (cairo_pen_t *pen)
cairo_private cairo_status_t _cairo_pen_add_points (cairo_pen_t *pen, cairo_point_t *point, int num_points)
cairo_private cairo_status_t _cairo_pen_add_points_for_slopes (cairo_pen_t *pen, cairo_point_t *a, cairo_point_t *b, cairo_point_t *c, cairo_point_t *d)
cairo_private cairo_status_t _cairo_pen_find_active_cw_vertex_index (cairo_pen_t *pen, cairo_slope_t *slope, int *active)
cairo_private cairo_status_t _cairo_pen_find_active_ccw_vertex_index (cairo_pen_t *pen, cairo_slope_t *slope, int *active)
cairo_private cairo_status_t _cairo_pen_stroke_spline (cairo_pen_t *pen, cairo_spline_t *spline, double tolerance, cairo_traps_t *traps)
cairo_private void _cairo_polygon_init (cairo_polygon_t *polygon)
cairo_private void _cairo_polygon_fini (cairo_polygon_t *polygon)
cairo_private cairo_status_t _cairo_polygon_add_edge (cairo_polygon_t *polygon, cairo_point_t *p1, cairo_point_t *p2)
cairo_private cairo_status_t _cairo_polygon_move_to (cairo_polygon_t *polygon, cairo_point_t *point)
cairo_private cairo_status_t _cairo_polygon_line_to (cairo_polygon_t *polygon, cairo_point_t *point)
cairo_private cairo_status_t _cairo_polygon_close (cairo_polygon_t *polygon)
cairo_private cairo_int_status_t _cairo_spline_init (cairo_spline_t *spline, cairo_point_t *a, cairo_point_t *b, cairo_point_t *c, cairo_point_t *d)
cairo_private cairo_status_t _cairo_spline_decompose (cairo_spline_t *spline, double tolerance)
cairo_private void _cairo_spline_fini (cairo_spline_t *spline)
cairo_private void _cairo_matrix_get_affine (const cairo_matrix_t *matrix, double *xx, double *yx, double *xy, double *yy, double *x0, double *y0)
 _cairo_matrix_get_affine: : a : location to store xx component of matrix : location to store yx component of matrix : location to store xy component of matrix : location to store yy component of matrix : location to store x0 (X-translation component) of matrix, or NULL : location to store y0 (Y-translation component) of matrix, or NULL
cairo_private void _cairo_matrix_transform_bounding_box (const cairo_matrix_t *matrix, double *x, double *y, double *width, double *height)
cairo_private void _cairo_matrix_compute_determinant (const cairo_matrix_t *matrix, double *det)
cairo_private cairo_status_t _cairo_matrix_compute_scale_factors (const cairo_matrix_t *matrix, double *sx, double *sy, int x_major)
cairo_private cairo_bool_t _cairo_matrix_is_integer_translation (const cairo_matrix_t *matrix, int *itx, int *ity)
cairo_private double _cairo_matrix_transformed_circle_major_axis (cairo_matrix_t *matrix, double radius)
cairo_private void _cairo_traps_init (cairo_traps_t *traps)
cairo_private cairo_status_t _cairo_traps_init_box (cairo_traps_t *traps, cairo_box_t *box)
 _cairo_traps_init_box: : a cairo_traps_t : a box that will be converted to a single trapezoid to store in .
cairo_private void _cairo_traps_fini (cairo_traps_t *traps)
cairo_private void _cairo_traps_translate (cairo_traps_t *traps, int x, int y)
cairo_private cairo_status_t _cairo_traps_tessellate_triangle (cairo_traps_t *traps, cairo_point_t t[3])
cairo_private cairo_status_t _cairo_traps_tessellate_rectangle (cairo_traps_t *traps, cairo_point_t q[4])
cairo_private cairo_status_t _cairo_traps_tessellate_polygon (cairo_traps_t *traps, cairo_polygon_t *poly, cairo_fill_rule_t fill_rule)
cairo_private int _cairo_traps_contain (cairo_traps_t *traps, double x, double y)
cairo_private void _cairo_traps_extents (cairo_traps_t *traps, cairo_box_t *extents)
cairo_private cairo_status_t _cairo_traps_extract_region (cairo_traps_t *tr, pixman_region16_t **region)
 _cairo_traps_extract_region: : a cairo_traps_t : on return, NULL is stored here if the trapezoids aren't exactly representable as a pixman region, otherwise a a pointer to such a region, newly allocated.
cairo_private void _cairo_slope_init (cairo_slope_t *slope, cairo_point_t *a, cairo_point_t *b)
cairo_private int _cairo_slope_compare (cairo_slope_t *a, cairo_slope_t *b)
cairo_private int _cairo_slope_clockwise (cairo_slope_t *a, cairo_slope_t *b)
cairo_private int _cairo_slope_counter_clockwise (cairo_slope_t *a, cairo_slope_t *b)
cairo_private void _cairo_pattern_init_copy (cairo_pattern_t *pattern, const cairo_pattern_t *other)
cairo_private void _cairo_pattern_init_solid (cairo_solid_pattern_t *pattern, const cairo_color_t *color)
cairo_private void _cairo_pattern_init_for_surface (cairo_surface_pattern_t *pattern, cairo_surface_t *surface)
cairo_private void _cairo_pattern_init_linear (cairo_linear_pattern_t *pattern, double x0, double y0, double x1, double y1)
cairo_private void _cairo_pattern_init_radial (cairo_radial_pattern_t *pattern, double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
cairo_private void _cairo_pattern_fini (cairo_pattern_t *pattern)
cairo_private cairo_pattern_t * _cairo_pattern_create_solid (const cairo_color_t *color)
cairo_private void _cairo_pattern_transform (cairo_pattern_t *pattern, const cairo_matrix_t *ctm_inverse)
cairo_private cairo_bool_t _cairo_pattern_is_opaque_solid (cairo_pattern_t *pattern)
 _cairo_pattern_is_opaque_solid
cairo_private cairo_int_status_t _cairo_pattern_acquire_surface (cairo_pattern_t *pattern, cairo_surface_t *dst, int x, int y, unsigned int width, unsigned int height, cairo_surface_t **surface_out, cairo_surface_attributes_t *attributes)
 _cairo_pattern_acquire_surface: : a #cairo_pattern_t : destination surface : X coordinate in source corresponding to left side of destination area : Y coordinate in source corresponding to top side of destination area : width of destination area : height of destination area : location to store a pointer to a surface : surface attributes that destination backend should apply to the returned surface
cairo_private void _cairo_pattern_release_surface (cairo_pattern_t *pattern, cairo_surface_t *surface, cairo_surface_attributes_t *attributes)
 _cairo_pattern_release_surface: : a #cairo_pattern_t : a surface obtained by _cairo_pattern_acquire_surface : attributes obtained by _cairo_pattern_acquire_surface
cairo_private cairo_int_status_t _cairo_pattern_acquire_surfaces (cairo_pattern_t *src, cairo_pattern_t *mask, cairo_surface_t *dst, int src_x, int src_y, int mask_x, int mask_y, unsigned int width, unsigned int height, cairo_surface_t **src_out, cairo_surface_t **mask_out, cairo_surface_attributes_t *src_attributes, cairo_surface_attributes_t *mask_attributes)
cairo_private cairo_status_t _cairo_gstate_set_antialias (cairo_gstate_t *gstate, cairo_antialias_t antialias)
cairo_private cairo_antialias_t _cairo_gstate_get_antialias (cairo_gstate_t *gstate)
cairo_private pixman_region16_t * _cairo_region_create_from_rectangle (cairo_rectangle_t *rect)
 _cairo_region_create_from_rectangle: : a cairo_rectangle_t
cairo_private void _cairo_region_extents_rectangle (pixman_region16_t *region, cairo_rectangle_t *rect)
 _cairo_region_extents_rectangle: : a #pixman_region16_t : rectangle into which to store the extents
cairo_private cairo_status_t _cairo_utf8_to_ucs4 (const unsigned char *str, int len, uint32_t **result, int *items_written)
 _cairo_utf8_to_utf32: : an UTF-8 string : length of in bytes, or -1 if it is nul-terminated.
cairo_private cairo_status_t _cairo_utf8_to_utf16 (const unsigned char *str, int len, uint16_t **result, int *items_written)
 _cairo_utf8_to_utf16: : an UTF-8 string : length of in bytes, or -1 if it is nul-terminated.
cairo_private
cairo_output_stream_t * 
_cairo_output_stream_create (cairo_write_func_t write_func, void *closure)
cairo_private void _cairo_output_stream_destroy (cairo_output_stream_t *stream)
cairo_private cairo_status_t _cairo_output_stream_write (cairo_output_stream_t *stream, const void *data, size_t length)
cairo_private void _cairo_output_stream_write_hex_string (cairo_output_stream_t *stream, const char *data, size_t length)
cairo_private cairo_status_t _cairo_output_stream_vprintf (cairo_output_stream_t *stream, const char *fmt, va_list ap)
cairo_private cairo_status_t _cairo_output_stream_printf (cairo_output_stream_t *stream, const char *fmt,...) CAIRO_PRINTF_FORMAT(2
cairo_private cairo_status_t
cairo_private long 
_cairo_output_stream_get_position (cairo_output_stream_t *status)
cairo_private cairo_status_t _cairo_output_stream_get_status (cairo_output_stream_t *stream)
cairo_private
cairo_output_stream_t * 
_cairo_output_stream_create_for_file (const char *filename)
cairo_private void _cairo_error (cairo_status_t status)
 _cairo_error: : a status value indicating an error, (eg.

Variables

const cairo_private
cairo_surface_backend_t 
cairo_image_surface_backend
const cairo_private
cairo_solid_pattern_t 
cairo_pattern_nil
const cairo_private
cairo_font_face_t 
_cairo_font_face_nil
const cairo_private cairo_surface_t _cairo_surface_nil
const cairo_private cairo_surface_t _cairo_surface_nil_read_error
const cairo_private cairo_surface_t _cairo_surface_nil_file_not_found

Class Documentation

struct _cairo_point

Definition at line 206 of file cairoint.h.

Class Members
cairo_fixed_t x
cairo_fixed_t y
struct _cairo_slope

Definition at line 211 of file cairoint.h.

Class Members
cairo_fixed_t dx
cairo_fixed_t dy
struct _cairo_point_double

Definition at line 217 of file cairoint.h.

Class Members
double x
double y
struct _cairo_distance_double

Definition at line 222 of file cairoint.h.

Class Members
double dx
double dy
struct _cairo_line

Definition at line 227 of file cairoint.h.

Collaboration diagram for _cairo_line:
Class Members
cairo_point_t p1
cairo_point_t p2
struct _cairo_trapezoid

Definition at line 232 of file cairoint.h.

Collaboration diagram for _cairo_trapezoid:
Class Members
cairo_fixed_t bottom
cairo_line_t left
cairo_line_t right
cairo_fixed_t top
struct _cairo_rectangle

Definition at line 237 of file cairoint.h.

Class Members
unsigned short height
unsigned short width
short x
short y
struct _cairo_edge

Definition at line 261 of file cairoint.h.

Collaboration diagram for _cairo_edge:
Class Members
int clockWise
cairo_fixed_16_16_t current_x
cairo_line_t edge
struct _cairo_polygon

Definition at line 268 of file cairoint.h.

Collaboration diagram for _cairo_polygon:
Class Members
int closed
cairo_point_t current_point
cairo_edge_t * edges
int edges_size
cairo_point_t first_point
int has_current_point
int num_edges
struct _cairo_spline

Definition at line 280 of file cairoint.h.

Collaboration diagram for _cairo_spline:
Class Members
cairo_point_t a
cairo_point_t b
cairo_point_t c
cairo_point_t d
cairo_slope_t final_slope
cairo_slope_t initial_slope
int num_points
cairo_point_t * points
int points_size
struct _cairo_pen_vertex

Definition at line 291 of file cairoint.h.

Collaboration diagram for _cairo_pen_vertex:
Class Members
cairo_point_t point
cairo_slope_t slope_ccw
cairo_slope_t slope_cw
struct _cairo_pen

Definition at line 298 of file cairoint.h.

Collaboration diagram for _cairo_pen:
Class Members
int num_vertices
double radius
double tolerance
cairo_pen_vertex_t * vertices
struct _cairo_array

Definition at line 319 of file cairoint.h.

Collaboration diagram for _cairo_array:
Class Members
int element_size
char * elements
int num_elements
int size
struct cairo_cache_entry_base_t

Definition at line 410 of file cairoint.h.

Class Members
unsigned long hashcode
unsigned long memory
struct cairo_cache_arrangement_t

Definition at line 415 of file cairoint.h.

Class Members
unsigned long high_water_mark
unsigned long rehash
unsigned long size
struct cairo_cache_t

Definition at line 423 of file cairoint.h.

Collaboration diagram for cairo_cache_t:
Class Members
const cairo_cache_arrangement_t * arrangement
const cairo_cache_backend_t * backend
cairo_cache_entry_base_t ** entries
unsigned long live_entries
unsigned long max_memory
unsigned long used_memory
struct _cairo_unscaled_font

Definition at line 479 of file cairoint.h.

Collaboration diagram for _cairo_unscaled_font:
Class Members
const
cairo_unscaled_font_backend_t *
backend
cairo_hash_entry_t hash_entry
int ref_count
struct _cairo_font_options

Definition at line 485 of file cairoint.h.

Class Members
cairo_antialias_t antialias
cairo_hint_metrics_t hint_metrics
cairo_hint_style_t hint_style
cairo_subpixel_order_t subpixel_order
struct _cairo_scaled_font

Definition at line 492 of file cairoint.h.

Collaboration diagram for _cairo_scaled_font:
Class Members
const cairo_scaled_font_backend_t * backend
cairo_matrix_t ctm
cairo_font_face_t * font_face
cairo_matrix_t font_matrix
cairo_hash_entry_t hash_entry
cairo_font_options_t options
int ref_count
cairo_matrix_t scale
cairo_status_t status
struct _cairo_font_face

Definition at line 505 of file cairoint.h.

Collaboration diagram for _cairo_font_face:
Class Members
const cairo_font_face_backend_t * backend
cairo_hash_entry_t hash_entry
int ref_count
cairo_status_t status
cairo_user_data_array_t user_data
struct cairo_glyph_cache_key_t

Definition at line 523 of file cairoint.h.

Collaboration diagram for cairo_glyph_cache_key_t:
Class Members
cairo_cache_entry_base_t base
int flags
unsigned long index
cairo_matrix_t scale
cairo_unscaled_font_t * unscaled
struct cairo_image_glyph_cache_entry_t

Definition at line 531 of file cairoint.h.

Collaboration diagram for cairo_image_glyph_cache_entry_t:
Class Members
cairo_text_extents_t extents
cairo_image_surface_t * image
cairo_glyph_cache_key_t key
cairo_glyph_size_t size
struct _cairo_toy_font_face

Definition at line 581 of file cairoint.h.

Class Members
cairo_font_face_t base
const char * family
cairo_bool_t owns_family
cairo_font_slant_t slant
cairo_font_weight_t weight
struct _cairo_format_masks

Definition at line 858 of file cairoint.h.

Collaboration diagram for _cairo_format_masks:
Class Members
unsigned long alpha_mask
unsigned long blue_mask
int bpp
unsigned long green_mask
unsigned long red_mask
struct _cairo_surface

Definition at line 866 of file cairoint.h.

Collaboration diagram for _cairo_surface:
Class Members
const cairo_surface_backend_t * backend
unsigned int current_clip_serial
double device_x_offset
double device_x_scale
double device_y_offset
double device_y_scale
cairo_bool_t finished
unsigned int next_clip_serial
unsigned int ref_count
cairo_status_t status
cairo_user_data_array_t user_data
struct _cairo_image_surface

Definition at line 896 of file cairoint.h.

Collaboration diagram for _cairo_image_surface:
Class Members
cairo_surface_t base
unsigned char * data
int depth
cairo_format_t format
cairo_bool_t has_clip
int height
cairo_bool_t owns_data
pixman_image_t * pixman_image
int stride
int width
struct _cairo_color

Definition at line 922 of file cairoint.h.

Class Members
double alpha
unsigned short alpha_short
double blue
unsigned short blue_short
double green
unsigned short green_short
double red
unsigned short red_short
struct _cairo_color_stop

Definition at line 950 of file cairoint.h.

Class Members
cairo_color_t color
cairo_fixed_t offset
struct _cairo_pattern

Definition at line 955 of file cairoint.h.

Collaboration diagram for _cairo_pattern:
Class Members
cairo_extend_t extend
cairo_filter_t filter
cairo_matrix_t matrix
unsigned int ref_count
cairo_status_t status
cairo_pattern_type_t type
struct _cairo_solid_pattern

Definition at line 964 of file cairoint.h.

Class Members
cairo_pattern_t base
cairo_color_t color
struct _cairo_surface_pattern

Definition at line 971 of file cairoint.h.

Class Members
cairo_pattern_t base
cairo_surface_t * surface
struct _cairo_gradient_pattern

Definition at line 977 of file cairoint.h.

Collaboration diagram for _cairo_gradient_pattern:
Class Members
cairo_pattern_t base
int n_stops
cairo_color_stop_t * stops
struct _cairo_linear_pattern

Definition at line 984 of file cairoint.h.

Collaboration diagram for _cairo_linear_pattern:
Class Members
cairo_gradient_pattern_t base
cairo_point_double_t point0
cairo_point_double_t point1
struct _cairo_radial_pattern

Definition at line 991 of file cairoint.h.

Collaboration diagram for _cairo_radial_pattern:
Class Members
cairo_gradient_pattern_t base
cairo_point_double_t center0
cairo_point_double_t center1
double radius0
double radius1
union cairo_gradient_pattern_union_t

Definition at line 1000 of file cairoint.h.

Collaboration diagram for cairo_gradient_pattern_union_t:
Class Members
cairo_gradient_pattern_t base
cairo_linear_pattern_t linear
cairo_radial_pattern_t radial
union cairo_pattern_union_t

Definition at line 1007 of file cairoint.h.

Collaboration diagram for cairo_pattern_union_t:
Class Members
cairo_pattern_t base
cairo_gradient_pattern_union_t gradient
cairo_solid_pattern_t solid
cairo_surface_pattern_t surface
struct _cairo_surface_attributes

Definition at line 1015 of file cairoint.h.

Collaboration diagram for _cairo_surface_attributes:
Class Members
cairo_bool_t acquired
cairo_extend_t extend
void * extra
cairo_filter_t filter
cairo_matrix_t matrix
int x_offset
int y_offset
struct _cairo_traps

Definition at line 1025 of file cairoint.h.

Collaboration diagram for _cairo_traps:
Class Members
cairo_box_t extents
int num_traps
cairo_trapezoid_t * traps
int traps_size
struct _cairo_stroke_face

Definition at line 1067 of file cairoint.h.

Collaboration diagram for _cairo_stroke_face:
Class Members
cairo_point_t ccw
cairo_point_t cw
cairo_slope_t dev_vector
cairo_point_t point
cairo_point_double_t usr_vector

Define Documentation

Definition at line 124 of file cairoint.h.

Value:
do {                               \
    static const int NOT_REACHED = 0;     \
    assert (NOT_REACHED);          \
} while (0)

Definition at line 177 of file cairoint.h.

#define CAIRO_ALPHA_IS_OPAQUE (   alpha)    ((alpha) >= ((double)0xff00 / (double)0xffff))

Definition at line 201 of file cairoint.h.

#define CAIRO_ALPHA_IS_ZERO (   alpha)    ((alpha) <= 0.0)

Definition at line 202 of file cairoint.h.

Definition at line 1036 of file cairoint.h.

Definition at line 1345 of file cairoint.h.

Definition at line 1346 of file cairoint.h.

Definition at line 1344 of file cairoint.h.

Value:

Definition at line 1773 of file cairoint.h.

Definition at line 940 of file cairoint.h.

Definition at line 941 of file cairoint.h.

Definition at line 1032 of file cairoint.h.

Definition at line 1033 of file cairoint.h.

Value:

Definition at line 1770 of file cairoint.h.

Definition at line 1037 of file cairoint.h.

#define CAIRO_FUNCTION_ALIAS (   old,
  new 
)

Definition at line 120 of file cairoint.h.

Definition at line 1063 of file cairoint.h.

Definition at line 1058 of file cairoint.h.

Definition at line 1060 of file cairoint.h.

Definition at line 1061 of file cairoint.h.

Definition at line 1059 of file cairoint.h.

Definition at line 1062 of file cairoint.h.

Definition at line 1056 of file cairoint.h.

Definition at line 1057 of file cairoint.h.

Definition at line 468 of file cairoint.h.

#define CAIRO_MAXSHORT   SHRT_MAX

Definition at line 198 of file cairoint.h.

#define CAIRO_MINSHORT   SHRT_MIN

Definition at line 199 of file cairoint.h.

Definition at line 157 of file cairoint.h.

Definition at line 158 of file cairoint.h.

Definition at line 159 of file cairoint.h.

Definition at line 160 of file cairoint.h.

#define CAIRO_PRINTF_FORMAT (   fmt_index,
  va_index 
)

Definition at line 93 of file cairoint.h.

Definition at line 100 of file cairoint.h.

Definition at line 1035 of file cairoint.h.

Definition at line 469 of file cairoint.h.

#define FALSE   0

Definition at line 170 of file cairoint.h.

Definition at line 130 of file cairoint.h.

#define M_PI   3.14159265358979323846

Definition at line 184 of file cairoint.h.

#define MAX (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 167 of file cairoint.h.

#define MIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 164 of file cairoint.h.

Definition at line 86 of file cairoint.h.

Definition at line 85 of file cairoint.h.

#define TRUE   1

Definition at line 174 of file cairoint.h.


Typedef Documentation

typedef struct _cairo_array

Definition at line 318 of file cairoint.h.

typedef struct _cairo_clip

Definition at line 259 of file cairoint.h.

typedef typedeftypedef enum _cairo_clip_mode struct _cairo_clip_path

Definition at line 258 of file cairoint.h.

typedef struct _cairo_color

Definition at line 306 of file cairoint.h.

typedef struct _cairo_font_face_backend

Definition at line 473 of file cairoint.h.

typedef struct _cairo_gstate

Definition at line 1065 of file cairoint.h.

typedef struct _cairo_image_surface

Definition at line 307 of file cairoint.h.

typedef struct _cairo_output_stream

Definition at line 2046 of file cairoint.h.

typedef struct _cairo_path_fixed

Definition at line 256 of file cairoint.h.

Definition at line 472 of file cairoint.h.

Definition at line 471 of file cairoint.h.

typedef struct _cairo_line cairo_box_t
typedef struct _cairo_edge cairo_edge_t

Definition at line 189 of file cairoint.h.

Definition at line 190 of file cairoint.h.

Definition at line 191 of file cairoint.h.

Definition at line 192 of file cairoint.h.

Definition at line 193 of file cairoint.h.

Definition at line 196 of file cairoint.h.

typedef struct _cairo_line cairo_line_t

Definition at line 1537 of file cairoint.h.

Definition at line 1531 of file cairoint.h.

Definition at line 1527 of file cairoint.h.

Definition at line 1523 of file cairoint.h.

typedef struct _cairo_pen cairo_pen_t
typedef struct _cairo_point cairo_point_t
typedef struct _cairo_slope cairo_slope_t
typedef struct _cairo_spline cairo_spline_t
typedef struct _cairo_traps cairo_traps_t
typedef cairo_array_t cairo_user_data_array_t

Definition at line 351 of file cairoint.h.


Enumeration Type Documentation

Enumerator:
CAIRO_DIRECTION_FORWARD 
CAIRO_DIRECTION_REVERSE 

Definition at line 251 of file cairoint.h.

Enumerator:
CAIRO_INT_STATUS_DEGENERATE 
CAIRO_INT_STATUS_UNSUPPORTED 
CAIRO_INT_STATUS_NOTHING_TO_DO 

Definition at line 245 of file cairoint.h.

Enumerator:
CAIRO_PATTERN_SOLID 
CAIRO_PATTERN_SURFACE 
CAIRO_PATTERN_LINEAR 
CAIRO_PATTERN_RADIAL 

Definition at line 943 of file cairoint.h.

Enumerator:
CAIRO_STOCK_WHITE 
CAIRO_STOCK_BLACK 
CAIRO_STOCK_TRANSPARENT 

Definition at line 934 of file cairoint.h.


Function Documentation

cairo_private void* _cairo_array_append ( cairo_array_t *  array,
const void elements,
int  num_elements 
)

Definition at line 109 of file cairo-array.c.

{
    cairo_status_t status;
    void *dest;

    status = _cairo_array_grow_by (array, num_elements);
    if (status != CAIRO_STATUS_SUCCESS)
       return NULL;

    assert (array->num_elements + num_elements <= array->size);

    dest = &array->elements[array->num_elements * array->element_size];
    array->num_elements += num_elements;

    if (elements != NULL)
       memcpy (dest, elements, num_elements * array->element_size);

    return dest;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_array_copy_element ( cairo_array_t *  array,
int  index,
void dst 
)

Definition at line 103 of file cairo-array.c.

{
    memcpy (dst, _cairo_array_index (array, index), array->element_size);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_array_fini ( cairo_array_t *  array)

Definition at line 49 of file cairo-array.c.

{
    free (array->elements);
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_array_grow_by ( cairo_array_t *  array,
int  additional 
)

Definition at line 55 of file cairo-array.c.

{
    char *new_elements;
    int old_size = array->size;
    int required_size = array->num_elements + additional;
    int new_size;

    if (required_size <= old_size)
       return CAIRO_STATUS_SUCCESS;

    if (old_size == 0)
       new_size = 1;
    else
       new_size = old_size * 2;

    while (new_size < required_size)
       new_size = new_size * 2;

    array->size = new_size;
    new_elements = realloc (array->elements,
                         array->size * array->element_size);

    if (new_elements == NULL) {
       array->size = old_size;
       return CAIRO_STATUS_NO_MEMORY;
    }

    array->elements = new_elements;

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void* _cairo_array_index ( cairo_array_t *  array,
int  index 
)

Definition at line 95 of file cairo-array.c.

{
    assert (0 <= index && index < array->num_elements);

    return (void *) &array->elements[index * array->element_size];
}

Here is the caller graph for this function:

cairo_private void _cairo_array_init ( cairo_array_t *  array,
int  element_size 
)

Definition at line 40 of file cairo-array.c.

{
    array->size = 0;
    array->num_elements = 0;
    array->element_size = element_size;
    array->elements = NULL;
}

Here is the caller graph for this function:

cairo_private int _cairo_array_num_elements ( cairo_array_t *  array)

Definition at line 131 of file cairo-array.c.

{
    return array->num_elements;
}

Here is the caller graph for this function:

cairo_private void _cairo_array_truncate ( cairo_array_t *  array,
int  length 
)

Definition at line 88 of file cairo-array.c.

{
    if (num_elements < array->num_elements)
       array->num_elements = num_elements;
}

Here is the caller graph for this function:

Definition at line 1265 of file cairo-gstate.c.

{
    rectangle->x = _cairo_fixed_integer_floor (box->p1.x);
    rectangle->y = _cairo_fixed_integer_floor (box->p1.y);
    rectangle->width = _cairo_fixed_integer_ceil (box->p2.x) - rectangle->x;
    rectangle->height = _cairo_fixed_integer_ceil (box->p2.y) - rectangle->y;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 370 of file cairo-cache.c.

{
    unsigned long i;
    if (cache == NULL)
       return;
       
    _cache_sane_state (cache);

    for (i = 0; i < cache->arrangement->size; ++i)
       _entry_destroy (cache, i);
       
    free (cache->entries);
    cache->entries = NULL;
    cache->backend->destroy_cache (cache);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_cache_init ( cairo_cache_t cache,
const cairo_cache_backend_t backend,
unsigned long  max_memory 
)

Definition at line 340 of file cairo-cache.c.

{    
    assert (backend != NULL);

    if (cache != NULL){
       cache->arrangement = &cache_arrangements[0];
       cache->max_memory = max_memory;
       cache->used_memory = 0;
       cache->live_entries = 0;

#ifdef CAIRO_MEASURE_CACHE_PERFORMANCE
       cache->hits = 0;
       cache->misses = 0;
       cache->probes = 0;
#endif

       cache->backend = backend;   
       cache->entries = calloc (cache->arrangement->size,
                             sizeof(cairo_cache_entry_base_t *));
                             
       if (cache->entries == NULL)
           return CAIRO_STATUS_NO_MEMORY;
    }    
    _cache_sane_state (cache);
    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_cache_lookup ( cairo_cache_t cache,
void key,
void **  entry_return,
int created_entry 
)

Definition at line 400 of file cairo-cache.c.

{

    cairo_status_t status = CAIRO_STATUS_SUCCESS;
    cairo_cache_entry_base_t **slot = NULL, *new_entry;

    _cache_sane_state (cache);

#ifdef CAIRO_MEASURE_CACHE_PERFORMANCE
    if ((cache->hits + cache->misses) % 0xffff == 0)
       printf("cache %p stats: size %ld, live %ld, load %.2f\n"
              "                      mem %ld/%ld, hit %ld, miss %ld\n"
              "                      probe %ld, %.2f probe/access\n", 
              cache,
              cache->arrangement->size, 
              cache->live_entries, 
              _load_factor (cache),
              cache->used_memory, 
              cache->max_memory,
              cache->hits, 
              cache->misses, 
              cache->probes,
              ((double) cache->probes) 
              / ((double) (cache->hits + 
                         cache->misses + 1)));
#endif
    
    /* See if we have an entry in the table already. */
    slot = _find_exact_live_entry_for (cache, key);
    if (slot != NULL) {
#ifdef CAIRO_MEASURE_CACHE_PERFORMANCE
       cache->hits++;
#endif
       *entry_return = *slot;
       if (created_entry)
           *created_entry = 0;
       return status;
    }

#ifdef CAIRO_MEASURE_CACHE_PERFORMANCE
    cache->misses++;
#endif

    /* Build the new entry. */
    status = cache->backend->create_entry (cache, key, 
                                      (void **)&new_entry);
    if (status != CAIRO_STATUS_SUCCESS)
       return status;

    /* Store the hash value in case the backend forgot. */
    new_entry->hashcode = cache->backend->hash (cache, key);

    if (cache->live_entries && cache->max_memory)
        _cairo_cache_shrink_to (cache, cache->max_memory);
    
    /* Can't assert this; new_entry->memory may be larger than max_memory */
    /* assert(cache->max_memory >= (cache->used_memory + new_entry->memory)); */
    
    /* Make room in the table for a new slot. */
    status = _resize_cache (cache, cache->live_entries + 1);
    if (status != CAIRO_STATUS_SUCCESS) {
       cache->backend->destroy_entry (cache, new_entry);
       return status;
    }

    slot = _find_available_entry_for (cache, key);
    assert(slot != NULL);
    
    /* Store entry in slot and increment statistics. */
    *slot = new_entry;
    cache->live_entries++;
    cache->used_memory += new_entry->memory;

    _cache_sane_state (cache);

    *entry_return = new_entry;
    if (created_entry)
      *created_entry = 1;
    
    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void* _cairo_cache_random_entry ( cairo_cache_t cache,
int(*)(void *)  predicate 
)

Definition at line 502 of file cairo-cache.c.

{
    cairo_cache_entry_base_t **slot = _random_entry (cache, predicate);

    return slot ? *slot : NULL;
}

Here is the call graph for this function:

Definition at line 486 of file cairo-cache.c.

{
    cairo_cache_entry_base_t **slot;

    _cache_sane_state (cache);

    /* See if we have an entry in the table already. */
    slot = _find_exact_live_entry_for (cache, key);
    if (slot != NULL)
       _entry_destroy (cache, slot - cache->entries);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

cairo_private void _cairo_cache_shrink_to ( cairo_cache_t cache,
unsigned long  max_memory 
)

Definition at line 387 of file cairo-cache.c.

{
    unsigned long idx;
    /* Make some entries die if we're under memory pressure. */
    while (cache->live_entries > 0 && cache->used_memory > max_memory) {
       idx =  _random_entry (cache, NULL) - cache->entries;
       assert (idx < cache->arrangement->size);
       _entry_destroy (cache, idx);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_color_get_rgba ( cairo_color_t *  color,
double *  red,
double *  green,
double *  blue,
double *  alpha 
)

Definition at line 130 of file cairo-color.c.

{
    *red   = color->red;
    *green = color->green;
    *blue  = color->blue;
    *alpha = color->alpha;
}
cairo_private void _cairo_color_get_rgba_premultiplied ( cairo_color_t *  color,
double *  red,
double *  green,
double *  blue,
double *  alpha 
)

Definition at line 143 of file cairo-color.c.

{
    *red   = color->red   * color->alpha;
    *green = color->green * color->alpha;
    *blue  = color->blue  * color->alpha;
    *alpha = color->alpha;
}
cairo_private void _cairo_color_init ( cairo_color_t *  color)

Definition at line 80 of file cairo-color.c.

cairo_private void _cairo_color_init_rgb ( cairo_color_t *  color,
double  red,
double  green,
double  blue 
)

Definition at line 86 of file cairo-color.c.

{
    _cairo_color_init_rgba (color, red, green, blue, 1.0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_color_init_rgba ( cairo_color_t *  color,
double  red,
double  green,
double  blue,
double  alpha 
)

Definition at line 108 of file cairo-color.c.

{
    color->red   = red;
    color->green = green;
    color->blue  = blue;
    color->alpha = alpha;

    _cairo_color_compute_shorts (color);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_color_multiply_alpha ( cairo_color_t *  color,
double  alpha 
)

Definition at line 121 of file cairo-color.c.

{
    color->alpha *= alpha;

    _cairo_color_compute_shorts (color);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 315 of file cairo-image-surface.c.

Here is the caller graph for this function:

_cairo_error: : a status value indicating an error, (eg.

not CAIRO_STATUS_SUCCESS)

Checks that status is an error status, but does nothing else.

All assignments of an error status to any user-visible object within the cairo application should result in a call to _cairo_error().

The purpose of this function is to allow the user to set a breakpoint in _cairo_error() to generate a stack trace for when the user causes cairo to detect an error.

Definition at line 83 of file cairo.c.

Definition at line 52 of file cairo-fixed.c.

{
    return i << 10;
}

Here is the caller graph for this function:

Definition at line 46 of file cairo-fixed.c.

{
    return (cairo_fixed_t) floor (d * 65536 + 0.5);
}

Here is the caller graph for this function:

Definition at line 40 of file cairo-fixed.c.

{
    return i << 16;
}

Here is the caller graph for this function:

Definition at line 85 of file cairo-fixed.c.

{
    if (f > 0)
       return ((f - 1)>>16) + 1;
    else
       return - (-f >> 16);
}

Here is the caller graph for this function:

Definition at line 76 of file cairo-fixed.c.

{
    if (f >= 0)
       return f >> 16;
    else
       return -((-f - 1) >> 16) - 1;
}

Here is the caller graph for this function:

Definition at line 70 of file cairo-fixed.c.

{
    return f >> 16;
}

Here is the caller graph for this function:

Definition at line 64 of file cairo-fixed.c.

{
    return (f & 0xFFFF) == 0;
}

Here is the caller graph for this function:

Definition at line 58 of file cairo-fixed.c.

{
    return ((double) f) / 65536.0;
}

Here is the caller graph for this function:

cairo_private void _cairo_font_face_init ( cairo_font_face_t *  font_face,
const cairo_font_face_backend_t *  backend 
)

Definition at line 58 of file cairo-font.c.

{
    font_face->status = CAIRO_STATUS_SUCCESS;
    font_face->ref_count = 1;
    font_face->backend = backend;

    _cairo_user_data_array_init (&font_face->user_data);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_font_options_init_default ( cairo_font_options_t *  options)

_cairo_font_options_init_default: : a #cairo_font_options_t

Initializes all fileds of the font options object to default values.

Definition at line 53 of file cairo-font-options.c.

{
    if (options == (cairo_font_options_t *)&cairo_font_options_nil)
       return;
  
    options->antialias = CAIRO_ANTIALIAS_DEFAULT;
    options->subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT;
    options->hint_style = CAIRO_HINT_STYLE_DEFAULT;
    options->hint_metrics = CAIRO_HINT_METRICS_DEFAULT;
}

Here is the caller graph for this function:

Definition at line 299 of file cairo-image-surface.c.

Here is the caller graph for this function:

Definition at line 2650 of file cairo-ft-font.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1279 of file cairo-font.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private unsigned long _cairo_glyph_cache_hash ( void cache,
void key 
)

Definition at line 1162 of file cairo-font.c.

{
    cairo_glyph_cache_key_t *in;
    in = (cairo_glyph_cache_key_t *) key;
    return 
       ((unsigned long) in->unscaled) 
       ^ ((unsigned long) in->scale.xx) 
       ^ ((unsigned long) in->scale.yx) 
       ^ ((unsigned long) in->scale.xy) 
       ^ ((unsigned long) in->scale.yy)
        ^ (in->flags * 1451) /* 1451 is just an abitrary prime */
       ^ in->index;
}
cairo_private int _cairo_glyph_cache_keys_equal ( void cache,
void k1,
void k2 
)

Definition at line 1177 of file cairo-font.c.

{
    cairo_glyph_cache_key_t *a, *b;
    a = (cairo_glyph_cache_key_t *) k1;
    b = (cairo_glyph_cache_key_t *) k2;
    return (a->index == b->index)
       && (a->unscaled == b->unscaled)
       && (a->flags == b->flags)
       && (a->scale.xx == b->scale.xx)
       && (a->scale.yx == b->scale.yx)
       && (a->scale.xy == b->scale.xy)
       && (a->scale.yy == b->scale.yy);
}
cairo_private void _cairo_gstate_backend_to_user ( cairo_gstate_t *  gstate,
double *  x,
double *  y 
)

Definition at line 673 of file cairo-gstate.c.

{
    *x -= gstate->target->device_x_offset;
    *y -= gstate->target->device_y_offset;
    cairo_matrix_transform_point (&gstate->ctm_inverse, x, y);
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_clip ( cairo_gstate_t *  gstate,
cairo_path_fixed_t *  path 
)

Definition at line 1714 of file cairo-gstate.c.

{
    return _cairo_clip_clip (&gstate->clip,
                          path, gstate->fill_rule, gstate->tolerance,
                          gstate->antialias, gstate->target);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_gstate_t* _cairo_gstate_clone ( cairo_gstate_t *  gstate)

Definition at line 216 of file cairo-gstate.c.

{
    cairo_status_t status;
    cairo_gstate_t *clone;

    clone = malloc (sizeof (cairo_gstate_t));
    if (clone) {
       status = _cairo_gstate_init_copy (clone, gstate);
       if (status) {
           free (clone);
           return NULL;
       }
       clone->next = NULL;
    }

    return clone;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1627 of file cairo-gstate.c.

{
    return _cairo_surface_copy_page (gstate->target);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_gstate_t* _cairo_gstate_create ( cairo_surface_t *  target)

Definition at line 69 of file cairo-gstate.c.

{
    cairo_status_t status;
    cairo_gstate_t *gstate;

    gstate = malloc (sizeof (cairo_gstate_t));

    if (gstate)
    {
       status = _cairo_gstate_init (gstate, target);
       if (status) {
           free (gstate);
           return NULL;            
       }
    }

    return gstate;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_gstate_destroy ( cairo_gstate_t *  gstate)

Definition at line 209 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_device_to_user ( cairo_gstate_t *  gstate,
double *  x,
double *  y 
)

Definition at line 648 of file cairo-gstate.c.

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_device_to_user_distance ( cairo_gstate_t *  gstate,
double *  dx,
double *  dy 
)

Definition at line 656 of file cairo-gstate.c.

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_fill ( cairo_gstate_t *  gstate,
cairo_path_fixed_t *  path 
)

Definition at line 1557 of file cairo-gstate.c.

{
    cairo_status_t status;
    cairo_traps_t traps;

    if (gstate->source->status)
       return gstate->source->status;
    
    status = _cairo_surface_set_clip (gstate->target, &gstate->clip);
    if (status)
       return status;

    status = _cairo_surface_fill_path (gstate->operator,
                                   gstate->source,
                                   gstate->target,
                                   path,
                                   gstate->fill_rule,
                                   gstate->tolerance);
    
    if (status != CAIRO_INT_STATUS_UNSUPPORTED)
       return status;

    _cairo_traps_init (&traps);

    status = _cairo_path_fixed_fill_to_traps (path,
                                         gstate->fill_rule,
                                         gstate->tolerance,
                                         &traps);
    if (status) {
       _cairo_traps_fini (&traps);
       return status;
    }

    _cairo_gstate_clip_and_composite_trapezoids (gstate, &traps);

    _cairo_traps_fini (&traps);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_fill_extents ( cairo_gstate_t *  gstate,
cairo_path_fixed_t *  path,
double *  x1,
double *  y1,
double *  x2,
double *  y2 
)

Definition at line 1673 of file cairo-gstate.c.

{
    cairo_status_t status;
    cairo_traps_t traps;
    cairo_box_t extents;
  
    _cairo_traps_init (&traps);
  
    status = _cairo_path_fixed_fill_to_traps (path,
                                         gstate->fill_rule,
                                         gstate->tolerance,
                                         &traps);
    if (status)
       goto BAIL;
  
    _cairo_traps_extents (&traps, &extents);

    *x1 = _cairo_fixed_to_double (extents.p1.x);
    *y1 = _cairo_fixed_to_double (extents.p1.y);
    *x2 = _cairo_fixed_to_double (extents.p2.x);
    *y2 = _cairo_fixed_to_double (extents.p2.y);

    _cairo_gstate_backend_to_user (gstate, x1, y1);
    _cairo_gstate_backend_to_user (gstate, x2, y2);
  
BAIL:
    _cairo_traps_fini (&traps);
  
    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2189 of file cairo-gstate.c.

{
    return gstate->antialias;
}

Here is the caller graph for this function:

Definition at line 383 of file cairo-gstate.c.

{
    return gstate->fill_rule;
}

Here is the caller graph for this function:

Definition at line 1932 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_get_font_face ( cairo_gstate_t *  gstate,
cairo_font_face_t **  font_face 
)

Definition at line 1796 of file cairo-gstate.c.

{
    cairo_status_t status;

    status = _cairo_gstate_ensure_font_face (gstate);
    if (status)
       return status;
    
    *font_face = gstate->font_face;

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_gstate_get_font_matrix ( cairo_gstate_t *  gstate,
cairo_matrix_t matrix 
)

Definition at line 1771 of file cairo-gstate.c.

{
    *matrix = gstate->font_matrix;
}

Here is the caller graph for this function:

cairo_private void _cairo_gstate_get_font_options ( cairo_gstate_t *  gstate,
cairo_font_options_t *  options 
)

Definition at line 1789 of file cairo-gstate.c.

{
    *options = gstate->font_options;
}

Here is the caller graph for this function:

Definition at line 411 of file cairo-gstate.c.

{
    return gstate->line_cap;
}

Here is the caller graph for this function:

Definition at line 425 of file cairo-gstate.c.

{
    return gstate->line_join;
}

Here is the caller graph for this function:

cairo_private double _cairo_gstate_get_line_width ( cairo_gstate_t *  gstate)

Definition at line 397 of file cairo-gstate.c.

{
    return gstate->line_width;
}

Here is the caller graph for this function:

cairo_private void _cairo_gstate_get_matrix ( cairo_gstate_t *  gstate,
cairo_matrix_t matrix 
)

Definition at line 521 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private double _cairo_gstate_get_miter_limit ( cairo_gstate_t *  gstate)

Definition at line 489 of file cairo-gstate.c.

{
    return gstate->miter_limit;
}

Here is the caller graph for this function:

Definition at line 355 of file cairo-gstate.c.

{
    return gstate->operator;
}

Here is the caller graph for this function:

cairo_private cairo_pattern_t* _cairo_gstate_get_source ( cairo_gstate_t *  gstate)

Definition at line 338 of file cairo-gstate.c.

{
    if (gstate == NULL)
       return NULL;

    return gstate->source;
}

Here is the caller graph for this function:

cairo_private cairo_surface_t* _cairo_gstate_get_target ( cairo_gstate_t *  gstate)

Definition at line 317 of file cairo-gstate.c.

{
    return gstate->target;
}

Here is the caller graph for this function:

cairo_private double _cairo_gstate_get_tolerance ( cairo_gstate_t *  gstate)

Definition at line 369 of file cairo-gstate.c.

{
    return gstate->tolerance;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_glyph_extents ( cairo_gstate_t *  gstate,
cairo_glyph_t glyphs,
int  num_glyphs,
cairo_text_extents_t extents 
)

Definition at line 1998 of file cairo-gstate.c.

{
    cairo_status_t status;

    status = _cairo_gstate_ensure_scaled_font (gstate);
    if (status)
       return status;

    cairo_scaled_font_glyph_extents (gstate->scaled_font,
                                 glyphs, num_glyphs,
                                 extents);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_glyph_path ( cairo_gstate_t *  gstate,
cairo_glyph_t glyphs,
int  num_glyphs,
cairo_path_fixed_t *  path 
)

Definition at line 2146 of file cairo-gstate.c.

{
    cairo_status_t status;
    int i;
    cairo_glyph_t *transformed_glyphs = NULL;

    status = _cairo_gstate_ensure_scaled_font (gstate);
    if (status)
       return status;
    
    transformed_glyphs = malloc (num_glyphs * sizeof(cairo_glyph_t));
    if (transformed_glyphs == NULL)
       return CAIRO_STATUS_NO_MEMORY;
    
    for (i = 0; i < num_glyphs; ++i)
    {
       transformed_glyphs[i] = glyphs[i];
       _cairo_gstate_user_to_backend (gstate,
                                   &(transformed_glyphs[i].x), 
                                   &(transformed_glyphs[i].y));
    }

    status = _cairo_scaled_font_glyph_path (gstate->scaled_font,
                                       transformed_glyphs, num_glyphs,
                                       path);

    free (transformed_glyphs);
    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 617 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_in_fill ( cairo_gstate_t *  gstate,
cairo_path_fixed_t *  path,
double  x,
double  y,
cairo_bool_t inside_ret 
)

Definition at line 1598 of file cairo-gstate.c.

{
    cairo_status_t status = CAIRO_STATUS_SUCCESS;
    cairo_traps_t traps;

    _cairo_gstate_user_to_backend (gstate, &x, &y);

    _cairo_traps_init (&traps);

    status = _cairo_path_fixed_fill_to_traps (path,
                                         gstate->fill_rule,
                                         gstate->tolerance,
                                         &traps);
    if (status)
       goto BAIL;

    *inside_ret = _cairo_traps_contain (&traps, x, y);
    
BAIL:
    _cairo_traps_fini (&traps);

    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_in_stroke ( cairo_gstate_t *  gstate,
cairo_path_fixed_t *  path,
double  x,
double  y,
cairo_bool_t inside_ret 
)

Definition at line 1223 of file cairo-gstate.c.

{
    cairo_status_t status = CAIRO_STATUS_SUCCESS;
    cairo_traps_t traps;

    _cairo_gstate_user_to_backend (gstate, &x, &y);

    _cairo_pen_init (&gstate->pen_regular, gstate->line_width / 2.0, gstate);

    _cairo_traps_init (&traps);

    status = _cairo_path_fixed_stroke_to_traps (path, gstate, &traps);
    if (status)
       goto BAIL;

    *inside_ret = _cairo_traps_contain (&traps, x, y);

BAIL:
    _cairo_traps_fini (&traps);

    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_mask ( cairo_gstate_t *  gstate,
cairo_pattern_t *  mask 
)

Definition at line 1155 of file cairo-gstate.c.

{
    cairo_rectangle_t extents;
    cairo_pattern_union_t source_pattern, mask_pattern;
    cairo_status_t status;

    if (mask->status)
       return mask->status;

    if (gstate->source->status)
       return gstate->source->status;

    status = _cairo_surface_set_clip (gstate->target, &gstate->clip);
    if (status)
       return status;

    _cairo_gstate_copy_transformed_source (gstate, &source_pattern.base);
    _cairo_gstate_copy_transformed_mask (gstate, &mask_pattern.base, mask);
    
    _get_mask_extents (gstate, &mask_pattern.base, &extents);
    
    status = _cairo_gstate_clip_and_composite (&gstate->clip, gstate->operator,
                                          &source_pattern.base, 
                                          _cairo_gstate_mask_draw_func, &mask_pattern.base,
                                          gstate->target,
                                          &extents);

    _cairo_pattern_fini (&source_pattern.base);
    _cairo_pattern_fini (&mask_pattern.base);

    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_paint ( cairo_gstate_t *  gstate)

Definition at line 729 of file cairo-gstate.c.

{
    cairo_rectangle_t rectangle;
    cairo_status_t status;
    cairo_box_t box;
    cairo_traps_t traps;

    if (gstate->source->status)
       return gstate->source->status;

    status = _cairo_surface_set_clip (gstate->target, &gstate->clip);
    if (status)
       return status;

    status = _cairo_surface_get_extents (gstate->target, &rectangle);
    if (status)
       return status;
    status = _cairo_clip_intersect_to_rectangle (&gstate->clip, &rectangle);
    if (status)
       return status;

    box.p1.x = _cairo_fixed_from_int (rectangle.x);
    box.p1.y = _cairo_fixed_from_int (rectangle.y);
    box.p2.x = _cairo_fixed_from_int (rectangle.x + rectangle.width);
    box.p2.y = _cairo_fixed_from_int (rectangle.y + rectangle.height);
    status = _cairo_traps_init_box (&traps, &box);
    if (status)
       return status;
    
    _cairo_gstate_clip_and_composite_trapezoids (gstate, &traps);

    _cairo_traps_fini (&traps);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1708 of file cairo-gstate.c.

{
    return _cairo_clip_reset (&gstate->clip);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_rotate ( cairo_gstate_t *  gstate,
double  angle 
)

Definition at line 563 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_scale ( cairo_gstate_t *  gstate,
double  sx,
double  sy 
)

Definition at line 544 of file cairo-gstate.c.

{
    cairo_matrix_t tmp;

    if (sx == 0 || sy == 0)
       return CAIRO_STATUS_INVALID_MATRIX;

    _cairo_gstate_unset_scaled_font (gstate);
    
    cairo_matrix_init_scale (&tmp, sx, sy);
    cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm);

    cairo_matrix_init_scale (&tmp, 1/sx, 1/sy);
    cairo_matrix_multiply (&gstate->ctm_inverse, &gstate->ctm_inverse, &tmp);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_select_font_face ( cairo_gstate_t *  gstate,
const char *  family,
cairo_font_slant_t  slant,
cairo_font_weight_t  weight 
)

Definition at line 1731 of file cairo-gstate.c.

{
    cairo_font_face_t *font_face;

    font_face = _cairo_toy_font_face_create (family, slant, weight);
    if (font_face->status)
       return font_face->status;

    _cairo_gstate_set_font_face (gstate, font_face);
    cairo_font_face_destroy (font_face);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_antialias ( cairo_gstate_t *  gstate,
cairo_antialias_t  antialias 
)

Definition at line 2180 of file cairo-gstate.c.

{
    gstate->antialias = antialias;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_dash ( cairo_gstate_t *  gstate,
double *  dash,
int  num_dashes,
double  offset 
)

Definition at line 431 of file cairo-gstate.c.

{
    int i;
    double dash_total;

    if (gstate->dash)
       free (gstate->dash);
    
    gstate->num_dashes = num_dashes;

    if (gstate->num_dashes == 0) {
       gstate->dash = NULL;
       gstate->dash_offset = 0.0;
       return CAIRO_STATUS_SUCCESS;
    }

    gstate->dash = malloc (gstate->num_dashes * sizeof (double));
    if (gstate->dash == NULL) {
       gstate->num_dashes = 0;
       return CAIRO_STATUS_NO_MEMORY;
    }

    memcpy (gstate->dash, dash, gstate->num_dashes * sizeof (double));
    
    dash_total = 0.0;
    for (i = 0; i < gstate->num_dashes; i++) {
       if (gstate->dash[i] < 0)
           return CAIRO_STATUS_INVALID_DASH;
       dash_total += gstate->dash[i];
    }

    if (dash_total == 0.0)
       return CAIRO_STATUS_INVALID_DASH;

    /* A single dash value indicate symmetric repeating, so the total
     * is twice as long. */
    if (gstate->num_dashes == 1)
       dash_total *= 2;

    /* The dashing code doesn't like a negative offset, so we compute
     * the equivalent positive offset. */
    if (offset < 0)
       offset += ceil (-offset / dash_total + 0.5) * dash_total;

    gstate->dash_offset = offset;

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_fill_rule ( cairo_gstate_t *  gstate,
cairo_fill_rule_t  fill_rule 
)

Definition at line 375 of file cairo-gstate.c.

{
    gstate->fill_rule = fill_rule;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_font_face ( cairo_gstate_t *  gstate,
cairo_font_face_t *  font_face 
)

Definition at line 1981 of file cairo-gstate.c.

{
    if (font_face && font_face->status)
       return font_face->status;
    
    if (font_face != gstate->font_face) {
       cairo_font_face_destroy (gstate->font_face);
       gstate->font_face = cairo_font_face_reference (font_face);
    }

    _cairo_gstate_unset_scaled_font (gstate);
    
    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_font_matrix ( cairo_gstate_t *  gstate,
const cairo_matrix_t matrix 
)

Definition at line 1760 of file cairo-gstate.c.

{
    _cairo_gstate_unset_scaled_font (gstate);

    gstate->font_matrix = *matrix;

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_font_options ( cairo_gstate_t *  gstate,
const cairo_font_options_t *  options 
)

Definition at line 1778 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_font_size ( cairo_gstate_t *  gstate,
double  size 
)

Definition at line 1749 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_line_cap ( cairo_gstate_t *  gstate,
cairo_line_cap_t  line_cap 
)

Definition at line 403 of file cairo-gstate.c.

{
    gstate->line_cap = line_cap;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_line_join ( cairo_gstate_t *  gstate,
cairo_line_join_t  line_join 
)

Definition at line 417 of file cairo-gstate.c.

{
    gstate->line_join = line_join;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_line_width ( cairo_gstate_t *  gstate,
double  width 
)

Definition at line 389 of file cairo-gstate.c.

{
    gstate->line_width = width;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_matrix ( cairo_gstate_t *  gstate,
const cairo_matrix_t matrix 
)

Definition at line 596 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_miter_limit ( cairo_gstate_t *  gstate,
double  limit 
)

Definition at line 481 of file cairo-gstate.c.

{
    gstate->miter_limit = limit;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_operator ( cairo_gstate_t *  gstate,
cairo_operator_t  operator 
)

Definition at line 347 of file cairo-gstate.c.

{
    gstate->operator = operator;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_source ( cairo_gstate_t *  gstate,
cairo_pattern_t *  source 
)

Definition at line 323 of file cairo-gstate.c.

{
    if (source->status)
       return source->status;

    cairo_pattern_reference (source);
    cairo_pattern_destroy (gstate->source);
    gstate->source = source;
    gstate->source_ctm_inverse = gstate->ctm_inverse;
    
    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_set_tolerance ( cairo_gstate_t *  gstate,
double  tolerance 
)

Definition at line 361 of file cairo-gstate.c.

{
    gstate->tolerance = tolerance;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_show_glyphs ( cairo_gstate_t *  gstate,
cairo_glyph_t glyphs,
int  num_glyphs 
)

Definition at line 2069 of file cairo-gstate.c.

{
    cairo_status_t status;
    int i;
    cairo_glyph_t *transformed_glyphs = NULL;
    cairo_pattern_union_t pattern;
    cairo_box_t bbox;
    cairo_rectangle_t extents;
    cairo_show_glyphs_info_t glyph_info;

    if (gstate->source->status)
       return gstate->source->status;

    status = _cairo_surface_set_clip (gstate->target, &gstate->clip);
    if (status)
       return status;

    status = _cairo_gstate_ensure_scaled_font (gstate);
    if (status)
       return status;
    
    transformed_glyphs = malloc (num_glyphs * sizeof(cairo_glyph_t));
    if (transformed_glyphs == NULL)
       return CAIRO_STATUS_NO_MEMORY;
    
    for (i = 0; i < num_glyphs; ++i)
    {
       transformed_glyphs[i] = glyphs[i];
       _cairo_gstate_user_to_backend (gstate,
                                   &transformed_glyphs[i].x, 
                                   &transformed_glyphs[i].y);
    }

    if (_cairo_operator_bounded (gstate->operator))
    {
       status = _cairo_scaled_font_glyph_bbox (gstate->scaled_font,
                                          transformed_glyphs, num_glyphs, 
                                          &bbox);
       if (status)
           goto CLEANUP_GLYPHS;
       
       _cairo_box_round_to_rectangle (&bbox, &extents);
    }
    else
    {
       status = _cairo_surface_get_extents (gstate->target, &extents);
       if (status)
           goto CLEANUP_GLYPHS;
    }
    
    status = _cairo_clip_intersect_to_rectangle (&gstate->clip, &extents);
    if (status)
       goto CLEANUP_GLYPHS;
    
    _cairo_gstate_copy_transformed_source (gstate, &pattern.base);

    glyph_info.font = gstate->scaled_font;
    glyph_info.glyphs = transformed_glyphs;
    glyph_info.num_glyphs = num_glyphs;
    
    status = _cairo_gstate_clip_and_composite (&gstate->clip, gstate->operator,
                                          &pattern.base,
                                          _cairo_gstate_show_glyphs_draw_func, &glyph_info,
                                          gstate->target,
                                          &extents);

    _cairo_pattern_fini (&pattern.base);
    
 CLEANUP_GLYPHS:
    free (transformed_glyphs);
    
    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1633 of file cairo-gstate.c.

{
    return _cairo_surface_show_page (gstate->target);
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_show_surface ( cairo_gstate_t *  gstate,
cairo_surface_t *  surface,
double  x,
double  y,
double  width,
double  height 
)
cairo_private cairo_status_t _cairo_gstate_stroke ( cairo_gstate_t *  gstate,
cairo_path_fixed_t *  path 
)

Definition at line 1190 of file cairo-gstate.c.

{
    cairo_status_t status;
    cairo_traps_t traps;

    if (gstate->source->status)
       return gstate->source->status;

    if (gstate->line_width <= 0.0)
       return CAIRO_STATUS_SUCCESS;

    status = _cairo_surface_set_clip (gstate->target, &gstate->clip);
    if (status)
       return status;

    _cairo_pen_init (&gstate->pen_regular, gstate->line_width / 2.0, gstate);

    _cairo_traps_init (&traps);

    status = _cairo_path_fixed_stroke_to_traps (path, gstate, &traps);
    if (status) {
       _cairo_traps_fini (&traps);
       return status;
    }

    _cairo_gstate_clip_and_composite_trapezoids (gstate, &traps);

    _cairo_traps_fini (&traps);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_stroke_extents ( cairo_gstate_t *  gstate,
cairo_path_fixed_t *  path,
double *  x1,
double *  y1,
double *  x2,
double *  y2 
)

Definition at line 1639 of file cairo-gstate.c.

{
    cairo_status_t status;
    cairo_traps_t traps;
    cairo_box_t extents;
  
    _cairo_pen_init (&gstate->pen_regular, gstate->line_width / 2.0, gstate);

    _cairo_traps_init (&traps);
  
    status = _cairo_path_fixed_stroke_to_traps (path, gstate, &traps);
    if (status)
       goto BAIL;

    _cairo_traps_extents (&traps, &extents);

    *x1 = _cairo_fixed_to_double (extents.p1.x);
    *y1 = _cairo_fixed_to_double (extents.p1.y);
    *x2 = _cairo_fixed_to_double (extents.p2.x);
    *y2 = _cairo_fixed_to_double (extents.p2.y);

    _cairo_gstate_backend_to_user (gstate, x1, y1);
    _cairo_gstate_backend_to_user (gstate, x2, y2);
  
BAIL:
    _cairo_traps_fini (&traps);
  
    return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_text_to_glyphs ( cairo_gstate_t *  font,
const char *  utf8,
double  x,
double  y,
cairo_glyph_t **  glyphs,
int num_glyphs 
)

Definition at line 1945 of file cairo-gstate.c.

{
    cairo_status_t status;
    int i;

    status = _cairo_gstate_ensure_scaled_font (gstate);
    if (status)
       return status;
    
    status = _cairo_scaled_font_text_to_glyphs (gstate->scaled_font, 
                                          utf8, glyphs, num_glyphs);

    if (status || !glyphs || !num_glyphs || !(*glyphs) || !(num_glyphs))
       return status;

    /* The font responded in glyph space, starting from (0,0).  Convert to
       user space by applying the font transform, then add any current point
       offset. */

    for (i = 0; i < *num_glyphs; ++i) {
       cairo_matrix_transform_point (&gstate->font_matrix, 
                                  &((*glyphs)[i].x),
                                  &((*glyphs)[i].y));
       (*glyphs)[i].x += x;
       (*glyphs)[i].y += y;
    }
    
    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_transform ( cairo_gstate_t *  gstate,
const cairo_matrix_t matrix 
)

Definition at line 579 of file cairo-gstate.c.

{
    cairo_matrix_t tmp;

    _cairo_gstate_unset_scaled_font (gstate);
    
    tmp = *matrix;
    cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm);

    cairo_matrix_invert (&tmp);
    cairo_matrix_multiply (&gstate->ctm_inverse, &gstate->ctm_inverse, &tmp);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_translate ( cairo_gstate_t *  gstate,
double  tx,
double  ty 
)

Definition at line 528 of file cairo-gstate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_gstate_user_to_backend ( cairo_gstate_t *  gstate,
double *  x,
double *  y 
)

Definition at line 665 of file cairo-gstate.c.

{
    cairo_matrix_transform_point (&gstate->ctm, x, y);
    *x += gstate->target->device_x_offset;
    *y += gstate->target->device_y_offset;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_user_to_device ( cairo_gstate_t *  gstate,
double *  x,
double *  y 
)

Definition at line 631 of file cairo-gstate.c.

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_gstate_user_to_device_distance ( cairo_gstate_t *  gstate,
double *  dx,
double *  dy 
)

Definition at line 639 of file cairo-gstate.c.

Here is the caller graph for this function:

cairo_private unsigned long _cairo_hash_string ( const char *  c)

Definition at line 511 of file cairo-cache.c.

{
    /* This is the djb2 hash. */
    unsigned long hash = 5381;
    while (c && *c)
       hash = ((hash << 5) + hash) + *c++;
    return hash;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 193 of file cairo-hull.c.

{
    cairo_hull_t *hull;
    int num_hull = *num_vertices;

    hull = _cairo_hull_create (vertices, num_hull);
    if (hull == NULL)
       return CAIRO_STATUS_NO_MEMORY;

    qsort (hull + 1, num_hull - 1,
          sizeof (cairo_hull_t), _cairo_hull_vertex_compare);

    _cairo_hull_eliminate_concave (hull, num_hull);

    _cairo_hull_to_pen (hull, vertices, num_vertices);

    free (hull);

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 362 of file cairo-image-surface.c.

{
    surface->owns_data = 1;
}

Here is the caller graph for this function:

cairo_private cairo_surface_t* _cairo_image_surface_create_with_masks ( unsigned char *  data,
cairo_format_masks_t format,
int  width,
int  height,
int  stride 
)

Definition at line 84 of file cairo-image-surface.c.

{
    cairo_surface_t *surface;
    pixman_format_t *pixman_format;
    pixman_image_t *pixman_image;

    pixman_format = pixman_format_create_masks (format->bpp,
                                          format->alpha_mask,
                                          format->red_mask,
                                          format->green_mask,
                                          format->blue_mask);

    if (pixman_format == NULL) {
       _cairo_error (CAIRO_STATUS_NO_MEMORY);
       return (cairo_surface_t*) &_cairo_surface_nil;
    }

    pixman_image = pixman_image_create_for_data ((pixman_bits_t *) data, pixman_format,
                                           width, height, format->bpp, stride);

    pixman_format_destroy (pixman_format);

    if (pixman_image == NULL) {
       _cairo_error (CAIRO_STATUS_NO_MEMORY);
       return (cairo_surface_t*) &_cairo_surface_nil;
    }

    surface = _cairo_image_surface_create_for_pixman_image (pixman_image,
                                                     (cairo_format_t)-1);

    return surface;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_int_status_t _cairo_image_surface_set_clip_region ( cairo_image_surface_t *  surface,
pixman_region16_t *  region 
)

Definition at line 822 of file cairo-image-surface.c.

{
    pixman_image_set_clip_region (surface->pixman_image, region);

    surface->has_clip = region != NULL;

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

Definition at line 1263 of file cairo-font.c.

Here is the caller graph for this function:

Definition at line 475 of file cairo-matrix.c.

{
    double a, b, c, d;

    a = matrix->xx; b = matrix->yx;
    c = matrix->xy; d = matrix->yy;

    *det = a*d - b*c;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_matrix_compute_scale_factors ( const cairo_matrix_t matrix,
double *  sx,
double *  sy,
int  x_major 
)

Definition at line 488 of file cairo-matrix.c.

{
    double det;

    _cairo_matrix_compute_determinant (matrix, &det);

    if (det == 0)
    {
       *sx = *sy = 0;
    }
    else
    {
       double x = x_major != 0;
       double y = x == 0;
       double major, minor;
       
       cairo_matrix_transform_distance (matrix, &x, &y);
       major = sqrt(x*x + y*y);
       /*
        * ignore mirroring
        */
       if (det < 0)
           det = -det;
       if (major)
           minor = det / major;
       else 
           minor = 0.0;
       if (x_major)
       {
           *sx = major;
           *sy = minor;
       }
       else
       {
           *sx = minor;
           *sy = major;
       }
    }

    return CAIRO_STATUS_SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_matrix_get_affine ( const cairo_matrix_t matrix,
double *  xx,
double *  yx,
double *  xy,
double *  yy,
double *  x0,
double *  y0 
)

_cairo_matrix_get_affine: : a : location to store xx component of matrix : location to store yx component of matrix : location to store xy component of matrix : location to store yy component of matrix : location to store x0 (X-translation component) of matrix, or NULL : location to store y0 (Y-translation component) of matrix, or NULL

Gets the matrix values for the affine tranformation that represents. See cairo_matrix_init().

This function is a leftover from the old public API, but is still mildly useful as an internal means for getting at the matrix members in a positional way. For example, when reassigning to some external matrix type, or when renaming members to more meaningful names (such as a,b,c,d,e,f) for particular manipulations.

Definition at line 116 of file cairo-matrix.c.

{
    *xx  = matrix->xx;
    *yx  = matrix->yx;

    *xy  = matrix->xy;
    *yy  = matrix->yy;

    if (x0)
       *x0 = matrix->x0;
    if (y0)
       *y0 = matrix->y0;
}

Here is the caller graph for this function:

Definition at line 532 of file cairo-matrix.c.

{
    cairo_bool_t is_integer_translation;
    cairo_fixed_t x0_fixed, y0_fixed;

    x0_fixed = _cairo_fixed_from_double (m->x0);
    y0_fixed = _cairo_fixed_from_double (m->y0);

    is_integer_translation = ((m->xx == 1.0) &&
                           (m->yx == 0.0) &&
                           (m->xy == 0.0) &&
                           (m->yy == 1.0) &&
                           (_cairo_fixed_is_integer(x0_fixed)) &&
                           (_cairo_fixed_is_integer(y0_fixed)));

    if (! is_integer_translation)
       return FALSE;

    if (itx)
       *itx = _cairo_fixed_integer_part(x0_fixed);
    if (ity)
       *ity = _cairo_fixed_integer_part(y0_fixed);

    return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_matrix_transform_bounding_box ( const cairo_matrix_t matrix,
double *  x,
double *  y,
double *  width,
double *  height 
)

Definition at line 358 of file cairo-matrix.c.

{
    int i;
    double quad_x[4], quad_y[4];
    double dx1, dy1;
    double dx2, dy2;
    double min_x, max_x;
    double min_y, max_y;

    quad_x[0] = *x;
    quad_y[0] = *y;
    cairo_matrix_transform_point (matrix, &quad_x[0], &quad_y[0]);

    dx1 = *width;
    dy1 = 0;
    cairo_matrix_transform_distance (matrix, &dx1, &dy1);
    quad_x[1] = quad_x[0] + dx1;
    quad_y[1] = quad_y[0] + dy1;

    dx2 = 0;
    dy2 = *height;
    cairo_matrix_transform_distance (matrix, &dx2, &dy2);
    quad_x[2] = quad_x[0] + dx2;
    quad_y[2] = quad_y[0] + dy2;

    quad_x[3] = quad_x[0] + dx1 + dx2;
    quad_y[3] = quad_y[0] + dy1 + dy2;

    min_x = max_x = quad_x[0];
    min_y = max_y = quad_y[0];

    for (i=1; i < 4; i++) {
       if (quad_x[i] < min_x)
           min_x = quad_x[i];
       if (quad_x[i] > max_x)
           max_x = quad_x[i];

       if (quad_y[i] < min_y)
           min_y = quad_y[i];
       if (quad_y[i] > max_y)
           max_y = quad_y[i];
    }

    *x = min_x;
    *y = min_y;
    *width = max_x - min_x;
    *height = max_y - min_y;
}

Definition at line 680 of file cairo-matrix.c.

{
    double  a, b, c, d, f, g, h, i, j;

    _cairo_matrix_get_affine (matrix,
                              &a, &b,
                              &c, &d,
                              NULL, NULL);

    i = a*a + b*b;
    j = c*c + d*d;

    f = 0.5 * (i + j);
    g = 0.5 * (i - j);
    h = a*c + b*d;

    return radius * sqrt (f + sqrt (g*g+h*h));

    /*
     * we don't need the minor axis length, which is
     * double min = radius * sqrt (f - sqrt (g*g+h*h));
     */
}

Here is the call graph for this function:

Here is the caller graph for this function:

_cairo_operator_bounded: : a cairo_operator_t

A bounded operator is one where a source or mask pixel of zero results in no effect on the destination image.

Unbounded operators often require special handling; if you, for example, draw trapezoids with an unbounded operator, the effect extends past the bounding box of the trapezoids.

Return value: TRUE if the operator is bounded

Definition at line 779 of file cairo-gstate.c.

Here is the caller graph for this function:

cairo_private cairo_output_stream_t* _cairo_output_stream_create ( cairo_write_func_t  write_func,
void closure 
)

Definition at line 55 of file cairo-output-stream.c.

{
    cairo_output_stream_t *stream;

    stream = malloc (sizeof (cairo_output_stream_t));
    if (stream == NULL)
       return NULL;

    stream->write_data = write_data;
    stream->closure = closure;
    stream->owns_closure_is_file = FALSE;
    stream->position = 0;
    stream->status = CAIRO_STATUS_SUCCESS;

    return stream;
}

Here is the caller graph for this function:

cairo_private cairo_output_stream_t* _cairo_output_stream_create_for_file ( const char *  filename)

Definition at line 298 of file cairo-output-stream.c.

{
    FILE *fp;
    cairo_output_stream_t *stream;

    fp = fopen (filename, "wb");
    if (fp == NULL)
       return NULL;
    
    stream = _cairo_output_stream_create (stdio_write, fp);
    if (stream == NULL)
       fclose (fp);
    stream->owns_closure_is_file = TRUE;

    return stream;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private void _cairo_output_stream_destroy ( cairo_output_stream_t *  stream)

Definition at line 74 of file cairo-output-stream.c.

{
    if (stream->owns_closure_is_file) {
       FILE *file = stream->closure;
       fflush (file);
       fclose (file);
    }
    free (stream);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 271 of file cairo-output-stream.c.

{
    return stream->position;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_output_stream_get_status ( cairo_output_stream_t *  stream)

Definition at line 277 of file cairo-output-stream.c.

{
    return stream->status;
}

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_output_stream_printf ( cairo_output_stream_t *  stream,
const char *  fmt,
  ... 
)
cairo_private cairo_status_t _cairo_output_stream_vprintf ( cairo_output_stream_t *  stream,
const char *  fmt,
va_list  ap 
)

Definition at line 180 of file cairo-output-stream.c.

{
    char buffer[512];
    char *p;
    const char *f;
    int length_modifier;

    f = fmt;
    p = buffer;
    while (*f != '\0') {
       if (p == buffer + sizeof (buffer)) {
           _cairo_output_stream_write (stream, buffer, sizeof (buffer));
           p = buffer;
       }

       if (*f != '%') {
           *p++ = *f++;
           continue;
       }

       f++;

       _cairo_output_stream_write (stream, buffer, p - buffer);
       p = buffer;

       length_modifier = 0;
       if (*f == 'l') {
           length_modifier = LENGTH_MODIFIER_LONG;
           f++;
       }

       switch (*f | length_modifier) {
       case '%':
           buffer[0] = *f;
           buffer[1] = 0;
           break;
       case 'd':
           snprintf (buffer, sizeof buffer, "%d", va_arg (ap, int));
           break;
       case 'd' | LENGTH_MODIFIER_LONG:
           snprintf (buffer, sizeof buffer, "%ld", va_arg (ap, long int));
           break;
       case 'u':
           snprintf (buffer, sizeof buffer, "%u", va_arg (ap, unsigned int));
           break;
       case 'u' | LENGTH_MODIFIER_LONG:
           snprintf (buffer, sizeof buffer, "%lu", va_arg (ap, long unsigned int));
           break;
       case 'o':
           snprintf (buffer, sizeof buffer, "%o", va_arg (ap, int));
           break;
       case 's':
           snprintf (buffer, sizeof buffer, "%s", va_arg (ap, const char *));
           break;
       case 'f':
           dtostr (buffer, sizeof buffer, va_arg (ap, double));
           break;
       case 'c':
           buffer[0] = va_arg (ap, int);
           buffer[1] = 0;
           break;
       default:
           ASSERT_NOT_REACHED;
       }
       p = buffer + strlen (buffer);
       f++;
    }
    
    _cairo_output_stream_write (stream, buffer, p - buffer);

    return stream->status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_output_stream_write ( cairo_output_stream_t *  stream,
const void data,
size_t  length 
)

Definition at line 85 of file cairo-output-stream.c.

{
    if (length == 0)
       return CAIRO_STATUS_SUCCESS;

    stream->status = stream->write_data (stream->closure, data, length);
    stream->position += length;

    return stream->status;
}

Here is the caller graph for this function:

cairo_private void _cairo_output_stream_write_hex_string ( cairo_output_stream_t *  stream,
const char *  data,
size_t  length 
)

Definition at line 98 of file cairo-output-stream.c.

{
    const char hex_chars[] = "0123456789abcdef";
    char buffer[2];
    int i, column;

    for (i = 0, column = 0; i < length; i++, column++) {
       if (column == 38) {
           _cairo_output_stream_write (stream, "\n", 1);
           column = 0;
       }
       buffer[0] = hex_chars[(data[i] >> 4) & 0x0f];
       buffer[1] = hex_chars[data[i] & 0x0f];
       _cairo_output_stream_write (stream, buffer, 2);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_status_t _cairo_path_fixed_bounds ( cairo_path_fixed_t *  path,
double *  x1,
double *  y1,
double *  x2,
double *  y2 
)

Definition at line 154 of file cairo-path-bounds.c.

Here is the call graph for this function:

Definition at line 285 of file cairo-path.c.