Commit Graph

171 Commits

Author SHA1 Message Date
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
  GimpPrecision enum values is loaded correctly

This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Michael Natterer a7223bbd2d Bug 352823 - Changing image mode discards text layer information
For conversions that have no dither options (like RGB -> GRAY or u8 ->
u16), always preserve text editability, for conversions that have
dither options (like RGB -> INDEXED or u16 -> u8), give the user the
choice whether to enable dithering.
2012-11-10 18:56:44 +01:00
Michael Natterer d4933b3052 Bug 674160 - Redesign of "Lock panel"
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.

Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
2012-11-09 11:17:25 +01:00
Michael Natterer e546f2b43b Bug 683462 - cropping with rectangular select tool leaves misaligned...
Reset the tool on image changes again, but not if only the active
drawable changes, so keep bug #678890 closed:

Introduce new dirty flag GIMP_DIRTY_ACTIVE_DRAWABLE and set it on all
tools' dirty_mask except for rect select. Check the new flag when
reseting the active tool because of a drawable change.
2012-09-06 23:55:35 +02:00
Michael Natterer 64a4ec12d5 app: s/unsigned integer/integer/ in UI labels 2012-05-02 17:51:22 +02:00
Michael Natterer 1badcb7ce9 app: add GIMP_PRECISION_U32 and all its formats 2012-05-02 17:51:19 +02:00
Michael Natterer 2e7944cad0 app: add GIMP_PRECISION_HALF for 16 bit floating point
and use babl_format_get_palette() to simplify some code.
2012-05-02 17:51:18 +02:00
Michael Natterer d81ea1315e app: implement active, affected components in GEGL
Add GimpOperationMaskComponents, enum GimpComponentMask, and image and
drawable infrastructure to get the right mask, and plug the mask
operation into gimp_gegl_create_apply_buffer_node().
2012-05-02 17:51:17 +02:00
Michael Natterer 3e4edc1aea pdb/libgimp: export enum GimpPrecision and gimp-image-convert-precision 2012-05-02 17:51:17 +02:00
Michael Natterer b4580e74e6 app: implement converting images between precisions, including menu items 2012-05-02 17:51:16 +02:00
Michael Natterer 5167550271 app: add GIMP_PRECISION_U16 and all needed 16 bit integer formats 2012-05-02 17:51:15 +02:00
Michael Natterer 8f3fe621e6 app: s/Bit/bit/ in the precision strings 2012-05-02 17:51:11 +02:00
Michael Natterer a34afd63d8 app: add GIMP_PRECISION_FLOAT and all its formats
Images in that format can't be created currently, the legacy code
crashes royally on it.
2012-05-02 17:51:11 +02:00
Michael Natterer c07325a005 app: add "precision" argument to gimp_image_new() 2012-05-02 17:51:09 +02:00
Michael Natterer 678255604d app: add a GimpPrecision enum that for now contains GIMP_PRECISION_U8
Add gimp_image_get_precision(), and a "precision" argument to
gimp_babl_format(). Change code accordingly and do some more format
related cleanups.
2012-05-02 17:51:09 +02:00
Michael Natterer 7eb8b0b925 app: remove base-enums.[ch]
and move its remaining content to core-enums, move the siox enum to
base-types.h.
2012-05-02 17:51:01 +02:00
Michael Natterer 9b70f4e7fc app: move some enums from base-enums.h to core-enums.h 2012-05-02 17:50:54 +02:00
Michael Natterer c38eb0df4a app: core-enums.h: fix type macros of the align type enums 2011-03-29 12:45:54 +02:00
Michael Natterer f8d6821790 app: get rid of selection_control() in core/ and display/
- replace gimp_display_shell_selection_control() by undraw() and restart()
  which actually say what they are doing
- remove enum GimpSelectionControl
- replace GimpImage::selection_control() by ::selection_invalidate()
  because none of the other enum values was used any longer
