crashes GIMP
* app/paint/gimppaintcore-stroke.c
(gimp_paint_core_stroke_vectors): Return an error message if there
were not enough points to stroke.
* app/dialogs/stroke-dialog.c (stroke_dialog_response): Guard
against crashes if an implementator forgets to set an error.
svn path=/trunk/; revision=27589
2008-11-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.[ch]: add optional parameter "PixelRegion
*destPR" to GimpDrawable::apply_region().
* app/core/gimpdrawable-combine.[ch]: if the passed destPR is !=
NULL, write the result of the combination into that region instead
of the drawable's tiles. The region must have the exact size of
the result.
* app/core/gimp-edit.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-shadow.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpimagemap.c
* app/core/gimplayer-floating-sel.c
* app/paint/gimppaintcore.c: pass NULL as destPR. Code actually
using this feature follows.
svn path=/trunk/; revision=27574
2008-11-06 Sven Neumann <sven@gimp.org>
* tools/gimp-mkenums: use NC_() to mark enum values for
translation.
Use a lower-case short form of the type name as translation
context.
* libgimp/libgimp-intl.h: define the NC_() macro as noop.
* libgimpbase/gimpbasetypes.[ch]
* libgimpbase/gimpbase.def: added new functions to set and
get a translation context on an enum type.
* app/base/Makefile.am
* app/core/Makefile.am
* app/display/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/tools/Makefile.am
* app/widgets/Makefile.am
* libgimp/Makefile.am
* libgimpbase/Makefile.am:
* libgimpconfig/Makefile.am
* libgimpthumb/Makefile.am
* libgimpwidgets/Makefile.am: register the translation context
with the enum types.
* app/display/display-enums.h
* libgimpbase/gimpbaseenums.h
* libgimpconfig/gimpcolorconfig-enums.h: removed old-style
explicit
translation context.
* app/base/base-enums.c
* app/core/core-enums.c
* app/display/display-enums.c
* app/paint/paint-enums.c
* app/plug-in/plug-in-enums.c
* app/text/text-enums.c
* app/tools/tools-enums.c
* app/widgets/widgets-enums.c
* libgimpbase/gimpbaseenums.c
* libgimpconfig/gimpcolorconfig-enums.c
* libgimpwidgets/gimpwidgetsenums.c: regenerated.
svn path=/trunk/; revision=27562
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2008-09-08 Sven Neumann <sven@gimp.org>
* app/paint/gimpbrushcore.c: based on a patch from David Gowers
clamp the brush scale so that the brush never becomes smaller
than
0.5 pixels. Fixes bug #548631.
svn path=/trunk/; revision=26900
2008-08-20 Michael Natterer <mitch@gimp.org>
* app/paint/gimpperspectiveclone.[ch]: make
gimp_perspective_clone_get_matrix() static and add
gimp_perspective_clone_set_transform().
* app/tools/gimpperspectiveclonetool.c
(gimp_perspective_clone_tool_mode_notify): use above set_transform()
API instead of poking into the object.
(gimp_perspective_clone_tool_constructor): call
gimp_perspective_clone_tool_mode_notify() to set up things instead
of duplicating code.
svn path=/trunk/; revision=26673
2008-08-15 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintcore-stroke.c
(gimp_paint_core_stroke_boundary)
(gimp_paint_core_stroke_vectors): when stroking multiple segments,
set paint_core->cur_coords to the start of each segment. It
normally gets assigned by gimp_paint_core_start(), but that's not
called for subsequent segments. Fixes stroking multiple segments
with the ink tool. The other tools were not affected since they
plot individual brushes rather than a shape from the last to the
current coordinates. Spotted by Alexia.
svn path=/trunk/; revision=26578
2008-08-13 Martin Nordholts <martinn@svn.gnome.org>
* app/paint/gimppaintcore.c: Include gimpprojection.h for
gimp_projection_get_tiles().
svn path=/trunk/; revision=26528
2008-08-12 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore.c (gimp_paint_core_start): use
gimp_projection_get_tiles() instead of doing the same through
the
GimpPickable interface.
svn path=/trunk/; revision=26522
2008-07-23 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintcore-stroke.[ch]: also implement brush
dynamics emulation for stroking selections.
* app/core/gimpchannel.c: pass the 'emulate-dynamics' parameter
to
gimp_paint_core_stroke_boundary().
svn path=/trunk/; revision=26293
2008-07-23 Sven Neumann <sven@gimp.org>
Based on a patch from Alexia Death (bug #543706):
* app/paint/gimppaintcore-stroke.[ch]
(gimp_paint_core_stroke_vectors): added code to emulate brush
dynamics by modifying pressure and velocity along the stroke.
* app/vectors/gimpvectors.c (gimp_vectors_stroke): pass the
'emulate-dynamics' parameter to
gimp_paint_core_stroke_vectors().
svn path=/trunk/; revision=26291
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-07 Sven Neumann <sven@gimp.org>
* app/paint/gimppaintoptions.c
(gimp_paint_options_get_dynamic_hardness) : applied patch from
Alexia Death fixing a cut'n'paste error.
svn path=/trunk/; revision=26084
2008-06-09 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.c: set DEFAULT_VELOCITY_SIZE to FALSE
so the paint tools behave as before and the brush outline is
meaningful at least in the default setup.
svn path=/trunk/; revision=25902
2008-05-27 Sven Neumann <sven@gimp.org>
* app/paint/gimpconvolve.c: make Convolve work with very thin
brushes, then convolving only in one direction (bug #533791).
svn path=/trunk/; revision=25823
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 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.[ch]: replace the identical
GimpPressureOptions, GimpVelocityOptions and GimpRandomOptions
struct by a single GimpDynamicOptions struct.
* app/tools/gimppaintoptions-gui.c: don't pass the various
sub-structs to the _options_gui() function because they are not
needed.
svn path=/trunk/; revision=25814
2008-05-22 Michael Natterer <mitch@gimp.org>
* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate): move
generating the random axis to the right place.
svn path=/trunk/; revision=25766
2008-05-22 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.[ch]: replace the pressure-expanded,
velocity-expanded and random-expanded properties by a single
dynamics-expanded property.
* app/tools/gimppaintoptions-gui.c: pack the toggle matrix into an
expander, some cleanup.
svn path=/trunk/; revision=25765
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-18 Martin Nordholts <martinn@svn.gnome.org>
Applied patch from Alexia Death that makes velocity dynamics
controlled scale properly recalculate the brush mask when
necessary (bug #533618).
* app/paint/gimpbrushcore.[ch] (gimp_brush_core_scale_mask): A
change in scale requires a recalculation of the cached brush mask.
svn path=/trunk/; revision=25696
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-04-25 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.c (gimp_paint_options_get_jitter):
add g_return_if_fail().
* app/paint/gimpheal.c (gimp_heal_motion)
* app/paint/gimpdodgeburn.c (gimp_dodge_burn_motion): free stuff
right after it's not used any longer, instead of at the end of the
function.
* app/paint/gimppaintbrush.c (_gimp_paintbrush_motion): move a
statement to improve consistency with other motion() functions.
svn path=/trunk/; revision=25526
2008-04-25 Michael Natterer <mitch@gimp.org>
* app/paint/gimppaintoptions.[ch]: reorder jitter options stuff to
be consistently ordered all over the place.
svn path=/trunk/; revision=25523
2008-03-30 Sven Neumann <sven@gimp.org>
Merged Bill's changes for bug #521433 from trunk with some minor
cleanups:
* app/paint/gimpbrushcore.[ch]: made
gimp_brush_core_get_brush_mask() public.
* app/paint/gimpheal.c: respect the brush mask.
svn path=/trunk/; revision=25309
2008-02-06 Michael Natterer <mitch@gimp.org>
* app/paint/gimpclone.c
* app/paint/gimpheal.c
* app/paint/gimpink.c
* app/widgets/gimphistogrameditor.c: remove includes that are
not needed any longer.
svn path=/trunk/; revision=24823
2008-02-04 Sven Neumann <sven@gimp.org>
* app/paint/gimpbrushcore.c (gimp_brush_core_create_bound_segs):
only smooth the inner area of the mask so that we don't enlarge
the boundary for hard brushes (bug #304798).
svn path=/trunk/; revision=24780
2008-01-22 Sven Neumann <sven@gimp.org>
* app/paint/gimpbrushcore.c (gimp_brush_core_create_bound_segs):
dilate the brush mask in order to obtain a simpler boundary.
Addresses bug #304798.
* app/tools/gimpbrushtool.c (gimp_brush_tool_draw_brush):
removed
redundant casts.
svn path=/trunk/; revision=24676