2009-04-27 14:48:12 +00:00
|
|
|
/*
|
|
|
|
* Cogl
|
2008-10-30 17:57:41 +00:00
|
|
|
*
|
2009-04-27 14:48:12 +00:00
|
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008,2009 Intel Corporation.
|
2008-10-30 17:57:41 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2009-04-27 14:48:12 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
2008-10-30 17:57:41 +00:00
|
|
|
*/
|
|
|
|
|
2008-10-30 17:25:00 +00:00
|
|
|
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
|
|
|
#error "Only <cogl/cogl.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __COGL_PATH_H__
|
|
|
|
#define __COGL_PATH_H__
|
|
|
|
|
|
|
|
#include <cogl/cogl-types.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
/**
|
2010-02-10 22:30:37 +00:00
|
|
|
* SECTION:cogl-paths
|
|
|
|
* @short_description: Functions for constructing and drawing 2D paths.
|
|
|
|
*
|
|
|
|
* There are two levels on which drawing with cogl-paths can be used.
|
|
|
|
* The highest level functions construct various simple primitive
|
|
|
|
* shapes to be either filled or stroked. Using a lower-level set of
|
|
|
|
* functions more complex and arbitrary paths can be constructed by
|
|
|
|
* concatenating straight line, bezier curve and arc segments.
|
2008-10-30 17:25:00 +00:00
|
|
|
*
|
|
|
|
* When constructing arbitrary paths, the current pen location is
|
|
|
|
* initialized using the move_to command. The subsequent path segments
|
|
|
|
* implicitly use the last pen location as their first vertex and move
|
|
|
|
* the pen location to the last vertex they produce at the end. Also
|
|
|
|
* there are special versions of functions that allow specifying the
|
|
|
|
* vertices of the path segments relative to the last pen location
|
|
|
|
* rather then in the absolute coordinates.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_fill:
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* Fills the constructed shape using the current drawing color. The
|
|
|
|
* current path is then cleared. To use the path again, call
|
|
|
|
* cogl_path_fill_preserve() instead.
|
2008-10-30 17:25:00 +00:00
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_fill (void);
|
2008-12-04 13:45:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_fill_preserve:
|
|
|
|
*
|
|
|
|
* Fills the constructed shape using the current drawing color and
|
|
|
|
* preserves the path to be used again.
|
|
|
|
*
|
|
|
|
* Since: 1.0
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_fill_preserve (void);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_stroke:
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* Strokes the constructed shape using the current drawing color and a
|
|
|
|
* width of 1 pixel (regardless of the current transformation
|
|
|
|
* matrix). To current path is then cleared. To use the path again,
|
|
|
|
* call cogl_path_stroke_preserve() instead.
|
2008-10-30 17:25:00 +00:00
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_stroke (void);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
2008-12-04 13:45:09 +00:00
|
|
|
/**
|
|
|
|
* cogl_path_stroke_preserve:
|
|
|
|
*
|
|
|
|
* Strokes the constructed shape using the current drawing color and
|
|
|
|
* preserves the path to be used again.
|
|
|
|
*
|
|
|
|
* Since: 1.0
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_stroke_preserve (void);
|
2008-12-04 13:45:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_new:
|
|
|
|
*
|
|
|
|
* Clears the current path and starts a new one.
|
|
|
|
*
|
|
|
|
* Since: 1.0
|
|
|
|
*/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_new (void);
|
2008-12-04 13:45:09 +00:00
|
|
|
|
2008-10-30 17:25:00 +00:00
|
|
|
/**
|
|
|
|
* cogl_path_move_to:
|
|
|
|
* @x: X coordinate of the pen location to move to.
|
|
|
|
* @y: Y coordinate of the pen location to move to.
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* Moves the pen to the given location. If there is an existing path
|
|
|
|
* this will start a new disjoint subpath.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_move_to (float x,
|
|
|
|
float y);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* 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.
|
2008-10-30 17:25:00 +00:00
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_rel_move_to (float x,
|
|
|
|
float y);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_line_to (float x,
|
|
|
|
float y);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_rel_line_to (float x,
|
|
|
|
float y);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
2009-07-12 00:38:40 +00:00
|
|
|
* @radius_y: Y radius of the elliptical arc
|
2008-10-30 17:25:00 +00:00
|
|
|
* @angle_1: Angle in the unit-circle at which the arc begin
|
|
|
|
* @angle_2: Angle in the unit-circle 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.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_arc (float center_x,
|
|
|
|
float center_y,
|
|
|
|
float radius_x,
|
|
|
|
float radius_y,
|
|
|
|
float angle_1,
|
|
|
|
float angle_2);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_curve_to:
|
2009-03-13 15:28:20 +00:00
|
|
|
* @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
|
2009-03-13 15:43:19 +00:00
|
|
|
* @x_3: X coordinate of the fourth bezier control point
|
|
|
|
* @y_3: Y coordinate of the fourth bezier control point
|
2008-10-30 17:25:00 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_curve_to (float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2,
|
|
|
|
float x_3,
|
|
|
|
float y_3);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_rel_curve_to:
|
2009-03-13 15:28:20 +00:00
|
|
|
* @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
|
2009-03-13 15:43:19 +00:00
|
|
|
* @x_3: X coordinate of the fourth bezier control point
|
|
|
|
* @y_3: Y coordinate of the fourth bezier control point
|
2008-10-30 17:25:00 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_rel_curve_to (float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2,
|
|
|
|
float x_3,
|
|
|
|
float y_3);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_close (void);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_line:
|
2009-03-13 15:28:20 +00:00
|
|
|
* @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
|
2008-10-30 17:25:00 +00:00
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* 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.
|
2008-10-30 17:25:00 +00:00
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_line (float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_polyline:
|
2009-09-21 14:21:21 +00:00
|
|
|
* @coords: (in) (array) (transfer none): A pointer to the first element of an
|
|
|
|
* array of fixed-point values that specify the vertex coordinates.
|
2008-10-30 17:25:00 +00:00
|
|
|
* @num_points: The total number of vertices.
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* 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.
|
2008-10-30 17:25:00 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_polyline (float *coords,
|
|
|
|
int num_points);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_polygon:
|
2009-09-21 14:21:21 +00:00
|
|
|
* @coords: (in) (array) (transfer none): A pointer to the first element of
|
|
|
|
* an array of fixed-point values that specify the vertex coordinates.
|
2008-10-30 17:25:00 +00:00
|
|
|
* @num_points: The total number of vertices.
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* Constructs a polygonal shape of the given number of vertices. If
|
|
|
|
* there is an existing path this will start a new disjoint sub-path.
|
2008-10-30 17:25:00 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_polygon (float *coords,
|
|
|
|
int num_points);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_rectangle:
|
2009-03-13 15:28:20 +00:00
|
|
|
* @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.
|
2008-10-30 17:25:00 +00:00
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* Constructs a rectangular shape at the given coordinates. If there
|
|
|
|
* is an existing path this will start a new disjoint sub-path.
|
2008-10-30 17:25:00 +00:00
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_rectangle (float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* Constructs an ellipse shape. If there is an existing path this will
|
|
|
|
* start a new disjoint sub-path.
|
2008-10-30 17:25:00 +00:00
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_ellipse (float center_x,
|
|
|
|
float center_y,
|
|
|
|
float radius_x,
|
|
|
|
float radius_y);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cogl_path_round_rectangle:
|
2009-03-13 15:28:20 +00:00
|
|
|
* @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.
|
2008-10-30 17:25:00 +00:00
|
|
|
* @radius: Radius of the corner arcs.
|
|
|
|
* @arc_step: Angle increment resolution for subdivision of
|
|
|
|
* the corner arcs.
|
|
|
|
*
|
2008-12-04 13:45:09 +00:00
|
|
|
* Constructs a rectangular shape with rounded corners. If there is an
|
|
|
|
* existing path this will start a new disjoint sub-path.
|
2009-03-13 12:20:26 +00:00
|
|
|
**/
|
cogl: improves header and coding style consistency
We've had complaints that our Cogl code/headers are a bit "special" so
this is a first pass at tidying things up by giving them some
consistency. These changes are all consistent with how new code in Cogl
is being written, but the style isn't consistently applied across all
code yet.
There are two parts to this patch; but since each one required a large
amount of effort to maintain tidy indenting it made sense to combine the
changes to reduce the time spent re indenting the same lines.
The first change is to use a consistent style for declaring function
prototypes in headers. Cogl headers now consistently use this style for
prototypes:
return_type
cogl_function_name (CoglType arg0,
CoglType arg1);
Not everyone likes this style, but it seems that most of the currently
active Cogl developers agree on it.
The second change is to constrain the use of redundant glib data types
in Cogl. Uses of gint, guint, gfloat, glong, gulong and gchar have all
been replaced with int, unsigned int, float, long, unsigned long and char
respectively. When talking about pixel data; use of guchar has been
replaced with guint8, otherwise unsigned char can be used.
The glib types that we continue to use for portability are gboolean,
gint{8,16,32,64}, guint{8,16,32,64} and gsize.
The general intention is that Cogl should look palatable to the widest
range of C programmers including those outside the Gnome community so
- especially for the public API - we want to minimize the number of
foreign looking typedefs.
2010-02-10 01:57:32 +00:00
|
|
|
void
|
|
|
|
cogl_path_round_rectangle (float x_1,
|
|
|
|
float y_1,
|
|
|
|
float x_2,
|
|
|
|
float y_2,
|
|
|
|
float radius,
|
|
|
|
float arc_step);
|
2008-10-30 17:25:00 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __COGL_PATH_H__ */
|