Commit d62d780a authored by Jonas Ådahl's avatar Jonas Ådahl

Remove cogl-1.0 vs cogl-2.0 vs cogl experimental API split

Mutter (and libmutter users) are the only users of this version of
cogl, and will more or less only use the cogl-1.0, cogl-2.0 and cogl
experimental API variants, and having the possibility of having
different API versions of the same API depending on what file includes
it is error prone and confusing. Lets just remove the possibility of
having different versions of the same API.

https://bugzilla.gnome.org/show_bug.cgi?id=768977
parent eed71654
......@@ -16,7 +16,6 @@ AM_CPPFLAGS = \
-DCLUTTER_LOCALEDIR=\""$(localedir)"\" \
-DCLUTTER_SYSCONFDIR=\""$(sysconfdir)"\" \
-DCLUTTER_COMPILATION=1 \
-DCOGL_ENABLE_EXPERIMENTAL_API \
-DCOGL_DISABLE_DEPRECATION_WARNINGS \
-DG_LOG_DOMAIN=\"Clutter\" \
-I$(top_srcdir) \
......@@ -62,7 +61,6 @@ source_h = \
clutter-canvas.h \
clutter-child-meta.h \
clutter-click-action.h \
clutter-cogl-compat.h \
clutter-clone.h \
clutter-color-static.h \
clutter-color.h \
......
......@@ -856,8 +856,6 @@ CLUTTER_AVAILABLE_IN_1_10
void clutter_actor_remove_all_transitions (ClutterActor *self);
/* Experimental API */
#ifdef CLUTTER_ENABLE_EXPERIMENTAL_API
CLUTTER_AVAILABLE_IN_1_16
gboolean clutter_actor_has_mapped_clones (ClutterActor *self);
CLUTTER_AVAILABLE_IN_1_22
......@@ -865,7 +863,6 @@ void clutter_actor_set_opacity_override
gint opacity);
CLUTTER_AVAILABLE_IN_1_22
gint clutter_actor_get_opacity_override (ClutterActor *self);
#endif
/**
* ClutterActorCreateChildFunc:
......
......@@ -1214,7 +1214,7 @@ _clutter_backend_remove_event_translator (ClutterBackend *backend,
}
/**
* clutter_backend_get_cogl_context:
* clutter_backend_get_cogl_context: (skip)
* @backend: a #ClutterBackend
*
* Retrieves the #CoglContext associated with the given clutter
......
......@@ -31,9 +31,7 @@
#include <cairo.h>
#include <pango/pango.h>
#ifdef COGL_ENABLE_EXPERIMENTAL_API
#include <cogl/cogl.h>
#endif
#include <clutter/clutter-config.h>
#include <clutter/clutter-types.h>
......@@ -73,10 +71,8 @@ void clutter_backend_set_font_options (Clutter
CLUTTER_AVAILABLE_IN_ALL
const cairo_font_options_t * clutter_backend_get_font_options (ClutterBackend *backend);
#if defined (COGL_ENABLE_EXPERIMENTAL_API) && defined (CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_8
CoglContext * clutter_backend_get_cogl_context (ClutterBackend *backend);
#endif
G_END_DECLS
......
......@@ -6,9 +6,6 @@
/* Use Generic EGL backend */
#undef CLUTTER_EGL_BACKEND_GENERIC
/* Can use Cogl 2.0 API internally */
#undef COGL_ENABLE_EXPERIMENTAL_2_0_API
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
......
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright (C) 2012 Intel Corporation.
*
* 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
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __CLUTTER_COGL_COMPAT_H__
#define __CLUTTER_COGL_COMPAT_H__
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
#error "Only <clutter/clutter.h> can be included directly."
#endif
G_BEGIN_DECLS
/* XXX: Some public Clutter apis depend on Cogl types that have been
* removed from the Cogl 2.0 experimental api.
*
* If somone has opted to use the Cogl 2.0 experimental api by
* defining COGL_ENABLE_EXPERIMENTAL_2_0_API then we need to define
* some place holder typdefs for compatability.
*
* NB: we build all clutter internals with COGL_ENABLE_EXPERIMENTAL_2_0_API
* defined.
*/
#ifdef COGL_ENABLE_EXPERIMENTAL_2_0_API
/* CoglMaterial has been replaced with CoglPipeline in Cogl 2.0 */
typedef struct _CoglMaterial CoglMaterial;
#endif
G_END_DECLS
#endif /* __CLUTTER_COGL_COMPAT_H__ */
......@@ -131,10 +131,8 @@ gboolean clutter_image_set_bytes (ClutterImage
guint row_stride,
GError **error);
#if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_10
CoglTexture * clutter_image_get_texture (ClutterImage *image);
#endif
G_END_DECLS
......
......@@ -66,8 +66,6 @@
#include "clutter-build-config.h"
#endif
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include "clutter-offscreen-effect.h"
#include "cogl/cogl.h"
......@@ -520,7 +518,7 @@ clutter_offscreen_effect_get_texture (ClutterOffscreenEffect *effect)
}
/**
* clutter_offscreen_effect_get_target:
* clutter_offscreen_effect_get_target: (skip)
* @effect: a #ClutterOffscreenEffect
*
* Retrieves the material used as a render target for the offscreen
......
......@@ -31,7 +31,6 @@
#include <cogl/cogl.h>
#include <clutter/clutter-effect.h>
#include <clutter/clutter-cogl-compat.h>
G_BEGIN_DECLS
......
......@@ -884,7 +884,7 @@ clutter_paint_node_add_texture_rectangle (ClutterPaintNode *node,
}
/**
* clutter_paint_node_add_path:
* clutter_paint_node_add_path: (skip)
* @node: a #ClutterPaintNode
* @path: a Cogl path
*
......@@ -912,7 +912,7 @@ clutter_paint_node_add_path (ClutterPaintNode *node,
}
/**
* clutter_paint_node_add_primitive:
* clutter_paint_node_add_primitive: (skip)
* @node: a #ClutterPaintNode
* @primitive: a Cogl primitive
*
......
......@@ -66,14 +66,13 @@ void clutter_paint_node_add_texture_rectangle (Clutter
float y_1,
float x_2,
float y_2);
#if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_10
void clutter_paint_node_add_path (ClutterPaintNode *node,
CoglPath *path);
CLUTTER_AVAILABLE_IN_1_10
void clutter_paint_node_add_primitive (ClutterPaintNode *node,
CoglPrimitive *primitive);
#endif /* COGL_ENABLE_EXPERIMENTAL_API && CLUTTER_ENABLE_EXPERIMENTAL_API */
/**
* CLUTTER_VALUE_HOLDS_PAINT_NODE:
......
......@@ -511,7 +511,7 @@ clutter_pipeline_node_init (ClutterPipelineNode *self)
}
/**
* clutter_pipeline_node_new:
* clutter_pipeline_node_new: (skip)
* @pipeline: (allow-none): a Cogl pipeline state object, or %NULL
*
* Creates a new #ClutterPaintNode that will use the @pipeline to
......
......@@ -118,10 +118,8 @@ typedef struct _ClutterPipelineNodeClass ClutterPipelineNodeClass;
CLUTTER_AVAILABLE_IN_1_10
GType clutter_pipeline_node_get_type (void) G_GNUC_CONST;
#if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
CLUTTER_AVAILABLE_IN_1_10
ClutterPaintNode * clutter_pipeline_node_new (CoglPipeline *pipeline);
#endif /* COGL_ENABLE_EXPERIMENTAL_API && CLUTTER_ENABLE_EXPERIMENTAL_API */
#define CLUTTER_TYPE_TEXT_NODE (clutter_text_node_get_type ())
#define CLUTTER_TEXT_NODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_TEXT_NODE, ClutterTextNode))
......
......@@ -50,17 +50,8 @@
/* sadly, we are still using ClutterShader internally */
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
/* This file depends on the glib enum types which aren't exposed
* by cogl.h when COGL_ENABLE_EXPERIMENTAL_2_0_API is defined.
*
* Undefining COGL_ENABLE_EXPERIMENTAL_2_0_API will still expose
* us experimental api but will also expose Cogl 1.x api too...
*/
#undef COGL_ENABLE_EXPERIMENTAL_2_0_API
#include <cogl/cogl.h>
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include "clutter-texture.h"
#include "clutter-actor-private.h"
......@@ -73,6 +64,7 @@
#include "clutter-private.h"
#include "clutter-scriptable.h"
#include "clutter-stage-private.h"
#include "clutter-backend.h"
#include "deprecated/clutter-shader.h"
#include "deprecated/clutter-texture.h"
......
......@@ -250,12 +250,6 @@ AS_IF([test "x$enable_wayland_egl_server" = "xyes"],
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$enable_wayland_egl_server" = "xyes"])
dnl Instead of using AM_CFLAGS to ensure
dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter
dnl and cogl code we use a define in config.h instead. This helps ensure
dnl other tools such as glib-mkenums and gir-scanner don't end up
dnl using the define also.
AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally])
AC_DEFINE_UNQUOTED([CLUTTER_DRIVERS], ["*"], [List of Cogl drivers])
dnl strip leading spaces
......
......@@ -2,7 +2,6 @@
#include <gmodule.h>
#include <stdlib.h>
#undef COGL_ENABLE_EXPERIMENTAL_2_0_API
#include <cogl/cogl.h>
#include <clutter/clutter.h>
......
......@@ -81,23 +81,7 @@ CoglPango_1_0_gir_SCANNERFLAGS = \
--c-include='cogl-pango/cogl-pango.h' \
--include-uninstalled=$(top_builddir)/cogl/Cogl-1.0.gir
CoglPango-2.0.gir: libmutter-cogl-pango.la Makefile
CoglPango_2_0_gir_NAMESPACE = CoglPango
CoglPango_2_0_gir_VERSION = 2.0
CoglPango_2_0_gir_LIBS = $(top_builddir)/cogl/libmutter-cogl.la libmutter-cogl-pango.la
CoglPango_2_0_gir_FILES = $(source_h) $(source_c)
CoglPango_2_0_gir_CFLAGS = $(AM_CPPFLAGS) $(COGL_DEP_CFLAGS) $(COGL_PANGO_DEP_CFLAGS)
CoglPango_2_0_gir_INCLUDES = Pango-1.0 PangoCairo-1.0
CoglPango_2_0_gir_EXPORT_PACKAGES = mutter-cogl-pango-2.0-experimental
CoglPango_2_0_gir_SCANNERFLAGS = \
--warn-all \
--identifier-prefix=CoglPango \
--symbol-prefix=cogl_pango \
--c-include='cogl-pango/cogl-pango.h' \
--include-uninstalled=$(top_builddir)/cogl/Cogl-2.0.gir
INTROSPECTION_GIRS += CoglPango-1.0.gir CoglPango-2.0.gir
INTROSPECTION_GIRS += CoglPango-1.0.gir
girdir = $(mutterlibdir)
gir_DATA = $(INTROSPECTION_GIRS)
......
......@@ -174,7 +174,7 @@ PangoRenderer *
cogl_pango_font_map_get_renderer (CoglPangoFontMap *font_map);
/**
* cogl_pango_show_layout:
* cogl_pango_show_layout: (skip)
* @framebuffer: A #CoglFramebuffer to draw too.
* @layout: a #PangoLayout
* @x: X coordinate to render the layout at
......@@ -195,7 +195,7 @@ cogl_pango_show_layout (CoglFramebuffer *framebuffer,
const CoglColor *color);
/**
* cogl_pango_show_layout_line:
* cogl_pango_show_layout_line: (skip)
* @framebuffer: A #CoglFramebuffer to draw too.
* @line: a #PangoLayoutLine
* @x: X coordinate to render the line at
......
......@@ -39,7 +39,6 @@ cogl_tesselator_sources = \
source_c = \
$(cogl_tesselator_sources) \
cogl-path-private.h \
cogl1-path.c \
cogl-path.c \
$(NULL)
......@@ -51,13 +50,12 @@ EXTRA_DIST += \
source_1_x_h = \
cogl-path-types.h \
cogl1-path-functions.h \
$(NULL)
source_h = \
cogl-path.h \
$(source_1_x_h) \
cogl2-path-functions.h \
cogl-path-functions.h \
$(NULL)
# glib-mkenums rules
......
......@@ -32,8 +32,8 @@
#error "Only <cogl/cogl.h> can be included directly."
#endif
#ifndef __COGL2_PATH_FUNCTIONS_H__
#define __COGL2_PATH_FUNCTIONS_H__
#ifndef __COGL_PATH_FUNCTIONS_H__
#define __COGL_PATH_FUNCTIONS_H__
#include <cogl/cogl-types.h>
#ifdef COGL_COMPILATION
......@@ -41,20 +41,16 @@
#else
#include <cogl/cogl.h>
#endif
#ifdef COGL_HAS_GTYPE_SUPPORT
#include <glib-object.h>
#endif
COGL_BEGIN_DECLS
#ifdef COGL_HAS_GTYPE_SUPPORT
/**
* cogl_path_get_gtype:
*
* Returns: a #GType that can be used with the GLib type system.
*/
GType cogl_path_get_gtype (void);
#endif
#define cogl_path_new cogl2_path_new
/**
......@@ -541,5 +537,5 @@ cogl_clip_push_from_path (CoglPath *path);
COGL_END_DECLS
#endif /* __COGL2_PATH_FUNCTIONS_H__ */
#endif /* __COGL_PATH_FUNCTIONS_H__ */
......@@ -57,12 +57,7 @@
#endif
#include <cogl-path/cogl-path-types.h>
#ifdef COGL_ENABLE_EXPERIMENTAL_2_0_API
#include <cogl-path/cogl2-path-functions.h>
#else
#include <cogl-path/cogl1-path-functions.h>
#endif
#include <cogl-path/cogl-path-functions.h>
#endif /* __COGL_PATH_H__ */
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2008,2009,2012 Intel Corporation.
*
* 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:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* 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.
*
*
*/
#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
#error "Only <cogl/cogl.h> can be included directly."
#endif
#ifndef __COGL_PATH_FUNCTIONS_H__
#define __COGL_PATH_FUNCTIONS_H__
/* The functions are declared separately because cogl-path.c needs to
get the function declarations from the old 1.0 API without
colliding with the enum declarations from the 2.0 API */
#include <cogl/cogl-types.h>
COGL_BEGIN_DECLS
/**
* cogl_is_path:
* @handle: A CoglHandle
*
* Gets whether the given handle references an existing path object.
*
* Return value: %TRUE if the handle references a #CoglPath,
* %FALSE otherwise
*/
CoglBool
cogl_is_path (CoglHandle handle);
/**
* 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: 1.4
*/
void
cogl_path_set_fill_rule (CoglPathFillRule 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: 1.4
*/
CoglPathFillRule
cogl_path_get_fill_rule (void);
/**
* cogl_path_fill:
*
* Fills the interior of 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.
*
* The interior of the shape is determined using the fill rule of the
* path. See %CoglPathFillRule for details.
**/
void
cogl_path_fill (void);
/**
* cogl_path_fill_preserve:
*
* Fills the interior of the constructed shape using the current
* drawing color and preserves the path to be used again. See
* cogl_path_fill() for a description what is considered the interior
* of the shape.
*
* Since: 1.0
**/
void
cogl_path_fill_preserve (void);
/**
* cogl_path_stroke:
*
* 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.
**/
void
cogl_path_stroke (void);
/**
* cogl_path_stroke_preserve:
*
* Strokes the constructed shape using the current drawing color and
* preserves the path to be used again.
*
* Since: 1.0
**/
void
cogl_path_stroke_preserve (void);
/**
* cogl_path_new:
*
* Clears the current path and starts a new one. Creating a new path
* also resets the fill rule to the default which is
* %COGL_PATH_FILL_RULE_EVEN_ODD.
*
* Since: 1.0
*/
void
cogl_path_new (void);
/**
* 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.
**/
void
cogl_path_move_to (float x,
float y);
/**
* 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.
**/
void
cogl_path_rel_move_to (float x,
float y);
/**
* 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.
**/
void
cogl_path_line_to (float x,
float y);
/**
* 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.
**/
void
cogl_path_rel_line_to (float x,
float y);
/**
* 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).
**/
void
cogl_path_arc (float center_x,
float center_y,
float radius_x,
float radius_y,
float angle_1,
float angle_2);
/**
* 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.
**/
void
cogl_path_curve_to (float x_1,
float y_1,
float x_2,
float y_2,
float x_3,
float y_3);
/**
* 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.
*/
void
cogl_path_rel_curve_to (float x_1,
float y_1,
float x_2,
float y_2,
float x_3,
float y_3);
/**
* 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.
**/
void
cogl_path_close (void);
/**
* 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.
**/
void
cogl_path_line (float x_1,
float y_1,
float x_2,
float y_2);
/**
* 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.
**/
void
cogl_path_polyline (const float *coords,
int num_points);
/**
* 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.
**/
void
cogl_path_polygon (const float *coords,
int num_points);
/**
* 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.
**/
void
cogl_path_rectangle (float x_1,