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-pattern-private.h File Reference
#include "cairo-error-private.h"
#include "cairo-types-private.h"
#include "cairo-list-private.h"
#include "cairo-surface-private.h"
#include <stdio.h>
Include dependency graph for cairo-pattern-private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _cairo_pattern_observer
 
struct  _cairo_pattern
 
struct  _cairo_solid_pattern
 
struct  _cairo_surface_pattern
 
struct  _cairo_gradient_stop
 
struct  _cairo_gradient_pattern
 
struct  _cairo_linear_pattern
 
struct  _cairo_radial_pattern
 
union  cairo_gradient_pattern_union_t
 
struct  _cairo_mesh_patch
 
struct  _cairo_mesh_pattern
 
struct  _cairo_raster_source_pattern
 
union  cairo_pattern_union_t
 

Typedefs

typedef struct _cairo_pattern_observer cairo_pattern_observer_t
 
typedef struct _cairo_surface_pattern cairo_surface_pattern_t
 
typedef struct _cairo_gradient_stop cairo_gradient_stop_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_mesh_patch cairo_mesh_patch_t
 
typedef struct _cairo_mesh_pattern cairo_mesh_pattern_t
 
typedef struct _cairo_raster_source_pattern cairo_raster_source_pattern_t
 

Enumerations

enum  { CAIRO_PATTERN_NOTIFY_MATRIX = 0x1 , CAIRO_PATTERN_NOTIFY_FILTER = 0x2 , CAIRO_PATTERN_NOTIFY_EXTEND = 0x4 , CAIRO_PATTERN_NOTIFY_OPACITY = 0x9 }
 

Functions

cairo_pattern_t_cairo_pattern_create_in_error (cairo_status_t status)
 
cairo_status_t _cairo_pattern_create_copy (cairo_pattern_t **pattern, const cairo_pattern_t *other)
 
void _cairo_pattern_init (cairo_pattern_t *pattern, cairo_pattern_type_t type)
 
cairo_status_t _cairo_pattern_init_copy (cairo_pattern_t *pattern, const cairo_pattern_t *other)
 
void _cairo_pattern_init_static_copy (cairo_pattern_t *pattern, const cairo_pattern_t *other)
 
cairo_status_t _cairo_pattern_init_snapshot (cairo_pattern_t *pattern, const cairo_pattern_t *other)
 
void _cairo_pattern_init_solid (cairo_solid_pattern_t *pattern, const cairo_color_t *color)
 
void _cairo_pattern_init_for_surface (cairo_surface_pattern_t *pattern, cairo_surface_t *surface)
 
void _cairo_pattern_fini (cairo_pattern_t *pattern)
 
cairo_pattern_t_cairo_pattern_create_solid (const cairo_color_t *color)
 
void _cairo_pattern_transform (cairo_pattern_t *pattern, const cairo_matrix_t *ctm_inverse)
 
void _cairo_pattern_pretransform (cairo_pattern_t *pattern, const cairo_matrix_t *ctm)
 
cairo_bool_t _cairo_pattern_is_opaque_solid (const cairo_pattern_t *pattern)
 
cairo_bool_t _cairo_pattern_is_opaque (const cairo_pattern_t *pattern, const cairo_rectangle_int_t *extents)
 
cairo_bool_t _cairo_pattern_is_clear (const cairo_pattern_t *pattern)
 
cairo_bool_t _cairo_gradient_pattern_is_solid (const cairo_gradient_pattern_t *gradient, const cairo_rectangle_int_t *extents, cairo_color_t *color)
 
cairo_bool_t _cairo_pattern_is_constant_alpha (const cairo_pattern_t *abstract_pattern, const cairo_rectangle_int_t *extents, double *alpha)
 
void _cairo_gradient_pattern_fit_to_range (const cairo_gradient_pattern_t *gradient, double max_value, cairo_matrix_t *out_matrix, cairo_circle_double_t out_circle[2])
 
cairo_bool_t _cairo_radial_pattern_focus_is_inside (const cairo_radial_pattern_t *radial)
 
