[gimp/soc-2009-dynamics] Build fixes to the dynamics branch. it now builds.
- From: Alexia Death <alexiade src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp/soc-2009-dynamics] Build fixes to the dynamics branch. it now builds.
- Date: Tue, 21 Jul 2009 19:30:08 +0000 (UTC)
commit 4aa3d3f7b019a843ca6877843673067d118b1baf
Author: Alexia Death <alexiadeath gmail com>
Date: Tue Jul 21 22:27:29 2009 +0300
Build fixes to the dynamics branch. it now builds.
app/paint/gimpairbrush.c | 22 +++++++++++-----------
app/paint/gimpairbrushoptions.c | 8 ++++----
app/paint/gimpbrushcore.c | 32 ++++++++++++++++----------------
app/paint/gimpclone.c | 8 ++++----
app/paint/gimpconvolve.c | 4 ++--
app/paint/gimpdodgeburn.c | 8 ++++----
app/paint/gimperaser.c | 8 ++++----
app/paint/gimpheal.c | 8 ++++----
app/paint/gimppaintbrush.c | 12 ++++++------
app/paint/gimppaintoptions.c | 19 ++++++++++---------
app/paint/gimpsmudge.c | 12 ++++++------
11 files changed, 71 insertions(+), 70 deletions(-)
---
diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c
index 4ea888e..b8f0fd2 100644
--- a/app/paint/gimpairbrush.c
+++ b/app/paint/gimpairbrush.c
@@ -145,9 +145,9 @@ gimp_airbrush_paint (GimpPaintCore *paint_core,
airbrush->drawable = drawable;
airbrush->paint_options = paint_options;
- dynamic_rate = gimp_paint_options_get_dynamic_rate (paint_options,
- coords,
- paint_core->pixel_dist);
+ dynamic_rate = 1;// gimp_paint_options_get_dynamic_rate (paint_options,
+ // coords,
+ // paint_core->pixel_dist);
timeout = 10000 / (options->rate * dynamic_rate);
@@ -186,22 +186,22 @@ gimp_airbrush_motion (GimpPaintCore *paint_core,
opacity = options->pressure / 100.0;
- saved_pressure = paint_options->pressure_options->hardness;
- saved_velocity = paint_options->velocity_options->hardness;
+ saved_pressure = FALSE;//paint_options->pressure_options->hardness;
+ saved_velocity = FALSE;//paint_options->velocity_options->hardness;
if (saved_pressure)
- opacity *= GIMP_PAINT_PRESSURE_SCALE * coords->pressure;
+ opacity *= coords->pressure;
if (saved_velocity)
- opacity *= MAX (0.0, 1 - GIMP_PAINT_VELOCITY_SCALE * coords->velocity);
+ opacity *= MAX (0.0, 1 - coords->velocity);
- paint_options->pressure_options->hardness = FALSE;
- paint_options->velocity_options->hardness = FALSE;
+ //paint_options->pressure_options->hardness = FALSE;
+ //paint_options->velocity_options->hardness = FALSE;
_gimp_paintbrush_motion (paint_core, drawable, paint_options, coords, opacity);
- paint_options->pressure_options->hardness = saved_pressure;
- paint_options->velocity_options->hardness = saved_velocity;
+ //paint_options->pressure_options->hardness = saved_pressure;
+ //paint_options->velocity_options->hardness = saved_velocity;
}
static gboolean
diff --git a/app/paint/gimpairbrushoptions.c b/app/paint/gimpairbrushoptions.c
index d30d77d..ec7ed8b 100644
--- a/app/paint/gimpairbrushoptions.c
+++ b/app/paint/gimpairbrushoptions.c
@@ -107,13 +107,13 @@ gimp_airbrush_options_set_property (GObject *object,
case PROP_PRESSURE:
options->pressure = g_value_get_double (value);
break;
- case PROP_VELOCITY_SIZE:
+/* case PROP_VELOCITY_SIZE:
GIMP_PAINT_OPTIONS (options)->velocity_options->size = g_value_get_boolean (value);
break;
case PROP_VELOCITY_HARDNESS:
GIMP_PAINT_OPTIONS (options)->velocity_options->hardness = g_value_get_boolean (value);
break;
-
+*/
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -136,12 +136,12 @@ gimp_airbrush_options_get_property (GObject *object,
case PROP_PRESSURE:
g_value_set_double (value, options->pressure);
break;
- case PROP_VELOCITY_SIZE:
+/* case PROP_VELOCITY_SIZE:
g_value_set_boolean (value, GIMP_PAINT_OPTIONS (options)->velocity_options->size);
break;
case PROP_VELOCITY_HARDNESS:
g_value_set_boolean (value, GIMP_PAINT_OPTIONS (options)->velocity_options->hardness);
- break;
+ break;*/
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index a7d75a6..8381c8d 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -367,22 +367,22 @@ gimp_brush_core_start (GimpPaintCore *paint_core,
if (! core->main_brush)
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
- _("No brushes available for use with this tool."));
+ _("No brushes available for use with this tool."));
return FALSE;
}
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_transforming_brush)
{
- core->scale = gimp_paint_options_get_dynamic_size (paint_options, coords,
+ core->scale = paint_options->brush_scale;/* gimp_paint_options_get_dynamic_size (paint_options, coords,
TRUE,
- paint_core->pixel_dist);
+ paint_core->pixel_dist);*/
- core->angle = gimp_paint_options_get_dynamic_angle (paint_options, coords,
- paint_core->pixel_dist);
+ core->angle = paint_options->brush_angle;/* gimp_paint_options_get_dynamic_angle (paint_options, coords,
+ paint_core->pixel_dist);*/
- core->aspect_ratio =
- gimp_paint_options_get_dynamic_aspect_ratio (paint_options, coords,
- paint_core->pixel_dist);
+ core->aspect_ratio = paint_options->brush_aspect_ratio;
+/* gimp_paint_options_get_dynamic_aspect_ratio (paint_options, coords,
+ paint_core->pixel_dist);*/
}
core->spacing = (gdouble) gimp_brush_get_spacing (core->main_brush) / 100.0;
@@ -724,16 +724,16 @@ gimp_brush_core_get_paint_area (GimpPaintCore *paint_core,
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_transforming_brush)
{
- core->scale = gimp_paint_options_get_dynamic_size (paint_options, coords,
- TRUE,
- paint_core->pixel_dist);
+ core->scale = paint_options->brush_scale; /*gimp_paint_options_get_dynamic_size (paint_options, coords,
+ TRUE,
+ paint_core->pixel_dist);*/
- core->angle = gimp_paint_options_get_dynamic_angle (paint_options, coords,
- paint_core->pixel_dist);
+ core->angle = paint_options->brush_angle; /* gimp_paint_options_get_dynamic_angle (paint_options, coords,
+ paint_core->pixel_dist);*/
- core->aspect_ratio =
- gimp_paint_options_get_dynamic_aspect_ratio (paint_options, coords,
- paint_core->pixel_dist);
+ core->aspect_ratio = paint_options->brush_aspect_ratio;/*
+ gimp_paint_options_get_dynamic_aspect_ratio (paint_options, coords,
+ paint_core->pixel_dist);*/
}
core->scale = gimp_brush_core_clamp_brush_scale (core, core->scale);
diff --git a/app/paint/gimpclone.c b/app/paint/gimpclone.c
index 9fa6f46..a9f8a47 100644
--- a/app/paint/gimpclone.c
+++ b/app/paint/gimpclone.c
@@ -238,11 +238,11 @@ gimp_clone_motion (GimpSourceCore *source_core,
}
}
- opacity *= gimp_paint_options_get_dynamic_opacity (paint_options, coords,
- paint_core->pixel_dist);
+ opacity *= 1; /*gimp_paint_options_get_dynamic_opacity (paint_options, coords,
+ paint_core->pixel_dist);*/
- hardness = gimp_paint_options_get_dynamic_hardness (paint_options, coords,
- paint_core->pixel_dist);
+ hardness = 1; /*gimp_paint_options_get_dynamic_hardness (paint_options, coords,
+ paint_core->pixel_dist);*/
gimp_brush_core_paste_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
coords,
diff --git a/app/paint/gimpconvolve.c b/app/paint/gimpconvolve.c
index 1a9e591..627c8c6 100644
--- a/app/paint/gimpconvolve.c
+++ b/app/paint/gimpconvolve.c
@@ -154,8 +154,8 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
rate = options->rate;
- rate *= gimp_paint_options_get_dynamic_rate (paint_options, coords,
- paint_core->pixel_dist);
+ rate *= 1;/*gimp_paint_options_get_dynamic_rate (paint_options, coords,
+ paint_core->pixel_dist);*/
gimp_convolve_calculate_matrix (convolve, options->type,
brush_core->brush->mask->width / 2,
diff --git a/app/paint/gimpdodgeburn.c b/app/paint/gimpdodgeburn.c
index 1db1f2b..7846768 100644
--- a/app/paint/gimpdodgeburn.c
+++ b/app/paint/gimpdodgeburn.c
@@ -246,11 +246,11 @@ gimp_dodge_burn_motion (GimpPaintCore *paint_core,
g_free (temp_data);
- opacity *= gimp_paint_options_get_dynamic_opacity (paint_options, coords,
- paint_core->pixel_dist);
+ opacity *= 1; /*gimp_paint_options_get_dynamic_opacity (paint_options, coords,
+ paint_core->pixel_dist);*/
- hardness = gimp_paint_options_get_dynamic_hardness (paint_options, coords,
- paint_core->pixel_dist);
+ hardness = 1; /*gimp_paint_options_get_dynamic_hardness (paint_options, coords,
+ paint_core->pixel_dist);*/
/* Replace the newly dodgedburned area (canvas_buf) to the image */
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
diff --git a/app/paint/gimperaser.c b/app/paint/gimperaser.c
index b843395..99efb39 100644
--- a/app/paint/gimperaser.c
+++ b/app/paint/gimperaser.c
@@ -135,11 +135,11 @@ gimp_eraser_motion (GimpPaintCore *paint_core,
color_pixels (temp_buf_get_data (area), col,
area->width * area->height, area->bytes);
- opacity *= gimp_paint_options_get_dynamic_opacity (paint_options, coords,
- paint_core->pixel_dist);
+ opacity *= 1; /*gimp_paint_options_get_dynamic_opacity (paint_options, coords,
+ paint_core->pixel_dist);*/
- hardness = gimp_paint_options_get_dynamic_hardness (paint_options, coords,
- paint_core->pixel_dist);
+ hardness = 1; /*gimp_paint_options_get_dynamic_hardness (paint_options, coords,
+ paint_core->pixel_dist);*/
gimp_brush_core_paste_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
coords,
diff --git a/app/paint/gimpheal.c b/app/paint/gimpheal.c
index 56bbbbd..b1a30e8 100644
--- a/app/paint/gimpheal.c
+++ b/app/paint/gimpheal.c
@@ -439,8 +439,8 @@ gimp_heal_motion (GimpSourceCore *source_core,
TempBuf *mask_buf;
gdouble hardness;
- hardness = gimp_paint_options_get_dynamic_hardness (paint_options, coords,
- paint_core->pixel_dist);
+ hardness = 1;/*gimp_paint_options_get_dynamic_hardness (paint_options, coords,
+ paint_core->pixel_dist);*/
mask_buf = gimp_brush_core_get_brush_mask (GIMP_BRUSH_CORE (source_core),
coords,
@@ -548,8 +548,8 @@ gimp_heal_motion (GimpSourceCore *source_core,
temp_buf_free (temp);
- opacity *= gimp_paint_options_get_dynamic_opacity (paint_options, coords,
- paint_core->pixel_dist);
+ opacity *= 1;/*gimp_paint_options_get_dynamic_opacity (paint_options, coords,
+ paint_core->pixel_dist);*/
/* replace the canvas with our healed data */
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
diff --git a/app/paint/gimppaintbrush.c b/app/paint/gimppaintbrush.c
index 32338ef..1fdf4ce 100644
--- a/app/paint/gimppaintbrush.c
+++ b/app/paint/gimppaintbrush.c
@@ -131,8 +131,8 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
paint_appl_mode = paint_options->application_mode;
- grad_point = gimp_paint_options_get_dynamic_color (paint_options, coords,
- paint_core->pixel_dist);
+ grad_point = 1;/*gimp_paint_options_get_dynamic_color (paint_options, coords,
+ paint_core->pixel_dist);*/
/* optionally take the color from the current gradient */
if (gimp_paint_options_get_gradient_color (paint_options, image,
@@ -177,11 +177,11 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
area->bytes);
}
- opacity *= gimp_paint_options_get_dynamic_opacity (paint_options, coords,
- paint_core->pixel_dist);
+ opacity *= 1;/*gimp_paint_options_get_dynamic_opacity (paint_options, coords,
+ paint_core->pixel_dist);*/
- hardness = gimp_paint_options_get_dynamic_hardness (paint_options, coords,
- paint_core->pixel_dist);
+ hardness = 1; /* gimp_paint_options_get_dynamic_hardness (paint_options, coords,
+ paint_core->pixel_dist);*/
/* finally, let the brush core paste the colored area on the canvas */
gimp_brush_core_paste_canvas (brush_core, drawable,
diff --git a/app/paint/gimppaintoptions.c b/app/paint/gimppaintoptions.c
index 9b8e065..99f7491 100644
--- a/app/paint/gimppaintoptions.c
+++ b/app/paint/gimppaintoptions.c
@@ -172,14 +172,14 @@ gimp_paint_options_class_init (GimpPaintOptionsClass *klass)
"jitter-amount", NULL,
0.0, 50.0, DEFAULT_JITTER_AMOUNT,
GIMP_PARAM_STATIC_STRINGS);
- GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_RANDOM_ASPECT_RATIO,
+/*(object_class, PROP_RANDOM_ASPECT_RATIO,
"random-aspect-ratio", NULL,
DEFAULT_RANDOM_ASPECT_RATIO,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_FADING_ASPECT_RATIO,
"fading-aspect-ratio", NULL,
DEFAULT_FADING_ASPECT_RATIO,
- GIMP_PARAM_STATIC_STRINGS);
+ GIMP_PARAM_STATIC_STRINGS);*/
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_USE_GRADIENT,
"use-gradient", NULL,
DEFAULT_USE_GRADIENT,
@@ -498,7 +498,7 @@ gimp_paint_options_get_fade (GimpPaintOptions *paint_options,
}
break;
}
-
+
/* factor in the fade out value */
if (fade_out > 0.0)
{
@@ -510,7 +510,7 @@ gimp_paint_options_get_fade (GimpPaintOptions *paint_options,
return z; /* ln (1/255) */
}
-
+
return GIMP_OPACITY_TRANSPARENT;
}
@@ -565,9 +565,10 @@ gimp_paint_options_get_gradient_color (GimpPaintOptions *paint_options,
return TRUE;
}
-*/
- else if (gradient_options->use_gradient)
+
+ else*/
+ if (gradient_options->use_gradient)
{
gdouble gradient_length = 0.0;
gdouble unit_factor;
@@ -631,11 +632,11 @@ gimp_paint_options_get_brush_mode (GimpPaintOptions *paint_options)
if (paint_options->hard)
return GIMP_BRUSH_HARD;
- if (paint_options->pressure_options->hardness ||
+/* if (paint_options->pressure_options->hardness ||
paint_options->velocity_options->hardness ||
paint_options->random_options->hardness)
- return GIMP_BRUSH_PRESSURE;
-
+ return GIMP_BRUSH_PRESSURE;*/
+
return GIMP_BRUSH_SOFT;
}
diff --git a/app/paint/gimpsmudge.c b/app/paint/gimpsmudge.c
index 8783664..c3a73dd 100644
--- a/app/paint/gimpsmudge.c
+++ b/app/paint/gimpsmudge.c
@@ -271,8 +271,8 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
area->x, area->y, area->width, area->height, FALSE);
/* Enable dynamic rate */
- dynamic_rate = gimp_paint_options_get_dynamic_rate (paint_options, coords,
- paint_core->pixel_dist);
+ dynamic_rate = 1;/*gimp_paint_options_get_dynamic_rate (paint_options, coords,
+ paint_core->pixel_dist);*/
rate = (options->rate / 100.0) * dynamic_rate;
/* The tempPR will be the built up buffer (for smudge) */
@@ -312,11 +312,11 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
else
copy_region (&tempPR, &destPR);
- opacity *= gimp_paint_options_get_dynamic_opacity (paint_options, coords,
- paint_core->pixel_dist);
+ opacity *= 1;/*gimp_paint_options_get_dynamic_opacity (paint_options, coords,
+ paint_core->pixel_dist);*/
- hardness = gimp_paint_options_get_dynamic_hardness (paint_options, coords,
- paint_core->pixel_dist);
+ hardness = 1;/*gimp_paint_options_get_dynamic_hardness (paint_options, coords,
+ paint_core->pixel_dist);*/
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
coords,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]