1. 10 Apr, 2018 1 commit
    • Michael Natterer's avatar
      Bug 791519 - Unexpected selection from channel · 3f95dc52
      Michael Natterer authored
      Make sure a channel -> selection -> channel roundtrip never does any
      gamma conversion.
      
      In gimp_channel_duplicate(), make sure a created channel has the
      right format, and the right data. Fixes selection -> channel.
      
      When switching off quick mask, call gimp_item_to_selection() instead
      if gimp_selection_load(), the latter was implementing a shortcut which
      is now wrong.
      
      Remove gimp_selection_load() which is now unused.
      
      Unrelated: also remove gimp_selection_save(), it was an obvious
      3-liner used only twice.
      3f95dc52
  2. 07 Mar, 2016 1 commit
  3. 02 May, 2012 3 commits
  4. 26 Mar, 2011 1 commit
    • Michael Natterer's avatar
      app: remove the "offset" API from TileManager · bc8d5f84
      Michael Natterer authored
      It made the transform code hard to read and never belonged into the
      tile manager anyway. It's a simple pixel buffer that should not know
      about any position in an image. Instead, pass around the offsets of
      tile managers explicitly, so everything is less obscure for the price
      of having more parameters. This will also help replacing TileManagers
      with GeglBuffers.
      bc8d5f84
  5. 17 Jan, 2009 1 commit
    • Michael Natterer's avatar
      Change licence to GPLv3 (and to LGPLv3 for libgimp). · d9b5207a
      Michael Natterer authored
      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
      d9b5207a
  6. 22 Nov, 2008 1 commit
    • Michael Natterer's avatar
      make the entire selection API take GimpSelection arguments, not · 558e2e17
      Michael Natterer authored
      2008-11-22  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpselection.[ch]: make the entire selection
      	API take GimpSelection arguments, not GimpChannel.
      	Clean up gimp_selection_load() a bit.
      
      	* app/actions/select-commands.c
      	* app/core/gimp-edit.c
      	* app/core/gimpdrawable-transform.c
      	* app/core/gimpimage-quick-mask.c
      	* app/tools/gimpeditselectiontool.c
      	* tools/pdbgen/pdb/selection.pdb: add the needed casts.
      
      	* app/pdb/selection-cmds.c: regenerated.
      
      
      svn path=/trunk/; revision=27711
      558e2e17
  7. 29 Oct, 2008 1 commit
    • Michael Natterer's avatar
      change member "gboolean stroking" into "gint stroking_count". Add push/pop · 82ca2233
      Michael Natterer authored
      2008-10-29  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpselection.[ch]: change member "gboolean stroking"
      	into "gint stroking_count". Add push/pop API to increase/decrease
      	the counter. Pretend the selection is empty if the counter is > 0.
      	Enables correctly rendering vector layers even if there is a
      	selection.
      
      
      svn path=/trunk/; revision=27464
      82ca2233
  8. 07 Dec, 2007 1 commit
    • Michael Natterer's avatar
      added GErrors to gimp_selection_extract() and gimp_selection_float(). · 58c2dd9b
      Michael Natterer authored
      2007-12-07  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpselection.[ch]: added GErrors to
      	gimp_selection_extract() and gimp_selection_float().
      
      	* app/core/gimp-edit.c
      	* app/tools/gimpeditselectiontool.c
      	* app/actions/select-commands.c: handle the returned error.
      
      	* app/core/gimpdrawable-transform.c: pass NULL errors since this
      	file knows what it does and won't get errors.
      
      	* tools/pdbgen/pdb/selection.pdb: pass the error.
      
      	* app/pdb/selection_cmds.c: regenerated.
      
      
      svn path=/trunk/; revision=24286
      58c2dd9b
  9. 30 Apr, 2007 1 commit
    • Michael Natterer's avatar
      changed "drawable" parameter to "pickable" and added some special casing · ee0ab61b
      Michael Natterer authored
      2007-04-30  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpselection.[ch] (gimp_selection_extract): changed
      	"drawable" parameter to "pickable" and added some special casing
      	for the GIMP_IS_DRAWABLE(pickable) case in the implementation.
      
      	* app/core/gimpdrawable-transform.c: changed accordingly.
      
      	* app/core/gimp-edit.c: ditto. Removed utility function
      	gimp_edit_extract_visible() and simply use gimp_edit_extract() for
      	"copy visible", passing image->projection. Fixes bug #434102.
      
      
      svn path=/trunk/; revision=22368
      ee0ab61b
  10. 09 Dec, 2006 1 commit
  11. 28 Mar, 2006 1 commit
  12. 14 Apr, 2004 1 commit
    • Michael Natterer's avatar
      Get rid of the "current_context" which was in fact just a bunch of global · 18d9161e
      Michael Natterer authored
      2004-04-15  Michael Natterer  <mitch@gimp.org>
      
      	Get rid of the "current_context" which was in fact just a bunch of
      	global variables. Instead, pass the needed context all the way
      	from the GUI and the PDB to the core. This is a prerequisite for
      	macro recording and generally helps separating the various
      	subsystems from each other. Work in progress...
      
      	* app/core/gimp.[ch]: removed member "current_context" and
      	gimp_[get|set]_current_context().
      
      	* app/core/gimp-edit.[ch]
      	* app/core/gimpdrawable-blend.[ch]
      	* app/core/gimpdrawable-bucket-fill.[ch]
      	* app/core/gimpdrawable-offset.[ch]
      	* app/core/gimpdrawable-transform.[ch]
      	* app/core/gimpimage-crop.[ch]
      	* app/core/gimpimage-flip.[ch]
      	* app/core/gimpimage-merge.[ch]
      	* app/core/gimpimage-resize.[ch]
      	* app/core/gimpimage-rotate.[ch]
      	* app/core/gimpimage.[ch]
      	* app/core/gimpimagefile.[ch]
      	* app/core/gimpitem-linked.[ch]
      	* app/core/gimpitem.[ch]
      	* app/core/gimplayer.[ch]
      	* app/core/gimpselection.[ch]
      	* app/core/gimptemplate.[ch]
      	* app/file/file-open.[ch]
      	* app/file/file-save.[ch]
      	* app/pdb/procedural_db.[ch]
      	* app/text/gimptext-compat.[ch]
      	* app/text/gimptextlayer-transform.[ch]
      	* app/gui/brush-select.[ch]
      	* app/gui/font-select.[ch]
      	* app/gui/gradient-select.[ch]
      	* app/gui/palette-select.[ch]
      	* app/gui/pattern-select.[ch]: added tons of "GimpContext *context"
      	parameters and use the passed context instead of
      	gimp_get_current_context().
      
      	* app/app_procs.c
      	* app/batch.c
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable.c
      	* app/paint/gimperaser.c
      	* app/paint/gimppaintbrush.c
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-ins.c
      	* app/text/gimptextlayer.c
      	* app/tools/gimpblendtool.c
      	* app/tools/gimpbucketfilltool.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimpeditselectiontool.c
      	* app/tools/gimpfliptool.c
      	* app/tools/gimpinktool.c
      	* app/tools/gimptransformtool.c
      	* app/vectors/gimpvectors.c
      	* app/gui/convert-dialog.c
      	* app/gui/drawable-commands.c
      	* app/gui/edit-commands.c
      	* app/gui/file-commands.c
      	* app/gui/file-new-dialog.c
      	* app/gui/file-open-dialog.c
      	* app/gui/file-save-dialog.c
      	* app/gui/image-commands.c
      	* app/gui/layers-commands.c
      	* app/gui/offset-dialog.c
      	* app/gui/select-commands.c
      	* app/gui/vectors-commands.c
      	* app/widgets/gimpdnd.c
      	* app/widgets/gimpdocumentview.c
      	* app/widgets/gimphelp.c
      	* app/widgets/gimpthumbbox.c: pass gimp_get_user_context() or
      	GIMP_CONTEXT(tool_options) or whatever is the right context
      	to the changed core functions.
      
      	* tools/pdbgen/app.pl: pass "GimpContext *context" to all
      	generated PDB invokers.
      
      	* tools/pdbgen/pdb/brush_select.pdb
      	* tools/pdbgen/pdb/brushes.pdb
      	* tools/pdbgen/pdb/drawable.pdb
      	* tools/pdbgen/pdb/edit.pdb
      	* tools/pdbgen/pdb/font_select.pdb
      	* tools/pdbgen/pdb/gradient_select.pdb
      	* tools/pdbgen/pdb/gradients.pdb
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/layer.pdb
      	* tools/pdbgen/pdb/paint_tools.pdb
      	* tools/pdbgen/pdb/palette.pdb
      	* tools/pdbgen/pdb/palette_select.pdb
      	* tools/pdbgen/pdb/palettes.pdb
      	* tools/pdbgen/pdb/paths.pdb
      	* tools/pdbgen/pdb/pattern_select.pdb
      	* tools/pdbgen/pdb/patterns.pdb
      	* tools/pdbgen/pdb/selection.pdb
      	* tools/pdbgen/pdb/text_tool.pdb
      	* tools/pdbgen/pdb/transform_tools.pdb: pass the new context
      	parameter to the changed core functions.
      
      	* app/pdb/*_cmds.c: regenerated.
      18d9161e
  13. 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.
      
      	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.
      f0372cad
  14. 04 Sep, 2003 2 commits
    • Michael Natterer's avatar
      removed gimp_channel_load(). · e2e04908
      Michael Natterer authored
      2003-09-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpchannel.[ch]: removed gimp_channel_load().
      
      	* app/core/gimpimage-mask.[ch]: removed gimp_image_mask_load()
      	and _save().
      
      	* app/core/gimpselection.[ch]: added gimp_selection_load() and
      	_save() since these functions are specific to the selection.
      
      	* app/core/gimpimage-qmask.c
      	* app/gui/select-commands.c
      	* app/widgets/gimpselectioneditor.c
      	* tools/pdbgen/pdb/selection.pdb: changed accordingly.
      
      	* app/pdb/selection_cmds.c: regenerated.
      e2e04908
    • Michael Natterer's avatar
      added new pure virtual function GimpDrawable::invalidate_boundary(). · f9f5089f
      Michael Natterer authored
      2003-09-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdrawable.[ch]: added new pure virtual function
      	GimpDrawable::invalidate_boundary().
      
      	* app/core/gimplayer.[ch]: implement it and removed public
      	function gimp_layer_invalidate_boundary().
      
      	* app/core/gimpchannel.[ch]: implement it.
      
      	* app/core/gimpselection.[ch]: implement it and removed public
      	function gimp_selection_invalidate().
      
      	* app/core/gimpimage-mask.c (gimp_image_mask_invalidate)
      	* app/core/gimpimage-undo-push.c
      	* app/core/gimpimage.c
      	* app/core/gimplayer-floating-sel.c
      	* app/text/gimptextlayer.c: changed accordingly.
      
      	* app/core/gimpchannel.[ch]: made gimp_channel_push_undo() a
      	public function and made it call
      	gimp_drawable_invalidate_boundary(). Added undo_desc strings for
      	all undo pushing functions to GimpChannelClass.
      
      	* app/core/gimpselection.[ch]: removed gimp_selection_push_undo()
      	since after the change above it was identical to
      	gimp_channel_push_undo().  Don't push any undo here since
      	upchaining does the right thing now.  Override GimpChannelClass'
      	undo_desc strings to say "Selection".
      
      	* app/core/gimpimage-mask.c (gimp_image_mask_push_undo): changed
      	accordingly.
      f9f5089f
  15. 03 Sep, 2003 1 commit
    • Michael Natterer's avatar
      removed the feather(), sharpen(), all(), invert(), border(), grow() and · 6ce4e710
      Michael Natterer authored
      2003-09-03  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpimage-mask.[ch]: removed the feather(), sharpen(),
      	all(), invert(), border(), grow() and shrink() wrappers.
      
      	* app/core/gimpselection.[ch]: changed gimp_selection_invalidate()
      	and gimp_selection_push_undo() to take GimpChannel parameters, not
      	GimpSelection ones. They will be made virtual GimpChannel
      	functions anyway.
      
      	* app/core/gimpedit.c
      	* app/gui/select-commands.c
      	* app/widgets/gimpselectioneditor.c
      	* tools/pdbgen/pdb/selection.pdb: changed accordingly.
      
      	* app/pdb/selection_cmds.c: regenerated.
      6ce4e710
  16. 02 Sep, 2003 1 commit
    • Michael Natterer's avatar
      made all functions which push an undo step virtual and added them all as · 420d17d2
      Michael Natterer authored
      2003-09-03  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpchannel.[ch]: made all functions which push an
      	undo step virtual and added them all as default implementations.
      
      	* app/core/Makefile.am
      	* app/core/core-types.h
      	* app/core/gimpselection.[ch]: new object which is a GimpChannel
      	subclass and implements all of its virtual functions, pushes
      	an image_mask undo and chains up with "push_undo = FALSE".
      
      	* app/core/gimpimage-mask.[ch]: made most functions simple
      	wrappers like gimp_channel_invert(gimp_image_get_mask(gimage));
      	so the API stays the same for now.
      
      	* app/core/gimpimage.[ch]: create a GimpSelection object
      	as gimage->selection_mask. Removed "gboolean mask_stroking"
      	since it is in GimpSelection now.
      
      	* app/xcf/xcf-load.c (xcf_load_channel_props): added an evil hack
      	which turns a GimpChannel into a GimpSelection once we figured the
      	loaded channel is the selection.
      
      	* app/core/gimplayer.c (gimp_layer_create_mask):
      	gimp_channel_clear() takes an additional "const gchar *undo_desc"
      	parameter now.
      
      	* app/core/gimpscanconvert.c (gimp_scan_convert_to_channel): set
      	mask->bounds_known to FALSE before returning the new channel
      
      	* app/tools/gimpiscissorstool.c (iscissors_convert): no need to
      	call gimp_channel_invalidate_boundary() on the channel returned by
      	the above function.
      
      	* app/core/gimpchannel.[ch]: removed
      	gimp_channel_invalidate_boundary() since it is no longer needed.
      420d17d2