[gimp] app: rename gimp_cairo_foo() functions to follow cairo naming scheme
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: rename gimp_cairo_foo() functions to follow cairo naming scheme
- Date: Wed, 7 Mar 2018 11:18:47 +0000 (UTC)
commit efa80407803fe1723acfa40c7dee8d840562a2b8
Author: Ell <ell_se yahoo com>
Date: Wed Mar 7 04:38:58 2018 -0500
app: rename gimp_cairo_foo() functions to follow cairo naming scheme
Really pedantic stuff :) Rename the functions in gimp-cairo.h to
follow the naming scheme employed by cairo, so that they don't feel
out of place.
app/core/gimp-cairo.c | 20 ++++++++++----------
app/core/gimp-cairo.h | 6 +++---
app/display/gimpcanvas-style.c | 18 +++++++++---------
app/display/gimpcanvasarc.c | 4 ++--
app/display/gimpcanvasboundary.c | 2 +-
app/display/gimpcanvashandle.c | 12 ++++++------
app/display/gimpdisplayshell-draw.c | 2 +-
app/display/gimpdisplayshell-selection.c | 6 +++---
app/widgets/gimpdial.c | 4 ++--
9 files changed, 37 insertions(+), 37 deletions(-)
---
diff --git a/app/core/gimp-cairo.c b/app/core/gimp-cairo.c
index ef24a90..40b19fc 100644
--- a/app/core/gimp-cairo.c
+++ b/app/core/gimp-cairo.c
@@ -39,7 +39,7 @@ static cairo_user_data_key_t surface_data_key = { 0, };
cairo_pattern_t *
-gimp_cairo_stipple_pattern_create (const GimpRGB *fg,
+gimp_cairo_pattern_create_stipple (const GimpRGB *fg,
const GimpRGB *bg,
gint index,
gdouble offset_x,
@@ -101,12 +101,12 @@ gimp_cairo_stipple_pattern_create (const GimpRGB *fg,
}
void
-gimp_cairo_add_arc (cairo_t *cr,
- gdouble center_x,
- gdouble center_y,
- gdouble radius,
- gdouble start_angle,
- gdouble slice_angle)
+gimp_cairo_arc (cairo_t *cr,
+ gdouble center_x,
+ gdouble center_y,
+ gdouble radius,
+ gdouble start_angle,
+ gdouble slice_angle)
{
g_return_if_fail (cr != NULL);
@@ -125,9 +125,9 @@ gimp_cairo_add_arc (cairo_t *cr,
}
void
-gimp_cairo_add_segments (cairo_t *cr,
- GimpSegment *segs,
- gint n_segs)
+gimp_cairo_segments (cairo_t *cr,
+ GimpSegment *segs,
+ gint n_segs)
{
gint i;
diff --git a/app/core/gimp-cairo.h b/app/core/gimp-cairo.h
index 1b49e18..bdcc236 100644
--- a/app/core/gimp-cairo.h
+++ b/app/core/gimp-cairo.h
@@ -25,19 +25,19 @@
#define __APP_GIMP_CAIRO_H__
-cairo_pattern_t * gimp_cairo_stipple_pattern_create (const GimpRGB *fg,
+cairo_pattern_t * gimp_cairo_pattern_create_stipple (const GimpRGB *fg,
const GimpRGB *bg,
gint index,
gdouble offset_x,
gdouble offset_y);
-void gimp_cairo_add_arc (cairo_t *cr,
+void gimp_cairo_arc (cairo_t *cr,
gdouble center_x,
gdouble center_y,
gdouble radius,
gdouble start_angle,
gdouble slice_angle);
-void gimp_cairo_add_segments (cairo_t *cr,
+void gimp_cairo_segments (cairo_t *cr,
GimpSegment *segs,
gint n_segs);
diff --git a/app/display/gimpcanvas-style.c b/app/display/gimpcanvas-style.c
index 81a462d..b902f5e 100644
--- a/app/display/gimpcanvas-style.c
+++ b/app/display/gimpcanvas-style.c
@@ -152,10 +152,10 @@ gimp_canvas_set_guide_style (GtkWidget *canvas,
cairo_set_line_width (cr, line_width);
if (active)
- pattern = gimp_cairo_stipple_pattern_create (&active_fg, &active_bg, 0,
+ pattern = gimp_cairo_pattern_create_stipple (&active_fg, &active_bg, 0,
offset_x, offset_y);
else
- pattern = gimp_cairo_stipple_pattern_create (&normal_fg, &normal_bg, 0,
+ pattern = gimp_cairo_pattern_create_stipple (&normal_fg, &normal_bg, 0,
offset_x, offset_y);
cairo_set_source (cr, pattern);
@@ -206,14 +206,14 @@ gimp_canvas_set_grid_style (GtkWidget *canvas,
{
gimp_grid_get_bgcolor (grid, &bg);
- pattern = gimp_cairo_stipple_pattern_create (&fg, &bg, 0,
+ pattern = gimp_cairo_pattern_create_stipple (&fg, &bg, 0,
offset_x, offset_y);
}
else
{
gimp_rgba_set (&bg, 0.0, 0.0, 0.0, 0.0);
- pattern = gimp_cairo_stipple_pattern_create (&fg, &bg, 0,
+ pattern = gimp_cairo_pattern_create_stipple (&fg, &bg, 0,
offset_x, offset_y);
}
@@ -266,21 +266,21 @@ gimp_canvas_set_layer_style (GtkWidget *canvas,
if (gimp_layer_get_mask (layer) &&
gimp_layer_get_edit_mask (layer))
{
- pattern = gimp_cairo_stipple_pattern_create (&layer_mask_fg,
+ pattern = gimp_cairo_pattern_create_stipple (&layer_mask_fg,
&layer_mask_bg,
0,
offset_x, offset_y);
}
else if (gimp_viewable_get_children (GIMP_VIEWABLE (layer)))
{
- pattern = gimp_cairo_stipple_pattern_create (&layer_group_fg,
+ pattern = gimp_cairo_pattern_create_stipple (&layer_group_fg,
&layer_group_bg,
0,
offset_x, offset_y);
}
else
{
- pattern = gimp_cairo_stipple_pattern_create (&layer_fg,
+ pattern = gimp_cairo_pattern_create_stipple (&layer_fg,
&layer_bg,
0,
offset_x, offset_y);
@@ -304,7 +304,7 @@ gimp_canvas_set_selection_out_style (GtkWidget *canvas,
cairo_set_line_width (cr, 1.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
- pattern = gimp_cairo_stipple_pattern_create (&selection_out_fg,
+ pattern = gimp_cairo_pattern_create_stipple (&selection_out_fg,
&selection_out_bg,
0,
offset_x, offset_y);
@@ -327,7 +327,7 @@ gimp_canvas_set_selection_in_style (GtkWidget *canvas,
cairo_set_line_width (cr, 1.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
- pattern = gimp_cairo_stipple_pattern_create (&selection_in_fg,
+ pattern = gimp_cairo_pattern_create_stipple (&selection_in_fg,
&selection_in_bg,
index,
offset_x, offset_y);
diff --git a/app/display/gimpcanvasarc.c b/app/display/gimpcanvasarc.c
index 16fb4fd..9c82971 100644
--- a/app/display/gimpcanvasarc.c
+++ b/app/display/gimpcanvasarc.c
@@ -273,8 +273,8 @@ gimp_canvas_arc_draw (GimpCanvasItem *item,
cairo_save (cr);
cairo_translate (cr, center_x, center_y);
cairo_scale (cr, radius_x, radius_y);
- gimp_cairo_add_arc (cr, 0.0, 0.0, 1.0,
- private->start_angle, private->slice_angle);
+ gimp_cairo_arc (cr, 0.0, 0.0, 1.0,
+ private->start_angle, private->slice_angle);
cairo_restore (cr);
if (private->filled)
diff --git a/app/display/gimpcanvasboundary.c b/app/display/gimpcanvasboundary.c
index 28b1da9..6136d90 100644
--- a/app/display/gimpcanvasboundary.c
+++ b/app/display/gimpcanvasboundary.c
@@ -311,7 +311,7 @@ gimp_canvas_boundary_draw (GimpCanvasItem *item,
gimp_canvas_boundary_transform (item, segs, &n_segs);
- gimp_cairo_add_segments (cr, segs, n_segs);
+ gimp_cairo_segments (cr, segs, n_segs);
_gimp_canvas_item_stroke (item, cr);
diff --git a/app/display/gimpcanvashandle.c b/app/display/gimpcanvashandle.c
index e0da074..931c469 100644
--- a/app/display/gimpcanvashandle.c
+++ b/app/display/gimpcanvashandle.c
@@ -425,9 +425,9 @@ gimp_canvas_handle_draw (GimpCanvasItem *item,
cairo_set_dash (cr, dashes, 2, dashes[0] / 2.0);
}
- gimp_cairo_add_arc (cr, x, y, private->width / 2,
- private->start_angle,
- private->slice_angle);
+ gimp_cairo_arc (cr, x, y, private->width / 2,
+ private->start_angle,
+ private->slice_angle);
_gimp_canvas_item_stroke (item, cr);
@@ -438,9 +438,9 @@ gimp_canvas_handle_draw (GimpCanvasItem *item,
case GIMP_HANDLE_FILLED_CIRCLE:
cairo_move_to (cr, x, y);
- gimp_cairo_add_arc (cr, x, y, (gdouble) private->width / 2.0,
- private->start_angle,
- private->slice_angle);
+ gimp_cairo_arc (cr, x, y, (gdouble) private->width / 2.0,
+ private->start_angle,
+ private->slice_angle);
_gimp_canvas_item_fill (item, cr);
break;
diff --git a/app/display/gimpdisplayshell-draw.c b/app/display/gimpdisplayshell-draw.c
index 372f275..4afeb2b 100644
--- a/app/display/gimpdisplayshell-draw.c
+++ b/app/display/gimpdisplayshell-draw.c
@@ -60,7 +60,7 @@ gimp_display_shell_draw_selection_out (GimpDisplayShell *shell,
gimp_canvas_set_selection_out_style (shell->canvas, cr,
shell->offset_x, shell->offset_y);
- gimp_cairo_add_segments (cr, segs, n_segs);
+ gimp_cairo_segments (cr, segs, n_segs);
cairo_stroke (cr);
}
diff --git a/app/display/gimpdisplayshell-selection.c b/app/display/gimpdisplayshell-selection.c
index 8d7ea07..1b125ed 100644
--- a/app/display/gimpdisplayshell-selection.c
+++ b/app/display/gimpdisplayshell-selection.c
@@ -299,9 +299,9 @@ selection_render_mask (Selection *selection)
if (selection->shell->rotate_transform)
cairo_transform (cr, selection->shell->rotate_transform);
- gimp_cairo_add_segments (cr,
- selection->segs_in,
- selection->n_segs_in);
+ gimp_cairo_segments (cr,
+ selection->segs_in,
+ selection->n_segs_in);
cairo_stroke (cr);
selection->segs_in_mask = cairo_pattern_create_for_surface (surface);
diff --git a/app/widgets/gimpdial.c b/app/widgets/gimpdial.c
index 690e960..f870807 100644
--- a/app/widgets/gimpdial.c
+++ b/app/widgets/gimpdial.c
@@ -476,8 +476,8 @@ gimp_dial_draw_segment (cairo_t *cr,
else
slice = gimp_dial_normalize_angle (beta - alpha);
- gimp_cairo_add_arc (cr, radius, radius, segment_dist,
- alpha, slice);
+ gimp_cairo_arc (cr, radius, radius, segment_dist,
+ alpha, slice);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]