void _cairo_gradient_pattern_box_to_parameter (const cairo_gradient_pattern_t *gradient, double x0, double y0, double x1, double y1, double tolerance, double out_range[2])
 
void _cairo_gradient_pattern_interpolate (const cairo_gradient_pattern_t *gradient, double t, cairo_circle_double_t *out_circle)
 
void _cairo_pattern_alpha_range (const cairo_pattern_t *pattern, double *out_min, double *out_max)
 
cairo_bool_t _cairo_mesh_pattern_coord_box (const cairo_mesh_pattern_t *mesh, double *out_xmin, double *out_ymin, double *out_xmax, double *out_ymax)
 
void _cairo_pattern_sampled_area (const cairo_pattern_t *pattern, const cairo_rectangle_int_t *extents, cairo_rectangle_int_t *sample)
 
void _cairo_pattern_get_extents (const cairo_pattern_t *pattern, cairo_rectangle_int_t *extents, cairo_bool_t is_vector)
 
cairo_int_status_t _cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern, cairo_rectangle_int_t *extents)
 
unsigned long _cairo_pattern_hash (const cairo_pattern_t *pattern)
 
unsigned long _cairo_linear_pattern_hash (unsigned long hash, const cairo_linear_pattern_t *linear)
 
unsigned long _cairo_radial_pattern_hash (unsigned long hash, const cairo_radial_pattern_t *radial)
 
cairo_bool_t _cairo_linear_pattern_equal (const cairo_linear_pattern_t *a, const cairo_linear_pattern_t *b)
 
unsigned long _cairo_pattern_size (const cairo_pattern_t *pattern)
 
cairo_bool_t _cairo_radial_pattern_equal (const cairo_radial_pattern_t *a, const cairo_radial_pattern_t *b)
 
cairo_bool_t _cairo_pattern_equal (const cairo_pattern_t *a, const cairo_pattern_t *b)
 
cairo_filter_t _cairo_pattern_analyze_filter (const cairo_pattern_t *pattern)
 
void _cairo_mesh_pattern_rasterize (const cairo_mesh_pattern_t *mesh, void *data, int width, int height, int stride, double x_offset, double y_offset)
 
cairo_surface_t_cairo_raster_source_pattern_acquire (const cairo_pattern_t *abstract_pattern, cairo_surface_t *target, const cairo_rectangle_int_t *extents)
 
void _cairo_raster_source_pattern_release (const cairo_pattern_t *abstract_pattern, cairo_surface_t *surface)
 
cairo_status_t _cairo_raster_source_pattern_snapshot (cairo_pattern_t *abstract_pattern)
 
cairo_status_t _cairo_raster_source_pattern_init_copy (cairo_pattern_t *pattern, const cairo_pattern_t *other)
 
void _cairo_raster_source_pattern_finish (cairo_pattern_t *abstract_pattern)
 
void _cairo_debug_print_pattern (FILE *file, const cairo_pattern_t *pattern)
 

Typedef Documentation

◆ cairo_gradient_pattern_t

◆ cairo_gradient_stop_t

◆ cairo_linear_pattern_t

◆ cairo_mesh_patch_t

◆ cairo_mesh_pattern_t

◆ cairo_pattern_observer_t

Definition at line 1 of file cairo-pattern-private.h.

◆ cairo_radial_pattern_t

◆ cairo_raster_source_pattern_t

◆ cairo_surface_pattern_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CAIRO_PATTERN_NOTIFY_MATRIX 
CAIRO_PATTERN_NOTIFY_FILTER 
CAIRO_PATTERN_NOTIFY_EXTEND 
CAIRO_PATTERN_NOTIFY_OPACITY 

Definition at line 50 of file cairo-pattern-private.h.

Function Documentation

◆ _cairo_debug_print_pattern()

◆ _cairo_gradient_pattern_box_to_parameter()

void _cairo_gradient_pattern_box_to_parameter ( const cairo_gradient_pattern_t gradient,
double  x0,
double  y0,
double  x1,
double  y1,
double  tolerance,
double  out_range[2] 
)

