mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
Rename all the cairo_current functions to cairo_get functions instead. Add documentation for all of these functions (and a few others as well).
Add support so that old binarys should still run and old source should still compile, (though we'll rip that out again on the API Shakeup flag day).
This commit is contained in:
parent
36820ec40a
commit
6d4653fe22
13 changed files with 578 additions and 201 deletions
34
ChangeLog
34
ChangeLog
|
|
@ -1,3 +1,37 @@
|
|||
2005-03-09 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* doc/public/cairo-sections.txt:
|
||||
* src/cairo.c: (cairo_get_pattern), (cairo_get_font),
|
||||
(cairo_get_font_extents), (cairo_get_operator),
|
||||
(cairo_get_rgb_color), (cairo_get_alpha), (cairo_get_tolerance),
|
||||
(cairo_get_current_point), (cairo_get_fill_rule),
|
||||
(cairo_get_line_width), (cairo_get_line_cap),
|
||||
(cairo_get_line_join), (cairo_get_miter_limit), (cairo_get_matrix),
|
||||
(cairo_get_target_surface), (cairo_get_path),
|
||||
(cairo_get_path_flat):
|
||||
* src/cairo.h:
|
||||
* src/cairo_ft_font.c: (_conic_to):
|
||||
* src/cairo_gstate.c: (_cairo_gstate_get_target_surface),
|
||||
(_cairo_gstate_get_pattern), (_cairo_gstate_get_operator),
|
||||
(_cairo_gstate_get_rgb_color), (_cairo_gstate_get_tolerance),
|
||||
(_cairo_gstate_get_alpha), (_cairo_gstate_get_fill_rule),
|
||||
(_cairo_gstate_get_line_width), (_cairo_gstate_get_line_cap),
|
||||
(_cairo_gstate_get_line_join), (_cairo_gstate_get_miter_limit),
|
||||
(_cairo_gstate_get_matrix), (_cairo_gstate_get_current_point),
|
||||
(_cairo_gstate_show_surface), (_cairo_gstate_get_font),
|
||||
(_cairo_gstate_get_font_transform), (_cairo_gstate_get_font_scale),
|
||||
(_cairo_gstate_ensure_font), (_cairo_gstate_get_font_extents),
|
||||
(_cairo_gstate_text_to_glyphs):
|
||||
* src/cairo_path.c: (_cairo_path_get_current_point):
|
||||
* src/cairoint.h:
|
||||
* test/pixman_rotate.c: (draw):Rename all the cairo_current
|
||||
functions to cairo_get functions instead. Add documentation for
|
||||
all of these functions (and a few others as well).
|
||||
|
||||
Add support so that old binarys should still run and old source
|
||||
should still compile, (though we'll rip that out again on the API
|
||||
Shakeup flag day).
|
||||
|
||||
2005-03-08 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* configure.in: Add -head to CAIRO_VERSION after tagging with
|
||||
|
|
|
|||
|
|
@ -198,8 +198,8 @@ cairo_scale_font
|
|||
cairo_transform_font
|
||||
cairo_show_text
|
||||
cairo_show_glyphs
|
||||
cairo_current_font
|
||||
cairo_current_font_extents
|
||||
cairo_get_font
|
||||
cairo_get_font_extents
|
||||
cairo_set_font
|
||||
cairo_text_extents
|
||||
cairo_glyph_extents
|
||||
|
|
@ -210,32 +210,9 @@ cairo_font_destroy
|
|||
cairo_font_extents
|
||||
cairo_font_glyph_extents
|
||||
cairo_show_surface
|
||||
cairo_current_operator
|
||||
cairo_current_rgb_color
|
||||
cairo_current_pattern
|
||||
cairo_current_alpha
|
||||
cairo_current_tolerance
|
||||
cairo_current_point
|
||||
cairo_current_fill_rule
|
||||
cairo_current_line_width
|
||||
cairo_current_line_cap
|
||||
cairo_current_line_join
|
||||
cairo_current_miter_limit
|
||||
cairo_current_matrix
|
||||
cairo_current_target_surface
|
||||
cairo_current_path
|
||||
cairo_current_path_flat
|
||||
cairo_status_t
|
||||
cairo_status
|
||||
cairo_status_string
|
||||
cairo_filter_t
|
||||
cairo_image_surface_create
|
||||
cairo_image_surface_create_for_data
|
||||
<SUBSECTION Private>
|
||||
CAIRO_BEGIN_DECLS
|
||||
CAIRO_END_DECLS
|
||||
cairo_get_operator
|
||||
cairo_get_rgb_color
|
||||
cairo_get_pattern
|
||||
cairo_get_alpha
|
||||
cairo_get_tolerance
|
||||
cairo_get_current_point
|
||||
|
|
@ -246,6 +223,30 @@ cairo_get_line_join
|
|||
cairo_get_miter_limit
|
||||
cairo_get_matrix
|
||||
cairo_get_target_surface
|
||||
cairo_get_path
|
||||
cairo_get_path_flat
|
||||
cairo_status_t
|
||||
cairo_status
|
||||
cairo_status_string
|
||||
cairo_filter_t
|
||||
cairo_image_surface_create
|
||||
cairo_image_surface_create_for_data
|
||||
<SUBSECTION Private>
|
||||
CAIRO_API_SHAKEUP_FLAG_DAY
|
||||
CAIRO_BEGIN_DECLS
|
||||
CAIRO_END_DECLS
|
||||
cairo_current_operator
|
||||
cairo_current_rgb_color
|
||||
cairo_current_alpha
|
||||
cairo_current_tolerance
|
||||
cairo_current_point
|
||||
cairo_current_fill_rule
|
||||
cairo_current_line_width
|
||||
cairo_current_line_cap
|
||||
cairo_current_line_join
|
||||
cairo_current_miter_limit
|
||||
cairo_current_matrix
|
||||
cairo_current_target_surface
|
||||
cairo_get_status
|
||||
cairo_get_status_string
|
||||
</SECTION>
|
||||
|
|
|
|||
|
|
@ -1088,7 +1088,7 @@ _conic_to (FT_Vector *control, FT_Vector *to, void *closure)
|
|||
cairo_point_t p0, p1, p2, p3;
|
||||
cairo_point_t conic;
|
||||
|
||||
_cairo_path_current_point (path, &p0);
|
||||
_cairo_path_get_current_point (path, &p0);
|
||||
|
||||
conic.x = _cairo_fixed_from_26_6 (control->x);
|
||||
conic.y = _cairo_fixed_from_26_6 (control->y);
|
||||
|
|
@ -1422,7 +1422,7 @@ cairo_ft_font_create_for_ft_face (FT_Face face,
|
|||
* @ft_font: A #cairo_font_t from the FreeType font backend. Such an
|
||||
* object can be created with cairo_ft_font_create() or
|
||||
* cairo_ft_font_create_for_ft_face(). On some platforms the font from
|
||||
* cairo_current_font() will also be a FreeType font, but using this
|
||||
* cairo_get_font() will also be a FreeType font, but using this
|
||||
* functionality with fonts you don't create yourself is not
|
||||
* recommended.
|
||||
*
|
||||
|
|
@ -1466,7 +1466,7 @@ cairo_ft_font_lock_face (cairo_font_t *abstract_font)
|
|||
* @ft_font: A #cairo_font_t from the FreeType font backend. Such an
|
||||
* object can be created with cairo_ft_font_create() or
|
||||
* cairo_ft_font_create_for_ft_face(). On some platforms the font from
|
||||
* cairo_current_font() will also be a FreeType font, but using this
|
||||
* cairo_get_font() will also be a FreeType font, but using this
|
||||
* functionality with fonts you don't create yourself is not
|
||||
* recommended.
|
||||
*
|
||||
|
|
@ -1486,7 +1486,7 @@ cairo_ft_font_unlock_face (cairo_font_t *abstract_font)
|
|||
* @ft_font: A #cairo_font_t from the FreeType font backend. Such an
|
||||
* object can be created with cairo_ft_font_create() or
|
||||
* cairo_ft_font_create_for_ft_face(). On some platforms the font from
|
||||
* cairo_current_font() will also be a FreeType font, but using this
|
||||
* cairo_get_font() will also be a FreeType font, but using this
|
||||
* functionality with fonts you don't create yourself is not
|
||||
* recommended.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ _cairo_gstate_set_target_surface (cairo_gstate_t *gstate, cairo_surface_t *surfa
|
|||
/* XXX: Need to decide the memory mangement semantics of this
|
||||
function. Should it reference the surface again? */
|
||||
cairo_surface_t *
|
||||
_cairo_gstate_current_target_surface (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_target_surface (cairo_gstate_t *gstate)
|
||||
{
|
||||
if (gstate == NULL)
|
||||
return NULL;
|
||||
|
|
@ -412,7 +412,7 @@ _cairo_gstate_set_pattern (cairo_gstate_t *gstate, cairo_pattern_t *pattern)
|
|||
}
|
||||
|
||||
cairo_pattern_t *
|
||||
_cairo_gstate_current_pattern (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_pattern (cairo_gstate_t *gstate)
|
||||
{
|
||||
if (gstate == NULL)
|
||||
return NULL;
|
||||
|
|
@ -433,7 +433,7 @@ _cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t operator)
|
|||
}
|
||||
|
||||
cairo_operator_t
|
||||
_cairo_gstate_current_operator (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_operator (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->operator;
|
||||
}
|
||||
|
|
@ -451,7 +451,7 @@ _cairo_gstate_set_rgb_color (cairo_gstate_t *gstate, double red, double green, d
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_rgb_color (cairo_gstate_t *gstate, double *red, double *green, double *blue)
|
||||
_cairo_gstate_get_rgb_color (cairo_gstate_t *gstate, double *red, double *green, double *blue)
|
||||
{
|
||||
return _cairo_pattern_get_rgb (gstate->pattern, red, green, blue);
|
||||
}
|
||||
|
|
@ -465,7 +465,7 @@ _cairo_gstate_set_tolerance (cairo_gstate_t *gstate, double tolerance)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_tolerance (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_tolerance (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->tolerance;
|
||||
}
|
||||
|
|
@ -479,7 +479,7 @@ _cairo_gstate_set_alpha (cairo_gstate_t *gstate, double alpha)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_alpha (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_alpha (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->alpha;
|
||||
}
|
||||
|
|
@ -493,7 +493,7 @@ _cairo_gstate_set_fill_rule (cairo_gstate_t *gstate, cairo_fill_rule_t fill_rule
|
|||
}
|
||||
|
||||
cairo_fill_rule_t
|
||||
_cairo_gstate_current_fill_rule (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_fill_rule (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->fill_rule;
|
||||
}
|
||||
|
|
@ -507,7 +507,7 @@ _cairo_gstate_set_line_width (cairo_gstate_t *gstate, double width)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_line_width (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_line_width (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->line_width;
|
||||
}
|
||||
|
|
@ -521,7 +521,7 @@ _cairo_gstate_set_line_cap (cairo_gstate_t *gstate, cairo_line_cap_t line_cap)
|
|||
}
|
||||
|
||||
cairo_line_cap_t
|
||||
_cairo_gstate_current_line_cap (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_line_cap (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->line_cap;
|
||||
}
|
||||
|
|
@ -535,7 +535,7 @@ _cairo_gstate_set_line_join (cairo_gstate_t *gstate, cairo_line_join_t line_join
|
|||
}
|
||||
|
||||
cairo_line_join_t
|
||||
_cairo_gstate_current_line_join (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_line_join (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->line_join;
|
||||
}
|
||||
|
|
@ -572,13 +572,13 @@ _cairo_gstate_set_miter_limit (cairo_gstate_t *gstate, double limit)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_miter_limit (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_miter_limit (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->miter_limit;
|
||||
}
|
||||
|
||||
void
|
||||
_cairo_gstate_current_matrix (cairo_gstate_t *gstate, cairo_matrix_t *matrix)
|
||||
_cairo_gstate_get_matrix (cairo_gstate_t *gstate, cairo_matrix_t *matrix)
|
||||
{
|
||||
cairo_matrix_copy (matrix, &gstate->ctm);
|
||||
}
|
||||
|
|
@ -1133,13 +1133,13 @@ _cairo_gstate_close_path (cairo_gstate_t *gstate)
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_point (cairo_gstate_t *gstate, double *x_ret, double *y_ret)
|
||||
_cairo_gstate_get_current_point (cairo_gstate_t *gstate, double *x_ret, double *y_ret)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_point_t point;
|
||||
double x, y;
|
||||
|
||||
status = _cairo_path_current_point (&gstate->path, &point);
|
||||
status = _cairo_path_get_current_point (&gstate->path, &point);
|
||||
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
|
||||
x = 0.0;
|
||||
y = 0.0;
|
||||
|
|
@ -2015,7 +2015,7 @@ _cairo_gstate_show_surface (cairo_gstate_t *gstate,
|
|||
cairo_matrix_invert (&image_to_user);
|
||||
cairo_matrix_multiply (&image_to_device, &image_to_user, &gstate->ctm);
|
||||
|
||||
_cairo_gstate_current_point (gstate, &device_x, &device_y);
|
||||
_cairo_gstate_get_current_point (gstate, &device_x, &device_y);
|
||||
device_width = width;
|
||||
device_height = height;
|
||||
_cairo_matrix_transform_bounding_box (&image_to_device,
|
||||
|
|
@ -2147,7 +2147,7 @@ _cairo_gstate_transform_font (cairo_gstate_t *gstate,
|
|||
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_font (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font (cairo_gstate_t *gstate,
|
||||
cairo_font_t **font)
|
||||
{
|
||||
cairo_status_t status;
|
||||
|
|
@ -2171,7 +2171,7 @@ _cairo_gstate_set_font_transform (cairo_gstate_t *gstate,
|
|||
}
|
||||
|
||||
void
|
||||
_cairo_gstate_current_font_transform (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_transform (cairo_gstate_t *gstate,
|
||||
cairo_matrix_t *matrix)
|
||||
{
|
||||
cairo_matrix_copy (matrix, &gstate->font_matrix);
|
||||
|
|
@ -2255,7 +2255,7 @@ _cairo_gstate_current_font_transform (cairo_gstate_t *gstate,
|
|||
*/
|
||||
|
||||
void
|
||||
_cairo_gstate_current_font_scale (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_scale (cairo_gstate_t *gstate,
|
||||
cairo_font_scale_t *sc)
|
||||
{
|
||||
cairo_matrix_t tmp;
|
||||
|
|
@ -2279,7 +2279,7 @@ _cairo_gstate_ensure_font (cairo_gstate_t *gstate)
|
|||
if (gstate->font)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
_cairo_gstate_current_font_scale (gstate, &sc);
|
||||
_cairo_gstate_get_font_scale (gstate, &sc);
|
||||
|
||||
if (gstate->font_family)
|
||||
family = gstate->font_family;
|
||||
|
|
@ -2299,7 +2299,7 @@ _cairo_gstate_ensure_font (cairo_gstate_t *gstate)
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_font_extents (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
|
||||
cairo_font_extents_t *extents)
|
||||
{
|
||||
cairo_status_t status = _cairo_gstate_ensure_font (gstate);
|
||||
|
|
@ -2327,7 +2327,7 @@ _cairo_gstate_text_to_glyphs (cairo_gstate_t *gstate,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
status = _cairo_path_current_point (&gstate->path, &point);
|
||||
status = _cairo_path_get_current_point (&gstate->path, &point);
|
||||
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
|
||||
origin_x = 0.0;
|
||||
origin_y = 0.0;
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ _cairo_path_close_path (cairo_path_t *path)
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_path_current_point (cairo_path_t *path, cairo_point_t *point)
|
||||
_cairo_path_get_current_point (cairo_path_t *path, cairo_point_t *point)
|
||||
{
|
||||
if (! path->has_current_point)
|
||||
return CAIRO_STATUS_NO_CURRENT_POINT;
|
||||
|
|
|
|||
423
src/cairo.c
423
src/cairo.c
|
|
@ -353,6 +353,19 @@ cairo_set_target_image (cairo_t *cr,
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_set_operator:
|
||||
* @cr: a #cairo_t
|
||||
* @op: a compositing operator, specified as a #cairo_operator_t
|
||||
*
|
||||
* Sets the compositing operator to be used for all drawing
|
||||
* operations. See #cairo_operator_t for details on the semantics of
|
||||
* each available drawing operator.
|
||||
*
|
||||
* XXX: I'd also like to direct the reader's attention to some
|
||||
* (not-yet-written) section on cairo's imaging model. How would I do
|
||||
* that if such a section existed? (cworth).
|
||||
**/
|
||||
void
|
||||
cairo_set_operator (cairo_t *cr, cairo_operator_t op)
|
||||
{
|
||||
|
|
@ -391,6 +404,20 @@ cairo_set_rgb_color (cairo_t *cr, double red, double green, double blue)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_set_pattern:
|
||||
* @cr: a #cairo_t
|
||||
* @pattern: a #cairo_pattern_t to be used as the source for
|
||||
* subsequent drawing operations.
|
||||
*
|
||||
* Sets the source pattern within @cr to @pattern. This pattern will
|
||||
* then be used for any subsequent drawing operation until a new
|
||||
* pattern is set.
|
||||
*
|
||||
* XXX: I'd also like to direct the reader's attention to some
|
||||
* (not-yet-written) section on cairo's imaging model. How would I do
|
||||
* that if such a section existed? (cworth).
|
||||
**/
|
||||
void
|
||||
cairo_set_pattern (cairo_t *cr, cairo_pattern_t *pattern)
|
||||
{
|
||||
|
|
@ -402,11 +429,21 @@ cairo_set_pattern (cairo_t *cr, cairo_pattern_t *pattern)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_get_pattern:
|
||||
* @cr: a #cairo_t
|
||||
*
|
||||
* Gets the current source pattern for a #cairo_t.
|
||||
*
|
||||
* Return value: the current source pattern. This object is owned by
|
||||
* cairo. To keep a reference to it, you must call
|
||||
* cairo_pattern_reference().
|
||||
**/
|
||||
cairo_pattern_t *
|
||||
cairo_current_pattern (cairo_t *cr)
|
||||
cairo_get_pattern (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_pattern (cr->gstate);
|
||||
return _cairo_gstate_get_pattern (cr->gstate);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -459,6 +496,17 @@ cairo_set_alpha (cairo_t *cr, double alpha)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_set_fill_rule:
|
||||
* @cr: a #cairo_t
|
||||
* @fill_rule: a fill rule, specified as a #cairo_fill_rule_t
|
||||
*
|
||||
* Set the current fill rule within the cairo context. The fill rule
|
||||
* is used to determine which regions are inside or outside a complex
|
||||
* (potentially self-intersecting) path. The current fill rule affects
|
||||
* both cairo_fill and cairo_clip. See #cairo_fill_rule_t for details
|
||||
* on the semantics of each available fill rule.
|
||||
**/
|
||||
void
|
||||
cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule)
|
||||
{
|
||||
|
|
@ -470,6 +518,20 @@ cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_set_line_width:
|
||||
* @cr: a #cairo_t
|
||||
* @width: a line width, as a user-space value
|
||||
*
|
||||
* Sets the current line width within the cairo context. The line
|
||||
* width specifies the diameter of a pen that is circular in
|
||||
* user-space.
|
||||
*
|
||||
* As with the other stroke parameters, the current line cap style is
|
||||
* examined by cairo_stroke(), cairo_stroke_extents(), and
|
||||
* cairo_stroke_to_path(), but does not have any effect during path
|
||||
* construction.
|
||||
**/
|
||||
void
|
||||
cairo_set_line_width (cairo_t *cr, double width)
|
||||
{
|
||||
|
|
@ -483,6 +545,20 @@ cairo_set_line_width (cairo_t *cr, double width)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_set_line_cap:
|
||||
* @cr: a cairo context, as a #cairo_t
|
||||
* @line_cap: a line cap style, as a #cairo_line_cap_t
|
||||
*
|
||||
* Sets the current line cap style within the cairo context. See
|
||||
* #cairo_line_cap_t for details about how the available line cap
|
||||
* styles are drawn.
|
||||
*
|
||||
* As with the other stroke parameters, the current line cap style is
|
||||
* examined by cairo_stroke(), cairo_stroke_extents(), and
|
||||
* cairo_stroke_to_path(), but does not have any effect during path
|
||||
* construction.
|
||||
**/
|
||||
void
|
||||
cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap)
|
||||
{
|
||||
|
|
@ -494,6 +570,20 @@ cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_set_line_join:
|
||||
* @cr: a cairo context, as a #cairo_t
|
||||
* @line_join: a line joint style, as a #cairo_line_join_t
|
||||
*
|
||||
* Sets the current line join style within the cairo context. See
|
||||
* #cairo_line_join_t for details about how the available line join
|
||||
* styles are drawn.
|
||||
*
|
||||
* As with the other stroke parameters, the current line join style is
|
||||
* examined by cairo_stroke(), cairo_stroke_extents(), and
|
||||
* cairo_stroke_to_path(), but does not have any effect during path
|
||||
* construction.
|
||||
**/
|
||||
void
|
||||
cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join)
|
||||
{
|
||||
|
|
@ -1022,7 +1112,7 @@ cairo_select_font (cairo_t *cr,
|
|||
}
|
||||
|
||||
/**
|
||||
* cairo_current_font:
|
||||
* cairo_get_font:
|
||||
* @cr: a #cairo_t
|
||||
*
|
||||
* Gets the current font object for a #cairo_t. If there is no current
|
||||
|
|
@ -1032,11 +1122,11 @@ cairo_select_font (cairo_t *cr,
|
|||
*
|
||||
* Return value: the current font object. Can return %NULL
|
||||
* on out-of-memory or if the context is already in
|
||||
* an error state. This object is owned by Cairo. To keep
|
||||
* an error state. This object is owned by cairo. To keep
|
||||
* a reference to it, you must call cairo_font_reference().
|
||||
**/
|
||||
cairo_font_t *
|
||||
cairo_current_font (cairo_t *cr)
|
||||
cairo_get_font (cairo_t *cr)
|
||||
{
|
||||
cairo_font_t *ret;
|
||||
|
||||
|
|
@ -1044,23 +1134,38 @@ cairo_current_font (cairo_t *cr)
|
|||
if (cr->status)
|
||||
return NULL;
|
||||
|
||||
cr->status = _cairo_gstate_current_font (cr->gstate, &ret);
|
||||
cr->status = _cairo_gstate_get_font (cr->gstate, &ret);
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return ret;
|
||||
}
|
||||
DEPRECATE (cairo_current_font, cairo_get_font);
|
||||
|
||||
/**
|
||||
* cairo_get_font_extents:
|
||||
* @cr: a #cairo_t
|
||||
* @extents: a #cairo_font_extents_t object into which the results
|
||||
* will be stored.
|
||||
*
|
||||
* Gets the font extents for the current font. This is a convenience
|
||||
* function that is equivalent to:
|
||||
*
|
||||
* cairo_font_extents (cairo_get_font (cr));
|
||||
*
|
||||
* XXX: This function seems gratuitous to me, shall we drop it?
|
||||
* (cworth)
|
||||
**/
|
||||
void
|
||||
cairo_current_font_extents (cairo_t *cr,
|
||||
cairo_font_extents_t *extents)
|
||||
cairo_get_font_extents (cairo_t *cr,
|
||||
cairo_font_extents_t *extents)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
if (cr->status)
|
||||
return;
|
||||
|
||||
cr->status = _cairo_gstate_current_font_extents (cr->gstate, extents);
|
||||
cr->status = _cairo_gstate_get_font_extents (cr->gstate, extents);
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
DEPRECATE (cairo_current_font_extents, cairo_get_font_extents);
|
||||
|
||||
/**
|
||||
* cairo_set_font:
|
||||
|
|
@ -1089,6 +1194,25 @@ cairo_set_font (cairo_t *cr, cairo_font_t *font)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_scale_font:
|
||||
* @cr: a #cairo_t
|
||||
* @scale: a scale factor
|
||||
*
|
||||
* Scale the current font by the factor @scale. This function is
|
||||
* designed to work well with cairo_select_font(), and will usually be
|
||||
* called immediately afterwards to set the desired font size.
|
||||
*
|
||||
* If this function is called after a #cairo_font_t has been set by
|
||||
* cairo_font_t() then that font will be discarded from the
|
||||
* #cairo_t. Instead, cairo_scale_font will operate on the last font
|
||||
* selected by cairo_select_font(), or the default font if
|
||||
* cairo_select_font() has never been called.
|
||||
*
|
||||
* XXX: The interaction with cairo_set_font described above is very
|
||||
* confusing and violates the principle of least surprise. I think
|
||||
* this is an API bug that we should resolve somehow (cworth).
|
||||
**/
|
||||
void
|
||||
cairo_scale_font (cairo_t *cr, double scale)
|
||||
{
|
||||
|
|
@ -1100,6 +1224,28 @@ cairo_scale_font (cairo_t *cr, double scale)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_transform_font:
|
||||
* @cr: a #cairo_t
|
||||
* @matrix: a #cairo_matrix_t describing a transform to be applied to
|
||||
* the current font.
|
||||
*
|
||||
* Transform the current font according to @matrix. The transformation
|
||||
* is applied in addition to any previous transformations applied by
|
||||
* either cairo_transform_font() or cairo_scale_font().
|
||||
*
|
||||
* This function is designed to work well with cairo_select_font().
|
||||
*
|
||||
* If this function is called after a #cairo_font_t has been set by
|
||||
* cairo_font_t() then that font will be discarded from the
|
||||
* #cairo_t. Instead, cairo_scale_font will operate on the last font
|
||||
* selected by cairo_select_font(), or the default font if
|
||||
* cairo_select_font() has never been called.
|
||||
*
|
||||
* XXX: The interaction with cairo_set_font described above is very
|
||||
* confusing and violates the principle of least surprise. I think
|
||||
* this is an API bug that we should resolve somehow (cworth).
|
||||
**/
|
||||
void
|
||||
cairo_transform_font (cairo_t *cr, cairo_matrix_t *matrix)
|
||||
{
|
||||
|
|
@ -1111,6 +1257,26 @@ cairo_transform_font (cairo_t *cr, cairo_matrix_t *matrix)
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_text_extents:
|
||||
* @cr: a #cairo_t
|
||||
* @utf8: a string of text, encoded in utf-8
|
||||
* @extents: a #cairo_text_extents_t object into which the results
|
||||
* will be stored.
|
||||
*
|
||||
* Gets the extents for a string of text. The extents describe a
|
||||
* user-space rectangle that encloses the "inked" portion of the text,
|
||||
* (as it would be drawn by cairo_show_text). Additionally, the
|
||||
* x_advance and y_advance values indicate the amount by which the
|
||||
* current point would be advanced by cairo_show_text.
|
||||
*
|
||||
* Note that whitespace characters do not directly contribute to the
|
||||
* size of the rectangle (extents.width and extents.height). They do
|
||||
* contribute indirectly by changing the position of non-whitespace
|
||||
* characters. In particular, trailing whitespace characters are
|
||||
* likely to not affect the size of the rectangle, though they will
|
||||
* affect the x_advance and y_advance values.
|
||||
**/
|
||||
void
|
||||
cairo_text_extents (cairo_t *cr,
|
||||
const unsigned char *utf8,
|
||||
|
|
@ -1149,6 +1315,24 @@ cairo_text_extents (cairo_t *cr,
|
|||
free (glyphs);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_glyph_extents:
|
||||
* @cr: a #cairo_t
|
||||
* @glyphs: an array of #cairo_glyph_t objects
|
||||
* @num_glyphs: the number of elements in @glyphs
|
||||
* @extents: a #cairo_text_extents_t object into which the results
|
||||
* will be stored
|
||||
*
|
||||
* Gets the extents for an array of glyphs. The extents describe a
|
||||
* user-space rectangle that encloses the "inked" portion of the
|
||||
* glyphs, (as they would be drawn by cairo_show_glyphs).
|
||||
* Additionally, the x_advance and y_advance values indicate the
|
||||
* amount by which the current point would be advanced by
|
||||
* cairo_show_glyphs.
|
||||
*
|
||||
* Note that whitespace glyphs do not contribute to the size of the
|
||||
* rectangle (extents.width and extents.height).
|
||||
**/
|
||||
void
|
||||
cairo_glyph_extents (cairo_t *cr,
|
||||
cairo_glyph_t *glyphs,
|
||||
|
|
@ -1256,112 +1440,235 @@ cairo_show_surface (cairo_t *cr,
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_get_operator:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current compositing operator for a cairo context.
|
||||
*
|
||||
* Return value: the current compositing operator.
|
||||
**/
|
||||
cairo_operator_t
|
||||
cairo_current_operator (cairo_t *cr)
|
||||
cairo_get_operator (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_operator (cr->gstate);
|
||||
return _cairo_gstate_get_operator (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_operator, cairo_current_operator);
|
||||
DEPRECATE (cairo_current_operator, cairo_get_operator);
|
||||
|
||||
/**
|
||||
* cairo_get_rgb_color:
|
||||
* @cr: a cairo context
|
||||
* @red: return value for red channel
|
||||
* @green: return value for green channel
|
||||
* @blue: return value for blue channel
|
||||
*
|
||||
* Gets the current color for a cairo context, as set by
|
||||
* cairo_set_rgb_color().
|
||||
*
|
||||
* Note that this color may not actually be used for drawing
|
||||
* operations, (in the case of an alternate source pattern being set
|
||||
* by cairo_set_pattern()).
|
||||
*
|
||||
* WARNING: This function is scheduled to be removed as part of the
|
||||
* upcoming API Shakeup.
|
||||
**/
|
||||
void
|
||||
cairo_current_rgb_color (cairo_t *cr, double *red, double *green, double *blue)
|
||||
cairo_get_rgb_color (cairo_t *cr, double *red, double *green, double *blue)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
_cairo_gstate_current_rgb_color (cr->gstate, red, green, blue);
|
||||
_cairo_gstate_get_rgb_color (cr->gstate, red, green, blue);
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
DEPRECATE (cairo_get_rgb_color, cairo_current_rgb_color);
|
||||
DEPRECATE (cairo_current_rgb_color, cairo_get_rgb_color);
|
||||
|
||||
/**
|
||||
* cairo_get_alpha:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current alpha value, as set by cairo_set_alpha().
|
||||
*
|
||||
* Return value: the current alpha value.
|
||||
*
|
||||
* WARNING: This function is scheduled to be removed as part of the
|
||||
* upcoming API Shakeup.
|
||||
**/
|
||||
double
|
||||
cairo_current_alpha (cairo_t *cr)
|
||||
cairo_get_alpha (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_alpha (cr->gstate);
|
||||
return _cairo_gstate_get_alpha (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_alpha, cairo_current_alpha);
|
||||
DEPRECATE (cairo_current_alpha, cairo_get_alpha);
|
||||
|
||||
/**
|
||||
* cairo_get_tolerance:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current tolerance value, as set by cairo_set_tolerance().
|
||||
*
|
||||
* Return value: the current tolerance value.
|
||||
**/
|
||||
double
|
||||
cairo_current_tolerance (cairo_t *cr)
|
||||
cairo_get_tolerance (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_tolerance (cr->gstate);
|
||||
return _cairo_gstate_get_tolerance (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_tolerance, cairo_current_tolerance);
|
||||
DEPRECATE (cairo_current_tolerance, cairo_get_tolerance);
|
||||
|
||||
/**
|
||||
* cairo_get_current_point:
|
||||
* @cr: a cairo context
|
||||
* @x: return value for X coordinate of the current point
|
||||
* @y: return value for Y coordinate of the current point
|
||||
*
|
||||
* Returns the current point of the current path, which is
|
||||
* conceptually the final point reached by the path so far.
|
||||
*
|
||||
* The current point is returned in the user-space coordinate
|
||||
* system. If there is no defined current point then @x and @y will
|
||||
* both be set to 0.0.
|
||||
*
|
||||
* Most path construction functions alter the current point. See the
|
||||
* following for details on how they affect the current point:
|
||||
*
|
||||
* cairo_new_path(), cairo_move_to(), cairo_line_to(),
|
||||
* cairo_curve_to(), cairo_arc(), cairo_rel_move_to(),
|
||||
* cairo_rel_line_to(), cairo_rel_curve_to(), cairo_arc(),
|
||||
* cairo_text_path(), cairo_stroke_to_path()
|
||||
**/
|
||||
void
|
||||
cairo_current_point (cairo_t *cr, double *x, double *y)
|
||||
cairo_get_current_point (cairo_t *cr, double *x, double *y)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
_cairo_gstate_current_point (cr->gstate, x, y);
|
||||
_cairo_gstate_get_current_point (cr->gstate, x, y);
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
DEPRECATE (cairo_get_current_point, cairo_current_point);
|
||||
DEPRECATE (cairo_current_point, cairo_get_current_point);
|
||||
|
||||
/**
|
||||
* cairo_get_fill_rule:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current fill rule, as set by cairo_set_fill_rule().
|
||||
*
|
||||
* Return value: the current fill rule.
|
||||
**/
|
||||
cairo_fill_rule_t
|
||||
cairo_current_fill_rule (cairo_t *cr)
|
||||
cairo_get_fill_rule (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_fill_rule (cr->gstate);
|
||||
return _cairo_gstate_get_fill_rule (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_fill_rule, cairo_current_fill_rule);
|
||||
DEPRECATE (cairo_current_fill_rule, cairo_get_fill_rule);
|
||||
|
||||
/**
|
||||
* cairo_get_line_width:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current line width, as set by cairo_set_line_width().
|
||||
*
|
||||
* Return value: the current line width, in user-space units.
|
||||
**/
|
||||
double
|
||||
cairo_current_line_width (cairo_t *cr)
|
||||
cairo_get_line_width (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_line_width (cr->gstate);
|
||||
return _cairo_gstate_get_line_width (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_line_width, cairo_current_line_width);
|
||||
DEPRECATE (cairo_current_line_width, cairo_get_line_width);
|
||||
|
||||
/**
|
||||
* cairo_get_line_cap:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current line cap style, as set by cairo_set_line_cap().
|
||||
*
|
||||
* Return value: the current line cap style.
|
||||
**/
|
||||
cairo_line_cap_t
|
||||
cairo_current_line_cap (cairo_t *cr)
|
||||
cairo_get_line_cap (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_line_cap (cr->gstate);
|
||||
return _cairo_gstate_get_line_cap (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_line_cap, cairo_current_line_cap);
|
||||
DEPRECATE (cairo_current_line_cap, cairo_get_line_cap);
|
||||
|
||||
/**
|
||||
* cairo_get_line_join:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current line join style, as set by cairo_set_line_join().
|
||||
*
|
||||
* Return value: the current line join style.
|
||||
**/
|
||||
cairo_line_join_t
|
||||
cairo_current_line_join (cairo_t *cr)
|
||||
cairo_get_line_join (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_line_join (cr->gstate);
|
||||
return _cairo_gstate_get_line_join (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_line_join, cairo_current_line_join);
|
||||
DEPRECATE (cairo_current_line_join, cairo_get_line_join);
|
||||
|
||||
/**
|
||||
* cairo_get_miter_limit:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current miter limit, as set by cairo_set_miter_limit().
|
||||
*
|
||||
* Return value: the current miter limit.
|
||||
**/
|
||||
double
|
||||
cairo_current_miter_limit (cairo_t *cr)
|
||||
cairo_get_miter_limit (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_miter_limit (cr->gstate);
|
||||
return _cairo_gstate_get_miter_limit (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_miter_limit, cairo_current_miter_limit);
|
||||
DEPRECATE (cairo_current_miter_limit, cairo_get_miter_limit);
|
||||
|
||||
/**
|
||||
* cairo_get_matrix:
|
||||
* @cr: a cairo context
|
||||
* @matrix: return value for the matrix
|
||||
*
|
||||
* Stores the current transformation matrix (CTM) into @matrix.
|
||||
**/
|
||||
void
|
||||
cairo_current_matrix (cairo_t *cr, cairo_matrix_t *matrix)
|
||||
cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
_cairo_gstate_current_matrix (cr->gstate, matrix);
|
||||
_cairo_gstate_get_matrix (cr->gstate, matrix);
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
DEPRECATE (cairo_get_matrix, cairo_current_matrix);
|
||||
DEPRECATE (cairo_current_matrix, cairo_get_matrix);
|
||||
|
||||
/**
|
||||
* cairo_get_target_surface:
|
||||
* @cr: a cairo context
|
||||
*
|
||||
* Gets the current target surface, as set by cairo_set_target_surface().
|
||||
*
|
||||
* Return value: the current target surface.
|
||||
*
|
||||
* WARNING: This function is scheduled to be removed as part of the
|
||||
* upcoming API Shakeup.
|
||||
**/
|
||||
cairo_surface_t *
|
||||
cairo_current_target_surface (cairo_t *cr)
|
||||
cairo_get_target_surface (cairo_t *cr)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
return _cairo_gstate_current_target_surface (cr->gstate);
|
||||
return _cairo_gstate_get_target_surface (cr->gstate);
|
||||
}
|
||||
DEPRECATE (cairo_get_target_surface, cairo_current_target_surface);
|
||||
DEPRECATE (cairo_current_target_surface, cairo_get_target_surface);
|
||||
|
||||
void
|
||||
cairo_current_path (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_curve_to_func_t *curve_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure)
|
||||
cairo_get_path (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_curve_to_func_t *curve_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
if (cr->status)
|
||||
|
|
@ -1375,13 +1682,14 @@ cairo_current_path (cairo_t *cr,
|
|||
closure);
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
DEPRECATE (cairo_current_path, cairo_get_path);
|
||||
|
||||
void
|
||||
cairo_current_path_flat (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure)
|
||||
cairo_get_path_flat (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure)
|
||||
{
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
if (cr->status)
|
||||
|
|
@ -1395,6 +1703,7 @@ cairo_current_path_flat (cairo_t *cr,
|
|||
closure);
|
||||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
DEPRECATE (cairo_current_path_flat, cairo_get_path_flat);
|
||||
|
||||
cairo_status_t
|
||||
cairo_status (cairo_t *cr)
|
||||
|
|
|
|||
125
src/cairo.h
125
src/cairo.h
|
|
@ -125,7 +125,7 @@ cairo_save (cairo_t *cr);
|
|||
void
|
||||
cairo_restore (cairo_t *cr);
|
||||
|
||||
/* XXX: Replace with cairo_current_gstate/cairo_set_gstate */
|
||||
/* XXX: Replace with cairo_get_gstate/cairo_set_gstate */
|
||||
void
|
||||
cairo_copy (cairo_t *dest, cairo_t *src);
|
||||
|
||||
|
|
@ -562,11 +562,11 @@ void
|
|||
cairo_show_glyphs (cairo_t *cr, cairo_glyph_t *glyphs, int num_glyphs);
|
||||
|
||||
cairo_font_t *
|
||||
cairo_current_font (cairo_t *cr);
|
||||
cairo_get_font (cairo_t *cr);
|
||||
|
||||
void
|
||||
cairo_current_font_extents (cairo_t *cr,
|
||||
cairo_font_extents_t *extents);
|
||||
cairo_get_font_extents (cairo_t *cr,
|
||||
cairo_font_extents_t *extents);
|
||||
|
||||
void
|
||||
cairo_set_font (cairo_t *cr, cairo_font_t *font);
|
||||
|
|
@ -626,48 +626,48 @@ cairo_show_surface (cairo_t *cr,
|
|||
typing than that. */
|
||||
|
||||
cairo_operator_t
|
||||
cairo_current_operator (cairo_t *cr);
|
||||
cairo_get_operator (cairo_t *cr);
|
||||
|
||||
void
|
||||
cairo_current_rgb_color (cairo_t *cr, double *red, double *green, double *blue);
|
||||
cairo_get_rgb_color (cairo_t *cr, double *red, double *green, double *blue);
|
||||
cairo_pattern_t *
|
||||
cairo_current_pattern (cairo_t *cr);
|
||||
cairo_get_pattern (cairo_t *cr);
|
||||
|
||||
double
|
||||
cairo_current_alpha (cairo_t *cr);
|
||||
cairo_get_alpha (cairo_t *cr);
|
||||
|
||||
/* XXX: Do we want cairo_current_pattern as well? */
|
||||
/* XXX: Do we want cairo_get_pattern as well? */
|
||||
|
||||
double
|
||||
cairo_current_tolerance (cairo_t *cr);
|
||||
cairo_get_tolerance (cairo_t *cr);
|
||||
|
||||
void
|
||||
cairo_current_point (cairo_t *cr, double *x, double *y);
|
||||
cairo_get_current_point (cairo_t *cr, double *x, double *y);
|
||||
|
||||
cairo_fill_rule_t
|
||||
cairo_current_fill_rule (cairo_t *cr);
|
||||
cairo_get_fill_rule (cairo_t *cr);
|
||||
|
||||
double
|
||||
cairo_current_line_width (cairo_t *cr);
|
||||
cairo_get_line_width (cairo_t *cr);
|
||||
|
||||
cairo_line_cap_t
|
||||
cairo_current_line_cap (cairo_t *cr);
|
||||
cairo_get_line_cap (cairo_t *cr);
|
||||
|
||||
cairo_line_join_t
|
||||
cairo_current_line_join (cairo_t *cr);
|
||||
cairo_get_line_join (cairo_t *cr);
|
||||
|
||||
double
|
||||
cairo_current_miter_limit (cairo_t *cr);
|
||||
cairo_get_miter_limit (cairo_t *cr);
|
||||
|
||||
/* XXX: How to do cairo_current_dash??? Do we want to switch to a cairo_dash object? */
|
||||
/* XXX: How to do cairo_get_dash??? Do we want to switch to a cairo_dash object? */
|
||||
|
||||
void
|
||||
cairo_current_matrix (cairo_t *cr, cairo_matrix_t *matrix);
|
||||
cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix);
|
||||
|
||||
/* XXX: Need to decide the memory mangement semantics of this
|
||||
function. Should it reference the surface again? */
|
||||
cairo_surface_t *
|
||||
cairo_current_target_surface (cairo_t *cr);
|
||||
cairo_get_target_surface (cairo_t *cr);
|
||||
|
||||
typedef void (cairo_move_to_func_t) (void *closure,
|
||||
double x, double y);
|
||||
|
|
@ -683,19 +683,19 @@ typedef void (cairo_curve_to_func_t) (void *closure,
|
|||
typedef void (cairo_close_path_func_t) (void *closure);
|
||||
|
||||
extern void
|
||||
cairo_current_path (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_curve_to_func_t *curve_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure);
|
||||
cairo_get_path (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_curve_to_func_t *curve_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure);
|
||||
|
||||
extern void
|
||||
cairo_current_path_flat (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure);
|
||||
cairo_get_path_flat (cairo_t *cr,
|
||||
cairo_move_to_func_t *move_to,
|
||||
cairo_line_to_func_t *line_to,
|
||||
cairo_close_path_func_t *close_path,
|
||||
void *closure);
|
||||
|
||||
/* Error status queries */
|
||||
|
||||
|
|
@ -739,7 +739,7 @@ cairo_surface_set_repeat (cairo_surface_t *surface, int repeat);
|
|||
cairo_status_t
|
||||
cairo_surface_set_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
|
||||
|
||||
/* XXX: Rework this as a cairo function: cairo_current_pattern_transform */
|
||||
/* XXX: Rework this as a cairo function: cairo_get_pattern_transform */
|
||||
cairo_status_t
|
||||
cairo_surface_get_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
|
||||
|
||||
|
|
@ -870,25 +870,58 @@ cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy)
|
|||
cairo_status_t
|
||||
cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y);
|
||||
|
||||
#define CAIRO_API_SHAKEUP_FLAG_DAY 0
|
||||
|
||||
#ifndef _CAIROINT_H_
|
||||
|
||||
#if CAIRO_API_SHAKEUP_FLAG_DAY
|
||||
|
||||
/* Deprecated functions. We've made some effort to allow the
|
||||
deprecated functions to continue to work for now, (with useful
|
||||
warnings). But the deprecated functions will not appear in the next
|
||||
release. */
|
||||
#ifndef _CAIROINT_H_
|
||||
#define cairo_get_operator cairo_get_operator_DEPRECATED_BY_cairo_current_operator
|
||||
#define cairo_get_rgb_color cairo_get_rgb_color_DEPRECATED_BY_cairo_current_rgb_color
|
||||
#define cairo_get_alpha cairo_get_alpha_DEPRECATED_BY_cairo_current_alpha
|
||||
#define cairo_get_tolerance cairo_get_tolerance_DEPRECATED_BY_cairo_current_tolerance
|
||||
#define cairo_get_current_point cairo_get_current_point_DEPRECATED_BY_cairo_current_point
|
||||
#define cairo_get_fill_rule cairo_get_fill_rule_DEPRECATED_BY_cairo_current_fill_rule
|
||||
#define cairo_get_line_width cairo_get_line_width_DEPRECATED_BY_cairo_current_line_width
|
||||
#define cairo_get_line_cap cairo_get_line_cap_DEPRECATED_BY_cairo_current_line_cap
|
||||
#define cairo_get_line_join cairo_get_line_join_DEPRECATED_BY_cairo_current_line_join
|
||||
#define cairo_get_miter_limit cairo_get_miter_limit_DEPRECATED_BY_cairo_current_miter_limit
|
||||
#define cairo_get_matrix cairo_get_matrix_DEPRECATED_BY_cairo_current_matrix
|
||||
#define cairo_get_target_surface cairo_get_target_surface_DEPRECATED_BY_cairo_current_target_surface
|
||||
#define cairo_get_status cairo_get_status_DEPRECATED_BY_cairo_status
|
||||
#define cairo_get_status_string cairo_get_status_string_DEPRECATED_BY_cairo_status_string
|
||||
#define cairo_current_path cairo_current_path_DEPRECATED_BY_cairo_get_path
|
||||
#define cairo_current_path_flat cairo_current_path_flat_DEPRECATED_BY_cairo_get_path_flat
|
||||
#define cairo_current_font cairo_current_font_DEPRECATED_BY_cairo_get_font
|
||||
#define cairo_current_font_extents cairo_current_font_extents_DEPRECATED_BY_cairo_get_font_extents
|
||||
#define cairo_current_operator cairo_current_operator_DEPRECATED_BY_cairo_get_operator
|
||||
#define cairo_current_rgb_color cairo_current_rgb_color_DEPRECATED_BY_cairo_get_rgb_color
|
||||
#define cairo_current_alpha cairo_current_alpha_DEPRECATED_BY_cairo_get_alpha
|
||||
#define cairo_current_tolerance cairo_current_tolerance_DEPRECATED_BY_cairo_get_tolerance
|
||||
#define cairo_current_point cairo_current_point_DEPRECTATED_BY_cairo_get_current_point
|
||||
#define cairo_current_fill_rule cairo_current_fill_rule_DEPRECATED_BY_cairo_get_fill_rule
|
||||
#define cairo_current_line_width cairo_current_line_width_DEPRECATED_BY_cairo_get_line_width
|
||||
#define cairo_current_line_cap cairo_current_line_cap_DEPRECATED_BY_cairo_get_line_cap
|
||||
#define cairo_current_line_join cairo_current_line_join_DEPRECATED_BY_cairo_get_line_join
|
||||
#define cairo_current_miter_limit cairo_current_miter_limit_DEPRECATED_BY_cairo_get_miter_limit
|
||||
#define cairo_current_matrix cairo_current_matrix_DEPRECATED_BY_cairo_get_matrix
|
||||
#define cairo_current_target_surface cairo_current_target_surface_DEPRECATED_BY_cairo_get_target_surface
|
||||
#define cairo_get_status cairo_get_status_DEPRECATED_BY_cairo_status
|
||||
#define cairo_get_status_string cairo_get_status_string_DEPRECATED_BY_cairo_status_string
|
||||
|
||||
#else /* CAIRO_API_SHAKEUP_FLAG_DAY */
|
||||
|
||||
#define cairo_current_path cairo_get_path
|
||||
#define cairo_current_path_flat cairo_get_path_flat
|
||||
#define cairo_current_font cairo_get_font
|
||||
#define cairo_current_font_extents cairo_get_font_extents
|
||||
#define cairo_current_operator cairo_get_operator
|
||||
#define cairo_current_rgb_color cairo_get_rgb_color
|
||||
#define cairo_current_alpha cairo_get_alpha
|
||||
#define cairo_current_tolerance cairo_get_tolerance
|
||||
#define cairo_current_point cairo_get_current_point
|
||||
#define cairo_current_fill_rule cairo_get_fill_rule
|
||||
#define cairo_current_line_width cairo_get_line_width
|
||||
#define cairo_current_line_cap cairo_get_line_cap
|
||||
#define cairo_current_line_join cairo_get_line_join
|
||||
#define cairo_current_miter_limit cairo_get_miter_limit
|
||||
#define cairo_current_matrix cairo_get_matrix
|
||||
#define cairo_current_target_surface cairo_get_target_surface
|
||||
#define cairo_get_status cairo_status
|
||||
#define cairo_get_status_string cairo_status_string
|
||||
|
||||
#endif /* CAIRO_API_SHAKEUP_FLAG_DAY */
|
||||
|
||||
#endif
|
||||
|
||||
CAIRO_END_DECLS
|
||||
|
|
|
|||
|
|
@ -1088,7 +1088,7 @@ _conic_to (FT_Vector *control, FT_Vector *to, void *closure)
|
|||
cairo_point_t p0, p1, p2, p3;
|
||||
cairo_point_t conic;
|
||||
|
||||
_cairo_path_current_point (path, &p0);
|
||||
_cairo_path_get_current_point (path, &p0);
|
||||
|
||||
conic.x = _cairo_fixed_from_26_6 (control->x);
|
||||
conic.y = _cairo_fixed_from_26_6 (control->y);
|
||||
|
|
@ -1422,7 +1422,7 @@ cairo_ft_font_create_for_ft_face (FT_Face face,
|
|||
* @ft_font: A #cairo_font_t from the FreeType font backend. Such an
|
||||
* object can be created with cairo_ft_font_create() or
|
||||
* cairo_ft_font_create_for_ft_face(). On some platforms the font from
|
||||
* cairo_current_font() will also be a FreeType font, but using this
|
||||
* cairo_get_font() will also be a FreeType font, but using this
|
||||
* functionality with fonts you don't create yourself is not
|
||||
* recommended.
|
||||
*
|
||||
|
|
@ -1466,7 +1466,7 @@ cairo_ft_font_lock_face (cairo_font_t *abstract_font)
|
|||
* @ft_font: A #cairo_font_t from the FreeType font backend. Such an
|
||||
* object can be created with cairo_ft_font_create() or
|
||||
* cairo_ft_font_create_for_ft_face(). On some platforms the font from
|
||||
* cairo_current_font() will also be a FreeType font, but using this
|
||||
* cairo_get_font() will also be a FreeType font, but using this
|
||||
* functionality with fonts you don't create yourself is not
|
||||
* recommended.
|
||||
*
|
||||
|
|
@ -1486,7 +1486,7 @@ cairo_ft_font_unlock_face (cairo_font_t *abstract_font)
|
|||
* @ft_font: A #cairo_font_t from the FreeType font backend. Such an
|
||||
* object can be created with cairo_ft_font_create() or
|
||||
* cairo_ft_font_create_for_ft_face(). On some platforms the font from
|
||||
* cairo_current_font() will also be a FreeType font, but using this
|
||||
* cairo_get_font() will also be a FreeType font, but using this
|
||||
* functionality with fonts you don't create yourself is not
|
||||
* recommended.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ _cairo_gstate_set_target_surface (cairo_gstate_t *gstate, cairo_surface_t *surfa
|
|||
/* XXX: Need to decide the memory mangement semantics of this
|
||||
function. Should it reference the surface again? */
|
||||
cairo_surface_t *
|
||||
_cairo_gstate_current_target_surface (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_target_surface (cairo_gstate_t *gstate)
|
||||
{
|
||||
if (gstate == NULL)
|
||||
return NULL;
|
||||
|
|
@ -412,7 +412,7 @@ _cairo_gstate_set_pattern (cairo_gstate_t *gstate, cairo_pattern_t *pattern)
|
|||
}
|
||||
|
||||
cairo_pattern_t *
|
||||
_cairo_gstate_current_pattern (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_pattern (cairo_gstate_t *gstate)
|
||||
{
|
||||
if (gstate == NULL)
|
||||
return NULL;
|
||||
|
|
@ -433,7 +433,7 @@ _cairo_gstate_set_operator (cairo_gstate_t *gstate, cairo_operator_t operator)
|
|||
}
|
||||
|
||||
cairo_operator_t
|
||||
_cairo_gstate_current_operator (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_operator (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->operator;
|
||||
}
|
||||
|
|
@ -451,7 +451,7 @@ _cairo_gstate_set_rgb_color (cairo_gstate_t *gstate, double red, double green, d
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_rgb_color (cairo_gstate_t *gstate, double *red, double *green, double *blue)
|
||||
_cairo_gstate_get_rgb_color (cairo_gstate_t *gstate, double *red, double *green, double *blue)
|
||||
{
|
||||
return _cairo_pattern_get_rgb (gstate->pattern, red, green, blue);
|
||||
}
|
||||
|
|
@ -465,7 +465,7 @@ _cairo_gstate_set_tolerance (cairo_gstate_t *gstate, double tolerance)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_tolerance (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_tolerance (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->tolerance;
|
||||
}
|
||||
|
|
@ -479,7 +479,7 @@ _cairo_gstate_set_alpha (cairo_gstate_t *gstate, double alpha)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_alpha (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_alpha (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->alpha;
|
||||
}
|
||||
|
|
@ -493,7 +493,7 @@ _cairo_gstate_set_fill_rule (cairo_gstate_t *gstate, cairo_fill_rule_t fill_rule
|
|||
}
|
||||
|
||||
cairo_fill_rule_t
|
||||
_cairo_gstate_current_fill_rule (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_fill_rule (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->fill_rule;
|
||||
}
|
||||
|
|
@ -507,7 +507,7 @@ _cairo_gstate_set_line_width (cairo_gstate_t *gstate, double width)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_line_width (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_line_width (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->line_width;
|
||||
}
|
||||
|
|
@ -521,7 +521,7 @@ _cairo_gstate_set_line_cap (cairo_gstate_t *gstate, cairo_line_cap_t line_cap)
|
|||
}
|
||||
|
||||
cairo_line_cap_t
|
||||
_cairo_gstate_current_line_cap (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_line_cap (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->line_cap;
|
||||
}
|
||||
|
|
@ -535,7 +535,7 @@ _cairo_gstate_set_line_join (cairo_gstate_t *gstate, cairo_line_join_t line_join
|
|||
}
|
||||
|
||||
cairo_line_join_t
|
||||
_cairo_gstate_current_line_join (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_line_join (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->line_join;
|
||||
}
|
||||
|
|
@ -572,13 +572,13 @@ _cairo_gstate_set_miter_limit (cairo_gstate_t *gstate, double limit)
|
|||
}
|
||||
|
||||
double
|
||||
_cairo_gstate_current_miter_limit (cairo_gstate_t *gstate)
|
||||
_cairo_gstate_get_miter_limit (cairo_gstate_t *gstate)
|
||||
{
|
||||
return gstate->miter_limit;
|
||||
}
|
||||
|
||||
void
|
||||
_cairo_gstate_current_matrix (cairo_gstate_t *gstate, cairo_matrix_t *matrix)
|
||||
_cairo_gstate_get_matrix (cairo_gstate_t *gstate, cairo_matrix_t *matrix)
|
||||
{
|
||||
cairo_matrix_copy (matrix, &gstate->ctm);
|
||||
}
|
||||
|
|
@ -1133,13 +1133,13 @@ _cairo_gstate_close_path (cairo_gstate_t *gstate)
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_point (cairo_gstate_t *gstate, double *x_ret, double *y_ret)
|
||||
_cairo_gstate_get_current_point (cairo_gstate_t *gstate, double *x_ret, double *y_ret)
|
||||
{
|
||||
cairo_status_t status;
|
||||
cairo_point_t point;
|
||||
double x, y;
|
||||
|
||||
status = _cairo_path_current_point (&gstate->path, &point);
|
||||
status = _cairo_path_get_current_point (&gstate->path, &point);
|
||||
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
|
||||
x = 0.0;
|
||||
y = 0.0;
|
||||
|
|
@ -2015,7 +2015,7 @@ _cairo_gstate_show_surface (cairo_gstate_t *gstate,
|
|||
cairo_matrix_invert (&image_to_user);
|
||||
cairo_matrix_multiply (&image_to_device, &image_to_user, &gstate->ctm);
|
||||
|
||||
_cairo_gstate_current_point (gstate, &device_x, &device_y);
|
||||
_cairo_gstate_get_current_point (gstate, &device_x, &device_y);
|
||||
device_width = width;
|
||||
device_height = height;
|
||||
_cairo_matrix_transform_bounding_box (&image_to_device,
|
||||
|
|
@ -2147,7 +2147,7 @@ _cairo_gstate_transform_font (cairo_gstate_t *gstate,
|
|||
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_font (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font (cairo_gstate_t *gstate,
|
||||
cairo_font_t **font)
|
||||
{
|
||||
cairo_status_t status;
|
||||
|
|
@ -2171,7 +2171,7 @@ _cairo_gstate_set_font_transform (cairo_gstate_t *gstate,
|
|||
}
|
||||
|
||||
void
|
||||
_cairo_gstate_current_font_transform (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_transform (cairo_gstate_t *gstate,
|
||||
cairo_matrix_t *matrix)
|
||||
{
|
||||
cairo_matrix_copy (matrix, &gstate->font_matrix);
|
||||
|
|
@ -2255,7 +2255,7 @@ _cairo_gstate_current_font_transform (cairo_gstate_t *gstate,
|
|||
*/
|
||||
|
||||
void
|
||||
_cairo_gstate_current_font_scale (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_scale (cairo_gstate_t *gstate,
|
||||
cairo_font_scale_t *sc)
|
||||
{
|
||||
cairo_matrix_t tmp;
|
||||
|
|
@ -2279,7 +2279,7 @@ _cairo_gstate_ensure_font (cairo_gstate_t *gstate)
|
|||
if (gstate->font)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
_cairo_gstate_current_font_scale (gstate, &sc);
|
||||
_cairo_gstate_get_font_scale (gstate, &sc);
|
||||
|
||||
if (gstate->font_family)
|
||||
family = gstate->font_family;
|
||||
|
|
@ -2299,7 +2299,7 @@ _cairo_gstate_ensure_font (cairo_gstate_t *gstate)
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_gstate_current_font_extents (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
|
||||
cairo_font_extents_t *extents)
|
||||
{
|
||||
cairo_status_t status = _cairo_gstate_ensure_font (gstate);
|
||||
|
|
@ -2327,7 +2327,7 @@ _cairo_gstate_text_to_glyphs (cairo_gstate_t *gstate,
|
|||
if (status)
|
||||
return status;
|
||||
|
||||
status = _cairo_path_current_point (&gstate->path, &point);
|
||||
status = _cairo_path_get_current_point (&gstate->path, &point);
|
||||
if (status == CAIRO_STATUS_NO_CURRENT_POINT) {
|
||||
origin_x = 0.0;
|
||||
origin_y = 0.0;
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ _cairo_path_close_path (cairo_path_t *path)
|
|||
}
|
||||
|
||||
cairo_status_t
|
||||
_cairo_path_current_point (cairo_path_t *path, cairo_point_t *point)
|
||||
_cairo_path_get_current_point (cairo_path_t *path, cairo_point_t *point)
|
||||
{
|
||||
if (! path->has_current_point)
|
||||
return CAIRO_STATUS_NO_CURRENT_POINT;
|
||||
|
|
|
|||
|
|
@ -953,25 +953,25 @@ cairo_private cairo_status_t
|
|||
_cairo_gstate_set_target_surface (cairo_gstate_t *gstate, cairo_surface_t *surface);
|
||||
|
||||
cairo_private cairo_surface_t *
|
||||
_cairo_gstate_current_target_surface (cairo_gstate_t *gstate);
|
||||
_cairo_gstate_get_target_surface (cairo_gstate_t *gstate);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_set_pattern (cairo_gstate_t *gstate, cairo_pattern_t *pattern);
|
||||
|
||||
cairo_private cairo_pattern_t *
|
||||
_cairo_gstate_current_pattern (cairo_gstate_t *gstate);
|
||||
_cairo_gstate_get_pattern (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_current_operator (cairo_gstate_t *gstate);
|
||||
_cairo_gstate_get_operator (cairo_gstate_t *gstate);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_set_rgb_color (cairo_gstate_t *gstate, double red, double green, double blue);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_current_rgb_color (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_rgb_color (cairo_gstate_t *gstate,
|
||||
double *red,
|
||||
double *green,
|
||||
double *blue);
|
||||
|
|
@ -980,37 +980,37 @@ cairo_private cairo_status_t
|
|||
_cairo_gstate_set_tolerance (cairo_gstate_t *gstate, double tolerance);
|
||||
|
||||
cairo_private double
|
||||
_cairo_gstate_current_tolerance (cairo_gstate_t *gstate);
|
||||
_cairo_gstate_get_tolerance (cairo_gstate_t *gstate);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_set_alpha (cairo_gstate_t *gstate, double alpha);
|
||||
|
||||
cairo_private double
|
||||
_cairo_gstate_current_alpha (cairo_gstate_t *gstate);
|
||||
_cairo_gstate_get_alpha (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_current_fill_rule (cairo_gstate_t *gstate);
|
||||
_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_current_line_width (cairo_gstate_t *gstate);
|
||||
_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_current_line_cap (cairo_gstate_t *gstate);
|
||||
_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_current_line_join (cairo_gstate_t *gstate);
|
||||
_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);
|
||||
|
|
@ -1019,10 +1019,10 @@ cairo_private cairo_status_t
|
|||
_cairo_gstate_set_miter_limit (cairo_gstate_t *gstate, double limit);
|
||||
|
||||
cairo_private double
|
||||
_cairo_gstate_current_miter_limit (cairo_gstate_t *gstate);
|
||||
_cairo_gstate_get_miter_limit (cairo_gstate_t *gstate);
|
||||
|
||||
cairo_private void
|
||||
_cairo_gstate_current_matrix (cairo_gstate_t *gstate, cairo_matrix_t *matrix);
|
||||
_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);
|
||||
|
|
@ -1107,7 +1107,7 @@ cairo_private cairo_status_t
|
|||
_cairo_gstate_close_path (cairo_gstate_t *gstate);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_current_point (cairo_gstate_t *gstate, double *x, double *y);
|
||||
_cairo_gstate_get_current_point (cairo_gstate_t *gstate, double *x, double *y);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_interpret_path (cairo_gstate_t *gstate,
|
||||
|
|
@ -1177,7 +1177,7 @@ _cairo_gstate_scale_font (cairo_gstate_t *gstate,
|
|||
double scale);
|
||||
|
||||
cairo_private void
|
||||
_cairo_gstate_current_font_scale (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_scale (cairo_gstate_t *gstate,
|
||||
cairo_font_scale_t *sc);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
|
|
@ -1185,7 +1185,7 @@ _cairo_gstate_transform_font (cairo_gstate_t *gstate,
|
|||
cairo_matrix_t *matrix);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_current_font (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font (cairo_gstate_t *gstate,
|
||||
cairo_font_t **font);
|
||||
|
||||
cairo_private void
|
||||
|
|
@ -1193,11 +1193,11 @@ _cairo_gstate_set_font_transform (cairo_gstate_t *gstate,
|
|||
cairo_matrix_t *matrix);
|
||||
|
||||
cairo_private void
|
||||
_cairo_gstate_current_font_transform (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_transform (cairo_gstate_t *gstate,
|
||||
cairo_matrix_t *matrix);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_gstate_current_font_extents (cairo_gstate_t *gstate,
|
||||
_cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
|
||||
cairo_font_extents_t *extents);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
|
|
@ -1362,7 +1362,7 @@ cairo_private cairo_status_t
|
|||
_cairo_path_close_path (cairo_path_t *path);
|
||||
|
||||
cairo_private cairo_status_t
|
||||
_cairo_path_current_point (cairo_path_t *path, cairo_point_t *point);
|
||||
_cairo_path_get_current_point (cairo_path_t *path, cairo_point_t *point);
|
||||
|
||||
typedef cairo_status_t (cairo_path_move_to_func_t) (void *closure,
|
||||
cairo_point_t *point);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ draw (cairo_t *cr, int width, int height)
|
|||
{
|
||||
cairo_surface_t *target, *stamp;
|
||||
|
||||
target = cairo_current_target_surface (cr);
|
||||
target = cairo_get_target_surface (cr);
|
||||
cairo_surface_reference (target);
|
||||
|
||||
stamp = cairo_surface_create_similar (target, CAIRO_FORMAT_ARGB32,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ draw (cairo_t *cr, int width, int height)
|
|||
{
|
||||
cairo_surface_t *target, *stamp;
|
||||
|
||||
target = cairo_current_target_surface (cr);
|
||||
target = cairo_get_target_surface (cr);
|
||||
cairo_surface_reference (target);
|
||||
|
||||
stamp = cairo_surface_create_similar (target, CAIRO_FORMAT_ARGB32,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue