Commit Graph

25 Commits

Author SHA1 Message Date
Michael Natterer b77cbdf3a1 More tool event log output and some minor whitespace cleanup 2009-09-19 15:09:55 +02:00
Michael Natterer 2d442e4576 Use gtk_widget_get_window() instead of widget->window 2009-07-15 14:52:27 +02:00
Sven Neumann ac11569830 app: fix the questionable while loop in another place
The questionable while loops to get GimpCoords.direction into a proper
range were used in two places. This commit fixes the actual problematic
place where, under some rare circumstances, the code used to go into a
loop for a very long time.
2009-05-29 23:33:54 +02:00
Alexia Death 936df1a183 app: Fix gimp_display_shell_eval_event that had some questionable whiles 2009-05-29 22:26:57 +03:00
Sven Neumann 8a28c073f1 app/core/gimpcoords-interpolate.c applied patch from Alexia Death that
2009-02-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcoords-interpolate.c
	* app/display/gimpdisplayshell-coords.c: applied patch from 
Alexia
	Death that fixes issues with the new stroke direction code
	(bug #520078).


svn path=/trunk/; revision=28030
2009-02-14 13:36:28 +00:00
Sven Neumann f64e2a76bf app/core/gimpcoords-interpolate.c app/core/gimpbrush-transform.c
2009-02-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcoords-interpolate.c
	* app/core/gimpbrush-transform.c
	* app/paint/gimppaintoptions.c
	* app/display/gimpdisplayshell-coords.c: applied patch from 
Alexia
	Death that fixes the direction of brush rotation (bug #520078).


svn path=/trunk/; revision=28010
2009-02-10 21:07:35 +00:00
Sven Neumann fd4b557fd7 applied patch from Alexia Death that introduces smoothing for the stroke
2009-02-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): applied patch from Alexia Death
	that introduces smoothing for the stroke direction (bug 
#520078).


svn path=/trunk/; revision=28009
2009-02-10 19:45:37 +00:00
Michael Natterer 9999ccf790 Bug 520078 – Rotate brushes
2009-02-08  Michael Natterer  <mitch@gimp.org>

	Bug 520078 – Rotate brushes

	Applied a slightly modified patch from Alexia Death:

	* app/core/core-types.h (struct GimpCoords): add "direction" member.

	* app/core/gimpcoords.c: take direction into account in mix(),
	scalarprod(), length_squared(), manhattan_dist() and equal().

	* app/core/gimpcoords-interpolate.c
	(gimp_coords_interpolate_catmull): same here.
	* app/display/gimpdisplayshell-coords.c

	(gimp_display_shell_eval_event): same here.

	* app/paint/gimppaintoptions.[ch]: add properties for direction
	dynamics and adapt dynamics mixing accordingly.

	* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
	"interpolate" direction too (in fact, just copy it from
	last_coords since it doesn't change along a straight line).

	* app/paint/gimppaintcore-stroke.c
	(gimp_paint_core_stroke_emulate_dynamics): emulate direction too.

	* app/tools/gimppaintoptions-gui.c: add GUI for direction dynamics.


svn path=/trunk/; revision=28001
2009-02-08 12:55:20 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann f171d10506 Bug 471344 – Circular brush strokes are not smooth and have corners
2009-01-10  Sven Neumann  <sven@gimp.org>

	Bug 471344 – Circular brush strokes are not smooth and have 
corners

	Bug 127785 – stroking with size linked to pressure sensitivity
	should scale the spacing

	* app/core/gimpcoords-interpolate.[ch]
	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-callbacks.[ch]
	* app/display/gimpdisplayshell-coords.[ch]: applied patch from
	Alexia Death that introduces a Catmul-Rom splines based event
	interpolation and also adapts the brush spacing to brush size.


svn path=/trunk/; revision=27898
2009-01-10 00:48:30 +00:00
Sven Neumann 92661af96c removed delta_time, delta_x, delta_y, distance and random from the
2008-07-18  Sven Neumann  <sven@gimp.org>

	* app/core/core-types.h: removed delta_time, delta_x, delta_y,
	distance and random from the GimpCoords struct. These don't need
	to be kept here and they can't be properly interpolated.

	* app/core/gimpcoords.c: changed accordingly.

	* app/xcf/xcf-load.c (xcf_load_vector): the size of the 
GimpCoords
	struct changed.

	* app/display/gimpdisplayshell.[ch] (struct _GimpDisplayShell):
	added some members to store values from the last event that are
	needed in gimp_display_shell_eval_event() and which are not any
	longer part of GimpCoords.

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): changed accordingly.
	
	* app/paint/gimppaintoptions.c: calculate a random number when 
one
	is needed.

	* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
	GimpCoords doesn't have a "random" field any longer.


svn path=/trunk/; revision=26232
2008-07-18 11:56:05 +00:00
Michael Natterer f8a7ba7693 revert velocity limit to 1.0, this part of the patch shouldn't have been
2008-05-27  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-coords.c: revert velocity limit to
	1.0, this part of the patch shouldn't have been applied.


svn path=/trunk/; revision=25824
2008-05-27 09:02:31 +00:00
Michael Natterer b819602590 Applied modified patch from Alexia Death. Addresses bug #534770:
2008-05-26  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Alexia Death. Addresses bug #534770:

	* app/paint/gimppaintoptions.[ch]: add properties for scaling
	the effects of pressure, velocity and hardness and honor them
	in the various get_dynamic_foo() functions.

	(gimp_paint_options_get_dynamic_size): look at
	pressure_options->size again, that code got lost in one of the
	earlier patches.

	* app/tools/gimppaintoptions-gui.c: add GimpScaleButtons to the
	table for the new properties.

	* app/display/gimpdisplayshell-coords.c: don't let "velocity"
	reach 1.0, use 0.9999 instead.


svn path=/trunk/; revision=25816
2008-05-26 19:52:09 +00:00
Michael Natterer fe70064f00 Applied slightly modified and fixed patch from Alexia Death which adds a
2008-05-22  Michael Natterer  <mitch@gimp.org>

	Applied slightly modified and fixed patch from Alexia Death which
	adds a "random" axis to the paint dynamics and fixes some issues
	in the previous paint dynamics commits. Fixes bug #529431.

	* app/core/core-types.h: add a "random" axis to GimpCoords.

	* app/display/gimpdisplayshell-coords.c: set it to a random value.

	* app/display/gimpdisplayshell-callbacks.c: on button_press,
	use the dynamics from the last motion event to avoid blotches
	at the beginning of paint strokes.

	* app/paint/gimppaintoptions.[ch]: add random properties the same
	way we do pressure and velocity. Add get_dynamic_size(),
	get_dynamic_color() and get_dynamic_hardness() functions which
	look at all dynamic parameters of the passed coords.

	* app/tools/gimppaintoptions-gui.c: add gui for the random options.

	* app/paint/gimpbrushcore.[ch]: remove calc_brush_scale() and use
	gimp_paint_options_get_dynamic_size_instead().
	Add "dynamic_hardness" parameters to paste_canvas(),
	replace_canvas() and get_brush_mask().

	* app/paint/gimpairbrushoptions.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: calculate the dynamic hardness and pass
	it to above brush core functions. Use the get_dynamic_color() to
	calculate the gradient color.


svn path=/trunk/; revision=25758
2008-05-22 16:38:57 +00:00
Michael Natterer 82c2616f0f Applied modified patch from Alexia Death which adds velocity support to
2008-05-10  Michael Natterer  <mitch@gimp.org>

	Applied modified patch from Alexia Death which adds velocity
	support to paint tools in the spirit of the pressure support we
	already have. Fixes bug #529431.

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): tweak velocity calculation to
	work in screen coordinates.

	* app/paint/gimppaintoptions.[ch]: add velocity options in the
	same way as there are pressure options. Add utility functions
	which return dynamic opatity and dynamic rate according to the the
	option's settings and some GimpCoords' pressure and velocity.

	* app/tools/gimppaintoptions-gui.c: add GUI for the velocity
	options.

	* app/paint/gimpbrushcore.h: remove PRESSURE_SCALE define, it's
	now in gimppaintoptions.h.

	* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
	inerpolate velocity too.

	(gimp_brush_core_calc_brush_scale): take velocity into account.

	(gimp_brush_core_get_brush_mask): always pressurize the mask in
	the GIMP_BRUSH_PRESSURE because there always is velocity (unlike
	pressure which is only there on tablets).

	* app/paint/gimpairbrush.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: get opacity and rate from the new paint
	options utility functions which take both pressure and velocity
	into account.

	* app/paint/gimppaintbrush.c: take velocity into account when
	calculating the gradient color offset.

	* app/paint/gimpairbrush.c: do some additional fiddling with
	velocity in the asynchronous airbrush timeout.

	* app/paint/gimpairbrushoptions.c: override the velocity-size
	property and have it default to FALSE.


svn path=/trunk/; revision=25604
2008-05-10 10:03:21 +00:00
Sven Neumann 563684d665 app/tools/gimppainttool.c applied patch from Alexia Death which changes
2008-05-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimppainttool.c
	* app/display/gimpdisplayshell-coords.c: applied patch from 
Alexia
	Death which changes the maximum smoothing for paint tools to 
more
	conservative default and adds velocity dependent smooth 
suppression.


svn path=/trunk/; revision=25564
2008-05-05 06:21:22 +00:00
Michael Natterer b8d687fec2 remove local "inertia" variable and simply modify the passed
2008-04-16  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): remove local "inertia" variable
	and simply modify the passed "inertia_factor" when needed.


