[gimp] app: add "style" and "antialias" setters to GimpFillOptions
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add "style" and "antialias" setters to GimpFillOptions
- Date: Tue, 8 Mar 2016 18:50:00 +0000 (UTC)
commit d0b113d1ca37634c7f7bdf3e89636cb570681c05
Author: Michael Natterer <mitch gimp org>
Date: Tue Mar 8 19:49:17 2016 +0100
app: add "style" and "antialias" setters to GimpFillOptions
app/core/gimpfilloptions.c | 26 ++++++++++++++++++++------
app/core/gimpfilloptions.h | 5 +++++
2 files changed, 25 insertions(+), 6 deletions(-)
---
diff --git a/app/core/gimpfilloptions.c b/app/core/gimpfilloptions.c
index 9fd0434..df07681 100644
--- a/app/core/gimpfilloptions.c
+++ b/app/core/gimpfilloptions.c
@@ -208,6 +208,15 @@ gimp_fill_options_get_style (GimpFillOptions *options)
return GET_PRIVATE (options)->style;
}
+void
+gimp_fill_options_set_style (GimpFillOptions *options,
+ GimpFillStyle style)
+{
+ g_return_if_fail (GIMP_IS_FILL_OPTIONS (options));
+
+ g_object_set (options, "style", style, NULL);
+}
+
gboolean
gimp_fill_options_get_antialias (GimpFillOptions *options)
{
@@ -216,6 +225,15 @@ gimp_fill_options_get_antialias (GimpFillOptions *options)
return GET_PRIVATE (options)->antialias;
}
+void
+gimp_fill_options_set_antialias (GimpFillOptions *options,
+ gboolean antialias)
+{
+ g_return_if_fail (GIMP_IS_FILL_OPTIONS (options));
+
+ g_object_set (options, "antialias", antialias, NULL);
+}
+
gboolean
gimp_fill_options_set_by_fill_type (GimpFillOptions *options,
GimpContext *context,
@@ -258,9 +276,7 @@ gimp_fill_options_set_by_fill_type (GimpFillOptions *options,
return FALSE;
}
- g_object_set (options,
- "style", GIMP_FILL_STYLE_PATTERN,
- NULL);
+ gimp_fill_options_set_style (options, GIMP_FILL_STYLE_PATTERN);
gimp_context_set_pattern (GIMP_CONTEXT (options), pattern);
return TRUE;
@@ -272,9 +288,7 @@ gimp_fill_options_set_by_fill_type (GimpFillOptions *options,
return FALSE;
}
- g_object_set (options,
- "style", GIMP_FILL_STYLE_SOLID,
- NULL);
+ gimp_fill_options_set_style (options, GIMP_FILL_STYLE_SOLID);
gimp_context_set_foreground (GIMP_CONTEXT (options), &color);
return TRUE;
diff --git a/app/core/gimpfilloptions.h b/app/core/gimpfilloptions.h
index 729bc6b..5948a95 100644
--- a/app/core/gimpfilloptions.h
+++ b/app/core/gimpfilloptions.h
@@ -51,7 +51,12 @@ GType gimp_fill_options_get_type (void) G_GNUC_CONST;
GimpFillOptions * gimp_fill_options_new (Gimp *gimp);
GimpFillStyle gimp_fill_options_get_style (GimpFillOptions *options);
+void gimp_fill_options_set_style (GimpFillOptions *options,
+ GimpFillStyle style);
+
gboolean gimp_fill_options_get_antialias (GimpFillOptions *options);
+void gimp_fill_options_set_antialias (GimpFillOptions *options,
+ gboolean antialias);
gboolean gimp_fill_options_set_by_fill_type (GimpFillOptions *options,
GimpContext *context,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]