Build fixes to the dynamics branch. it now builds.

This commit is contained in:
Alexia Death 2009-07-21 22:27:29 +03:00
parent 7cbf10b886
commit 4aa3d3f7b0
11 changed files with 71 additions and 70 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;
}

View File

@ -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,