_cairo_gradient_pattern_box_to_parameter:

Compute a interpolation range sufficient to draw (within the given tolerance) the gradient in the given box getting the same result as using the (-inf, +inf) range.

Assumes that the pattern is not degenerate. This can be guaranteed by simplifying it to a solid clear if _cairo_pattern_is_clear or to a solid color if _cairo_gradient_pattern_is_solid.

The range isn't guaranteed to be minimal, but it tries to.

Definition at line 2644 of file cairo-pattern.c.

References _cairo_linear_pattern_box_to_parameter(), _cairo_radial_pattern_box_to_parameter(), assert(), CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_RADIAL, tolerance, x0, x1, y0, and y1.

Referenced by _cairo_pdf_surface_emit_gradient(), _cairo_ps_surface_emit_gradient(), and CairoQuartzCreateGradientFunction().

◆ _cairo_gradient_pattern_fit_to_range()

void _cairo_gradient_pattern_fit_to_range ( const cairo_gradient_pattern_t gradient,
double  max_value,
cairo_matrix_t out_matrix,
cairo_circle_double_t  out_circle[2] 
)

_cairo_gradient_pattern_fit_to_range:

Scale the extremes of a gradient to guarantee that the coordinates and their deltas are within the range (-max_value, max_value). The new extremes are stored in out_circle.

The pattern matrix is scaled to guarantee that the aspect of the gradient is the same and the result is stored in out_matrix.

Definition at line 2707 of file cairo-pattern.c.

References assert(), cairo_matrix_init_scale(), cairo_matrix_multiply(), CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_RADIAL, _cairo_radial_pattern::cd1, _cairo_radial_pattern::cd2, _cairo_circle_double::center, fabs, linear, MAX, _cairo_circle_double::radius, scale, unlikely, _cairo_point_double::x, and _cairo_point_double::y.

Referenced by _cairo_gl_gradient_operand_init(), _cairo_xcb_linear_picture(), _cairo_xcb_radial_picture(), _pixman_image_for_gradient(), and gradient_source().

◆ _cairo_gradient_pattern_interpolate()

void _cairo_gradient_pattern_interpolate ( const cairo_gradient_pattern_t gradient,
double  t,
cairo_circle_double_t out_circle 
)

_cairo_gradient_pattern_interpolate:

Interpolate between the start and end objects of linear or radial gradients. The interpolated object is stored in out_circle, with the radius being zero in the linear gradient case.

Definition at line 2670 of file cairo-pattern.c.

References assert(), CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_RADIAL, _cairo_radial_pattern::cd1, _cairo_radial_pattern::cd2, _cairo_circle_double::center, lerp, linear, _cairo_circle_double::radius, _cairo_point_double::x, and _cairo_point_double::y.

Referenced by _cairo_pdf_surface_emit_gradient(), _cairo_ps_surface_emit_gradient(), and CairoQuartzCreateGradientFunction().

◆ _cairo_gradient_pattern_is_solid()

cairo_bool_t _cairo_gradient_pattern_is_solid ( const cairo_gradient_pattern_t gradient,
const cairo_rectangle_int_t extents,
cairo_color_t color 
)

_cairo_gradient_pattern_is_solid:

Convenience function to determine whether a gradient pattern is a solid color within the given extents. In this case the color argument is initialized to the color the pattern represents. This functions doesn't handle completely transparent gradients, thus it should be called only after _cairo_pattern_is_clear has returned FALSE.

Return value: TRUE if the pattern is a solid color.

Definition at line 3083 of file cairo-pattern.c.

References _cairo_color_init_rgba(), _cairo_color_stop_equal(), _cairo_linear_pattern_box_to_parameter(), _gradient_color_average(), _linear_pattern_is_degenerate(), pixman_color::alpha, assert(), pixman_color::blue, CAIRO_EXTEND_NONE, CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_RADIAL, pixman_gradient_stop::color, FALSE, pixman_color::green, i, linear, gradient::n_stops, NULL, pixman_color::red, gradient::stops, and TRUE.

