gimp r26225 - in trunk: . app/paint app/tools
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26225 - in trunk: . app/paint app/tools
- Date: Thu, 17 Jul 2008 19:00:13 +0000 (UTC)
Author: neo
Date: Thu Jul 17 19:00:13 2008
New Revision: 26225
URL: http://svn.gnome.org/viewvc/gimp?rev=26225&view=rev
Log:
2008-07-17 Sven Neumann <sven gimp org>
* app/paint/gimppaintcore.[ch]: removed 'use_pressure' field
from
GimpPaintCore.
* app/paint/gimppaintoptions.[ch]: removed 'use_pressure'
parameter.
* app/paint/gimpairbrush.c
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimppaintbrush.c
* app/paint/gimpsmudge.c
* app/tools/gimppainttool.c: changed accordingly.
Modified:
trunk/ChangeLog
trunk/app/paint/gimpairbrush.c
trunk/app/paint/gimpbrushcore.c
trunk/app/paint/gimpclone.c
trunk/app/paint/gimpconvolve.c
trunk/app/paint/gimpdodgeburn.c
trunk/app/paint/gimperaser.c
trunk/app/paint/gimpheal.c
trunk/app/paint/gimppaintbrush.c
trunk/app/paint/gimppaintcore.c
trunk/app/paint/gimppaintcore.h
trunk/app/paint/gimppaintoptions.c
trunk/app/paint/gimppaintoptions.h
trunk/app/paint/gimpsmudge.c
trunk/app/tools/gimppainttool.c
Modified: trunk/app/paint/gimpairbrush.c
==============================================================================
--- trunk/app/paint/gimpairbrush.c (original)
+++ trunk/app/paint/gimpairbrush.c Thu Jul 17 19:00:13 2008
@@ -143,8 +143,7 @@
airbrush->paint_options = paint_options;
dynamic_rate = gimp_paint_options_get_dynamic_rate (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
timeout = 10000 / (options->rate * dynamic_rate);
Modified: trunk/app/paint/gimpbrushcore.c
==============================================================================
--- trunk/app/paint/gimpbrushcore.c (original)
+++ trunk/app/paint/gimpbrushcore.c Thu Jul 17 19:00:13 2008
@@ -355,7 +355,6 @@
core->scale = gimp_paint_options_get_dynamic_size (paint_options,
coords,
- paint_core->use_pressure,
GIMP_BRUSH_CORE_GET_CLASS (core)->handles_scaling_brush);
core->spacing = (gdouble) gimp_brush_get_spacing (core->main_brush) / 100.0;
@@ -689,12 +688,10 @@
gint brush_width, brush_height;
if (GIMP_BRUSH_CORE_GET_CLASS (core)->handles_scaling_brush)
- {
- core->scale = gimp_paint_options_get_dynamic_size (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure,
- TRUE);
- }
+ core->scale = gimp_paint_options_get_dynamic_size (paint_options,
+ &paint_core->cur_coords,
+ TRUE);
+
/* else use scale from start(), we don't support on-the-fly scaling */
gimp_brush_scale_size (core->brush, core->scale,
Modified: trunk/app/paint/gimpclone.c
==============================================================================
--- trunk/app/paint/gimpclone.c (original)
+++ trunk/app/paint/gimpclone.c Thu Jul 17 19:00:13 2008
@@ -237,12 +237,10 @@
}
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
hardness = gimp_paint_options_get_dynamic_hardness (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
gimp_brush_core_paste_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),
Modified: trunk/app/paint/gimpconvolve.c
==============================================================================
--- trunk/app/paint/gimpconvolve.c (original)
+++ trunk/app/paint/gimpconvolve.c Thu Jul 17 19:00:13 2008
@@ -151,8 +151,7 @@
rate = options->rate;
rate *= gimp_paint_options_get_dynamic_rate (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
gimp_convolve_calculate_matrix (convolve, options->type,
brush_core->brush->mask->width / 2,
Modified: trunk/app/paint/gimpdodgeburn.c
==============================================================================
--- trunk/app/paint/gimpdodgeburn.c (original)
+++ trunk/app/paint/gimpdodgeburn.c Thu Jul 17 19:00:13 2008
@@ -237,12 +237,10 @@
g_free (temp_data);
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
hardness = gimp_paint_options_get_dynamic_hardness (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
/* Replace the newly dodgedburned area (canvas_buf) to the image */
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
Modified: trunk/app/paint/gimperaser.c
==============================================================================
--- trunk/app/paint/gimperaser.c (original)
+++ trunk/app/paint/gimperaser.c Thu Jul 17 19:00:13 2008
@@ -132,12 +132,10 @@
area->width * area->height, area->bytes);
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
hardness = gimp_paint_options_get_dynamic_hardness (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
gimp_brush_core_paste_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),
Modified: trunk/app/paint/gimpheal.c
==============================================================================
--- trunk/app/paint/gimpheal.c (original)
+++ trunk/app/paint/gimpheal.c Thu Jul 17 19:00:13 2008
@@ -438,8 +438,7 @@
gdouble hardness;
hardness = gimp_paint_options_get_dynamic_hardness (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
mask_buf = gimp_brush_core_get_brush_mask (GIMP_BRUSH_CORE (source_core),
GIMP_BRUSH_HARD,
@@ -547,8 +546,7 @@
temp_buf_free (temp);
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
/* replace the canvas with our healed data */
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core),
Modified: trunk/app/paint/gimppaintbrush.c
==============================================================================
--- trunk/app/paint/gimppaintbrush.c (original)
+++ trunk/app/paint/gimppaintbrush.c Thu Jul 17 19:00:13 2008
@@ -129,8 +129,7 @@
paint_appl_mode = paint_options->application_mode;
grad_point = gimp_paint_options_get_dynamic_color (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
/* optionally take the color from the current gradient */
if (gimp_paint_options_get_gradient_color (paint_options, image,
@@ -175,12 +174,10 @@
}
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
hardness = gimp_paint_options_get_dynamic_hardness (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
/* finally, let the brush core paste the colored area on the canvas */
gimp_brush_core_paste_canvas (brush_core, drawable,
Modified: trunk/app/paint/gimppaintcore.c
==============================================================================
--- trunk/app/paint/gimppaintcore.c (original)
+++ trunk/app/paint/gimppaintcore.c Thu Jul 17 19:00:13 2008
@@ -150,7 +150,6 @@
core->x2 = 0;
core->y2 = 0;
- core->use_pressure = FALSE;
core->use_saved_proj = FALSE;
core->undo_tiles = NULL;
Modified: trunk/app/paint/gimppaintcore.h
==============================================================================
--- trunk/app/paint/gimppaintcore.h (original)
+++ trunk/app/paint/gimppaintcore.h Thu Jul 17 19:00:13 2008
@@ -55,7 +55,6 @@
gint x1, y1; /* undo extents in image coords */
gint x2, y2; /* undo extents in image coords */
- gboolean use_pressure; /* look at coords->pressure */
gboolean use_saved_proj; /* keep the unmodified proj around */
TileManager *undo_tiles; /* tiles which have been modified */
Modified: trunk/app/paint/gimppaintoptions.c
==============================================================================
--- trunk/app/paint/gimppaintoptions.c (original)
+++ trunk/app/paint/gimppaintoptions.c Thu Jul 17 19:00:13 2008
@@ -980,8 +980,7 @@
gdouble
gimp_paint_options_get_dynamic_opacity (GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure)
+ const GimpCoords *coords)
{
gdouble opacity = 1.0;
@@ -996,7 +995,7 @@
gdouble velocity = -1.0;
gdouble random = -1.0;
- if (paint_options->pressure_options->opacity && use_pressure)
+ if (paint_options->pressure_options->opacity)
pressure = GIMP_PAINT_PRESSURE_SCALE * coords->pressure;
if (paint_options->velocity_options->opacity)
@@ -1019,7 +1018,6 @@
gdouble
gimp_paint_options_get_dynamic_size (GimpPaintOptions *paint_options,
const GimpCoords *coords,
- gboolean use_pressure,
gboolean use_dynamics)
{
gdouble scale = 1.0;
@@ -1030,11 +1028,11 @@
gdouble velocity = -1.0;
gdouble random = -1.0;
- if (paint_options->pressure_options->size && use_pressure)
+ if (paint_options->pressure_options->size)
{
pressure = coords->pressure;
}
- else if (paint_options->pressure_options->inverse_size && use_pressure)
+ else if (paint_options->pressure_options->inverse_size)
{
pressure = 1.0 - 0.9 * coords->pressure;
}
@@ -1078,8 +1076,7 @@
gdouble
gimp_paint_options_get_dynamic_rate (GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure)
+ const GimpCoords *coords)
{
gdouble rate = 1.0;
@@ -1094,7 +1091,7 @@
gdouble velocity = -1.0;
gdouble random = -1.0;
- if (paint_options->pressure_options->rate && use_pressure)
+ if (paint_options->pressure_options->rate)
pressure = GIMP_PAINT_PRESSURE_SCALE * coords->pressure;
if (paint_options->velocity_options->rate)
@@ -1117,8 +1114,7 @@
gdouble
gimp_paint_options_get_dynamic_color (GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure)
+ const GimpCoords *coords)
{
gdouble color = 1.0;
@@ -1133,7 +1129,7 @@
gdouble velocity = -1.0;
gdouble random = -1.0;
- if (paint_options->pressure_options->color && use_pressure)
+ if (paint_options->pressure_options->color)
pressure = GIMP_PAINT_PRESSURE_SCALE * coords->pressure;
if (paint_options->velocity_options->color)
@@ -1155,8 +1151,7 @@
gdouble
gimp_paint_options_get_dynamic_hardness (GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure)
+ const GimpCoords *coords)
{
gdouble hardness = 1.0;
@@ -1171,7 +1166,7 @@
gdouble velocity = -1.0;
gdouble random = -1.0;
- if (paint_options->pressure_options->hardness && use_pressure)
+ if (paint_options->pressure_options->hardness)
pressure = GIMP_PAINT_PRESSURE_SCALE * coords->pressure;
if (paint_options->velocity_options->hardness)
Modified: trunk/app/paint/gimppaintoptions.h
==============================================================================
--- trunk/app/paint/gimppaintoptions.h (original)
+++ trunk/app/paint/gimppaintoptions.h Thu Jul 17 19:00:13 2008
@@ -139,25 +139,20 @@
gdouble gimp_paint_options_get_dynamic_opacity (GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure);
+ const GimpCoords *coords);
gdouble gimp_paint_options_get_dynamic_size (GimpPaintOptions *paint_options,
const GimpCoords *coords,
- gboolean use_pressure,
gboolean use_dynamics);
gdouble gimp_paint_options_get_dynamic_rate (GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure);
+ const GimpCoords *coords);
gdouble gimp_paint_options_get_dynamic_color (GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure);
+ const GimpCoords *coords);
gdouble gimp_paint_options_get_dynamic_hardness(GimpPaintOptions *paint_options,
- const GimpCoords *coords,
- gboolean use_pressure);
+ const GimpCoords *coords);
#endif /* __GIMP_PAINT_OPTIONS_H__ */
Modified: trunk/app/paint/gimpsmudge.c
==============================================================================
--- trunk/app/paint/gimpsmudge.c (original)
+++ trunk/app/paint/gimpsmudge.c Thu Jul 17 19:00:13 2008
@@ -264,8 +264,7 @@
/* Enable dynamic rate */
dynamic_rate = gimp_paint_options_get_dynamic_rate (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
rate = (options->rate / 100.0) * dynamic_rate;
/* The tempPR will be the built up buffer (for smudge) */
@@ -306,12 +305,10 @@
copy_region (&tempPR, &destPR);
opacity *= gimp_paint_options_get_dynamic_opacity (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
hardness = gimp_paint_options_get_dynamic_hardness (paint_options,
- &paint_core->cur_coords,
- paint_core->use_pressure);
+ &paint_core->cur_coords);
gimp_brush_core_replace_canvas (GIMP_BRUSH_CORE (paint_core), drawable,
MIN (opacity, GIMP_OPACITY_OPAQUE),
Modified: trunk/app/tools/gimppainttool.c
==============================================================================
--- trunk/app/tools/gimppainttool.c (original)
+++ trunk/app/tools/gimppainttool.c Thu Jul 17 19:00:13 2008
@@ -274,7 +274,6 @@
GimpPaintOptions *paint_options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);
GimpPaintCore *core = paint_tool->core;
GimpDrawable *drawable;
- GdkDisplay *gdk_display;
GimpCoords curr_coords;
gint off_x, off_y;
GError *error = NULL;
@@ -311,11 +310,6 @@
tool->display = display;
}
- gdk_display = gtk_widget_get_display (display->shell);
-
- core->use_pressure = (gimp_devices_get_current (display->image->gimp) !=
- gdk_display_get_core_pointer (gdk_display));
-
if (! gimp_paint_core_start (core, drawable, paint_options, &curr_coords,
&error))
{
@@ -345,7 +339,6 @@
GIMP_BRUSH_HARD);
core->start_coords = core->last_coords;
- core->use_pressure = FALSE;
gimp_paint_tool_round_line (core, hard, state);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]