1. 18 May, 2005 1 commit
  2. 19 Apr, 2005 1 commit
  3. 07 Jan, 2005 1 commit
    • Michael Natterer's avatar
      moved variables to local scopes, assign the snapped coords unconditionally · 2cd34bf1
      Michael Natterer authored
      2005-01-07  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimpimage-snap.c: moved variables to local scopes,
      	assign the snapped coords unconditionally (also if we don't snap),
      	(gimp_image_snap_rectangle): entirely rewritten to use local
      	mindist_x, mindist_y variables instead of fiddling with lots of
      	boolean variables. Implemented vectors snapping as if the required
      	GimpStroke functions existed (#defined them). Simon, your turn :)
  4. 03 Jan, 2005 1 commit
    • Michael Natterer's avatar
      Implemented "Snap to Canvas Edges" (fixes bug #152971) and "Snap to Active · 150bea1e
      Michael Natterer authored
      2005-01-03  Michael Natterer  <mitch@gimp.org>
      	Implemented "Snap to Canvas Edges" (fixes bug #152971) and
      	"Snap to Active Path" (half way done):
      	* app/core/gimpimage-snap.[ch]: added boolean snap_to_canvas and
      	snap_to_vectors parameters (snap_to_vectors works fine when
      	snapping to a point, but is unimplemented for snapping to a
      	* app/display/gimpdisplayshell.[ch] (struct GimpDisplayShell):
      	added snap_to_canvas and snap_to_vectors booleans.
      	* app/display/gimpdisplayshell-appearance.[ch]: added API to
      	get/set them.
      	* app/actions/view-actions.c
      	* app/actions/view-commands.[ch]
      	* app/widgets/gimphelp-ids.h: added actions, callbacks and help IDs.
      	* menus/image-menu.xml.in: added them to Image->View.
  5. 23 Feb, 2004 1 commit
    • Michael Natterer's avatar
      return the snapped coordinates as gdouble, not gint because we must not · 02065884
      Michael Natterer authored
      2004-02-23  Michael Natterer  <mitch@gimp.org>
      	* app/core/gimpimage-snap.[ch]: return the snapped coordinates as
      	gdouble, not gint because we must not round the unsnapped axis
      	if only one axis snapped.
      	* app/display/gimpdisplayshell.[ch] (gimp_display_shell_snap_coords):
      	changed accordingly. Added boolean return value indicating "snapped".
      	* app/display/gimpdisplayshell-cursor.[ch]
      	(gimp_display_shell_update_cursor): take both display_x and _x and
      	(possibly snapped) image_x and _y. Use the snapped values for the
      	statusbar and the unsnapped ones for updating the info_window.
      	* app/display/gimpdisplayshell-callbacks.c
      	(gimp_display_shell_canvas_tool_events): applied modified patch
      	from Simon Budig which moves guide/grid snapping out of the
      	button_press/motion/button_release handlers and *always* snaps
      	the image_coords if the active_tool wants them to be snapped.
      	Makes sure that e.g. the brush preview is drawn at the right
      	place and fixes bug #134284.
      	Also pass both display_coords and image_coords to
  6. 13 Feb, 2004 1 commit
    • Simon Budig's avatar
      make the snapping width a parameter of the snapping functions. · ae81af14
      Simon Budig authored
      2004-02-13  Simon Budig  <simon@gimp.org>
      	* app/core/gimpimage-snap.[ch]: make the snapping width a
      	parameter of the snapping functions.
      	* app/display/gimpdisplayshell.c: make sure that the snapping
      	width always is 5 pixels in the view coordinates.
      	Fixes bug #134285
  7. 17 Jan, 2004 2 commits
    • Henrik Brix Andersen's avatar
      forgot to change two G_MAXINT to G_MAXDOUBLE. · 8e43a403
      Henrik Brix Andersen authored
      2004-01-17 Henrik Brix Andersen <brix@gimp.org>
      * app/core/gimpimage-snap.c (gimp_image_snap_point): forgot to
      change two G_MAXINT to G_MAXDOUBLE.
    • Henrik Brix Andersen's avatar
      Finally fixed bug #125864: · d22d364d
      Henrik Brix Andersen authored
      2004-01-17 Henrik Brix Andersen <brix@gimp.org>
      Finally fixed bug #125864:
      * app/core/gimpimage-guides.c (gimp_image_find_guide): iterate
      over the entire list of guides to determine the closest one.
      * app/core/gimpimage-snap.c: use gdoubles instead of gints for
      dist and mindist variables to make sure grid and guides with 1px
      spacings work as expected.
  8. 23 Nov, 2003 1 commit
  9. 06 Oct, 2003 1 commit
    • Michael Natterer's avatar
      Treat changes to the selection like changes to any other drawable: · f0372cad
      Michael Natterer authored
      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.
      	* 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
      	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
      	* app/pdb/display_cmds.c
      	* app/pdb/paths_cmds.c
      	* app/pdb/selection_cmds.c
      	* app/pdb/selection_tools_cmds.c: regenerated.
  10. 28 Aug, 2003 1 commit
    • Manish Singh's avatar
      app/core/gimpbrush.c app/core/gimpbrushgenerated.c · f9c41aa8
      Manish Singh authored
      2003-08-28  Manish Singh  <yosh@gimp.org>
              * app/core/gimpbrush.c
              * app/core/gimpbrushgenerated.c
              * app/core/gimpbrushpipe.c
              * app/core/gimpbuffer.c
              * app/core/gimpimage-snap.c
              * app/core/gimppattern.c
              * app/core/gimpundostack.c
              * app/display/gimpdisplayshell.c
              * app/gui/grid-dialog.c
              * plug-ins/common/CML_explorer.c: cleanup, remove unnecessary casts.
  11. 04 Jul, 2003 1 commit
    • Henrik Brix Andersen's avatar
      Added persistent storage of image grid in XCF files. · 5943f031
      Henrik Brix Andersen authored
      2003-07-04 Henrik Brix Andersen <brix@gimp.org>
      Added persistent storage of image grid in XCF files.
      * app/core/gimpimage.[ch]: removed gimp_image_get_grid() and
      gimp_image_set_grid() ...
      * app/core/Makefile.am
      * app/core/gimpimage-grid.[ch]: ... and added them to these new
      files. Added gimp_grid_parasite_name(), gimp_grid_to_parasite()
      and gimp_grid_from_parasite() functions.
      * app/core/gimpimage-snap.c
      * app/gui/grid-dialog.c: #include "gimpimage-grid.h"
      * app/core/gimpimage-undo-push.c: #include "gimpimage-grid.h".
      (gimp_image_undo_push_image_grid) mark image as dirty.
      * app/xcf/xcf-save.c (xcf_save_image_props): save GimpGrid object
      as a parasite.
      * app/xcf/xcf-load.c (xcf_load_image): load GimpGrid from
      * devel-docs/parasites.txt: documented the new "gimp-image-grid"
  12. 23 Jun, 2003 1 commit
    • Henrik Brix Andersen's avatar
      Added a per image configurable grid. · edd5c339
      Henrik Brix Andersen authored
      This fixes bug #65198
      * app/core/Makefile.am
      * app/core/core-types.h:
      * app/core/gimpgrid.[ch]: added new class GimpGrid.
      * app/core/core-enums.[ch]: added new enum GimpGridType.
      * app/core/gimpimage-guides.[ch]: removed the gimp_image_snap_*()
      * app/core/gimpimage-snap.[ch]: ...and added them here since they
      are no longer guide specific.
      * app/core/gimpimage-undo-push.[ch]: added
      * app/display/gimpdisplayshell-handlers.c:
      * app/core/gimpimage.[ch]: added grid member to _GimpImage. Added
      new signal "grid_changed", added gimp_image_grid_changed(),
      gimp_image_get_grid() and gimp_image_set_grid().
      * app/display/gimpdisplayshell-appearance.[ch]: added
      gimp_display_shell_set_snap_to_grid() and
      * app/display/gimpdisplayshell-callbacks.c: added call to
      * app/display/gimpdisplayshell.[ch]: added grid member to
      _GimpDisplayShellVisibility, added snap_to_grid and grid_dialog
      members to _GimpDisplayShell, added
      gimp_display_shell_draw_grid(), modified
      gimp_display_shell_snap_coords() to use the new
      gimp_image_snap_*() functions.
      * app/gui/image-menu.c: added grid entries to
      * app/gui/view-commands.[ch]: added
      view_toggle_grid_cmd_callback() and
      * app/gui/Makefile.am
      * app/gui/grid-dialog.[ch]: added a grid dialog.