Referenced by _cairo_gstate_copy_pattern().

◆ _cairo_linear_pattern_equal()

cairo_bool_t _cairo_linear_pattern_equal ( const cairo_linear_pattern_t a,
const cairo_linear_pattern_t b 
)

Definition at line 4016 of file cairo-pattern.c.

References _cairo_gradient_color_stops_equal(), a, b, and FALSE.

Referenced by _linear_pattern_cache_entry_equal().

◆ _cairo_linear_pattern_hash()

unsigned long _cairo_linear_pattern_hash ( unsigned long  hash,
const cairo_linear_pattern_t linear 
)

◆ _cairo_mesh_pattern_coord_box()

cairo_bool_t _cairo_mesh_pattern_coord_box ( const cairo_mesh_pattern_t mesh,
double *  out_xmin,
double *  out_ymin,
double *  out_xmax,
double *  out_ymax 
)

_cairo_mesh_pattern_coord_box:

Convenience function to determine the range of the coordinates of the points used to define the patches of the mesh.

This is guaranteed to contain the pattern extents, but might not be tight, just like a Bezier curve is always inside the convex hull of the control points.

This function cannot be used while the mesh is being constructed.

The function returns TRUE and sets the output parametes to define the coodrinate range if the mesh pattern contains at least one patch, otherwise it returns FALSE.

Definition at line 3030 of file cairo-pattern.c.

References _cairo_array_index_const(), _cairo_array_num_elements(), assert(), _cairo_mesh_pattern::current_patch, FALSE, i, j, k, MAX, MIN, NULL, _cairo_mesh_pattern::patches, points, _cairo_mesh_patch::points, TRUE, cordic::x, _cairo_point_double::x, x0, x1, y, _cairo_point_double::y, y0, and y1.

Referenced by _cairo_pdf_shading_generate_decode_array().

◆ _cairo_mesh_pattern_rasterize()

void _cairo_mesh_pattern_rasterize ( const cairo_mesh_pattern_t mesh,
void data,
int  width,
int  height,
int  stride,
double  x_offset,
double  y_offset 
)

Definition at line 879 of file cairo-mesh-pattern-rasterizer.c.

◆ _cairo_pattern_alpha_range()

void _cairo_pattern_alpha_range ( const cairo_pattern_t pattern,
double *  out_min,
double *  out_max 
)

_cairo_pattern_alpha_range:

Convenience function to determine the minimum and maximum alpha in the drawn part of a pattern (i.e. ignoring clear parts caused by extend modes and/or pattern shape).

If not NULL, out_min and out_max will be set respectively to the minimum and maximum alpha value of the pattern.

Definition at line 2945 of file cairo-pattern.c.

References _cairo_array_index_const(), _cairo_array_num_elements(), alpha, _cairo_color::alpha, pixman_color::alpha, assert(), ASSERT_NOT_REACHED, CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_MESH, CAIRO_PATTERN_TYPE_RADIAL, CAIRO_PATTERN_TYPE_RASTER_SOURCE, CAIRO_PATTERN_TYPE_SOLID, CAIRO_PATTERN_TYPE_SURFACE, _cairo_solid_pattern::color, pixman_gradient_stop::color, colors, _cairo_mesh_patch::colors, i, j, n, gradient::n_stops, _cairo_mesh_pattern::patches, gradient::stops, and pattern::type.

Referenced by _cairo_pdf_surface_add_pdf_pattern_or_shading(), _cairo_ps_surface_analyze_operation(), and _gradient_pattern_supported().

◆ _cairo_pattern_analyze_filter()

cairo_filter_t _cairo_pattern_analyze_filter ( const cairo_pattern_t pattern)

_cairo_pattern_analyze_filter: @pattern: surface pattern Returns: the optimized cairo_filter_t to use with @pattern.

Possibly optimize the filter to a simpler value depending on transformation

Definition at line 3424 of file cairo-pattern.c.

