by adding the source outline's canvas item to the source display
directly. Poking in GimpDrawTool internals is gone and generally not
possible any longer since GimpCanvasItem based drawing.
such as masks and outlines. The cache is currently very stupid and
only cacheds the last transformed object. Add caches to GimpBrush for
its mask, its pixmap and its boundary, and remove the same caches and
a ton of members from GimpBrushCore. This involves adding lots of
const qualifiers because GimpBrush returns const pointers now for
trasnformed stuff.
Add a transform matrix to GimpCanvasBoundary and get rid of the whole
BoundSeg transform code in boundary.c and gimpbrushcore.c, it was
impossible to get this right on that level. Also fix te extents of
GimpCanvasBoundary os it leaves no artifacts.
2009-02-05 Sven Neumann <sven@gimp.org>
Bug 520078 – Rotate brushes
Applied patch from Alexia Death:
* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/core/gimpbrush-transform.[ch]: affine transformations for
brushes. So far only scaling and rotation is supported. The
transformation is done using nearest-neighbour. This is a
regression and we need to add back interpolation before the next
release.
* app/paint/gimpsmudge.c
* app/paint/gimppaintoptions.[ch]
* app/paint/gimpbrushcore.[ch]: allow to control the brush
rotation angle.
* app/tools/gimppaintoptions-gui.c
* app/tools/gimpbrushtool.c: added UI for controlling the
brush rotation angle.
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]: add actions for controlling
the
brush rotation angle.
svn path=/trunk/; revision=27987
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
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-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
2007-10-29 Sven Neumann <sven@gimp.org>
Fix bug #491272 (no cursor drawn for small brush sizes):
* app/tools/gimpbrushtool.[ch]
(gimp_brush_tool_draw_brush): don't draw the brush outline if it
becomes too small. Instead draw a small cross, but only if
"draw_fallback" was passed as TRUE.
(gimp_brush_tool_draw_brush): pass TRUE for "draw_fallback" if
cursor drawing is disabled for the paint tools.
* app/tools/gimpsourcetool.c (gimp_source_tool_draw): pass FALSE
for "draw_fallback".
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_cross_by_anchor):
draw a symmetric cross for odd handle sizes.
svn path=/trunk/; revision=23984
2007-05-16 Michael Natterer <mitch@gimp.org>
* app/tools/gimpbrushtool.c (gimp_brush_tool_constructor): add a
local GimpDisplayConfig variable to improve readability.
svn path=/trunk/; revision=22514
2007-05-07 Sven Neumann <sven@gimp.org>
* app/tools/gimpbrushtool.[ch] (gimp_brush_tool_draw): moved
brush drawing code to the new function gimp_brush_tool_draw_brush().
* app/tools/gimpsourcetool.c: (gimp_source_tool_draw): draw the
brush outline at the source position (bug #435545).
svn path=/trunk/; revision=22450
2007-03-09 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
instead of "libgimpmath/gimpmath.h".
* app/core/gimpbrush.h
* app/paint/gimppaintcore.h
* app/paint/gimpperspectiveclone.h
* app/text/gimptext.h
* app/tools/gimptransformtool.h: include gimpvector.h and
gimpmatrix.h explicitely where they are needed in public structs.
* app/*/*.c
* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
where needed.
* app/pdb/paths_cmds.c: regenerated.
svn path=/trunk/; revision=22084
2007-01-21 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.[ch]: maintain an is_drawn boolean which
indicates whether the drawn stuff is currently visible. Added
gimp_draw_tool_is_drawn() to obtain it.
* app/tools/gimpbrushtool.c (gimp_brush_tool_draw): don't create
the brush outline segments for the purpose of undrawing (if we
don't have the segments, we can hardly have drawn them before).
Fixes artifacts when the brush is being scaled or changed.
* app/core/gimpbrush.c: don't call brush_scale_mask() and
brush_scale_pixmap() with zero width or height. Fixes warnings
from these functions.
svn path=/trunk/; revision=21749
2006-11-17 Michael Natterer <mitch@gimp.org>
* app/actions/tools-actions.c
* app/actions/tools-commands.[ch]: added actions and callbacks for
the new paint options brush scale property. Assigned new
shortcuts: '<' and '>' are now changing tool-value-1 and '[' and
']' are changing tool-value-2
* app/actions/context-actions.c: removed the shortcuts from the
brush size actions.
* app/tools/gimpbrushtool.c
* app/tools/gimpcolortool.c: set tool-value-2 to brush-scale and
to color-average-radius, so '[' and ']' always affect the size of
the tip of the active tool. tool-value-1 is connected to
context-opacity so that is changeable using '<' and '>' now.
2006-11-16 Michael Natterer <mitch@gimp.org>
Made all brushes scalable from the tool options. So far only
downscaling is supported since we lack an algorithm for bitmap
brush upscaling. Addresses bug #65030.
* app/paint/gimppaintoptions.[ch]: added "brush-scale" property.
* app/paint/gimpbrushcore.[ch]: separate pressure logic from brush
scaling logic and take paint_options->brush_scale into account.
Added gimp_brush_core_create_bound_segs() which returns BoundSegs
of the correctly scaled brush mask for the brush preview on the
canvas.
* app/tools/gimpbrushtool.c: use gimp_brush_core_create_bound_segs()
instead of doing this here (also removes all knowledge about lowlevel
stuff from this file). Connect to notify::brush-scale of the
paint options and invalidate the brush core's brush accordingly.
* app/tools/gimppaintoptions-gui.c: added brush scale slider.
2006-09-13 Michael Natterer <mitch@gimp.org>
* app/tools/gimpbrushtool.c: simplified by calling
gimp_draw_tool_pause/resume() unconditionally (it does no harm,
regardless of whether the tool is in color picking mode or not).
Return early in gimp_brush_tool_draw() if color picking is
enabled.
* app/tools/gimpsmudgetool.c (gimp_smudge_tool_init): don't enable
color picking, the tool doesn't use FG or BG.
2006-09-12 Sven Neumann <sven@gimp.org>
* app/tools/gimpbrushtool.c (gimp_brush_tool_cursor_update): if
the "bad" cursor modifier is set, show the cursor regardless of
the gimprc "show-paint-tool-cursor" setting.
2006-09-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: added gimp_tool_get_options() so tools
don't need to incude "core/gimptoolinfo.h" just to get to
their options.
* app/tools/gimp*tool.h: added macros GIMP_FOO_TOOL_GET_OPTIONS()
which return specific tool options types and do all casting
themselves.
* app/tools/*.c: use the new macros and don't include
"core/gimptoolinfo.h" in most files.
* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_register):
make it use the parent context's FG and BG.
* app/tools/gimpcolortool.c (gimp_color_tool_real_picked): set the
color on the tool's options, not on the user context.