[gimp/goat-invasion] app: change replace's "opacity" property from float to double
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion] app: change replace's "opacity" property from float to double
- Date: Tue, 24 Apr 2012 15:43:23 +0000 (UTC)
commit 342b44146072628e9d7f35d03740e4cd3152c84c
Author: Michael Natterer <mitch gimp org>
Date: Tue Apr 24 17:42:54 2012 +0200
app: change replace's "opacity" property from float to double
app/gegl/gimpoperationreplacemode.c | 18 ++++++++++--------
app/gegl/gimpoperationreplacemode.h | 2 +-
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/app/gegl/gimpoperationreplacemode.c b/app/gegl/gimpoperationreplacemode.c
index 8bf6408..55c3718 100644
--- a/app/gegl/gimpoperationreplacemode.c
+++ b/app/gegl/gimpoperationreplacemode.c
@@ -35,6 +35,7 @@ enum
PROP_OPACITY
};
+
static void gimp_operation_replace_mode_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -86,13 +87,14 @@ gimp_operation_replace_mode_class_init (GimpOperationReplaceModeClass *klass)
TRUE,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
+
g_object_class_install_property (object_class, PROP_OPACITY,
- g_param_spec_float ("opacity",
- NULL, NULL,
- 0.0, 1.0,
- 1.0,
- GIMP_PARAM_READWRITE |
- G_PARAM_CONSTRUCT));
+ g_param_spec_double ("opacity",
+ NULL, NULL,
+ 0.0, 1.0,
+ 1.0,
+ GIMP_PARAM_READWRITE |
+ G_PARAM_CONSTRUCT));
}
static void
@@ -114,7 +116,7 @@ gimp_operation_replace_mode_set_property (GObject *object,
self->premultiplied = g_value_get_boolean (value);
break;
case PROP_OPACITY:
- self->opacity = g_value_get_float (value);
+ self->opacity = g_value_get_double (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -136,7 +138,7 @@ gimp_operation_replace_mode_get_property (GObject *object,
g_value_set_boolean (value, self->premultiplied);
break;
case PROP_OPACITY:
- g_value_set_float (value, self->opacity);
+ g_value_set_double (value, self->opacity);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
diff --git a/app/gegl/gimpoperationreplacemode.h b/app/gegl/gimpoperationreplacemode.h
index 76fde6f..25baedf 100644
--- a/app/gegl/gimpoperationreplacemode.h
+++ b/app/gegl/gimpoperationreplacemode.h
@@ -37,7 +37,7 @@ struct _GimpOperationReplaceMode
{
GeglOperationPointComposer3 parent_instance;
- gfloat opacity;
+ gdouble opacity;
gboolean premultiplied;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]