References _cairo_matrix_is_pixel_exact(), CAIRO_FILTER_BEST, CAIRO_FILTER_BILINEAR, CAIRO_FILTER_FAST, CAIRO_FILTER_GAUSSIAN, CAIRO_FILTER_GOOD, CAIRO_FILTER_NEAREST, and use_bilinear().

Referenced by _cairo_composite_reduce_pattern().

◆ _cairo_pattern_create_copy()

◆ _cairo_pattern_create_in_error()

◆ _cairo_pattern_create_solid()

◆ _cairo_pattern_equal()

◆ _cairo_pattern_fini()

void _cairo_pattern_fini ( cairo_pattern_t pattern)

Definition at line 434 of file cairo-pattern.c.

References _cairo_array_fini(), _cairo_raster_source_pattern_finish(), _cairo_user_data_array_fini(), CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_MESH, CAIRO_PATTERN_TYPE_RADIAL, CAIRO_PATTERN_TYPE_RASTER_SOURCE, CAIRO_PATTERN_TYPE_SOLID, CAIRO_PATTERN_TYPE_SURFACE, cairo_surface_destroy(), free, _cairo_mesh_pattern::patches, gradient::stops, _cairo_surface_pattern::surface, and pattern::type.

Referenced by _blit_texture_to_renderbuffer(), _cairo_default_context_paint_with_alpha(), _cairo_gl_subsurface_clone_operand_init(), _cairo_gl_surface_draw_image(), _cairo_image_surface_clone_subimage(), _cairo_mask_compositor_fill(), _cairo_mask_compositor_glyphs(), _cairo_mask_compositor_stroke(), _cairo_pdf_surface_add_padded_image_surface(), _cairo_pdf_surface_emit_image(), _cairo_ps_surface_create_padded_image_from_image(), _cairo_ps_surface_emit_image(), _cairo_ps_surface_flatten_image_transparency(), _cairo_recording_surface_copy__fill(), _cairo_recording_surface_copy__glyphs(), _cairo_recording_surface_copy__mask(), _cairo_recording_surface_copy__paint(), _cairo_recording_surface_copy__stroke(), _cairo_recording_surface_copy__tag(), _cairo_recording_surface_fill(), _cairo_recording_surface_finish(), _cairo_recording_surface_mask(), _cairo_recording_surface_paint(), _cairo_recording_surface_show_text_glyphs(), _cairo_recording_surface_stroke(), _cairo_recording_surface_tag(), _cairo_script_implicit_context_reset(), _cairo_script_surface_finish(), _cairo_shape_mask_compositor_fill(), _cairo_shape_mask_compositor_glyphs(), _cairo_shape_mask_compositor_stroke(), _cairo_surface_subsurface_acquire_source_image(), _cairo_surface_subsurface_snapshot(), _cairo_surface_unmap_image(), _cairo_win32_printing_surface_paint_image_pattern(), _cairo_win32_printing_surface_release_image_pattern(), _cairo_xcb_surface_render_fill_via_mask(), _cairo_xcb_surface_render_glyphs_via_mask(), _cairo_xcb_surface_render_stroke_via_mask(), _cairo_xlib_surface_add_glyph(), _composite_boxes(), _emit_source(), _get_image_surface(), _intel_gradient_cache_fini(), _paint_fallback_image(), _paint_thumbnail_image(), _pattern_cache_entry_destroy(), _transform_glyph_bitmap(), fixup_unbounded_mask(), get_clip_source(), i915_surface_extract_X_from_Y(), i965_shader_acquire_solid_surface(), i965_shader_acquire_surface(), i965_surface_enable_scan_out(), intel_gradient_render(), render_glyphs_via_mask(), subsurface_source(), surface_source(), and traps_to_operand().

◆ _cairo_pattern_get_extents()

void _cairo_pattern_get_extents ( const cairo_pattern_t pattern,
cairo_rectangle_int_t extents,
cairo_bool_t  is_vector 
)

_cairo_pattern_get_extents:

Return the "target-space" extents of @pattern in @extents.

For unbounded patterns, the @extents will be initialized with "infinite" extents, (minimum and maximum fixed-point values).

