w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cairo-matrix.c File Reference
#include "cairoint.h"
#include "cairo-error-private.h"
#include <float.h>
Include dependency graph for cairo-matrix.c:

Go to the source code of this file.

Macros

#define PIXMAN_MAX_INT   ((pixman_fixed_1 >> 1) - pixman_fixed_e) /* need to ensure deltas also fit */
 
#define SCALING_EPSILON   _cairo_fixed_to_double(1)
 

Functions

static void _cairo_matrix_scalar_multiply (cairo_matrix_t *matrix, double scalar)
 
static void _cairo_matrix_compute_adjoint (cairo_matrix_t *matrix)
 
void cairo_matrix_init_identity (cairo_matrix_t *matrix)
 
int _cairo_dummy_prototype (void)
 
void cairo_matrix_init (cairo_matrix_t *matrix, double xx, double yx, double xy, double yy, double x0, double y0)
 
void _cairo_matrix_get_affine (const cairo_matrix_t *matrix, double *xx, double *yx, double *xy, double *yy, double *x0, double *y0)
 
void cairo_matrix_init_translate (cairo_matrix_t *matrix, double tx, double ty)
 
void cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty)
 
void cairo_matrix_init_scale (cairo_matrix_t *matrix, double sx, double sy)
 
void cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy)
 
void cairo_matrix_init_rotate (cairo_matrix_t *matrix, double radians)
 
void cairo_matrix_rotate (cairo_matrix_t *matrix, double radians)
 
void cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b)
 
void _cairo_matrix_multiply (cairo_matrix_t *r, const cairo_matrix_t *a, const cairo_matrix_t *b)
 
void cairo_matrix_transform_distance (const cairo_matrix_t *matrix, double *dx, double *dy)
 
void cairo_matrix_transform_point (const cairo_matrix_t *matrix, double *x, double *y)
 
void _cairo_matrix_transform_bounding_box (const cairo_matrix_t *matrix, double *x1, double *y1, double *x2, double *y2, cairo_bool_t *is_tight)
 
void _cairo_matrix_transform_bounding_box_fixed (const cairo_matrix_t *matrix, cairo_box_t *bbox, cairo_bool_t *is_tight)
 
cairo_status_t cairo_matrix_invert (cairo_matrix_t *matrix)
 
cairo_bool_t _cairo_matrix_is_invertible (const cairo_matrix_t *matrix)
 
cairo_bool_t _cairo_matrix_is_scale_0 (const cairo_matrix_t *matrix)
 
double _cairo_matrix_compute_determinant (const cairo_matrix_t *matrix)
 
cairo_status_t _cairo_matrix_compute_basis_scale_factors (const cairo_matrix_t *matrix, double *basis_scale, double *normal_scale, cairo_bool_t x_basis)
 
cairo_bool_t _cairo_matrix_is_integer_translation (const cairo_matrix_t *matrix, int *itx, int *ity)
 
cairo_bool_t _cairo_matrix_has_unity_scale (const cairo_matrix_t *matrix)
 
cairo_bool_t _cairo_matrix_is_pixel_exact (const cairo_matrix_t *matrix)
 
double _cairo_matrix_transformed_circle_major_axis (const cairo_matrix_t *matrix, double radius)
 
static cairo_status_t _cairo_matrix_to_pixman_matrix (const cairo_matrix_t *matrix, pixman_transform_t *pixman_transform, double xc, double yc)
 
static double _pixman_nearest_sample (double d)
 
cairo_bool_t _cairo_matrix_is_pixman_translation (const cairo_matrix_t *matrix, cairo_filter_t filter, int *x_offset, int *y_offset)
 
cairo_status_t _cairo_matrix_to_pixman_matrix_offset (const cairo_matrix_t *matrix, cairo_filter_t filter, double xc, double yc, pixman_transform_t *out_transform, int *x_offset, int *y_offset)
 

Variables

static const pixman_transform_t pixman_identity_transform
 

Macro Definition Documentation

◆ PIXMAN_MAX_INT

#define PIXMAN_MAX_INT   ((pixman_fixed_1 >> 1) - pixman_fixed_e) /* need to ensure deltas also fit */

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

◆ SCALING_EPSILON

#define SCALING_EPSILON   _cairo_fixed_to_double(1)

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

Function Documentation

◆ _cairo_dummy_prototype()

int _cairo_dummy_prototype ( void  )