svn path=/trunk/; revision=25494
2008-04-16 15:19:28 +00:00
Michael Natterer 5061fb6be0 fix calculation of filter distance, it was missing a 1 / zoom_factor.
2008-04-15  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): fix calculation of filter
	distance, it was missing a 1 / zoom_factor. Moved variables to
	local scope. Remove resundant thistime variable. Turned const
	gdouble into a #define.


svn path=/trunk/; revision=25490
2008-04-15 21:32:00 +00:00
Sven Neumann 1006d379e4 app/display/gimpdisplayshell-callbacks.c
2008-04-07  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-coords.[ch]
	* app/tools/gimppainttool.c
	* app/tools/gimptool.[ch]: applied patch from Alexia Death as
	attached to bug #508639. This change makes the smoothing depend on
	the active tool.

svn path=/trunk/; revision=25392
2008-04-07 13:54:43 +00:00
Sven Neumann 50d5d18af8 app/display/gimpdisplayshell-callbacks.c applied slightly modified patch
2008-03-02  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): applied slightly modified patch
	from Alexia Death as attached to bug #508639.


svn path=/trunk/; revision=25006
2008-03-02 16:29:13 +00:00
Sven Neumann 0a368b32e7 app/display/gimpdisplayshell-callbacks.c applied patch from Alexia Death
2008-01-22  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-coords.[ch]: applied patch from
	Alexia Death with further event filter improvements (bug #508639).

svn path=/trunk/; revision=24672
2008-01-22 14:53:34 +00:00
Sven Neumann 7ff3037502 app/display/gimpdisplayshell-callbacks.c applied parts of a change from
2008-01-16  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-coords.c: applied parts of a change
	from Alexia Death. This improves the event smoothing (bug #508639).

svn path=/trunk/; revision=24624
2008-01-16 10:42:49 +00:00
Sven Neumann 524870327c app/core/core-types.h app/display/gimpdisplayshell-callbacks.c
2008-01-14  Sven Neumann  <sven@gimp.org>

	* app/core/core-types.h
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-coords.[ch]
	* app/display/gimpdisplayshell.h
	* app/paint/gimpink.[ch]
	* app/paint/gimpinkundo.[ch]: applied patch from Alexia Death 
that
	adds an event evaluation function that decides if an event is
	needed or can be discarded. As a side-product some useful 
dynamics
	parameters like velocity are added to the GimpCoords struct. The
	Ink tool is changed to use this information. See bug #508639.


svn path=/trunk/; revision=24607
2008-01-14 20:34:37 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer aef1cf9306 app/display/Makefile.am app/display/gimpdisplayshell-autoscroll.[ch] new
2005-01-02  Michael Natterer  <mitch@gimp.org>

	* app/display/Makefile.am
	* app/display/gimpdisplayshell-autoscroll.[ch]
	* app/display/gimpdisplayshell-coords.[ch]: new files factored out
	of gimpdisplayshell-callbacks.c

	* app/display/gimpdisplayshell.h (struct GimpDisplayShell): added
	"gpointer scroll_info" needed by autoscroll.

	* app/display/gimpdisplayshell-callbacks.c: removed the stuff
	above. Also removed the static autoscroll struct because it's not
	needed any longer.
2005-01-02 20:42:31 +00:00