2010-11-04 00:27:47 +00:00
|
|
|
/*
|
|
|
|
* Cogl
|
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* A Low Level GPU Graphics and Utilities API
|
2010-11-04 00:27:47 +00:00
|
|
|
*
|
2013-04-28 02:22:24 +00:00
|
|
|
* Copyright (C) 2008,2009,2013 Intel Corporation.
|
2010-11-04 00:27:47 +00:00
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software and associated documentation
|
|
|
|
* files (the "Software"), to deal in the Software without
|
|
|
|
* restriction, including without limitation the rights to use, copy,
|
|
|
|
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
* of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
2010-11-04 00:27:47 +00:00
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
2010-11-04 00:27:47 +00:00
|
|
|
*
|
2014-02-22 01:28:54 +00:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
2010-11-04 00:27:47 +00:00
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-06-20 17:49:08 +00:00
|
|
|
#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
|
2010-11-04 00:27:47 +00:00
|
|
|
#error "Only <cogl/cogl.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2016-06-16 19:04:40 +00:00
|
|
|
#ifndef __COGL_PATH_FUNCTIONS_H__
|
|
|
|
#define __COGL_PATH_FUNCTIONS_H__
|
2010-11-04 00:27:47 +00:00
|
|
|
|
|
|
|
#include <cogl/cogl-types.h>
|
2013-10-09 12:31:12 +00:00
|
|
|
#ifdef COGL_COMPILATION
|
|
|
|
#include "cogl-context.h"
|
|
|
|
#else
|
2013-04-28 02:22:24 +00:00
|
|
|
#include <cogl/cogl.h>
|
2013-10-09 12:31:12 +00:00
|
|
|
#endif
|
2013-09-02 15:02:42 +00:00
|
|
|
#include <glib-object.h>
|
2010-11-04 00:27:47 +00:00
|
|
|
|
2018-11-23 07:42:05 +00:00
|
|
|
G_BEGIN_DECLS
|
2010-11-04 00:27:47 +00:00
|
|
|
|
2013-09-02 15:02:42 +00:00
|
|
|
/**
|
|
|
|
* cogl_path_get_gtype:
|
|
|
|
*
|
|
|
|
* Returns: a #GType that can be used with the GLib type system.
|
|
|
|
*/
|
|
|
|
GType cogl_path_get_gtype (void);
|
|
|
|
|
2010-11-04 00:27:47 +00:00
|
|
|
#define cogl_path_new cogl2_path_new
|
|
|
|
/**
|
|
|
|
* cogl_path_new:
|
|
|
|
*
|
|
|
|
* Creates a new, empty path object. The default fill rule is
|
|
|
|
* %COGL_PATH_FILL_RULE_EVEN_ODD.
|
|
|
|
*
|
|
|
|
* Return value: A pointer to a newly allocated #CoglPath, which can
|
|
|
|
* be freed using cogl_object_unref().
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
CoglPath *
|
|
|
|
cogl_path_new (void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_copy:
|
|
|
|
* @path: A #CoglPath object
|
|
|
|
*
|
|
|
|
* Returns a new copy of the path in @path. The new path has a
|
|
|
|
* reference count of 1 so you should unref it with
|
|
|
|
* cogl_object_unref() if you no longer need it.
|
|
|
|
*
|
|
|
|
* Internally the path will share the data until one of the paths is
|
|
|
|
* modified so copying paths should be relatively cheap.
|
|
|
|
*
|
2013-09-02 15:02:42 +00:00
|
|
|
* Return value: (transfer full): a copy of the path in @path.
|
2010-11-04 00:27:47 +00:00
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
CoglPath *
|
|
|
|
cogl_path_copy (CoglPath *path);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_is_path:
|
|
|
|
* @object: A #CoglObject
|
|
|
|
*
|
|
|
|
* Gets whether the given object references an existing path object.
|
|
|
|
*
|
|
|
|
* Return value: %TRUE if the object references a #CoglPath,
|
|
|
|
* %FALSE otherwise.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 20:56:40 +00:00
|
|
|
CoglBool
|
2010-11-04 00:27:47 +00:00
|
|
|
cogl_is_path (void *object);
|
|
|
|
|
|
|
|
#define cogl_path_move_to cogl2_path_move_to
|
|
|
|
/**
|
|
|
|
* cogl_path_move_to:
|
|
|
|
* @x: X coordinate of the pen location to move to.
|
|
|
|
* @y: Y coordinate of the pen location to move to.
|
|
|
|
*
|
|
|
|
* Moves the pen to the given location. If there is an existing path
|
|
|
|
* this will start a new disjoint subpath.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_move_to (CoglPath *path,
|
|
|
|
float x,
|
|
|
|
float y);
|
|
|
|
|
|
|
|
#define cogl_path_rel_move_to cogl2_path_rel_move_to
|
|
|
|
/**
|
|
|
|
* cogl_path_rel_move_to:
|
|
|
|
* @x: X offset from the current pen location to move the pen to.
|
|
|
|
* @y: Y offset from the current pen location to move the pen to.
|
|
|
|
*
|
|
|
|
* Moves the pen to the given offset relative to the current pen
|
|
|
|
* location. If there is an existing path this will start a new
|
|
|
|
* disjoint subpath.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_rel_move_to (CoglPath *path,
|
|
|
|
float x,
|
|
|
|
float y);
|
|
|
|
|
|
|
|
#define cogl_path_line_to cogl2_path_line_to
|
|
|
|
/**
|
|
|
|
* cogl_path_line_to:
|
|
|
|
* @x: X coordinate of the end line vertex
|
|
|
|
* @y: Y coordinate of the end line vertex
|
|
|
|
*
|
|
|
|
* Adds a straight line segment to the current path that ends at the
|
|
|
|
* given coordinates.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_line_to (CoglPath *path,
|
|
|
|
float x,
|
|
|
|
float y);
|
|
|
|
|
|
|
|
#define cogl_path_rel_line_to cogl2_path_rel_line_to
|
|
|
|
/**
|
|
|
|
* cogl_path_rel_line_to:
|
|
|
|
* @x: X offset from the current pen location of the end line vertex
|
|
|
|
* @y: Y offset from the current pen location of the end line vertex
|
|
|
|
*
|
|
|
|
* Adds a straight line segment to the current path that ends at the
|
|
|
|
* given coordinates relative to the current pen location.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_rel_line_to (CoglPath *path,
|
|
|
|
float x,
|
|
|
|
float y);
|
|
|
|
|
|
|
|
#define cogl_path_arc cogl2_path_arc
|
|
|
|
/**
|
|
|
|
* cogl_path_arc:
|
|
|
|
* @center_x: X coordinate of the elliptical arc center
|
|
|
|
* @center_y: Y coordinate of the elliptical arc center
|
|
|
|
* @radius_x: X radius of the elliptical arc
|
|
|
|
* @radius_y: Y radius of the elliptical arc
|
|
|
|
* @angle_1: Angle in degrees at which the arc begin
|
|
|
|
* @angle_2: Angle in degrees at which the arc ends
|
|
|
|
*
|
|
|
|
* Adds an elliptical arc segment to the current path. A straight line
|
|
|
|
* segment will link the current pen location with the first vertex
|
|
|
|
* of the arc. If you perform a move_to to the arcs start just before
|
|
|
|
* drawing it you create a free standing arc.
|
|
|
|
*
|
|
|
|
* The angles are measured in degrees where 0° is in the direction of
|
|
|
|
* the positive X axis and 90° is in the direction of the positive Y
|
|
|
|
* axis. The angle of the arc begins at @angle_1 and heads towards
|
|
|
|
* @angle_2 (so if @angle_2 is less than @angle_1 it will decrease,
|
|
|
|
* otherwise it will increase).
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_arc (CoglPath *path,
|
|
|
|
float center_x,
|
|
|
|
float center_y,
|
|
|
|
float radius_x,
|
|
|
|
float radius_y,
|
|
|
|
float angle_1,
|
|
|
|
float angle_2);
|
|
|
|
|
|
|
|
#define cogl_path_curve_to cogl2_path_curve_to
|
|
|
|
/**
|
|
|
|
* cogl_path_curve_to:
|
|
|
|
* @x_1: X coordinate of the second bezier control point
|
|
|
|
* @y_1: Y coordinate of the second bezier control point
|
|
|
|
* @x_2: X coordinate of the third bezier control point
|
|
|
|
* @y_2: Y coordinate of the third bezier control point
|
|
|
|
* @x_3: X coordinate of the fourth bezier control point
|
|
|
|
* @y_3: Y coordinate of the fourth bezier control point
|
|
|
|
*
|
|
|
|
* Adds a cubic bezier curve segment to the current path with the given
|
|
|
|
* second, third and fourth control points and using current pen location
|
|
|
|
* as the first control point.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_curve_to (CoglPath *path,
|
|
|
|
float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2,
|
|
|
|
float x_3,
|
|
|
|
float y_3);
|
|
|
|
|
|
|
|
#define cogl_path_rel_curve_to cogl2_path_rel_curve_to
|
|
|
|
/**
|
|
|
|
* cogl_path_rel_curve_to:
|
|
|
|
* @x_1: X coordinate of the second bezier control point
|
|
|
|
* @y_1: Y coordinate of the second bezier control point
|
|
|
|
* @x_2: X coordinate of the third bezier control point
|
|
|
|
* @y_2: Y coordinate of the third bezier control point
|
|
|
|
* @x_3: X coordinate of the fourth bezier control point
|
|
|
|
* @y_3: Y coordinate of the fourth bezier control point
|
|
|
|
*
|
|
|
|
* Adds a cubic bezier curve segment to the current path with the given
|
|
|
|
* second, third and fourth control points and using current pen location
|
|
|
|
* as the first control point. The given coordinates are relative to the
|
|
|
|
* current pen location.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_rel_curve_to (CoglPath *path,
|
|
|
|
float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2,
|
|
|
|
float x_3,
|
|
|
|
float y_3);
|
|
|
|
|
|
|
|
#define cogl_path_close cogl2_path_close
|
|
|
|
/**
|
|
|
|
* cogl_path_close:
|
|
|
|
*
|
|
|
|
* Closes the path being constructed by adding a straight line segment
|
|
|
|
* to it that ends at the first vertex of the path.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_close (CoglPath *path);
|
|
|
|
|
|
|
|
#define cogl_path_line cogl2_path_line
|
|
|
|
/**
|
|
|
|
* cogl_path_line:
|
|
|
|
* @x_1: X coordinate of the start line vertex
|
|
|
|
* @y_1: Y coordinate of the start line vertex
|
|
|
|
* @x_2: X coordinate of the end line vertex
|
|
|
|
* @y_2: Y coordinate of the end line vertex
|
|
|
|
*
|
|
|
|
* Constructs a straight line shape starting and ending at the given
|
|
|
|
* coordinates. If there is an existing path this will start a new
|
|
|
|
* disjoint sub-path.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_line (CoglPath *path,
|
|
|
|
float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2);
|
|
|
|
|
|
|
|
#define cogl_path_polyline cogl2_path_polyline
|
|
|
|
/**
|
|
|
|
* cogl_path_polyline:
|
|
|
|
* @coords: (in) (array) (transfer none): A pointer to the first element of an
|
|
|
|
* array of fixed-point values that specify the vertex coordinates.
|
|
|
|
* @num_points: The total number of vertices.
|
|
|
|
*
|
|
|
|
* Constructs a series of straight line segments, starting from the
|
|
|
|
* first given vertex coordinate. If there is an existing path this
|
|
|
|
* will start a new disjoint sub-path. Each subsequent segment starts
|
|
|
|
* where the previous one ended and ends at the next given vertex
|
|
|
|
* coordinate.
|
|
|
|
*
|
|
|
|
* The coords array must contain 2 * num_points values. The first value
|
|
|
|
* represents the X coordinate of the first vertex, the second value
|
|
|
|
* represents the Y coordinate of the first vertex, continuing in the same
|
|
|
|
* fashion for the rest of the vertices. (num_points - 1) segments will
|
|
|
|
* be constructed.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_polyline (CoglPath *path,
|
|
|
|
const float *coords,
|
|
|
|
int num_points);
|
|
|
|
|
|
|
|
#define cogl_path_polygon cogl2_path_polygon
|
|
|
|
/**
|
|
|
|
* cogl_path_polygon:
|
|
|
|
* @coords: (in) (array) (transfer none): A pointer to the first element of
|
|
|
|
* an array of fixed-point values that specify the vertex coordinates.
|
|
|
|
* @num_points: The total number of vertices.
|
|
|
|
*
|
|
|
|
* Constructs a polygonal shape of the given number of vertices. If
|
|
|
|
* there is an existing path this will start a new disjoint sub-path.
|
|
|
|
*
|
|
|
|
* The coords array must contain 2 * num_points values. The first value
|
|
|
|
* represents the X coordinate of the first vertex, the second value
|
|
|
|
* represents the Y coordinate of the first vertex, continuing in the same
|
|
|
|
* fashion for the rest of the vertices.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_polygon (CoglPath *path,
|
|
|
|
const float *coords,
|
|
|
|
int num_points);
|
|
|
|
|
|
|
|
#define cogl_path_rectangle cogl2_path_rectangle
|
|
|
|
/**
|
|
|
|
* cogl_path_rectangle:
|
|
|
|
* @x_1: X coordinate of the top-left corner.
|
|
|
|
* @y_1: Y coordinate of the top-left corner.
|
|
|
|
* @x_2: X coordinate of the bottom-right corner.
|
|
|
|
* @y_2: Y coordinate of the bottom-right corner.
|
|
|
|
*
|
|
|
|
* Constructs a rectangular shape at the given coordinates. If there
|
|
|
|
* is an existing path this will start a new disjoint sub-path.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_rectangle (CoglPath *path,
|
|
|
|
float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2);
|
|
|
|
|
|
|
|
#define cogl_path_ellipse cogl2_path_ellipse
|
|
|
|
/**
|
|
|
|
* cogl_path_ellipse:
|
|
|
|
* @center_x: X coordinate of the ellipse center
|
|
|
|
* @center_y: Y coordinate of the ellipse center
|
|
|
|
* @radius_x: X radius of the ellipse
|
|
|
|
* @radius_y: Y radius of the ellipse
|
|
|
|
*
|
|
|
|
* Constructs an ellipse shape. If there is an existing path this will
|
|
|
|
* start a new disjoint sub-path.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_ellipse (CoglPath *path,
|
|
|
|
float center_x,
|
|
|
|
float center_y,
|
|
|
|
float radius_x,
|
|
|
|
float radius_y);
|
|
|
|
|
|
|
|
#define cogl_path_round_rectangle cogl2_path_round_rectangle
|
|
|
|
/**
|
|
|
|
* cogl_path_round_rectangle:
|
|
|
|
* @x_1: X coordinate of the top-left corner.
|
|
|
|
* @y_1: Y coordinate of the top-left corner.
|
|
|
|
* @x_2: X coordinate of the bottom-right corner.
|
|
|
|
* @y_2: Y coordinate of the bottom-right corner.
|
|
|
|
* @radius: Radius of the corner arcs.
|
|
|
|
* @arc_step: Angle increment resolution for subdivision of
|
|
|
|
* the corner arcs.
|
|
|
|
*
|
|
|
|
* Constructs a rectangular shape with rounded corners. If there is an
|
|
|
|
* existing path this will start a new disjoint sub-path.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_round_rectangle (CoglPath *path,
|
|
|
|
float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2,
|
|
|
|
float radius,
|
|
|
|
float arc_step);
|
|
|
|
|
|
|
|
#define cogl_path_set_fill_rule cogl2_path_set_fill_rule
|
|
|
|
/**
|
|
|
|
* cogl_path_set_fill_rule:
|
|
|
|
* @fill_rule: The new fill rule.
|
|
|
|
*
|
|
|
|
* Sets the fill rule of the current path to @fill_rule. This will
|
|
|
|
* affect how the path is filled when cogl_path_fill() is later
|
|
|
|
* called. Note that the fill rule state is attached to the path so
|
|
|
|
* calling cogl_get_path() will preserve the fill rule and calling
|
|
|
|
* cogl_path_new() will reset the fill rule back to the default.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_set_fill_rule (CoglPath *path, CoglPathFillRule fill_rule);
|
|
|
|
|
|
|
|
#define cogl_path_get_fill_rule cogl2_path_get_fill_rule
|
|
|
|
/**
|
|
|
|
* cogl_path_get_fill_rule:
|
|
|
|
*
|
|
|
|
* Retrieves the fill rule set using cogl_path_set_fill_rule().
|
|
|
|
*
|
|
|
|
* Return value: the fill rule that is used for the current path.
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
CoglPathFillRule
|
|
|
|
cogl_path_get_fill_rule (CoglPath *path);
|
|
|
|
|
|
|
|
#define cogl_path_fill cogl2_path_fill
|
|
|
|
/**
|
|
|
|
* cogl_path_fill:
|
|
|
|
*
|
|
|
|
* Fills the interior of the constructed shape using the current
|
|
|
|
* drawing color.
|
|
|
|
*
|
|
|
|
* The interior of the shape is determined using the fill rule of the
|
|
|
|
* path. See %CoglPathFillRule for details.
|
|
|
|
*
|
|
|
|
* <note>The result of referencing sliced textures in your current
|
|
|
|
* pipeline when filling a path are undefined. You should pass
|
|
|
|
* the %COGL_TEXTURE_NO_SLICING flag when loading any texture you will
|
|
|
|
* use while filling a path.</note>
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_fill (CoglPath *path);
|
|
|
|
|
2013-04-28 02:22:24 +00:00
|
|
|
/**
|
|
|
|
* cogl_framebuffer_fill_path:
|
|
|
|
* @framebuffer: A #CoglFramebuffer
|
|
|
|
* @pipeline: A #CoglPipeline to render with
|
|
|
|
* @path: The #CoglPath to fill
|
|
|
|
*
|
|
|
|
* Fills the interior of the path using the fragment operations
|
|
|
|
* defined by the pipeline.
|
|
|
|
*
|
|
|
|
* The interior of the shape is determined using the fill rule of the
|
|
|
|
* path. See %CoglPathFillRule for details.
|
|
|
|
*
|
|
|
|
* <note>The result of referencing sliced textures in your current
|
|
|
|
* pipeline when filling a path are undefined. You should pass
|
|
|
|
* the %COGL_TEXTURE_NO_SLICING flag when loading any texture you will
|
|
|
|
* use while filling a path.</note>
|
|
|
|
*
|
|
|
|
* Stability: unstable
|
|
|
|
* Deprecated: 1.16: Use cogl_path_fill() instead
|
|
|
|
*/
|
2018-05-07 14:14:29 +00:00
|
|
|
COGL_DEPRECATED_FOR (cogl_path_fill)
|
2013-04-28 02:22:24 +00:00
|
|
|
void
|
|
|
|
cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer,
|
|
|
|
CoglPipeline *pipeline,
|
2013-07-24 09:44:56 +00:00
|
|
|
CoglPath *path);
|
2013-04-28 02:22:24 +00:00
|
|
|
|
2010-11-04 00:27:47 +00:00
|
|
|
#define cogl_path_stroke cogl2_path_stroke
|
|
|
|
/**
|
|
|
|
* cogl_path_stroke:
|
|
|
|
*
|
|
|
|
* Strokes the constructed shape using the current drawing color and a
|
|
|
|
* width of 1 pixel (regardless of the current transformation
|
|
|
|
* matrix).
|
|
|
|
*
|
|
|
|
* Since: 2.0
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_path_stroke (CoglPath *path);
|
|
|
|
|
2013-04-28 02:22:24 +00:00
|
|
|
/**
|
|
|
|
* cogl_framebuffer_stroke_path:
|
|
|
|
* @framebuffer: A #CoglFramebuffer
|
|
|
|
* @pipeline: A #CoglPipeline to render with
|
|
|
|
* @path: The #CoglPath to stroke
|
|
|
|
*
|
|
|
|
* Strokes the edge of the path using the fragment operations defined
|
|
|
|
* by the pipeline. The stroke line will have a width of 1 pixel
|
|
|
|
* regardless of the current transformation matrix.
|
|
|
|
*
|
|
|
|
* Stability: unstable
|
|
|
|
* Deprecated: 1.16: Use cogl_path_stroke() instead
|
|
|
|
*/
|
2018-05-07 14:14:29 +00:00
|
|
|
COGL_DEPRECATED_FOR (cogl_path_stroke)
|
2013-04-28 02:22:24 +00:00
|
|
|
void
|
|
|
|
cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer,
|
|
|
|
CoglPipeline *pipeline,
|
2013-07-24 09:44:56 +00:00
|
|
|
CoglPath *path);
|
2013-04-28 02:22:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_framebuffer_push_path_clip:
|
|
|
|
* @framebuffer: A #CoglFramebuffer pointer
|
|
|
|
* @path: The path to clip with.
|
|
|
|
*
|
|
|
|
* Sets a new clipping area using the silhouette of the specified,
|
|
|
|
* filled @path. The clipping area is intersected with the previous
|
|
|
|
* clipping area. To restore the previous clipping area, call
|
|
|
|
* cogl_framebuffer_pop_clip().
|
|
|
|
*
|
|
|
|
* Since: 1.0
|
|
|
|
* Stability: unstable
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
cogl_framebuffer_push_path_clip (CoglFramebuffer *framebuffer,
|
|
|
|
CoglPath *path);
|
|
|
|
|
|
|
|
#define cogl_clip_push_from_path cogl2_clip_push_from_path
|
|
|
|
/**
|
|
|
|
* cogl_clip_push_from_path:
|
|
|
|
* @path: The path to clip with.
|
|
|
|
*
|
|
|
|
* Sets a new clipping area using the silhouette of the specified,
|
|
|
|
* filled @path. The clipping area is intersected with the previous
|
|
|
|
* clipping area. To restore the previous clipping area, call
|
|
|
|
* call cogl_clip_pop().
|
|
|
|
*
|
|
|
|
* Since: 1.8
|
|
|
|
* Stability: Unstable
|
|
|
|
* Deprecated: 1.16: Use cogl_framebuffer_push_path_clip() instead
|
|
|
|
*/
|
2018-05-07 14:14:29 +00:00
|
|
|
COGL_DEPRECATED_FOR (cogl_framebuffer_push_path_clip)
|
2013-04-28 02:22:24 +00:00
|
|
|
void
|
2013-07-24 09:44:56 +00:00
|
|
|
cogl_clip_push_from_path (CoglPath *path);
|
2013-04-28 02:22:24 +00:00
|
|
|
|
2018-11-23 07:42:05 +00:00
|
|
|
G_END_DECLS
|
2010-11-04 00:27:47 +00:00
|
|
|
|
2016-06-16 19:04:40 +00:00
|
|
|
#endif /* __COGL_PATH_FUNCTIONS_H__ */
|
2010-11-04 00:27:47 +00:00
|
|
|
|