◆ _cairo_matrix_compute_adjoint()

static void _cairo_matrix_compute_adjoint ( cairo_matrix_t matrix)
static

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

References _cairo_matrix_get_affine(), a, b, c, cairo_matrix_init(), d, and matrix().

Referenced by cairo_matrix_invert().

◆ _cairo_matrix_compute_basis_scale_factors()

cairo_status_t _cairo_matrix_compute_basis_scale_factors ( const cairo_matrix_t matrix,
double *  basis_scale,
double *  normal_scale,
cairo_bool_t  x_basis 
)

_cairo_matrix_compute_basis_scale_factors: @matrix: a matrix @basis_scale: the scale factor in the direction of basis @normal_scale: the scale factor in the direction normal to the basis @x_basis: basis to use. X basis if true, Y basis otherwise.

Computes |Mv| and det(M)/|Mv| for v=[1,0] if x_basis is true, and v=[0,1] otherwise, and M is @matrix.

Return value: the scale factor of @matrix on the height of the font, or 1.0 if @matrix is NULL.

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

References _cairo_error(), _cairo_matrix_compute_determinant(), cairo_matrix_transform_distance(), CAIRO_STATUS_INVALID_MATRIX, CAIRO_STATUS_SUCCESS, det(), hypot(), ISFINITE, major, matrix(), minor, cordic::x, and y.

Referenced by _cairo_scaled_font_set_metrics(), _cairo_user_font_face_scaled_font_create(), and _compute_transform().

◆ _cairo_matrix_compute_determinant()

◆ _cairo_matrix_get_affine()

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: @matrix: a cairo_matrix_t @xx: location to store xx component of matrix @yx: location to store yx component of matrix @xy: location to store xy component of matrix @yy: location to store yy component of matrix @x0: location to store x0 (X-translation component) of matrix, or NULL @y0: location to store y0 (Y-translation component) of matrix, or NULL

Gets the matrix values for the affine transformation that @matrix 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 144 of file cairo-matrix.c.

References matrix(), x0, xx, y0, and yy.

Referenced by _cairo_matrix_compute_adjoint(), _cairo_matrix_transformed_circle_major_axis(), and _compute_transform().

◆ _cairo_matrix_has_unity_scale()

◆ _cairo_matrix_is_integer_translation()

◆ _cairo_matrix_is_invertible()

◆ _cairo_matrix_is_pixel_exact()

◆ _cairo_matrix_is_pixman_translation()

cairo_bool_t _cairo_matrix_is_pixman_translation ( const cairo_matrix_t matrix,
cairo_filter_t  filter,
int x_offset,
int y_offset 
)

_cairo_matrix_is_pixman_translation: @matrix: a matrix @filter: the filter to be used on the pattern transformed by @matrix @x_offset: the translation in the X direction @y_offset: the translation in the Y direction

Checks if @matrix translated by (x_offset, y_offset) can be represented using just an offset (within the range pixman can accept) and an identity matrix.

Passing a non-zero value in x_offset/y_offset has the same effect as applying cairo_matrix_translate(matrix, x_offset, y_offset) and setting x_offset and y_offset to 0.

Upon return x_offset and y_offset contain the translation vector if the return value is TRUE. If the return value is FALSE, they will not be modified.

Return value: TRUE if @matrix can be represented as a pixman translation, FALSE otherwise.

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

References _cairo_lround(), _cairo_matrix_is_translation(), _pixman_nearest_sample(), CAIRO_FILTER_FAST, CAIRO_FILTER_NEAREST, fabs, FALSE, filter, floor, matrix(), PIXMAN_MAX_INT, TRUE, x_offset, and y_offset.

Referenced by _cairo_composite_reduce_pattern(), _cairo_matrix_to_pixman_matrix_offset(), and _pixman_image_for_surface().

◆ _cairo_matrix_is_scale_0()

cairo_bool_t _cairo_matrix_is_scale_0 ( const cairo_matrix_t matrix)

◆ _cairo_matrix_multiply()

void _cairo_matrix_multiply ( cairo_matrix_t r,
const cairo_matrix_t a,
const cairo_matrix_t b 
)

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

References a, b, and r.

Referenced by _cairo_surface_wrapper_show_text_glyphs().

◆ _cairo_matrix_scalar_multiply()

static void _cairo_matrix_scalar_multiply ( cairo_matrix_t matrix,
double  scalar 
)
static

SECTION:cairo-matrix @Title: cairo_matrix_t @Short_Description: Generic matrix operations @See_Also: cairo_t

cairo_matrix_t is used throughout cairo to convert between different coordinate spaces. A cairo_matrix_t holds an affine transformation, such as a scale, rotation, shear, or a combination of these. The transformation of a point (<literal>x</literal>,<literal>y</literal>) is given by:

<programlisting> x_new = xx * x + xy * y + x0; y_new = yx * x + yy * y + y0; </programlisting>

The current transformation matrix of a cairo_t, represented as a cairo_matrix_t, defines the transformation from user-space coordinates to device-space coordinates. See cairo_get_matrix() and cairo_set_matrix().

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

References matrix().

Referenced by cairo_matrix_invert().

◆ _cairo_matrix_to_pixman_matrix()

◆ _cairo_matrix_to_pixman_matrix_offset()

cairo_status_t _cairo_matrix_to_pixman_matrix_offset ( const cairo_matrix_t matrix,
cairo_filter_t  filter,
double  xc,
double  yc,
pixman_transform_t out_transform,
int x_offset,
int y_offset 
)

_cairo_matrix_to_pixman_matrix_offset: @matrix: a matrix @filter: the filter to be used on the pattern transformed by @matrix @xc: the X coordinate of the point to fix in pattern space @yc: the Y coordinate of the point to fix in pattern space @out_transform: the transformation which best approximates @matrix @x_offset: the translation in the X direction @y_offset: the translation in the Y direction

This function tries to represent @matrix translated by (x_offset, y_offset) as a pixman_transform_t and an translation.

Passing a non-zero value in x_offset/y_offset has the same effect as applying cairo_matrix_translate(matrix, x_offset, y_offset) and setting x_offset and y_offset to 0.

If it is possible to represent the matrix with an identity pixman_transform_t and a translation within the valid range for pixman, this function will set @out_transform to be the identity, @x_offset and @y_offset to be the translation vector and will return CAIRO_INT_STATUS_NOTHING_TO_DO. Otherwise it will try to evenly divide the translational component of @matrix between @out_transform and (@x_offset, @y_offset).

Upon return x_offset and y_offset contain the translation vector.

Return value: CAIRO_INT_STATUS_NOTHING_TO_DO if the out_transform is the identity, CAIRO_STATUS_INVALID_MATRIX if it was not possible to represent @matrix as a pixman_transform_t without overflows, CAIRO_STATUS_SUCCESS otherwise.

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

References _cairo_matrix_is_pixman_translation(), _cairo_matrix_to_pixman_matrix(), CAIRO_INT_STATUS_NOTHING_TO_DO, cairo_matrix_translate(), DBL_EPSILON, den, fabs, filter, floor, i, j, m, matrix(), MAX, gen-unicode-tables::norm, pixman_identity_transform, cordic::x, x_offset, y, and y_offset.

Referenced by _cairo_xcb_picture_set_matrix(), _pixman_image_for_gradient(), _pixman_image_set_properties(), embedded_source(), picture_set_matrix(), and subsurface_source().

◆ _cairo_matrix_transform_bounding_box()

◆ _cairo_matrix_transform_bounding_box_fixed()

◆ _cairo_matrix_transformed_circle_major_axis()

◆ _pixman_nearest_sample()

static double _pixman_nearest_sample ( double  d)
inlinestatic

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

References ceil(), and d.

Referenced by _cairo_matrix_is_pixman_translation().

◆ cairo_matrix_init()

void cairo_matrix_init ( cairo_matrix_t matrix,
double  xx,
double  yx,
double  xy,
double  yy,
double  x0,
double  y0 
)

cairo_matrix_init: @matrix: a cairo_matrix_t @xx: xx component of the affine transformation @yx: yx component of the affine transformation @xy: xy component of the affine transformation @yy: yy component of the affine transformation @x0: X translation component of the affine transformation @y0: Y translation component of the affine transformation

Sets @matrix to be the affine transformation given by @xx, @yx, @xy, @yy, @x0, @y0. The transformation is given by: <programlisting> x_new = xx * x + xy * y + x0; y_new = yx * x + yy * y + y0; </programlisting>

Since: 1.0

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

References matrix(), x0, xx, y0, and yy.