2010-10-09 20:28:37 +02:00
Michael Natterer 545e65dda6 app: add gimp_display_shell_selection_pause() and _resume()
and use them instead of gimp_display_shell_selection_control() with
the resp. enum values. Remove the GIMP_SELECTION_PAUSE and _RESUME
enums values and thus the presence of this concept in the core.
2010-10-09 14:26:33 +02:00
Michael Natterer 3e69ae0039 app: add a layer boundary canvas item class
and use it to draw the layer boundary. Remove a lot of stuff
that was there only to draw the boundary before:

- remvoe all layer boundary stuff from the selection code
- remove gimp_display_shell_draw_layer()
- remove enum values GIMP_SELECTION_LAYER_ON,OFF from core-enums.h
- remove all lines calling gimp_image_selection_control() with
  the removed enum values
- remove gimp_layer_boundary()
2010-10-03 00:28:40 +02:00
Alexia Death 78a4cae2d5 app: Rewire the the feature formely known as harndess back to gui as force 2010-04-09 00:44:52 +03:00
Michael Natterer efed2bf623 app: some cleanup and fixes in the tool preset infrastructure 2010-04-04 13:58:55 +02:00
Alexia Death 29f7fe87b0 Base infra for tool presets. 2010-04-03 21:06:15 +03:00
Alexia Death 336de7935f app: Add dynamics to airbrush Flow 2010-03-14 19:09:55 +02:00
Alexia Death f1a1114ed7 app: Order dynamics in editor a bit more sensibly 2010-03-14 18:12:24 +02:00
Michael Natterer 652c6756c4 app: cosmetic cleanups in the new dynamics stuff in core/ 2010-02-22 08:53:50 +01:00
Alexia Death 468b30b585 app: Add type for dynamics output 2010-02-22 01:00:16 +02:00
Michael Natterer 7bfd5dcf75 Merge the layer, channel and vectors reorder undo into one item undo
- get rid of the individual undo types and add GIMP_UNDO_ITEM_REORDER.
- replace the pushing functions by a single one.
- merge all the actual undo code into gimpitempropundo.[ch].
- use gimp_item_tree_reorder_item() to do the actual reordering.
- fix gimp_item_tree_reorder_item() to use an ordinary "push_undo"
  boolean again instead of a pointer to an undo function.

GimpVectorsPropUndo is now a completely empty skeleton. Keep it around
anyway, maybe we'll get vectors properties to undo soon.
2010-02-06 16:41:54 +01:00
Alexia Death 26e7b5f0e2 Fix ennum ordering 2009-10-03 16:08:15 +03:00
Alexia Death be78fe3b1d Merge commit 'origin/master' into soc-2009-dynamics 2009-09-20 14:32:32 +03:00
Michael Natterer 717b4e6a07 Fix undoing a group layer type conversion
* app/core/gimpdrawable.[ch]: add "gboolean push_undo" to
  GimpDrawable::convert_type().

* app/core/gimpdrawable-convert.[ch]: same here for the gray and rgb
  conversion functions.

* app/core/gimpchannel.c
* app/core/gimplayer.c: pass FALSE when called from GimpItem::convert()
  because it can be called on unattached items only.

* app/core/gimpimage-convert.c: pass TRUE.

* app/core/core-enums.[ch]
* app/core/gimpgrouplayerundo.[ch]
* app/core/gimpimage-undo-push.[ch]: add GIMP_UNDO_GROUP_LAYER_CONVERT
  which simply calls gimp_drawable_convert_type() with the old type
  when undone/redone.

* app/core/gimpgrouplayer.c: push a group layer convert undo so this
  can be properly undone/redone.
2009-09-13 19:24:19 +02:00
Michael Natterer 4df9b25217 Add facility to compress multiple group layer resizings into one
* app/core/gimpgrouplayer.[ch]: add gimp_group_layer_suspend_resize()
  and gimp_group_layer_resume_resize() and call them around functions
  where all a group's children are transformed (translated, resized
  etc).  This way we go from the worst case of reallocating the
  group's projection tiles once for each child down to exactly one
  reallocation.

