diff options
Diffstat (limited to 'src/cairo.c')
-rw-r--r-- | src/cairo.c | 166 |
1 files changed, 83 insertions, 83 deletions
diff --git a/src/cairo.c b/src/cairo.c index 05f3ee94..98308c31 100644 --- a/src/cairo.c +++ b/src/cairo.c @@ -68,7 +68,7 @@ static const cairo_t cairo_nil = { * _cairo_error: * @status: a status value indicating an error, (eg. not * CAIRO_STATUS_SUCCESS) - * + * * Checks that status is an error status, but does nothing else. * * All assignments of an error status to any user-visible object @@ -91,7 +91,7 @@ _cairo_error (cairo_status_t status) * @cr: a cairo context * @status: a status value indicating an error, (eg. not * CAIRO_STATUS_SUCCESS) - * + * * Sets cr->status to @status and calls _cairo_error; * * All assignments of an error status to cr->status should happen @@ -116,7 +116,7 @@ _cairo_set_error (cairo_t *cr, cairo_status_t status) /** * cairo_version: - * + * * Returns the version of the cairo library encoded in a single * integer as per CAIRO_VERSION_ENCODE. The encoding ensures that * later versions compare greater than earlier versions. @@ -130,7 +130,7 @@ _cairo_set_error (cairo_t *cr, cairo_status_t status) * * See also cairo_version_string() as well as the compile-time * equivalents %CAIRO_VERSION and %CAIRO_VERSION_STRING. - * + * * Return value: the encoded version. **/ int @@ -141,13 +141,13 @@ cairo_version (void) /** * cairo_version_string: - * + * * Returns the version of the cairo library as a human-readable string * of the form "X.Y.Z". * * See also cairo_version() as well as the compile-time equivalents * %CAIRO_VERSION_STRING and %CAIRO_VERSION. - * + * * Return value: a string containing the version. **/ const char* @@ -159,7 +159,7 @@ cairo_version_string (void) /** * cairo_create: * @target: target surface for the context - * + * * Creates a new #cairo_t with all graphics state parameters set to * default values and with @target as a target surface. The target * surface should be constructed with a backend-specific function such @@ -169,7 +169,7 @@ cairo_version_string (void) * This function references @target, so you can immediately * call cairo_surface_destroy() on it if you don't need to * maintain a separate reference to it. - * + * * Return value: a newly allocated #cairo_t with a reference * count of 1. The initial reference count should be released * with cairo_destroy() when you are done using the #cairo_t. @@ -210,9 +210,9 @@ cairo_create (cairo_surface_t *target) /** * cairo_reference: * @cr: a #cairo_t - * + * * Increases the reference count on @cr by one. This prevents - * @cr from being destroyed until a matching call to cairo_destroy() + * @cr from being destroyed until a matching call to cairo_destroy() * is made. * * Return value: the referenced #cairo_t. @@ -236,7 +236,7 @@ cairo_reference (cairo_t *cr) /** * cairo_destroy: * @cr: a #cairo_t - * + * * Decreases the reference count on @cr by one. If the result * is zero, then @cr and all associated resources are freed. * See cairo_reference(). @@ -271,7 +271,7 @@ cairo_destroy (cairo_t *cr) /** * cairo_save: * @cr: a #cairo_t - * + * * Makes a copy of the current state of @cr and saves it * on an internal stack of saved states for @cr. When * cairo_restore() is called, @cr will be restored to @@ -307,7 +307,7 @@ slim_hidden_def(cairo_save); /** * cairo_restore: * @cr: a #cairo_t - * + * * Restores @cr to the state saved by a preceding call to * cairo_save() and removes that state from the stack of * saved states. @@ -545,7 +545,7 @@ slim_hidden_def(cairo_pop_group_to_source); * 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 compositing operator. @@ -571,7 +571,7 @@ cairo_set_operator (cairo_t *cr, cairo_operator_t op) * @red: red component of color * @green: green component of color * @blue: blue component of color - * + * * Sets the source pattern within @cr to an opaque color. This opaque * color will then be used for any subsequent drawing operation until * a new source pattern is set. @@ -600,7 +600,7 @@ cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue) * @green: green component of color * @blue: blue component of color * @alpha: alpha component of color - * + * * Sets the source pattern within @cr to a translucent color. This * color will then be used for any subsequent drawing operation until * a new source pattern is set. @@ -630,7 +630,7 @@ cairo_set_source_rgba (cairo_t *cr, * @surface: a surface to be used to set the source pattern * @x: User-space X coordinate for surface origin * @y: User-space Y coordinate for surface origin - * + * * This is a convenience function for creating a pattern from @surface * and setting it as the source in @cr with cairo_set_source(). * @@ -673,7 +673,7 @@ cairo_set_source_surface (cairo_t *cr, * @cr: a cairo context * @source: a #cairo_pattern_t to be used as the source for * subsequent drawing operations. - * + * * Sets the source pattern within @cr to @source. This pattern * will then be used for any subsequent drawing operation until a new * source pattern is set. @@ -711,9 +711,9 @@ cairo_set_source (cairo_t *cr, cairo_pattern_t *source) /** * cairo_get_source: * @cr: a cairo context - * + * * Gets the current source pattern for @cr. - * + * * Return value: the current source pattern. This object is owned by * cairo. To keep a reference to it, you must call * cairo_pattern_reference(). @@ -731,7 +731,7 @@ cairo_get_source (cairo_t *cr) * cairo_set_tolerance: * @cr: a #cairo_t * @tolerance: the tolerance, in device units (typically pixels) - * + * * Sets the tolerance used when converting paths into trapezoids. * Curved segments of the path will be subdivided until the maximum * deviation between the original path and the polygonal approximation @@ -757,7 +757,7 @@ cairo_set_tolerance (cairo_t *cr, double tolerance) * cairo_set_antialias: * @cr: a #cairo_t * @antialias: the new antialiasing mode - * + * * Set the antialiasing mode of the rasterizer used for drawing shapes. * This value is a hint, and a particular backend may or may not support * a particular value. At the current time, no backend supports @@ -781,7 +781,7 @@ cairo_set_antialias (cairo_t *cr, cairo_antialias_t antialias) * 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 @@ -803,7 +803,7 @@ cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule) * cairo_set_line_width: * @cr: a #cairo_t * @width: a line width - * + * * Sets the current line width within the cairo context. The line * width value specifies the diameter of a pen that is circular in * user space, (though device-space pen may be an ellipse in general @@ -842,7 +842,7 @@ cairo_set_line_width (cairo_t *cr, double width) * 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. @@ -894,7 +894,7 @@ cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join) * @dashes: an array specifying alternate lengths of on and off stroke portions * @num_dashes: the length of the dashes array * @offset: an offset into the dash pattern at which the stroke should start - * + * * Sets the dash pattern to be used by cairo_stroke(). A dash pattern * is specified by @dashes, an array of positive values. Each value * provides the length of alternate "on" and "off" portions of the @@ -947,7 +947,7 @@ cairo_set_miter_limit (cairo_t *cr, double limit) * @cr: a cairo context * @tx: amount to translate in the X direction * @ty: amount to translate in the Y direction - * + * * Modifies the current transformation matrix (CTM) by translating the * user-space origin by (@tx, @ty). This offset is interpreted as a * user-space coordinate according to the CTM in place before the new @@ -970,7 +970,7 @@ cairo_translate (cairo_t *cr, double tx, double ty) * @cr: a cairo context * @sx: scale factor for the X dimension * @sy: scale factor for the Y dimension - * + * * Modifies the current transformation matrix (CTM) by scaling the X * and Y user-space axes by @sx and @sy respectively. The scaling of * the axes takes place after any existing transformation of user @@ -993,7 +993,7 @@ cairo_scale (cairo_t *cr, double sx, double sy) * @cr: a cairo context * @angle: angle (in radians) by which the user-space axes will be * rotated - * + * * Modifies the current transformation matrix (CTM) by rotating the * user-space axes by @angle radians. The rotation of the axes takes * places after any existing transformation of user space. The @@ -1015,7 +1015,7 @@ cairo_rotate (cairo_t *cr, double angle) * cairo_transform: * @cr: a cairo context * @matrix: a transformation to be applied to the user-space axes - * + * * Modifies the current transformation matrix (CTM) by applying * @matrix as an additional transformation. The new transformation of * user space takes place after any existing transformation. @@ -1036,7 +1036,7 @@ cairo_transform (cairo_t *cr, * cairo_set_matrix: * @cr: a cairo context * @matrix: a transformation matrix from user space to device space - * + * * Modifies the current transformation matrix (CTM) by setting it * equal to @matrix. **/ @@ -1055,7 +1055,7 @@ cairo_set_matrix (cairo_t *cr, /** * cairo_identity_matrix: * @cr: a cairo context - * + * * Resets the current transformation matrix (CTM) by setting it equal * to the identity matrix. That is, the user-space and device-space * axes will be aligned and one user-space unit will transform to one @@ -1077,7 +1077,7 @@ cairo_identity_matrix (cairo_t *cr) * @cr: a cairo context * @x: X value of coordinate (in/out parameter) * @y: Y value of coordinate (in/out parameter) - * + * * Transform a coordinate from user space to device space by * multiplying the given point by the current transformation matrix * (CTM). @@ -1098,7 +1098,7 @@ cairo_user_to_device (cairo_t *cr, double *x, double *y) * @cr: a cairo context * @dx: X component of a distance vector (in/out parameter) * @dy: Y component of a distance vector (in/out parameter) - * + * * Transform a distance vector from user space to device space. This * function is similar to cairo_user_to_device() except that the * translation components of the CTM will be ignored when transforming @@ -1120,7 +1120,7 @@ cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy) * @cr: a cairo * @x: X value of coordinate (in/out parameter) * @y: Y value of coordinate (in/out parameter) - * + * * Transform a coordinate from device space to user space by * multiplying the given point by the inverse of the current * transformation matrix (CTM). @@ -1141,7 +1141,7 @@ cairo_device_to_user (cairo_t *cr, double *x, double *y) * @cr: a cairo context * @dx: X component of a distance vector (in/out parameter) * @dy: Y component of a distance vector (in/out parameter) - * + * * Transform a distance vector from device space to user space. This * function is similar to cairo_device_to_user() except that the * translation components of the inverse CTM will be ignored when @@ -1205,7 +1205,7 @@ slim_hidden_def(cairo_move_to); /** * cairo_new_sub_path: * @cr: a cairo context - * + * * Begin a new subpath. Note that the existing path is not * affected. After this call there will be no current point. * @@ -1318,7 +1318,7 @@ cairo_curve_to (cairo_t *cr, * @radius: the radius of the arc * @angle1: the start angle, in radians * @angle2: the end angle, in radians - * + * * Adds a circular arc of the given @radius to the current path. The * arc is centered at (@xc, @yc), begins at @angle1 and proceeds in * the direction of increasing angles to end at @angle2. If @angle2 is @@ -1388,7 +1388,7 @@ cairo_arc (cairo_t *cr, * @radius: the radius of the arc * @angle1: the start angle, in radians * @angle2: the end angle, in radians - * + * * Adds a circular arc of the given @radius to the current path. The * arc is centered at (@xc, @yc), begins at @angle1 and proceeds in * the direction of decreasing angles to end at @angle2. If @angle2 is @@ -1619,7 +1619,7 @@ cairo_stroke_to_path (cairo_t *cr) /** * cairo_close_path: * @cr: a cairo context - * + * * Adds a line segment to the path from the current point to the * beginning of the current subpath, (the most recent point passed to * cairo_move_to()), and closes this subpath. After this call the @@ -1649,7 +1649,7 @@ slim_hidden_def(cairo_close_path); /** * cairo_paint: * @cr: a cairo context - * + * * A drawing operator that paints the current source everywhere within * the current clip region. **/ @@ -1668,7 +1668,7 @@ cairo_paint (cairo_t *cr) * cairo_paint_with_alpha: * @cr: a cairo context * @alpha: alpha value, between 0 (transparent) and 1 (opaque) - * + * * A drawing operator that paints the current source everywhere within * the current clip region using a mask of constant alpha value * @alpha. The effect is similar to cairo_paint(), but the drawing @@ -1745,7 +1745,7 @@ cairo_mask (cairo_t *cr, * A drawing operator that paints the current source * using the alpha channel of @surface as a mask. (Opaque * areas of @surface are painted with the source, transparent - * areas are not painted.) + * areas are not painted.) */ void cairo_mask_surface (cairo_t *cr, @@ -1772,7 +1772,7 @@ cairo_mask_surface (cairo_t *cr, /** * cairo_stroke: * @cr: a cairo context - * + * * A drawing operator that strokes the current path according to the * current line width, line join, line cap, and dash settings. After * cairo_stroke, the current path will be cleared from the cairo @@ -1791,7 +1791,7 @@ cairo_stroke (cairo_t *cr) /** * cairo_stroke_preserve: * @cr: a cairo context - * + * * A drawing operator that strokes the current path according to the * current line width, line join, line cap, and dash settings. Unlike * cairo_stroke(), cairo_stroke_preserve preserves the path within the @@ -1816,7 +1816,7 @@ slim_hidden_def(cairo_stroke_preserve); /** * cairo_fill: * @cr: a cairo context - * + * * A drawing operator that fills the current path according to the * current fill rule, (each sub-path is implicitly closed before being * filled). After cairo_fill, the current path will be cleared from @@ -1834,7 +1834,7 @@ cairo_fill (cairo_t *cr) /** * cairo_fill_preserve: * @cr: a cairo context - * + * * A drawing operator that fills the current path according to the * current fill rule, (each sub-path is implicitly closed before being * filled). Unlike cairo_fill(), cairo_fill_preserve preserves the @@ -1943,7 +1943,7 @@ cairo_fill_extents (cairo_t *cr, /** * cairo_clip: * @cr: a cairo context - * + * * Establishes a new clip region by intersecting the current clip * region with the current path as it would be filled by cairo_fill() * and according to the current fill rule (see cairo_set_fill_rule()). @@ -1973,7 +1973,7 @@ cairo_clip (cairo_t *cr) /** * cairo_clip_preserve: * @cr: a cairo context - * + * * Establishes a new clip region by intersecting the current clip * region with the current path as it would be filled by cairo_fill() * and according to the current fill rule (see cairo_set_fill_rule()). @@ -2007,7 +2007,7 @@ slim_hidden_def(cairo_clip_preserve); /** * cairo_reset_clip: * @cr: a cairo context - * + * * Reset the current clip region to its original, unrestricted * state. That is, set the clip region to an infinitely large shape * containing the target surface. Equivalently, if infinity is too @@ -2037,7 +2037,7 @@ cairo_reset_clip (cairo_t *cr) * @family: a font family name, encoded in UTF-8 * @slant: the slant for the font * @weight: the weight for the font - * + * * Selects a family and style of font from a simplified description as * a family name, slant and weight. This function is meant to be used * only for applications with simple font needs: Cairo doesn't provide @@ -2063,7 +2063,7 @@ cairo_select_font_face (cairo_t *cr, /** * cairo_get_font_face: * @cr: a #cairo_t - * + * * Gets the current font face for a #cairo_t. * * Return value: the current font object. Can return %NULL @@ -2093,7 +2093,7 @@ cairo_get_font_face (cairo_t *cr) * @cr: a #cairo_t * @extents: a #cairo_font_extents_t object into which the results * will be stored. - * + * * Gets the font extents for the currently selected font. **/ void @@ -2133,7 +2133,7 @@ cairo_set_font_face (cairo_t *cr, * cairo_set_font_size: * @cr: a #cairo_t * @size: the new font size, in user space units - * + * * Sets the current font matrix to a scale by a factor of @size, replacing * any font matrix previously set with cairo_set_font_size() or * cairo_set_font_matrix(). This results in a font size of @size user space @@ -2194,7 +2194,7 @@ cairo_get_font_matrix (cairo_t *cr, cairo_matrix_t *matrix) * cairo_set_font_options: * @cr: a #cairo_t * @options: font options to use - * + * * Sets a set of custom font rendering options for the #cairo_t. * Rendering options are derived by merging these options with the * options derived from underlying surface; if the value in @options @@ -2218,7 +2218,7 @@ cairo_set_font_options (cairo_t *cr, * @cr: a #cairo_t * @options: a #cairo_font_options_t object into which to store * the retrieved options. All existing values are overwritten - * + * * Retrieves font rendering options set via #cairo_set_font_options. * Note that the returned options do not include any options derived * from the underlying surface; they are literally the options @@ -2277,7 +2277,7 @@ BAIL: * @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 @@ -2341,14 +2341,14 @@ cairo_text_extents (cairo_t *cr, * @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). **/ @@ -2371,7 +2371,7 @@ cairo_glyph_extents (cairo_t *cr, * cairo_show_text: * @cr: a cairo context * @utf8: a string of text encoded in UTF-8 - * + * * A drawing operator that generates the shape from a string of UTF-8 * characters, rendered according to the current font_face, font_size * (font_matrix), and font_options. @@ -2505,9 +2505,9 @@ cairo_glyph_path (cairo_t *cr, cairo_glyph_t *glyphs, int num_glyphs) /** * 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 @@ -2519,9 +2519,9 @@ cairo_get_operator (cairo_t *cr) /** * 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 @@ -2533,9 +2533,9 @@ cairo_get_tolerance (cairo_t *cr) /** * cairo_get_antialias: * @cr: a cairo context - * + * * Gets the current shape antialiasing mode, as set by cairo_set_shape_antialias(). - * + * * Return value: the current shape antialiasing mode. **/ cairo_antialias_t @@ -2549,7 +2549,7 @@ cairo_get_antialias (cairo_t *cr) * @cr: a cairo context * @x: return value for X coordinate of the current point * @y: return value for Y coordinate of the current point - * + * * Gets the current point of the current path, which is * conceptually the final point reached by the path so far. * @@ -2592,9 +2592,9 @@ slim_hidden_def(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 @@ -2606,7 +2606,7 @@ cairo_get_fill_rule (cairo_t *cr) /** * cairo_get_line_width: * @cr: a cairo context - * + * * Return value: the current line width value exactly as set by * cairo_set_line_width(). Note that the value is unchanged even if * the CTM has changed between the calls to cairo_set_line_width() and @@ -2621,9 +2621,9 @@ cairo_get_line_width (cairo_t *cr) /** * 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 @@ -2635,9 +2635,9 @@ cairo_get_line_cap (cairo_t *cr) /** * 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 @@ -2649,9 +2649,9 @@ cairo_get_line_join (cairo_t *cr) /** * 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 @@ -2676,7 +2676,7 @@ cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix) /** * cairo_get_target: * @cr: a cairo context - * + * * Gets the target surface for the cairo context as passed to * cairo_create(). * @@ -2685,7 +2685,7 @@ cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix) * (ie. cairo_status() <literal>!=</literal> %CAIRO_STATUS_SUCCESS). * A nil surface is indicated by cairo_surface_status() * <literal>!=</literal> %CAIRO_STATUS_SUCCESS. - * + * * Return value: the target surface. This object is owned by cairo. To * keep a reference to it, you must call cairo_surface_reference(). **/ @@ -2726,11 +2726,11 @@ cairo_get_group_target (cairo_t *cr) /** * cairo_copy_path: * @cr: a cairo context - * + * * Creates a copy of the current path and returns it to the user as a * #cairo_path_t. See #cairo_path_data_t for hints on how to iterate * over the returned data structure. - * + * * This function will always return a valid pointer, but the result * will have no data (<literal>data==NULL</literal> and * <literal>num_data==0</literal>), if either of the following @@ -2761,7 +2761,7 @@ cairo_copy_path (cairo_t *cr) /** * cairo_copy_path_flat: * @cr: a cairo context - * + * * Gets a flattened copy of the current path and returns it to the * user as a #cairo_path_t. See #cairo_path_data_t for hints on * how to iterate over the returned data structure. @@ -2786,7 +2786,7 @@ cairo_copy_path (cairo_t *cr) * <literal>path->status</literal> will contain the same status that * would be returned by cairo_status().</listitem> * </orderedlist> - * + * * Return value: the copy of the current path. The caller owns the * returned object and should call cairo_path_destroy() when finished * with it. @@ -2804,7 +2804,7 @@ cairo_copy_path_flat (cairo_t *cr) * cairo_append_path: * @cr: a cairo context * @path: path to be appended - * + * * Append the @path onto the current path. The @path may be either the * return value from one of cairo_copy_path() or * cairo_copy_path_flat() or it may be constructed manually. See |