In layer expansion if user is trying to draw outside the layer boundary
with expand option turned on but the "Lock position and size" enabled,
the lock square will be blinked. If user is painting on layer mask, the
corresponding layer's lock will be blinked. It will be blinked only
once per stroke.
This function returns TRUE if the drawable is expanded. Otherwise, it
will return FALSE. This removes the need to check width and height of
the drawable to infer the same.
Created a separate function gimp_paint_core_expand_drawable that handles
layer expansion while painting. The gimp_brush_core_get_buffer function
now uses this function to expand drawable. It has been separated so that
it can be reused for ink tool.
- Make the various virtual methods of GimpPaintCore use a list of
drawables as argument instead of a single drawable.
- gimp_brush_core_eval_transform_dynamics() can work with an image as
argument rather than a drawable as it doesn't actually depends on
specific drawable data.
- New function gimp_paint_tool_enable_multi_paint() to be used in init()
method of paint tools to announce that this tool can work with
multiple layers selected.
- Use gimp_paint_tool_enable_multi_paint() in the GimpSourceTool base
class only for now.
This is a first step for multi-layer drawing, but we don't want it to be
possible in just any random cases, which is why I add a special function
to advertize this capability. We will use it for special-casing the
clone (as well as heal and perspective tools most likely) tool to work
on several layers at once. At this step, it is still very bugged and not
really working properly. In particular, since we don't process the
drawable offset early anymore (because it makes no sense when we pass a
list of drawables with different offsets), I suspect that all the
offset-related code will be very broken.
GimpPaintCore operates indipendently of a display, and hence needs
to be explictly told when operating in "show all" mode, affecting
the result of paint tools operating in "sample merged" mode. Add
gimp_paint_core_set_show_all() for that purpose, and call it,
passing the current display's "show all" mode, in GimpPaintTool.
This controls which pickable (the image itself, or its projection)
is used as the sampling source, as per
GimpPaintCore::saved_proj_buffer, and as returned by the new
gimp_paint_core_get_image_pickable() function.
Remove the mask_components_onto() gimppaintcore-loops function, and
the GimpPaintCore::comp_buffer member. Instead, in
gimp_paint_core_paste() and gimp_paint_core_replace(), use the
MASK_COMPONENTS algorithm, added in the previous commit.
Fix gimp_constrain_line() and friends to properly constrain line
angles when the image's horizontal and vertical resolutions are
different, and dot-for-dot is disabled.
Add an offset_angle parameter to gimp_constrain_line(), which
offsets the radial lines by a given angle.
Add gimpdisplayshell-utils.[ch], with two new functions:
- gimp_display_shell_get_constrained_line_offset_angle():
Returns the offset angle to be passed to
gimp_constrain_line(), in order to constrain line angles in
display space, according to the shell's rotation angle and
flip mode.
- gimp_display_shell_constrain_line(): A convenience function
which calls gimp_constrain_line() with the said offset angle.
Use the new functions in all instances where we constrain line
angles, so that angles are constrained in display space, rather
than image space.
The only exception is GimpEditSelectionTool, which keeps
constraining angles in image space, since it's not entirely obvious
that we want to constrain angles of dragged layers/selections in
display space.
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
You can now set any paint tool to mirror painting relatively
horizontal/vertical axis or a central point (any combination of these 3
symmetries).
This has been implemented as a new multi-stroke core, where every stroke
is actually handled as a multi-stroke (default of size 1).
This is also the first usage of custom guides for symmetry guiding.
Current version has to be activated in the playground.
paint_core->start_coords is in fact the last stroke's endpoint and
only used for storing it in GimpPaintCoreUndo, so the last endpoint
can be resotred for straight-line painting after an undo. Make the
code actually doing that.
and instead simply return the paint_core owned buffers. Also, move
graph creation and source buffer fiddling out of perspective clone's
inner loop, and set an area to be processed manually, which makes it
responsive again.
Rebased/fixed to go on top of current master. Next commit will add cleanup.
Had to change author tag because gnome is not accepting random stuff
in email fields. Original author is tarai, from gimp painter project
in sourceforge.
(gimp_paint_core_get_orig_image)
(gimp_paint_core_get_orig_proj): changed parameters to x,y,width,height.
Update callers accordingly and use x,y,width,height there too except
in gimpperspectiveclone.c which does better with a bounding box.
Pass the current coords to the function instead of setting them
on the paint core before calling it. Doesn't exactly make the code
in the paint tool simpler, but that needs further refactoring anyway.
* app/paint/gimppaintcore.[ch]: add
gimp_paint_core_{get|set}_{current|last}_coords(), add "const GimpCoords*"
parameter to ::paint() which gets core->cur_coords passed.
* app/paint/gimpsourcecore.[ch]: add "const GimpCoords*" to ::motion().
* app/paint/gimpbrushcore.c: use the new coords getters/setters instead
of accessing GimpPaintCore members directly.
* 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/gimpink.c
* app/paint/gimppaintbrush.[ch]
* app/paint/gimpperspectiveclone.c
* app/paint/gimpsmudge.c: change implementations of GimpPaintCore::paint()
and GimpSourceCore::motion() accordingly. app/paint/ is now virtually
free of direct access to the paint core's coords members. More to come...
* app/paint/gimppaintcore.[ch]: add gimp_paint_core_round_line()
* app/tools/gimppainttool.c: remove gimp_paint_tool_round_line() and call
above new function instead.
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
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