When is_vector is TRUE, avoid rounding to zero widths or heights that are less than 1 unit.

XXX: Currently, bounded gradient patterns will also return "infinite" extents, though it would be possible to optimize these with a little more work.

Definition at line 3588 of file cairo-pattern.c.

References _cairo_hypot(), _cairo_lround(), _cairo_matrix_is_translation(), _cairo_matrix_transform_bounding_box(), _cairo_mesh_pattern_coord_box(), _cairo_surface_get_extents(), _cairo_unbounded_rectangle_init(), _linear_pattern_is_degenerate(), _radial_pattern_is_degenerate(), assert(), ASSERT_NOT_REACHED, CAIRO_EXTEND_NONE, CAIRO_FILTER_BEST, CAIRO_FILTER_BILINEAR, CAIRO_FILTER_FAST, CAIRO_FILTER_GAUSSIAN, CAIRO_FILTER_GOOD, CAIRO_FILTER_NEAREST, cairo_matrix_invert(), CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_MESH, CAIRO_PATTERN_TYPE_RADIAL, CAIRO_PATTERN_TYPE_RASTER_SOURCE, CAIRO_PATTERN_TYPE_SOLID, CAIRO_PATTERN_TYPE_SURFACE, CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MIN, CAIRO_STATUS_SUCCESS, _cairo_radial_pattern::cd1, _cairo_radial_pattern::cd2, _cairo_circle_double::center, EMPTY, FALSE, _cairo_rectangle_int::height, int(), ix1, ix2, iy1, iy2, linear, MAX, MIN, NULL, r1, r2, _cairo_circle_double::radius, raster, status, _cairo_surface_pattern::surface, surface, TRUE, pattern::type, _cairo_rectangle_int::width, _cairo_point_double::x, _cairo_rectangle_int::x, x1, x2, _cairo_point_double::y, _cairo_rectangle_int::y, y1, and y2.

Referenced by _cairo_analysis_surface_mask(), _cairo_analysis_surface_operation_extents(), _cairo_composite_rectangles_init(), and _cairo_composite_rectangles_init_for_mask().

◆ _cairo_pattern_get_ink_extents()

◆ _cairo_pattern_hash()

◆ _cairo_pattern_init()

◆ _cairo_pattern_init_copy()

◆ _cairo_pattern_init_for_surface()

void _cairo_pattern_init_for_surface ( cairo_surface_pattern_t pattern,
cairo_surface_t surface 
)

Definition at line 545 of file cairo-pattern.c.

References _cairo_pattern_init(), _cairo_pattern_set_error(), CAIRO_PATTERN_TYPE_SOLID, CAIRO_PATTERN_TYPE_SURFACE, cairo_surface_reference(), _cairo_surface::status, and surface.

Referenced by _blit_texture_to_renderbuffer(), _cairo_gl_subsurface_clone_operand_init(), _cairo_gl_surface_draw_image(), _cairo_image_surface_clone_subimage(), _cairo_mask_compositor_fill(), _cairo_mask_compositor_glyphs(), _cairo_mask_compositor_stroke(), _cairo_pdf_surface_add_padded_image_surface(), _cairo_pdf_surface_emit_image(), _cairo_ps_surface_create_padded_image_from_image(), _cairo_ps_surface_emit_image(), _cairo_ps_surface_flatten_image_transparency(), _cairo_shape_mask_compositor_fill(), _cairo_shape_mask_compositor_glyphs(), _cairo_shape_mask_compositor_stroke(), _cairo_surface_subsurface_acquire_source_image(), _cairo_surface_subsurface_snapshot(), _cairo_surface_unmap_image(), _cairo_win32_printing_surface_acquire_image_pattern(), _cairo_win32_printing_surface_paint_image_pattern(), _cairo_xcb_surface_render_fill_via_mask(), _cairo_xcb_surface_render_glyphs_via_mask(), _cairo_xcb_surface_render_stroke_via_mask(), _cairo_xlib_surface_add_glyph(), _composite_boxes(), _get_image_surface(), _paint_fallback_image(), _paint_thumbnail_image(), _transform_glyph_bitmap(), fixup_unbounded_mask(), get_clip_source(), i915_surface_extract_X_from_Y(), i965_shader_acquire_solid_surface(), i965_shader_acquire_surface(), i965_surface_enable_scan_out(), render_glyphs_via_mask(), subsurface_source(), surface_source(), and traps_to_operand().