Referenced by _cairo_ft_unscaled_font_set_scale(), _cairo_gl_gradient_operand_init(), _cairo_matrix_compute_adjoint(), _cairo_pdf_surface_create_for_stream_internal(), _cairo_pdf_surface_emit_gradient(), _cairo_pdf_surface_emit_mesh_pattern(), _cairo_pdf_surface_emit_surface_pattern(), _cairo_ps_surface_create_for_stream_internal(), _cairo_ps_surface_emit_recording_surface(), _cairo_scaled_font_init(), _cairo_type3_glyph_surface_emit_fallback_image(), _cairo_type3_glyph_surface_emit_image_pattern(), _cairo_win32_printing_surface_paint_linear_pattern(), _compute_transform(), _paint_fallback_image(), cairo_matrix_init_identity(), cairo_matrix_init_rotate(), cairo_matrix_init_scale(), cairo_matrix_init_translate(), cairo_ps_surface_set_size(), CairoImageOutputDev::getBBox(), i965_shader_acquire_linear(), renderPage(), and CairoOutputDev::tilingPatternFill().

◆ cairo_matrix_init_identity()

◆ cairo_matrix_init_rotate()

void cairo_matrix_init_rotate ( cairo_matrix_t matrix,
double  radians 
)

cairo_matrix_init_rotate: @matrix: a cairo_matrix_t @radians: angle of rotation, in radians. The direction of rotation is defined such that positive angles rotate in the direction from the positive X axis toward the positive Y axis. With the default axis orientation of cairo, positive angles rotate in a clockwise direction.

Initialized @matrix to a transformation that rotates by @radians.

Since: 1.0

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

References c, cairo_matrix_init(), cos(), matrix(), s, and sin().

Referenced by _cairo_gstate_rotate(), and cairo_matrix_rotate().

◆ cairo_matrix_init_scale()

void cairo_matrix_init_scale ( cairo_matrix_t matrix,
double  sx,
double  sy 
)

◆ cairo_matrix_init_translate()

void cairo_matrix_init_translate ( cairo_matrix_t matrix,
double  tx,
double  ty 
)

cairo_matrix_init_translate: @matrix: a cairo_matrix_t @tx: amount to translate in the X direction @ty: amount to translate in the Y direction

Initializes @matrix to a transformation that translates by @tx and @ty in the X and Y dimensions, respectively.

Since: 1.0

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

References cairo_matrix_init(), and matrix().

Referenced by _cairo_default_context_set_source_surface(), _cairo_gl_gradient_operand_init(), _cairo_gl_subsurface_clone_operand_init(), _cairo_gl_surface_draw_image(), _cairo_gstate_transform_glyphs_to_backend(), _cairo_gstate_translate(), _cairo_mask_compositor_fill(), _cairo_mask_compositor_glyphs(), _cairo_mask_compositor_stroke(), _cairo_pdf_surface_add_padded_image_surface(), _cairo_pdf_surface_emit_surface_pattern(), _cairo_ps_surface_create_padded_image_from_image(), _cairo_ps_surface_emit_eps(), _cairo_ps_surface_emit_surface_pattern(), _cairo_shape_mask_compositor_fill(), _cairo_shape_mask_compositor_glyphs(), _cairo_shape_mask_compositor_stroke(), _cairo_surface_offset_fill(), _cairo_surface_offset_glyphs(), _cairo_surface_offset_mask(), _cairo_surface_offset_paint(), _cairo_surface_offset_stroke(), _cairo_surface_subsurface_acquire_source_image(), _cairo_surface_subsurface_snapshot(), _cairo_surface_unmap_image(), _cairo_win32_printing_surface_acquire_image_pattern(), _cairo_xcb_surface_render_fill_via_mask(), _cairo_xcb_surface_render_glyphs_via_mask(), _cairo_xcb_surface_render_stroke_via_mask(), _composite_boxes(), _get_image_surface(), cairo_mask_surface(), cairo_matrix_translate(), composite_one_color_glyph(), CairoOutputDev::drawImage(), CairoOutputDev::drawImageMaskPrescaled(), CairoOutputDev::drawImageMaskRegular(), CairoOutputDev::drawMaskedImage(), CairoOutputDev::drawSoftMaskedImage(), i915_surface_extract_X_from_Y(), i915_surface_mask_internal(), i965_shader_acquire_solid_surface(), i965_shader_acquire_surface(), i965_surface_mask_internal(), record_source(), record_to_picture(), render_glyphs_via_mask(), CairoOutputDev::setSoftMask(), subsurface_source(), surface_source(), and traps_to_operand().

