From 368dc483723ae213594df202b6651234c0c419fa Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 1 Jun 2010 17:34:59 +0100 Subject: [PATCH] cogl-path: Renames cogl_path_get/set cogl_get/set_path These aren't path methods so aren't consistent with the cogl_object_method naming style we are aiming for. --- cogl/cogl-clip-state.c | 2 +- cogl/cogl-path.c | 47 ++++++++++++++-------------- cogl/cogl-path.h | 8 ++--- doc/reference/cogl/cogl-sections.txt | 4 +-- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/cogl/cogl-clip-state.c b/cogl/cogl-clip-state.c index bb8ec1ee5..9e1798fd3 100644 --- a/cogl/cogl-clip-state.c +++ b/cogl/cogl-clip-state.c @@ -235,7 +235,7 @@ cogl_clip_push_from_path_preserve (void) cogl_get_modelview_matrix (&modelview_matrix); - _cogl_clip_stack_push_from_path (stack, cogl_path_get (), + _cogl_clip_stack_push_from_path (stack, cogl_get_path (), &modelview_matrix); clip_state->stack_dirty = TRUE; diff --git a/cogl/cogl-path.c b/cogl/cogl-path.c index b89d29fab..9c1475ad2 100644 --- a/cogl/cogl-path.c +++ b/cogl/cogl-path.c @@ -1060,29 +1060,6 @@ cogl_path_rel_curve_to (float x_1, data->path_pen.y + y_3); } -CoglPath * -cogl_path_get (void) -{ - _COGL_GET_CONTEXT (ctx, NULL); - - return ctx->current_path; -} - -void -cogl_path_set (CoglPath *path) -{ - _COGL_GET_CONTEXT (ctx, NO_RETVAL); - - if (!cogl_is_path (path)) - return; - - /* Reference the new object first in case it is the same as the old - object */ - cogl_object_ref (path); - cogl_object_unref (ctx->current_path); - ctx->current_path = path; -} - CoglPath * _cogl_path_new (void) { @@ -1241,3 +1218,27 @@ cogl_rel_curve2_to (float x_1, } #endif + +CoglPath * +cogl_get_path (void) +{ + _COGL_GET_CONTEXT (ctx, NULL); + + return ctx->current_path; +} + +void +cogl_set_path (CoglPath *path) +{ + _COGL_GET_CONTEXT (ctx, NO_RETVAL); + + if (!cogl_is_path (path)) + return; + + /* Reference the new object first in case it is the same as the old + object */ + cogl_object_ref (path); + cogl_object_unref (ctx->current_path); + ctx->current_path = path; +} + diff --git a/cogl/cogl-path.h b/cogl/cogl-path.h index 618f320c7..aa8bfd2ed 100644 --- a/cogl/cogl-path.h +++ b/cogl/cogl-path.h @@ -368,7 +368,7 @@ cogl_path_round_rectangle (float x_1, float arc_step); /** - * cogl_path_get: + * cogl_get_path: * * Gets a pointer to the current path. The path can later be used * again by calling cogl_path_set(). Note that the path isn't copied @@ -382,10 +382,10 @@ cogl_path_round_rectangle (float x_1, * Since: 1.4 */ CoglPath * -cogl_path_get (void); +cogl_get_path (void); /** - * cogl_path_set: + * cogl_set_path: * @path: A #CoglPath object * * Replaces the current path with @path. A reference is taken on the @@ -395,7 +395,7 @@ cogl_path_get (void); * Since: 1.4 */ void -cogl_path_set (CoglPath *path); +cogl_set_path (CoglPath *path); /** * cogl_path_copy: diff --git a/doc/reference/cogl/cogl-sections.txt b/doc/reference/cogl/cogl-sections.txt index 900a88253..755a5827a 100644 --- a/doc/reference/cogl/cogl-sections.txt +++ b/doc/reference/cogl/cogl-sections.txt @@ -155,8 +155,8 @@ cogl_polygon cogl_path_new -cogl_path_get -cogl_path_set +cogl_get_path +cogl_set_path cogl_path_copy cogl_path_move_to cogl_path_close