[gimp/soc-2009-dynamics] Remove the special method for mixing scale thats absolete now with limist gone.
- From: Alexia Death <alexiade src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] Remove the special method for mixing scale thats absolete now with limist gone.
- Date: Sun, 11 Oct 2009 08:26:54 +0000 (UTC)
commit 424294b7386d87063573f75809e4e183246c6c70
Author: Alexia Death <alexiadeath gmail com>
Date: Sun Oct 11 11:26:44 2009 +0300
Remove the special method for mixing scale thats absolete now with limist gone.
app/core/gimpdynamics.c | 54 ---------------------------------------------
app/core/gimpdynamics.h | 5 ----
app/paint/gimpbrushcore.c | 4 +-
3 files changed, 2 insertions(+), 61 deletions(-)
---
diff --git a/app/core/gimpdynamics.c b/app/core/gimpdynamics.c
index 5af55ae..ad0e798 100644
--- a/app/core/gimpdynamics.c
+++ b/app/core/gimpdynamics.c
@@ -1159,60 +1159,6 @@ gimp_dynamics_get_aspect_output_val (GimpDynamicsOutput *output, GimpCoords coor
return result;
}
-
-gdouble
-gimp_dynamics_get_scale_output_val (GimpDynamicsOutput *output, GimpCoords coords, gdouble fade_point)
-{
- gdouble total = 0.0;
- gdouble factors = 0.0;
-
- gdouble scale = 1.0;
-
- if (output->pressure)
- {
- total += coords.pressure;
- factors++;
- }
-
- if (output->velocity)
- {
- total += 1.0 - sqrt (coords.velocity);
- factors++;
- }
-
- if (output->direction)
- {
- total += coords.direction + 0.5;
- factors++;
- }
-
- if (output->tilt)
- {
- total += 1.0 - sqrt (SQR (coords.xtilt) + SQR (coords.ytilt));
- factors++;
- }
-
- if (output->random)
- {
- total += 1.0 - g_random_double_range (0.0, 1.0);
- factors++;
- }
-
- if (output->fade)
- {
- total += fade_point;
- factors++;
- }
-
- if (factors > 0)
- scale = total / factors;
-
- scale = sqrt (scale);
-
- /* printf("Dynamics queried(scale). Result: %f, factors: %f, total: %f \n", result, factors, total);*/
- return scale;
-}
-
gboolean
gimp_dynamics_output_is_enabled(GimpDynamicsOutput *output)
{
diff --git a/app/core/gimpdynamics.h b/app/core/gimpdynamics.h
index 87dbfb7..d042b7c 100644
--- a/app/core/gimpdynamics.h
+++ b/app/core/gimpdynamics.h
@@ -86,15 +86,10 @@ GimpData * gimp_dynamics_get_standard (void);
gdouble gimp_dynamics_get_linear_output_val (GimpDynamicsOutput *output, GimpCoords coords, gdouble fade_point);
-
gdouble gimp_dynamics_get_angular_output_val (GimpDynamicsOutput *output, GimpCoords coords, gdouble fade_point);
-
gdouble gimp_dynamics_get_aspect_output_val (GimpDynamicsOutput *output, GimpCoords coords, gdouble fade_point);
-
-gdouble gimp_dynamics_get_scale_output_val (GimpDynamicsOutput *output, GimpCoords coords, gdouble fade_point);
-
gboolean gimp_dynamics_output_is_enabled (GimpDynamicsOutput *output);
gboolean gimp_dynamics_input_fade_enabled (GimpDynamics *dynamics);
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index ce44063..61ec3b6 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -407,7 +407,7 @@ gimp_brush_core_start (GimpPaintCore *paint_core,
if (core->dynamics)
{
- core->scale *= gimp_dynamics_get_scale_output_val(core->dynamics->size_dynamics, *coords, fade_point);
+ core->scale *= gimp_dynamics_get_linear_output_val(core->dynamics->size_dynamics, *coords, fade_point);
core->angle += gimp_dynamics_get_angular_output_val(core->dynamics->angle_dynamics, *coords, fade_point);
@@ -767,7 +767,7 @@ gimp_brush_core_get_paint_area (GimpPaintCore *paint_core,
gdouble fade_point = gimp_paint_options_get_fade (paint_options, gimp_item_get_image (GIMP_ITEM (drawable)),
paint_core->pixel_dist);
- core->scale *= gimp_dynamics_get_scale_output_val(core->dynamics->size_dynamics, *coords, fade_point);
+ core->scale *= gimp_dynamics_get_linear_output_val(core->dynamics->size_dynamics, *coords, fade_point);
core->angle += gimp_dynamics_get_angular_output_val(core->dynamics->angle_dynamics, *coords, fade_point);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]