◆ cairo_matrix_invert()

cairo_status_t cairo_matrix_invert ( cairo_matrix_t matrix)

cairo_matrix_invert: @matrix: a cairo_matrix_t

Changes @matrix to be the inverse of its original value. Not all transformation matrices have inverses; if the matrix collapses points together (it is <firstterm>degenerate</firstterm>), then it has no inverse and this function will fail.

Returns: If @matrix has an inverse, modifies @matrix to be the inverse matrix and returns CAIRO_STATUS_SUCCESS. Otherwise, returns CAIRO_STATUS_INVALID_MATRIX.

Since: 1.0

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

References _cairo_error(), _cairo_matrix_compute_adjoint(), _cairo_matrix_compute_determinant(), _cairo_matrix_scalar_multiply(), CAIRO_STATUS_INVALID_MATRIX, CAIRO_STATUS_SUCCESS, det(), ISFINITE, and matrix().

Referenced by _analyze_recording_surface_pattern(), _cairo_gstate_set_matrix(), _cairo_gstate_transform(), _cairo_matrix_to_pixman_matrix(), _cairo_mesh_pattern_rasterize(), _cairo_pattern_get_extents(), _cairo_pattern_get_ink_extents(), _cairo_pdf_operators_emit_stroke(), _cairo_pdf_operators_set_text_matrix(), _cairo_pdf_operators_set_text_position(), _cairo_pdf_operators_show_text_glyphs(), _cairo_pdf_surface_emit_combined_smask(), _cairo_pdf_surface_emit_gradient(), _cairo_pdf_surface_emit_mesh_pattern(), _cairo_pdf_surface_emit_surface_pattern(), _cairo_pdf_surface_paint_gradient(), _cairo_pdf_surface_paint_surface_pattern(), _cairo_ps_surface_emit_gradient(), _cairo_ps_surface_emit_mesh_pattern(), _cairo_ps_surface_emit_surface_pattern(), _cairo_ps_surface_paint_gradient(), _cairo_ps_surface_paint_surface(), _cairo_quartz_cairo_repeating_surface_pattern_to_quartz(), _cairo_quartz_setup_gradient_source(), _cairo_quartz_setup_state(), _cairo_scaled_font_init(), _cairo_script_surface_show_text_glyphs(), _cairo_surface_wrapper_fill(), _cairo_surface_wrapper_fill_stroke(), _cairo_surface_wrapper_get_inverse_transform(), _cairo_surface_wrapper_mask(), _cairo_surface_wrapper_paint(), _cairo_surface_wrapper_set_inverse_transform(), _cairo_surface_wrapper_show_text_glyphs(), _cairo_surface_wrapper_stroke(), _cairo_surface_wrapper_tag(), _cairo_svg_surface_emit_composite_recording_pattern(), _cairo_svg_surface_emit_composite_surface_pattern(), _cairo_svg_surface_emit_linear_pattern(), _cairo_svg_surface_emit_radial_pattern(), _cairo_type3_glyph_surface_emit_glyph(), _cairo_type3_glyph_surface_emit_image_pattern(), _cairo_win32_printing_surface_acquire_image_pattern(), _cairo_win32_printing_surface_paint_image_pattern(), _cairo_win32_printing_surface_paint_linear_pattern(), _cairo_win32_printing_surface_paint_recording_pattern(), _cairo_win32_printing_surface_start_page(), _cairo_win32_scaled_font_type1_text_to_glyphs(), _compute_transform(), _pixman_image_for_recording(), _transform_glyph_bitmap(), _vg_set_source_matrix(), cairo_pattern_set_matrix(), cairo_surface_set_device_offset(), cairo_surface_set_device_scale(), CairoOutputDev::functionShadedFill(), PatternToBrushConverter::PatternToBrushConverter(), record_to_picture(), CairoOutputDev::updateCTM(), and CairoOutputDev::updateFont().

◆ cairo_matrix_multiply()

void cairo_matrix_multiply ( cairo_matrix_t result,
const cairo_matrix_t a,
const cairo_matrix_t b 
)

cairo_matrix_multiply:

Returns
: a cairo_matrix_t in which to store the result : a cairo_matrix_t : a cairo_matrix_t

Multiplies the affine transformations in and together and stores the result in

Returns
. The effect of the resulting transformation is to first apply the transformation in to the coordinates and then apply the transformation in to the coordinates.

It is allowable for