◆ _cairo_pattern_init_snapshot()

◆ _cairo_pattern_init_solid()

◆ _cairo_pattern_init_static_copy()

◆ _cairo_pattern_is_clear()

◆ _cairo_pattern_is_constant_alpha()

cairo_bool_t _cairo_pattern_is_constant_alpha ( const cairo_pattern_t abstract_pattern,
const cairo_rectangle_int_t extents,
double *  alpha 
)

_cairo_pattern_is_constant_alpha:

Convenience function to determine whether a pattern has constant alpha within the given extents. In this case the alpha argument is initialized to the alpha within the extents.

Return value: TRUE if the pattern has constant alpha.

Definition at line 3147 of file cairo-pattern.c.

References _cairo_gradient_pattern_is_solid(), _cairo_pattern_is_clear(), _cairo_pattern_is_opaque(), alpha, ASSERT_NOT_REACHED, CAIRO_PATTERN_TYPE_LINEAR, CAIRO_PATTERN_TYPE_MESH, CAIRO_PATTERN_TYPE_RADIAL, CAIRO_PATTERN_TYPE_RASTER_SOURCE, CAIRO_PATTERN_TYPE_SOLID, CAIRO_PATTERN_TYPE_SURFACE, FALSE, pattern, TRUE, and pattern::type.

Referenced by _cairo_pdf_surface_mask().

◆ _cairo_pattern_is_opaque()

◆ _cairo_pattern_is_opaque_solid()

cairo_bool_t _cairo_pattern_is_opaque_solid ( const cairo_pattern_t pattern)

_cairo_pattern_is_opaque_solid:

Convenience function to determine whether a pattern is an opaque (alpha==1.0) solid color pattern. This is done by testing whether the pattern's alpha value when converted to a byte is 255, so if a backend actually supported deep alpha channels this function might not do the right thing.

Return value: TRUE if the pattern is an opaque, solid color.

Definition at line 3218 of file cairo-pattern.c.

References CAIRO_COLOR_IS_OPAQUE, CAIRO_PATTERN_TYPE_SOLID, _cairo_solid_pattern::color, FALSE, and pattern::type.

Referenced by _cairo_cogl_surface_paint(), _cairo_composite_rectangles_init_for_glyphs(), _cairo_gl_surface_paint(), _cairo_image_source_create_for_pattern(), _cairo_recording_surface_paint(), _cairo_win32_surface_emit_glyphs(), check_glyphs(), mono_renderer_init(), and reduce_alpha_op().

◆ _cairo_pattern_pretransform()

void _cairo_pattern_pretransform ( cairo_pattern_t pattern,
const cairo_matrix_t ctm 
)

Definition at line 2133 of file cairo-pattern.c.

References cairo_matrix_multiply().

Referenced by _cairo_gstate_copy_transformed_pattern().

◆ _cairo_pattern_sampled_area()

void _cairo_pattern_sampled_area ( const cairo_pattern_t pattern,
const cairo_rectangle_int_t extents,
cairo_rectangle_int_t sample 
)

_cairo_pattern_sampled_area:

Return region of @pattern that will be sampled to fill @extents, based on the transformation and filter.

This does not include pixels that are mulitiplied by values very close to zero by the ends of filters. This is so that transforms that should be the identity or 90 degree rotations do not expand the source unexpectedly.

XXX: We don't actually have any way of querying the backend for the filter radius, so we just guess base on what we know that backends do currently (see bug #10508)

Definition at line 3492 of file cairo-pattern.c.

