2003-11-15 Simon Budig <simon@gimp.org>
* app/tools/gimpvectoroptions.[ch]: Since GimpVectorTool is no
GimpSelectionTool, it does not make sense to have
GimpSelectionOptions for it.
* app/tools/gimpvectoroptions.c
* app/tools/gimpvectortool.c: Connect the Buttons to the
Help system and make the to-selection Button modifier
aware.
2003-11-14 Simon Budig <simon@gimp.org>
* app/tools/gimpvectoroptions.c: Add two buttons to the
Tool Options
* app/tools/gimpvectortool.c: Use them for stroking a path
and converting a path to a selection, to make this functionality
more obvious.
2003-10-22 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: Changed the priority
of ALT vs. CTRL. Resolves an small issue with (broken)
window managers that grab ALT. Implements the suggestion
from Raymond Ostertag in bug #124971.
2003-10-06 Michael Natterer <mitch@gimp.org>
Treat changes to the selection like changes to any other drawable:
* app/core/gimpchannel.c
* app/core/gimpchannel-combine.c: call gimp_drawable_update() after
changing the channel.
* app/core/gimpimage.[ch]: added struct GimpImageFlushAccumulator
with one member "gboolean mask_changed". Connect to "update" of
the selection and set accum.mask_changed to TRUE in the callback.
Added default implementation for GimpImage::flush() and emit
"mask_changed" there.
Unrelated:
* app/core/gimpimage.h: removed GimpGuide struct...
* app/core/gimpimage-guides.h: ...and added it here.
* app/core/gimpimage-undo-push.c (undo_pop_mask)
(undo_pop_channel_mod): don't distinguish between selection and
non-selection channels and just call gimp_drawable_update().
* app/core/gimpundo.h
* app/core/gimpimage-undo.c: removed "gboolean mask_changed" from
the GimpUndoAccumulator struct since we don't have to care about
that signal explicitly any more.
* app/display/gimpdisplay-foreach.[ch]: removed gimp_displays_flush().
* tools/pdbgen/pdb/display.pdb (displays_flush_invoker): call
gimp_image_flush() on all images so the flush accumulator is
honored.
This generalization enables the removal of more special purpose
code which was needed to treat the selection different:
* app/core/gimpimage-mask-select.[ch]: removed...
* app/core/gimpchannel-select.[ch]: ...and added under a new name
because it's not selection specific any more.
* app/core/gimpimage-mask.[ch]: removed...
* app/core/gimpselection.[ch]: ...added the two remaining
functions here. Removed all calls to gimp_image_mask_changed().
* app/core/Makefile.am
* app/core/gimp-edit.c
* app/core/gimpdrawable-transform.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-snap.c
* app/display/gimpdisplayshell.c
* app/gui/channels-commands.c
* app/gui/layers-commands.c
* app/gui/select-commands.c
* app/gui/vectors-commands.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-save.c
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly.
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpimage-colormap.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/gui/image-menu.c
* app/paint/gimppaintcore.c
* app/tools/gimpcroptool.c
* app/tools/gimpinkoptions.c
* app/tools/gimpvectortool.c: removed useless and/or obsolete
#includes.
* app/pdb/display_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated.
2003-09-29 Simon Budig <simon@gimp.org>
* app/widgets/gimppreviewrenderervectors.c: Made the preview
respect the aspect ratio and resolutions of the image. There
apparently still is an off-by-one error in it.
* app/tools/gimpvectortool.c: (Hopefully) fixed a crash when a new
image gets opened with the vectors tool active.
2003-09-23 Simon Budig <simon@gimp.org>
* app/core/gimpdrawable-stroke.c: Fixed vectors stroking on
GRAY* and INDEXED* layers.
* app/tools/gimpvectortool.c: Made the polygonal mode more
consistent.
2003-09-19 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]: Show a little help in the
status bar. Maybe the functions I implemented to track
the status of the status bar should live in a parent class.
Still behaves a little weird, but I need help to fix it and it
does not crash, so I committed it anyway... :-)
2003-09-18 Michael Natterer <mitch@gimp.org>
* app/paint/Makefile.am
* app/paint/paint.[ch]: removed...
* app/paint/gimp-paint.[ch]: ...and added.
* app/core/gimp.c: changed accordingly.
* app/tools/Makefile.am
* app/tools/tools.[ch]: removed...
* app/tools/gimp-tools.[ch]: ...and added. Added
gimp_tools_restore() and gimp_tools_save() and moved the entire
tool registering and tool_options loading/saving code here. Call
tool_manager_init() from gimp_tools_init() and tool_manager_exit()
from gimp_tools_exit().
* app/tools/tool_manager.[ch]: removed the code which now lives
in gimp-tools.[ch]. The tool manager now has no knowledge about
individual tools any more and just handles the active_tool
and the tool part of tool <-> display interaction.
Removed tool_manager_get_info_by_type().
* app/tools/gimpvectortool.c (gimp_vector_tool_register): the
tool's identifier is "gimp-vector-tool", not "gimp-path-tool".
* app/app_procs.c
* app/display/gimpdisplayshell-callbacks.c
* app/gui/vectors-commands.c
* app/tools/gimppainttool.c: changed accordingly.
2003-09-18 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpbezierstroke.c: (gimp_stroke_nearest_point_get)
added the endpoint of the segment to the list of returned values.
* app/tools/gimpdrawtool.[ch]: (gimp_draw_tool_on_vectors_curve)
return the endpoint also.
* app/tools/gimpvectortool.[ch]: Use that to activate the
to-be-changed anchors when dragging on the curve directly.
* app/tools/gimpmovetool.[ch]: changed accordingly.
2003-09-18 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: Cursor keys now move the currently
active anchors, SHIFT and CTRL increase the steps.
* MAINTAINERS: Added myself in an attack of hubris...
2003-09-17 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpvectors.[ch]: Changed gimp_*_anchor_select to
accept the selection state as an argument.
* app/tools/gimpdrawtool.[ch]: Added "exclusive" boolean parameter
to gimp_draw_tool_on_vectors_handle(), so that you can specify
that you just get exactly the type of anchor you want to have.
* app/tools/gimpvectortool.[ch]: Handling of multiple selected
anchors: Shift-Clicking in Extend mode selects them, you can
move them together.
2003-09-17 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: smallish change to enable
dragging out of handles again. It is now dragging handles
out of anchors, when click/dragging on them in Insert/Delete
mode. Deletion of nodes now requires the SHIFT modifier.
2003-09-17 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.[ch]: added "GimpVectorMode saved_mode"
to the GimpVectorTool struct.
(gimp_vector_tool_modifier_key): use it to correctly keep track of
the modifier state.
* app/tools/gimpselectiontool.c (gimp_selection_tool_modifier_key):
moved variable to local scope.
2003-09-17 Michael Natterer <mitch@gimp.org>
* cursors/hand.xbm
* cursors/hand_mask.xbm: removed.
* cursors/hand_small.xbm
* cursors/hand_small_mask.xbm: ...and added under new names.
* cursors/Makefile.am
* cursors/gimp-tool-cursors.xcf: changed accordingly.
* app/widgets/widgets-enums.h
* app/widgets/gimpcursor.c: removed HAND from the GimpCursorModifier
enum and added it to the GimpToolCursorType enum. We don't have a
hand tool but this way the hand cursor (which is in the lower
right corner) can be used together with other cursor modifiers
(which are in the upper right corner).
* app/tools/gimpmovetool.c
* app/tools/gimpvectortool.c: show cursor modifers with the hand
cursor where appropriate.
2003-09-17 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: Ok, since the obsolete undo
step is invalid the undo_event of the image probably should be
GIMP_UNDO_EVENT_UNDO_EXPIRED. This fixes at least the undo
history...
2003-09-17 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]: Restored Mitchs favourite
feature :-) (now the cursor indicates if you hover over
a vectors object when no other one is active...). Also added
more descriptive Undo names and RMB-Cancel for the Vectors tool.
Please note, that the RMB-Cancel is implemented using the Undo
System. I do not really have a clue on that and so right now
there is an oddity - the undo-object popped from the undo
stack does not get removed from e.g. the Undo History Dialog.
Someone with a clue please have a look at that... :-)
2003-09-15 Simon Budig <simon@gimp.org>
* app/core/gimpimage.c: fixed bogus
gimp_item_set_image (GIMP_ITEM (vectors), NULL);
* app/tools/gimpdrawtool.[ch]: added gimp_draw_tool_on_vectors:
checks if the given coordinate is on any vectors object of the image.
* app/tools/gimpvectortool.[ch]: Changed the tool modes.
VECTORS_SELECT_VECTORS now is active when the tool does not
have a current vectors object or the gdisplay is different
than the one the tool is drawing on. Also the Move mode now
uses it, when clicking outside the current vectors object.
Factored out the sanity check of the internal state
(gimp_vector_tool_verify_state).
2003-09-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.[ch]: added new functions
gimp_draw_tool_on_vectors_handle() and _on_vectors_curve()
so they can be used by all GimpDrawTool subclasses.
* app/tools/gimpvectortool.[ch]: removed the _on_handle() and
_on_curve() functions here. Connect to "active_vectors_changed" of
the active_vector's image, so once it has been avtivated, the tool
follows the path which is selected in the paths dialog.
2003-09-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask-select.c (gimp_image_mask_select_vectors)
* app/paint/gimppaintcore-stroke.c (gimp_paint_core_stroke_vectors)
* app/display/gimpdisplayshell.c (gimp_display_shell_draw_vector)
* app/tools/gimpdrawtool.c (gimp_draw_tool_real_draw)
* app/tools/gimptransformtool.c (gimp_transform_tool_draw)
* app/tools/gimpvectortool.c (gimp_vector_tool_vectors_visible)
(gimp_vector_tool_draw): all callers of gimp_stroke_interpolate():
don't leak the returned GimpCoords array and don't crash if it's
NULL.
* app/tools/gimpvectortool.[ch]: added VECTORS_SELECT_VECTOR state
which enables activating any visible GimpVectors on any display.
(gimp_vector_tool_on_handle)
(gimp_vector_tool_on_curve): added a GimpVectors parameter so we
can check for vectors which are not vector_tool->vectors.
(gimp_vector_tool_oper_update): iterate gdisp->gimage->vectors
to figure if we are hovering any visible vectors and set
VECTORS_SELECT_VECTOR.
(gimp_vector_tool_button_press): catch VECTORS_SELECT_VECTOR and
start editing the selected vectors. Also make it the image's
active_vectors.
(gimp_vector_tool_button_release): removed unneeded call to
gimp_viewable_invalidate_preview(vectors).
Random cleanup all over the place.
2003-09-12 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.c: removed all calls to
gimp_tool_control_set_preserve() so the tool doesn't get
confused by the image being dirtied.
Made it aware of visible vectors:
(gimp_vector_tool_draw): don't draw the stroke itself if the
current vectors is visible.
(gimp_vector_tool_vectors_visible): new callback which just draws
the stroke itself when the vectors changes visibility.
(gimp_vector_tool_set_vectors): connect the new callback.
2003-09-03 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.c
* app/vectors/gimpbezierstroke.c: Two small hacks to make the
editing behave more symmetric (no more a user visible difference
between extending to the start or to the end of a stroke).
* app/tools/gimpvectortool.c: Use dashed lines for the connection
between the anchor and the handles. Looks great IMHO.
2003-09-03 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]: properly keep track of the
active anchor and retrieve that information after a _thaw () so
that proper editing is possible after an undo. Now the
vector_tool->cur_* variables are constantly updated in
_oper_update () so that we don't need to determine them in
_button_press () again.
On request by Jimmac and Joao connecting two stroke-ends now
works by activating one endpoint and clicking on the other
endpoint in Insert/Delete Mode.
2003-08-30 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]: fixed stupid int vs. float
error that caused rounding errors when moving in a zoomed view.
Fixed drawing artefact when connecting strokes did not succeed.
2003-08-29 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: Do not modify the selection
state of the anchors. When extending EXTEND_EDITABLE return
the anchor created (not the handle at the end of the list)
* app/tools/tools-enums.h: Added new mode-enum for the vector tool.
* app/tools/tools-enums.c: regenerated
* app/tools/gimpvectortool.[ch]: Implemented moving (Shortcuts
ALT and ALT+CTRL. The whole assignment of modifiers right now
gets revised. Right now you have to use the Tool options to
switch between the modes of operation. Connecting strokes now
works in Insert/Delete mode by clicking on startpoint and
dragging to target endpoint.
I will write a mail to gimp-devel when the shortcuts are
setteled a bit more. Sorry for the inconvenience.
2003-08-27 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpbezierstroke.c: Implemented function to
connect two strokes.
* app/tools/gimpvectortool.[ch]: Use it. Right now you have
to click on one endpoint, and then SHIFT+CTRL+ALT-Click on
the other endpoint.
Suggestions on how to solve that more sanely are welcome...
2003-08-26 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpbezierstroke.c: Implemented direct moving of the
curve. Whee! :-)
* app/tools/gimpvectortool.[ch]: Use it.
2003-08-22 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpbezierstroke.c: added
gimp_(bezier_)stroke_open that opens up a stroke (possibly
returns a new one if it falls apart).
* app/tools/gimpvectortool.[ch]: make it possible to break
up a stroke by deleting (CTRL-Clicking in Insert/Delete mode)
the curve between two anchors.
2003-08-21 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]: added _is_empty () that checks
if a stroke is empty.
* app/vectors/gimpbezierstroke.c: Implemented _anchor_delete ()
* app/vectors/gimpvectors.[ch]: added _stroke_remove ()
* app/tools/gimpvectortool.[ch]: implemented the deletion of
anchors. CTRL-Click on the anchor in Insert/Delete mode does
the trick. Also did some renaming to the Vector tool
(now Path tool) and set the Tooltip to something sane.
Folks, I think the new path tool is no longer a regression
against the 1.2 bezier select tool!
2003-08-21 Simon Budig <simon@gimp.org>
* app/tools/tools-enums.h: Added enum for vector tool operation
mode
* app/tools/tools-enums.c: regenerated
* app/tools/gimpvectoroptions.[ch]: Use new enum.
Add "Polygonal" Option
* app/tools/gimpvectortool.c: New Option "Polygonal" that
places all newly generated handles at the position of their
anchor, effectively ensuring that only polygons can be created.
Cleaned up the editing states. It is now possible to move anchors
in the Insert/Delete mode. Cleaned up the associated cursors.
Fixed warning when Shift+Ctrl-Clicking on an inactive Anchor.
2003-08-20 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]: Add hooks for insertion of points
(and testing if insertion is possible)
* app/vectors/gimpbezierstroke.c: Implement it for BezierStrokes
* app/tools/gimpvectoroptions.c: Adjusted Options-GUI.
* app/tools/gimpvectortool.[ch]: Detect if the pointer is over
the curve. Make it possible to insert points in the curve.
Select the "Insert/Delete Nodes" mode in the tool options and
click on the curve.
2003-08-18 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.c: cleaned up GimpTool, GimpDrawTool
and vectors_tool->vectors state handling a lot. Still does weird
things when switching between images and/or displays but it's
better than before...
2003-08-17 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpbezierstroke.[ch]: Virtualized
gimp_bezier_stroke_extend, added gimp_stroke_is_extendable.
* app/text/gimptext-vectors.c: changed accordingly.
* app/vectors/gimpvectors.[ch]: added gimp_vectors_anchor_select.
* app/tools/gimpvectoroptions.[ch]: dummy switch for future
extensions
* app/tools/gimpvectortool.[ch]: Major overhaul. Made use of
gimp_vector_tool_oper_update, cleaned up
gimp_vector_tool_button_press a lot and finally have a
working cursor_update. Still buggy, but I wanted to have it
in CVS.
2003-08-14 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.c (gimp_vector_tool_button_press): call
gimp_image_update() after calling gimp_image_add_vectors() so the
menus get updated correctly. Fixes bug #119412.
2003-08-02 Simon Budig <simon@gimp.org>
* app/vectors/gimpstroke.[ch]: implemented gimp_stroke_close.
* app/vectors/gimpbezierstroke.c: only extend a stroke if
it is not closed.
* app/tools/gimpvectortool.c: ALT-Click on an anchor now
closes the stroke. Will evolve to the ability to connect
two strokes.
2003-06-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.h: removed enum GimpContextPropType and
enum GimpContextPropMask.
* app/core/core-enums.[ch]: added them here.
* app/core/gimptoolinfo.[ch]: replaced "gboolean tool_context"
member by "GimpContextPropMask context_props" so each tool can
specify exactly which context properties it wants to have
persistently remembered.
* app/tools/tools-types.h: changed typedef GimpToolRegisterCallback
accordingly.
* app/tools/tool_manager.[ch] (tool_manager_register_tool): ditto.
Removed the "global_tool_context" and initialize all tool info
objects from the user_context after creation. Removed the
PAINT_OPTIONS_MASK #define and use the new context_props stored in
tool_info insted.
* app/tools/gimppainttool.h: #define the common properties of the
paint tools as GIMP_PAINT_TOOL_OPTIONS_MASK (which is OPACITY |
PAINT_MODE | BRUSH).
* app/tools/[all tools].c (gimp_*_tool_register): replaced the
"use_context" boolean by the actual mask of context properties the
tools need.
2003-06-26 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: rewrote gimp_bezier_stroke_extend
for the case when the neighbor is not really an end point of the
stroke, but close enough to the end to still be acceptable.
* app/tools/gimpvectortool.c: Make the tool behave sanely
and more symetrically (both ends of a stroke behave basically the
same now), gimp_draw_on_handle () now prefers the anchor passed
into it via the *ret_anchor parameter over other preferred anchors.
2003-06-25 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: If an control handle gets
converted to an edge simply move it to its next anchor.
* app/tools/gimpvectortool.c: Improved interactive handling
of vectors. Still work in progress, esp. I am not sure about
the assignment of the modifier keys. Right now it is:
Drag (Anchor/Handle): Regular Movement
Shift-Click (Anchor): select multiple anchors (does not work yet)
Shift-Drag: (Handle): move opposite handle symmetrically
Ctrl-Drag (Anchor): Drag out control point
S-C-Click: (Anchor/Handle): Convert to Edge
2003-05-19 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.[ch]: Implemented closed paths. Not
yet available in a sane manner via the UI. Added the last missing
line from gimp_bezier_stroke_interpolate ().
* app/tools/gimpvectortool.c: Changed accordingly
* app/vectors/gimpstroke.[ch]
* app/vectors/gimpvectors.[ch]: removed Tabs.