* app/core/Makefile.am
* app/core/core-enums.[ch]
* app/core/core-types.h
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpgrouplayerundo.[ch]: add new undo class
  GimpGroupLayerUndo which implements undos for suspend/resume of
  group layers and calls them in reverse order when undoing.
2009-09-07 13:12:54 +02:00
Alexia Death d2143b8886 Merging master to current state 2009-08-21 19:26:05 +03:00
Alexia Death 460bf0ecdd Fixing some more props errors in context 2009-08-20 03:20:17 +03:00
Alexia Death 17a377a553 Fixing props errors in context 2009-08-20 02:31:59 +03:00
zhenfeng zhao 6aa4d55315 Solve errors in gimpcontext for dynamics. 2009-08-18 22:38:45 -03:00
Michael Natterer d059f239ac Make reordering items between groups work in the core and the UI
* app/core/gimpimage.[ch]: rename all gimp_image_reposition_foo() to
  gimp_image_reorder_foo() and added "new_parent" parameters. Factor
  out calculating of the item's new container and index to a utility
  function.

* app/core/core-enums.[ch]: rename the REPOSITION undos to REORDER.

* app/core/gimpimage-undo-push.[ch]
* app/core/gimpchannelpropundo.[ch]
* app/core/gimplayerpropundo.[ch]
* app/vectors/gimpvectorspropundo.[ch]: change accordingly. Remember
  the old parent item in all item reorder undos.

* app/widgets/gimpitemtreeview.h: change GimpReorderItemFunc prototype
  accordingly.

* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c (class_init): follow image API
  name changes.

* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_drop_viewable):
  implement reordering of items between groups.

* app/widgets/gimpcontainertreeview.c
  (gimp_container_tree_view_reorder_item): fix to reorder the item
  within its level of the tree (unrelated to above changes, but needed
  to make them work).
2009-08-06 18:43:57 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Michael Natterer 1cdf6c5b7f remove floating_sel_remove() and reorder one function.
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.[ch]: remove
	floating_sel_remove() and reorder one function.

	* app/core/gimpimage.c (gimp_image_remove_layer): add the single
	line of special code that needs to be done when removing a
	floating selection.

	* app/core/gimpselection.c
	* app/actions/layers-commands.c
	* tools/pdbgen/pdb/floating_sel.pdb: changed accordingly.

	* app/pdb/floating-sel-cmds.c: regenerated.

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo.c: remove enum value
	GIMP_UNDO_GROUP_FS_REMOVE.


svn path=/trunk/; revision=27583
2008-11-09 18:45:16 +00:00
Michael Natterer 855b114f50 Bye bye floating_sel_rigor() and floating_sel_relax():
2008-11-09  Michael Natterer  <mitch@gimp.org>

	Bye bye floating_sel_rigor() and floating_sel_relax():

	* app/core/gimpdrawable.[ch] (gimp_drawable_init_src_region):
	implement compositing the floating selection on the fly. Add
	return parameter "TileManager **temp_tiles" which returns the temp
	buffer used for compositing; the caller has to unref the tiles.

	* app/core/gimpchannel-project.c
	* app/core/gimplayer-project.c: unref the temp_tiles.

	* app/core/gimplayer.[ch]: remove members fs.backing_store and
	fs.initial.

	* app/core/gimplayer-floating-sel.[ch]: remove functions rigor(),
	relax(), store() and restore(), they are not needed any longer.
	Some minor cleanup, more to come.

	* app/core/gimpprojection-construct.c: don't composite the
	floating selection before projecting because that happens on the
	fly now.

	* app/core/core-enums.[ch]
	* app/core/gimpfloatingselundo.c
	* app/core/gimpimage-undo-push.[ch]: remove the rigor and relax
	undos.

	* app/core/gimpdrawable.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/xcf/xcf-save.c: remove all calls to rigor and relax and all
	implementations of virtual functions that were just there to
	rigor/releax around chaining up.

	* tools/pdbgen/pdb/floating_sel.pdb: remove all code from the
	rigor and relax wrappers and deprecate the API.

	* app/pdb/floating-sel-cmds.c
	* libgimp/gimpfloatingsel_pdb.[ch]: regenerated.

	* plug-ins/file-xjt/xjt.c: don't call rigor and relax.


svn path=/trunk/; revision=27579
2008-11-09 16:49:37 +00:00
Michael Natterer 3dfef0f15a rename GimpStrokeStyle to GimpFillStyle.
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle.

	* app/core/gimpfilloptions.[ch]
	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27379
2008-10-23 21:30:28 +00:00
Sven Neumann b824df9b57 changed descriptions for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX
2008-04-09  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch] (enum GimpUndoType): changed
	descriptions for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX
	undo types again.

svn path=/trunk/; revision=25433
2008-04-09 14:42:32 +00:00
Sven Neumann e198bc4f2b better descriptions for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX undo
2008-04-09  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch] (enum GimpUndoType): better descriptions
	for the GIMP_UNDO_FS_RIGOR and GIMP_UNDO_FS_RELAX undo types.

	* app/core/gimplayer-floating-sel.c: corrected a comment.

svn path=/trunk/; revision=25431
2008-04-09 14:06:28 +00:00
William Skaggs 2ba3e595bc Bill Skaggs <weskaggs@primate.udavis.edu>
committing patch by Simon Budig to give an indication
	when working on a layer mask, updated to fix staleness
	and respond to "edit-changed".  Might fix bug #132204.
	
	* app/core/core-enums.[ch]: add GIMP_SELECTION_LAYER_ON.

	* app/core/gimplayermask.c: add handler for "edit-changed".

	* app/core/gimpcanvas.[ch]:  add new style
	GIMP_CANVAS_STYLE_LAYER_MASK_ACTIVE.

	* app/display/gimpdisplayshell-selection.c: use new style
	when layer mask is active.

svn path=/trunk/; revision=24520
2008-01-03 21:53:34 +00:00
Michael Natterer dcee3d60c3 app/core/core-enums.[ch] drop the "image" from GIMP_UNDO_IMAGE_GUIDE,
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]: drop the "image" from
	GIMP_UNDO_IMAGE_GUIDE, GIMP_UNDO_IMAGE_SAMPLE_POINT,
	gimp_imge_undo_push_image_guide() and
	gimp_imge_undo_push_image_sample_point()

	* app/core/gimpimage-undo.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-rotate.c
	* app/tools/gimpmeasuretool.c: changed accordingly.


svn path=/trunk/; revision=21804
2007-01-29 23:21:41 +00:00
Michael Natterer c52a43101a app/core/core-enums.[ch] reordered IMAGE_GRID and IMAGE_COLORMAP to be
2007-01-29  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo-push.[ch]: reordered IMAGE_GRID and
	IMAGE_COLORMAP to be before IMAGE_GUIDE and IMAGE_SAMPLE_POINT.


svn path=/trunk/; revision=21802
2007-01-29 22:37:18 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer 725a4e414f added value GIMP_UNDO_GROUP_LAYER_ADD.
2006-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch] (enum GimpUndoType): added value
	GIMP_UNDO_GROUP_LAYER_ADD.

	* app/file/file-open.[ch]: changed file_open_layer() to
	file_open_layers(), added parameter "gboolean merge_visible",
	return a GList of layers.

	* app/dialogs/file-open-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/widgets/gimplayertreeview.c: pass merge_visible = FALSE and
	add all returned layers to the image. Fixes bug #358082.
	(contains lots of duplicated code, will factor that out later).

	* tools/pdbgen/pdb/fileops.pdb (load_layer): pass merge_visible = TRUE
	(load_layers): new wrapper which returns all the image's layers.

	* app/pdb/fileops_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpfileops_pdb.[ch]: regenerated.

	* libgimp/gimp.def: changed accordingly.
2006-11-03 17:12:27 +00:00
Sven Neumann 2d16c08e1f string change.
2006-11-01  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch]: string change.

	* app/dialogs/preferences-dialog.c: added a combo box for the
	color-profile-policy.
2006-11-01 00:54:20 +00:00