References _cairo_hypot(), _cairo_matrix_is_identity(), _cairo_matrix_transform_bounding_box(), CAIRO_FILTER_BEST, CAIRO_FILTER_BILINEAR, CAIRO_FILTER_FAST, CAIRO_FILTER_GAUSSIAN, CAIRO_FILTER_GOOD, CAIRO_FILTER_NEAREST, CAIRO_RECT_INT_MAX, CAIRO_RECT_INT_MIN, floor, _cairo_rectangle_int::height, NULL, _cairo_rectangle_int::width, _cairo_rectangle_int::x, x1, x2, _cairo_rectangle_int::y, y1, and y2.

Referenced by _cairo_composite_rectangles_init_for_paint(), _cairo_composite_rectangles_intersect(), _cairo_composite_rectangles_intersect_mask_extents(), and _cairo_composite_rectangles_intersect_source_extents().

◆ _cairo_pattern_size()

unsigned long _cairo_pattern_size ( const cairo_pattern_t pattern)

◆ _cairo_pattern_transform()

void _cairo_pattern_transform ( cairo_pattern_t pattern,
const cairo_matrix_t ctm_inverse 
)

◆ _cairo_radial_pattern_equal()

cairo_bool_t _cairo_radial_pattern_equal ( const cairo_radial_pattern_t a,
const cairo_radial_pattern_t b 
)

Definition at line 4035 of file cairo-pattern.c.

References _cairo_gradient_color_stops_equal(), a, b, and FALSE.

Referenced by _radial_pattern_cache_entry_equal().

◆ _cairo_radial_pattern_focus_is_inside()

◆ _cairo_radial_pattern_hash()

◆ _cairo_raster_source_pattern_acquire()

cairo_surface_t* _cairo_raster_source_pattern_acquire ( const cairo_pattern_t abstract_pattern,
cairo_surface_t target,
const cairo_rectangle_int_t extents 
)

SECTION:cairo-raster-source @Title: Raster Sources @Short_Description: Supplying arbitrary image data @See_Also: cairo_pattern_t

The raster source provides the ability to supply arbitrary pixel data whilst rendering. The pixels are queried at the time of rasterisation by means of user callback functions, allowing for the ultimate flexibility. For example, in handling compressed image sources, you may keep a MRU cache of decompressed images and decompress sources on the fly and discard old ones to conserve memory.

For the raster source to be effective, you must at least specify the acquire and release callbacks which are used to retrieve the pixel data for the region of interest and demark when it can be freed afterwards. Other callbacks are provided for when the pattern is copied temporarily during rasterisation, or more permanently as a snapshot in order to keep the pixel data available for printing.

Definition at line 63 of file cairo-raster-source-pattern.c.

References NULL, and target.

Referenced by _cairo_pdf_surface_acquire_source_image_from_pattern(), _cairo_ps_surface_acquire_source_surface_from_pattern(), _cairo_recording_surface_merge_source_attributes(), _cairo_win32_printing_surface_acquire_image_pattern(), _emit_raster_pattern(), and _pixman_image_for_raster().

◆ _cairo_raster_source_pattern_finish()

void _cairo_raster_source_pattern_finish ( cairo_pattern_t abstract_pattern)

Definition at line 124 of file cairo-raster-source-pattern.c.

References NULL.

Referenced by _cairo_pattern_fini().

◆ _cairo_raster_source_pattern_init_copy()

cairo_status_t _cairo_raster_source_pattern_init_copy ( cairo_pattern_t pattern,
const cairo_pattern_t other 
)

Definition at line 94 of file cairo-raster-source-pattern.c.

References CAIRO_STATUS_SUCCESS, memcpy, other, status, and VG.

Referenced by _cairo_pattern_init_copy().

◆ _cairo_raster_source_pattern_release()

◆ _cairo_raster_source_pattern_snapshot()

cairo_status_t _cairo_raster_source_pattern_snapshot ( cairo_pattern_t abstract_pattern)

Definition at line 112 of file cairo-raster-source-pattern.c.

References CAIRO_STATUS_SUCCESS, and NULL.

Referenced by _cairo_pattern_init_snapshot().