[gimp/soc-2009-dynamics] Placeholder for quering dynamics values and a tesstpoint in brush core.
- From: Alexia Death <alexiade src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] Placeholder for quering dynamics values and a tesstpoint in brush core.
- Date: Wed, 19 Aug 2009 23:16:55 +0000 (UTC)
commit ae10bd5778da7befdd611ff53696c7336b243a45
Author: Alexia Death <alexiadeath gmail com>
Date: Thu Aug 20 02:16:09 2009 +0300
Placeholder for quering dynamics values and a tesstpoint in brush core.
app/paint/gimpbrushcore.c | 11 +++++++----
app/paint/gimpdynamicsoptions.c | 6 ++++++
app/paint/gimpdynamicsoptions.h | 3 ++-
3 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index 61f3a1a..7eb28da 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -153,7 +153,7 @@ gimp_brush_core_class_init (GimpBrushCoreClass *klass)
GIMP_TYPE_BRUSH);
core_signals[SET_DYNAMICS] =
- g_signal_new ("set-brush",
+ g_signal_new ("set-dynamics",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpBrushCoreClass, set_dynamics),
@@ -173,6 +173,7 @@ gimp_brush_core_class_init (GimpBrushCoreClass *klass)
klass->handles_changing_brush = FALSE;
klass->handles_transforming_brush = TRUE;
klass->set_brush = gimp_brush_core_real_set_brush;
+ klass->set_dynamics = gimp_brush_core_real_set_dynamics;
}
static void
@@ -740,9 +741,11 @@ gimp_brush_core_get_paint_area (GimpPaintCore *paint_core,
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_transforming_brush)
{
- core->scale = paint_options->brush_scale; /*gimp_paint_options_get_dynamic_size (paint_options, coords,
- TRUE,
- paint_core->pixel_dist);*/
+ core->scale = paint_options->brush_scale;
+ if (core->dynamics)
+ {
+ core->scale *= gimp_dynamics_options_get_output_val(core->dynamics->size_dynamics, coords);
+ }
core->angle = paint_options->brush_angle; /* gimp_paint_options_get_dynamic_angle (paint_options, coords,
paint_core->pixel_dist);*/
diff --git a/app/paint/gimpdynamicsoptions.c b/app/paint/gimpdynamicsoptions.c
index ff7f741..36b34fa 100644
--- a/app/paint/gimpdynamicsoptions.c
+++ b/app/paint/gimpdynamicsoptions.c
@@ -915,6 +915,12 @@ gimp_dynamics_get_standard (void)
return standard_dynamics;
}
+gdouble
+gimp_dynamics_options_get_output_val (GimpDynamicOutputOptions *output, GimpCoords *coords)
+{
+ printf("Dynamics queried...");
+ return 1;
+}
/* Calculates dynamics mix to be used for same parameter
* (velocity/pressure/direction/tilt/random) mix Needed in may places and tools.
diff --git a/app/paint/gimpdynamicsoptions.h b/app/paint/gimpdynamicsoptions.h
index 3b60a0b..875242d 100644
--- a/app/paint/gimpdynamicsoptions.h
+++ b/app/paint/gimpdynamicsoptions.h
@@ -19,7 +19,6 @@
#define __GIMP_DYNAMICS_OPTIONS_H__
-//#include "core/gimptooloptions.h"
#include "gimppaintoptions.h"
#include "core/gimpdata.h"
@@ -87,4 +86,6 @@ GimpData * gimp_dynamics_options_new (const gchar *name);
GimpData * gimp_dynamics_get_standard (void);
+gdouble gimp_dynamics_options_get_output_val (GimpDynamicOutputOptions *output, GimpCoords *coords);
+
#endif /* __GIMP_DYNAMICS_OPTIONS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]