Returns
to be identical to either or .

Since: 1.0

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

References a, b, r, and check-static-inits::result.

Referenced by _cairo_cogl_acquire_pattern_texture(), _cairo_cogl_surface_fill(), _cairo_cogl_surface_stroke(), _cairo_ft_resolve_pattern(), _cairo_gl_gradient_operand_init(), _cairo_gl_subsurface_clone_operand_init(), _cairo_gl_subsurface_operand_init(), _cairo_gl_surface_operand_init(), _cairo_gradient_pattern_fit_to_range(), _cairo_gstate_backend_to_user_rectangle(), _cairo_gstate_ensure_scaled_font(), _cairo_gstate_rotate(), _cairo_gstate_scale(), _cairo_gstate_stroke(), _cairo_gstate_tag_begin(), _cairo_gstate_transform(), _cairo_gstate_transform_glyphs_to_backend(), _cairo_gstate_translate(), _cairo_pattern_pretransform(), _cairo_pattern_transform(), _cairo_pdf_operators_emit_stroke(), _cairo_pdf_operators_set_text_matrix(), _cairo_pdf_operators_set_text_position(), _cairo_pdf_operators_show_text_glyphs(), _cairo_pdf_surface_emit_gradient(), _cairo_pdf_surface_emit_mesh_pattern(), _cairo_pdf_surface_emit_surface_pattern(), _cairo_pdf_surface_paint_gradient(), _cairo_pdf_surface_paint_surface_pattern(), _cairo_ps_surface_emit_gradient(), _cairo_ps_surface_emit_mesh_pattern(), _cairo_ps_surface_emit_surface_pattern(), _cairo_ps_surface_paint_gradient(), _cairo_ps_surface_paint_surface(), _cairo_scaled_font_init(), _cairo_surface_offset_stroke(), _cairo_surface_wrapper_fill_stroke(), _cairo_surface_wrapper_get_inverse_transform(), _cairo_surface_wrapper_get_transform(), _cairo_surface_wrapper_stroke(), _cairo_surface_wrapper_tag(), _cairo_svg_surface_emit_transform(), _cairo_type3_glyph_surface_emit_fallback_image(), _cairo_type3_glyph_surface_emit_image_pattern(), _cairo_type3_glyph_surface_show_glyphs(), _cairo_win32_printing_surface_acquire_image_pattern(), _cairo_win32_printing_surface_emit_win32_glyphs(), _cairo_win32_printing_surface_paint_image_pattern(), _cairo_win32_printing_surface_paint_linear_pattern(), _cairo_win32_printing_surface_paint_recording_pattern(), _cairo_win32_printing_surface_stroke(), _render_type3_glyph(), _win32_scaled_font_create(), cairo_matrix_rotate(), cairo_matrix_scale(), cairo_matrix_translate(), composite_aligned_boxes(), i965_shader_acquire_linear(), i965_shader_acquire_surface(), record_source(), record_to_picture(), CairoOutputDev::setSoftMask(), surface_source(), and CairoOutputDev::tilingPatternFill().

◆ cairo_matrix_rotate()

void cairo_matrix_rotate ( cairo_matrix_t matrix,
double  radians 
)

cairo_matrix_rotate: @matrix: a cairo_matrix_t @radians: angle of rotation, in radians. The direction of rotation is defined such that positive angles rotate in the direction from the positive X axis toward the positive Y axis. With the default axis orientation of cairo, positive angles rotate in a clockwise direction.

Applies rotation by @radians to the transformation in @matrix. The effect of the new transformation is to first rotate the coordinates by @radians, then apply the original transformation to the coordinates.

Since: 1.0

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

References cairo_matrix_init_rotate(), cairo_matrix_multiply(), and matrix().

Referenced by _cairo_cogl_acquire_pattern_texture().

◆ cairo_matrix_scale()

◆ cairo_matrix_transform_distance()

void cairo_matrix_transform_distance ( const cairo_matrix_t matrix,
double *  dx,
double *  dy 
)

cairo_matrix_transform_distance: @matrix: a cairo_matrix_t @dx: X component of a distance vector. An in/out parameter @dy: Y component of a distance vector. An in/out parameter

Transforms the distance vector (@dx,@dy) by @matrix. This is similar to cairo_matrix_transform_point() except that the translation components of the transformation are ignored. The calculation of the returned vector is as follows:

<programlisting> dx2 = dx1 * a + dy1 * c; dy2 = dx1 * b + dy1 * d; </programlisting>

Affine transformations are position invariant, so the same vector always transforms to the same vector. If (@x1,@y1) transforms to (@x2,@y2) then (@x1+@dx1,@y1+@dy1) will transform to (@x1+@dx2,@y1+@dy2) for all values of @x1 and @x2.

Since: 1.0

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

References matrix().

Referenced by _cairo_gstate_device_to_user_distance(), _cairo_gstate_user_to_device_distance(), _cairo_matrix_compute_basis_scale_factors(), _cairo_matrix_to_pixman_matrix(), _cairo_pdf_operators_add_glyph(), _cairo_pen_init(), _cairo_scaled_glyph_set_metrics(), _cairo_script_surface_show_text_glyphs(), _cairo_stroker_add_cap(), _cairo_stroker_join(), _cairo_stroker_line_to_dashed(), _cairo_type3_glyph_surface_emit_glyph(), _cairo_win32_printing_surface_start_page(), _cairo_win32_scaled_font_text_to_glyphs(), _cairo_win32_scaled_font_type1_text_to_glyphs(), _compute_face(), _compute_normalized_device_slope(), _do_cairo_gstate_backend_to_user_distance(), _do_cairo_gstate_user_to_backend_distance(), _render_type3_glyph(), add_cap(), cairo_matrix_transform_point(), compute_face(), CairoOutputDev::functionShadedFill(), join(), line_to_dashed(), outer_close(), outer_join(), and CairoOutputDev::tilingPatternFill().

◆ cairo_matrix_transform_point()

void cairo_matrix_transform_point ( const cairo_matrix_t matrix,
double *  x,
double *  y 
)

cairo_matrix_transform_point: @matrix: a cairo_matrix_t @x: X position. An in/out parameter @y: Y position. An in/out parameter

Transforms the point (@x, @y) by @matrix.

Since: 1.0

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

References cairo_matrix_transform_distance(), matrix(), cordic::x, and y.

Referenced by _add_glyph(), _cairo_gl_operand_emit(), _cairo_gstate_device_to_user(), _cairo_gstate_transform_glyphs_to_backend(), _cairo_gstate_user_to_device(), _cairo_matrix_to_pixman_matrix(), _cairo_matrix_transform_bounding_box(), _cairo_mesh_pattern_rasterize(), _cairo_path_fixed_transform_point(), _cairo_path_to_qpainterpath_curve_to(), _cairo_path_to_qpainterpath_line_to(), _cairo_path_to_qpainterpath_move_to(), _cairo_pdf_operators_emit_glyph(), _cairo_pdf_operators_show_text_glyphs(), _cairo_pdf_path_curve_to(), _cairo_pdf_path_line_to(), _cairo_pdf_path_move_to(), _cairo_pdf_path_rectangle(), _cairo_pdf_surface_emit_combined_smask(), _cairo_scaled_glyph_set_metrics(), _cairo_script_surface_show_text_glyphs(), _cairo_surface_wrapper_show_text_glyphs(), _cairo_svg_path_curve_to(), _cairo_svg_path_line_to(), _cairo_svg_path_move_to(), _cairo_user_text_to_glyphs(), _cairo_win32_printing_surface_emit_win32_glyphs(), _cairo_win32_printing_surface_paint_recording_pattern(), _cairo_win32_printing_surface_path_curve_to(), _cairo_win32_printing_surface_path_line_to(), _cairo_win32_printing_surface_path_move_to(), _cairo_win32_surface_emit_glyphs(), _cairo_win32_transform_FIXED_to_fixed(), _do_cairo_gstate_backend_to_user(), _do_cairo_gstate_user_to_backend(), _render_type3_glyph(), _transform_glyph_bitmap(), _vg_curve_to(), _vg_line_to(), _vg_move_to(), i915_emit_glyph_rectangle_general(), i915_span_generic(), i915_span_texture(), and i915_span_texture16().

◆ cairo_matrix_translate()

void cairo_matrix_translate ( cairo_matrix_t matrix,
double  tx,
double  ty 
)

Variable Documentation

◆ pixman_identity_transform

const pixman_transform_t pixman_identity_transform
static
Initial value:
= {{
{1 << 16, 0, 0},
{ 0, 1 << 16, 0},
{ 0, 0, 1 << 16}
}}

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

Referenced by _cairo_matrix_to_pixman_matrix_offset().