Commit Graph

24600 Commits

Author SHA1 Message Date
Martin Nordholts 21fce4e9b4 Increase readability by introducing short aliases.
* app/gegl/gimpoperationpointlayermode.c: Increase readability by
introducing short aliases.

svn path=/trunk/; revision=27413
2008-10-26 14:39:08 +00:00
Martin Nordholts 7e6f2fc304 For blend modes with conditions, fix so that the conditions are per color
* app/gegl/gimpoperationpointlayermode.c: For blend modes with
conditions, fix so that the conditions are per color
channel. Acheived by introducing a nice little preprocessor macro.

svn path=/trunk/; revision=27412
2008-10-26 14:19:38 +00:00
Martin Nordholts adc118ec9c Enable the [0..1] clamping of the output for Dodge and Burn. Without the
* app/gegl/gimpoperationpointlayermode.c: Enable the [0..1]
clamping of the output for Dodge and Burn. Without the clamping
one gets inconsistent results when blending together identical
layers but with different opacities. Maybe we should make the
clamping configurable and introduce a HDR compositing mode or
something?

svn path=/trunk/; revision=27411
2008-10-26 13:48:19 +00:00
Martin Nordholts a25fefff04 Implemented Grain Extract and Grain Merge. Also corrected the formula for
* app/gegl/gimpoperationpointlayermode.c: Implemented Grain
Extract and Grain Merge. Also corrected the formula for Divide.

Works the same for 100% opaque layers:
 o Grain Extract
 o Grain Merge

svn path=/trunk/; revision=27410
2008-10-26 08:39:41 +00:00
Martin Nordholts cdb3f70184 Implement a bunch of layer modes. Use the exact SVG 1.2 formula for layer
* app/gegl/gimpoperationpointlayermode.c: Implement a bunch of
layer modes. Use the exact SVG 1.2 formula for layer modes that
have a counterpart in SVG 1.2. Don't clamp the result to [0..1]
for Dodge and Burn though as we don't need to. Maybe we *should*
clamp from a compositing point of view, I'm not sure. Also
reformat the code a bit for readability.

Keep in mind that we now treat the opacity of all layers the same
indepentant of the layer mode. That is why most of the new
implementations doesn't work the same as the legacy ones when
transparency is involved, only when the layers are completely
opaque. Another important property for all layer modes implemented
below is that compositing onto complete transparency gives the
same result as if the layer would have been in Normal blending
mode.

The status of the new layer mode implementations compared to the
legacy implementations is as follows:

Completely works the same:
 o Behind

Works the same for 100% opaque layers:
 o Multiply
 o Screen
 o Difference
 o Darken
 o Lighten
 o Dodge
 o Burn
 o Hard Light
 o Subtract
 o Divide

Works different but similar:
 o Overlay

Work in progress:
 o Soft Light

svn path=/trunk/; revision=27409
2008-10-25 22:44:19 +00:00
Martin Nordholts 1f7b2c257e Completed the rename with gimp:layer-mode -> gimp:point-layer-mode and
* app/gegl/gimpoperationpointlayermode.c: Completed the rename
with gimp:layer-mode -> gimp:point-layer-mode and also did some
formating.

* app/core/gimplayer.c: Changed accordingly.

svn path=/trunk/; revision=27408
2008-10-25 21:02:46 +00:00
Martin Nordholts 76ba090647 plug-ins/file-psd/psd-save.c Add support for reading/writing PSDs with the
* plug-ins/file-psd/psd-save.c
* plug-ins/file-psd/psd-util.c: Add support for reading/writing
PSDs with the Linear Dodge layer mode which is the same as GIMPs
Addition layer mode.

svn path=/trunk/; revision=27407
2008-10-25 16:23:19 +00:00
Michael Natterer 6a7af472ea Bug 557870 – "Qmask" message popping up here and there
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Bug 557870 – "Qmask" message popping up here and there

	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use
	gimp_viewable_get_description() instead of gimp_object_get_name()
	for displaying the active drawable's name so the quick mask and
	the floating selection have the same names as in the
	layers/channels dialogs.


svn path=/trunk/; revision=27405
2008-10-25 15:29:35 +00:00
Aron Xu 5b665e7017 Updated zh_CN translations
svn path=/trunk/; revision=27404
2008-10-25 14:31:50 +00:00
Aron Xu 22ff81cee4 Updated zh_CN translations
svn path=/trunk/; revision=27403
2008-10-25 14:31:35 +00:00
Aron Xu 3515f23274 Updated zh_CN translations
svn path=/trunk/; revision=27402
2008-10-25 14:31:00 +00:00
Martin Nordholts 67c80e1574 Rename to
* app/gegl/gimpoperationlayermode.[ch]: Rename to

* app/gegl/gimpoperationpointlayermode.[ch]: so that we can later
create a common GimpOperationLayerMode class/interface for
non-point layer modes like GimpOperationDissolveLayerMode.

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c
* app/gegl/gegl-types.h: Adjust accordingly.

svn path=/trunk/; revision=27401
2008-10-25 14:16:22 +00:00
Martin Nordholts 1a19f7315a Instead of having one GEGL operation per layer mode, make
GimpOperationLayerMode instantiable and add a GimpLayerModeEffects
property to it that we check in ::process() to blend pixels
together.

* app/gegl/gimpoperationlayermode.[ch]: Do the change described
above. Currently only Normal and Addition are implemented. Normal
so that we don't need a special case for the gegl:normal op. Also,
the Dissolve layer mode is not a point op and needs to be
implemented elsewhere.

* app/gegl/gimpoperation*mode.c: Removed.

* app/gegl/gimp-gegl-utils.[ch]: Removed
gimp_layer_mode_to_gegl_operation().

* app/core/gimplayer.c

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c: Adapt.

svn path=/trunk/; revision=27400
2008-10-25 13:29:55 +00:00
Michael Natterer f0c79b81e3 Merge a modified and enhanced patch from the vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Merge a modified and enhanced patch from the vector layer branch:

	* app/core/gimpdrawable-stroke.[ch]: add new public API
	gimp_drawable_fill_boundary() and gimp_drawable_fill_vectors().

	Split the internal code up so that there are functions which turn
	the BoundSegs and GimpVectors into a GimpScanConvert and changed
	gimp_drawable_stroke_scan_convert() so it can either fill the
	shape or stroke it.


svn path=/trunk/; revision=27399
2008-10-25 13:12:48 +00:00
Michael Natterer 39af762f61 More merging from SOC 2006's vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	More merging from SOC 2006's vector layer branch:

	* app/core/gimpitem.[ch]: add "gboolean push_undo" to
	GimpItem::stroke().

	* app/core/gimpdrawable-stroke.[ch]
	* app/paint/gimppaintcore-stroke.[ch]
	* app/paint/gimppaintcore.[ch] (gimp_paint_core_finish): add
	"push_undo" parameters here too.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/dialogs/stroke-dialog.c
	* app/tools/gimppainttool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE all over the place.

	* app/pdb/edit-cmds.c
	* app/pdb/paint-tools-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27398
2008-10-25 11:59:03 +00:00
Martin Nordholts 85bbc9e37b ChangeLog formating.
svn path=/trunk/; revision=27397
2008-10-25 09:55:23 +00:00
Martin Nordholts 5c05c609e4 Make layer modes work on premultiplied data. This makes compositing 40%
* app/gegl/gimpoperationlayermode.c: Make layer modes work on
premultiplied data. This makes compositing 40% faster on my test
image with 10 interlaced Normal and Addition mode layers.

* app/gegl/gimpoperationadditionmode.c: Switch to the
premultiplied algorithm and remove the experimental ones. The new
Addition mode has two important differences over the legacy
Addition mode:

  o Addition mode now really is commutative as the GIMP
    documentation says (this wasn't previously the case).

  o Layers in Addition mode are just as opaque as Normal
    layers. That is, their effect on the composite alpha channel
    is the same. For discussion, refer to bug #387449.

svn path=/trunk/; revision=27396
2008-10-25 09:47:09 +00:00
Michael Natterer f096382af5 formatting.
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintoptions.h: formatting.


svn path=/trunk/; revision=27395
2008-10-25 09:18:49 +00:00
Michael Natterer a92925361b bail out if the notification is not about one of our own properties (but
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_parent_notify): bail out if
	the notification is not about one of our own properties
	(but from a subclass).


svn path=/trunk/; revision=27394
2008-10-25 09:14:16 +00:00
Michael Natterer efb6d15acf add "gboolean use_context_color" parameter to gimp_stroke_options_new()
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: add "gboolean use_context_color"
	parameter to gimp_stroke_options_new() and set the passed context
	as parent of the new options only if it's TRUE. Also fixed the
	GimpConfig::duplicate() implementation to really duplicate the
	object and not just return an object containing default values.

	* app/core/gimpfilloptions.[ch]: add gimp_fill_options_new().

	* app/actions/select-commands.c
	* app/dialogs/stroke-dialog.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE to gimp_stroke_options_new().

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27393
2008-10-25 08:52:20 +00:00
Michael Natterer 90c26cf10e add non-serializable properties pattern-view-type and pattern-view-size
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpfilloptions.[ch]: add non-serializable properties
	pattern-view-type and pattern-view-size which are used only by the
	new UI below.

	* app/widgets/gimpfilleditor.[ch]: added boolean edit-context
	property. If TRUE, add widgets to edit the context's foreground and
	pattern. Add "edit_context" parameter to gimp_fill_editor_new().

	* app/widgets/gimpstrokeeditor.[ch]: add the same parameter here.

	* app/widgets/gimpwidgets-utils.[ch]: add gimp_enum_radio_box_add()
	which does the same as the existing gimp_enum_radio_frame_add().

	* app/dialogs/stroke-dialog.c: pass FALSE for "edit_context"
	because this dialog takes its foreground and pattern from the user
	context and doesn't need it's own GUI for them.


svn path=/trunk/; revision=27392
2008-10-24 22:34:24 +00:00
Michael Natterer 9c299a8f03 app/widgets/Makefile.am app/widgets/widgets-types.h new widget factored
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpfilleditor.[ch]: new widget factored out of
	GimpStrokeEditor.

	* app/widgets/gimpstrokeeditor.[ch]: derive from GimpFillEditor
	and remove UI for the properties of GimpFillOptions.


svn path=/trunk/; revision=27390
2008-10-24 17:55:30 +00:00
Michael Natterer 1a453c37df app/core/Makefile.am app/core/core-types.h remove this mis-engineered
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: remove this mis-engineered
	abstraction...

	* app/core/gimpstrokeoptions.[ch]: ...and add its properties and
	API here.

	* app/core/gimpitem.[ch]: GimpItem::stroke() take a
	GimpStrokeOptions instead of a GimpStrokeDesc.

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/dialogs/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27388
2008-10-24 07:37:46 +00:00
Sven Neumann 4260576f0e to be on the safe side, always show hidden dialogs when the Tab key is
2008-10-24  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdialogfactory.c 
(gimp_dialog_factories_toggle):
	to be on the safe side, always show hidden dialogs when the Tab
	key is used. It should not be possible to get a Tab key-press
	while all displays are iconified, but you never know ...


svn path=/trunk/; revision=27385
2008-10-24 07:16:06 +00:00
Sven Neumann bf97ad3102 Bug 556896 – Dialogs don't get minimized with single image window
2008-10-24  Sven Neumann  <sven@gimp.org>

	Bug 556896 – Dialogs don't get minimized with single image 
window

	* app/widgets/gimpdialogfactory.[ch]: renamed the new methods to
	gimp_dialog_factories_{show|hide}_with_display().
	Remember if the dialogs were hidden using
	gimp_dialog_factories_hide_with_display() or using
	gimp_dialog_factories_toggle() and keep this into account when
	making them visible again. This ensures that dialogs that were
	hidden using the Tab key won't be shown when the image window is
	uniconified.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_window_state_event): changed accordingly.


svn path=/trunk/; revision=27384
2008-10-24 06:48:56 +00:00
Michael Natterer 50ad791fff Another merge from the vector layer branch:
2008-10-24  Michael Natterer  <mitch@gimp.org>

	Another merge from the vector layer branch:

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): make sure
	each stroke desc always has GimpPaintInfo.


svn path=/trunk/; revision=27383
2008-10-23 22:48:46 +00:00
Martin Nordholts 06b46fef6d For alpha compositing consistency, all layers should affect alpha in the
* app/gegl/gimpoperationadditionmode.c: For alpha compositing
consistency, all layers should affect alpha in the same way
independent of layer mode. Replace the compositing algorithm with
a version without the flaws discovered so far in the previous
ones. Don't use it yet though as it requires premultiplied data.

svn path=/trunk/; revision=27382
2008-10-23 22:14:44 +00:00
Sven Neumann 8626bed826 use the inverse of the scale factor so that we can multiply instead of
2008-10-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): use the inverse of the
	scale factor so that we can multiply instead of dividing in the
	loops.


svn path=/trunk/; revision=27380
2008-10-23 22:07:59 +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
Michael Natterer 67a5eaea68 Merge a part of SOC 2006's vector layer branch:
2008-10-23  Michael Natterer  <mitch@gimp.org>

	Merge a part of SOC 2006's vector layer branch:

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpfilloptions.[ch]: new GimpContext subclass factored
	out of GimpStrokeOptions. Has "style" and "antialias" properties.

	* app/core/gimpstrokeoptions.[ch]: derive from GimpFillOptions
	and remove said properties.

	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27378
2008-10-23 21:18:39 +00:00
Michael Natterer d3d9724ee1 set proc_frame->procedure to NULL *after* calling gimp_plug_in_cleanup().
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginprocframe.c
	(gimp_plug_in_proc_frame_dispose): set proc_frame->procedure to
	NULL *after* calling gimp_plug_in_cleanup(). Fixes the crash on
	windows in bug #557061 (but not the bug).


svn path=/trunk/; revision=27376
2008-10-23 17:13:19 +00:00
Michael Natterer 3b053f79fa don't #include "libgimpwidgets/gimpwidgets.h".
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.h: don't #include
	"libgimpwidgets/gimpwidgets.h".

	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-scale.c
	* app/tools/gimpeditselectiontool.c: include it here.


svn path=/trunk/; revision=27375
2008-10-23 09:42:55 +00:00
Sven Neumann 45b41a76d1 Bug 556896 – Dialogs don't get minimized with single image window
2008-10-23  Sven Neumann  <sven@gimp.org>

	Bug 556896 – Dialogs don't get minimized with single image 
window

	* app/display/gimpdisplay-foreach.[ch]: added utility function 
to
	get the number of visible (not withdrawn or iconified) displays.

	* app/widgets/gimpdialogfactory.[ch]: added functions to hide 
and
	show the dock windows. Changed gimp_dialog_factories_toggle() to
	use the new functions.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_window_state_event): hide the docks if the
	last display is iconified. Unhide them if a display is
	uniconified. Probably needs more work ...


svn path=/trunk/; revision=27374
2008-10-23 08:39:46 +00:00
Sven Neumann 9112b1aee4 fixed configure output
svn path=/trunk/; revision=27372
2008-10-22 22:07:10 +00:00
Sven Neumann 06a983e34e removed check for Carbon and added a test for the target OS being Darwin
2008-10-23  Sven Neumann  <sven@gimp.org>

	* configure.in: removed check for Carbon and added a test for 
the
	target OS being Darwin instead.

	* app/config/gimpguiconfig.c: use PLATFORM_OSX instead of
	HAVE_CARBON to determine the default "web-browser" command.


svn path=/trunk/; revision=27370
2008-10-22 22:04:30 +00:00
Sven Neumann 1effaac2bb check the crossing mode and don't unset the "inside" flag when the event
2008-10-22  Sven Neumann  <sven@gimp.org>

	* plug-ins/print/print-preview.c 
(print_preview_leave_notify_event):
	check the crossing mode and don't unset the "inside" flag when 
the
	event is caused by a pointer grab/ungrab.


svn path=/trunk/; revision=27368
2008-10-22 20:34:20 +00:00
Martin Nordholts 2427cc5495 Bug 556804 – Zoom drop down doesn't update
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-callbacks.c: Fix calls to
gimp_display_shell_scaled() when Resize window on zoom is enabled.

svn path=/trunk/; revision=27366
2008-10-22 19:02:00 +00:00
Sven Neumann e959bf084c Bug 524615 – Print not to scale
2008-10-22  Sven Neumann  <sven@gimp.org>

	Bug 524615 – Print not to scale

	* plug-ins/print/print.c: set the unit for dimensions on the 
Cairo
	context used for printing to GTK_UNIT_PIXELS.

	* plug-ins/print/print-draw-page.c (print_draw_page): changed 
the
	Cairo scale factors accordingly. Seems to fix printing on 
Windows.


svn path=/trunk/; revision=27364
2008-10-22 15:01:34 +00:00
Sven Neumann 883cb6da5b set box->progress to NULL in destroy() and check for progress being NULL
2008-10-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpprogressbox.c: set box->progress to NULL in
	destroy() and check for progress being NULL in various places so
	we don't crash on API calls after the widget is destroyed.


svn path=/trunk/; revision=27362
2008-10-22 11:01:15 +00:00
Sven Neumann 90bf1e42e5 Bug 555246 – gimp crashes when a file is opened while a preview is
2008-10-22  Sven Neumann  <sven@gimp.org>

	Bug 555246 – gimp crashes when a file is opened while a preview 
is
	generating

	* app/widgets/gimpthumbbox.c: set box->progress to NULL in
	destroy() and check for progress being NULL in various places so
	we don't crash on API calls after the widget is destroyed.


svn path=/trunk/; revision=27360
2008-10-22 07:26:49 +00:00
Sven Neumann 2b892dd8b2 Bug 556741 – Alpha layer automatically added (in psd format) but not
2008-10-22  Sven Neumann  <sven@gimp.org>

	Bug 556741 – Alpha layer automatically added (in psd format) but
	not desired

	* plug-ins/file-psd/psd-save.c: applied patch from Dennis Ranke
	that flattens the projection for indexed images.


svn path=/trunk/; revision=27358
2008-10-22 06:47:18 +00:00
Sven Neumann b6ae85b74c app/core/gimpimagefile.c formatting.
2008-10-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c
	* app/plug-in/gimpplugin-progress.c: formatting.


svn path=/trunk/; revision=27357
2008-10-22 06:00:06 +00:00
Sven Neumann 3676795aa4 added bug number to ChangeLog entry
svn path=/trunk/; revision=27356
2008-10-22 05:59:10 +00:00
Michael Natterer ff8e73ad0c set dialog->progress to NULL in destroy() and check for progress being
2008-10-21  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.c: set dialog->progress to NULL in
	destroy() and check for progress being NULL in various places so
	we don't crash on API calls after the widget is destroyed.


svn path=/trunk/; revision=27354
2008-10-21 19:23:44 +00:00
Sven Neumann 884042f61c mention GEGL version number
svn path=/trunk/; revision=27353
2008-10-21 14:37:31 +00:00
Sven Neumann 3bf04bd98c GEGL_IS_PARAM_SPEC_PATH() became GEGL_IS_PARAM_SPEC_FILE_PATH().
2008-10-21  Sven Neumann  <sven@sven>

	* app/tools/gimpgegltool.c (gimp_param_spec_duplicate):
	GEGL_IS_PARAM_SPEC_PATH() became GEGL_IS_PARAM_SPEC_FILE_PATH().


svn path=/trunk/; revision=27351
2008-10-21 14:25:23 +00:00
Sven Neumann 88340798f2 for the combo-box, strip known prefixes from the GEGL operation names and
2008-10-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpgegltool.c (gimp_gegl_tool_dialog): for the
	combo-box, strip known prefixes from the GEGL operation names 
and
	use icons instead.


svn path=/trunk/; revision=27350
2008-10-21 11:34:00 +00:00
Sven Neumann be7fb50cbb ref the GimpDisplay and GimpImageFile objects while holding a reference to
2008-10-21  Sven Neumann  <sven@gimp.org>

	* app/actions/file-commands.c (file_open_recent_cmd_callback): 
ref
	the GimpDisplay and GimpImageFile objects while holding a
	reference to them. Fixes a potential crash if GIMP is closed 
while
	the image is being loaded.


svn path=/trunk/; revision=27346
2008-10-21 07:51:08 +00:00
Kenneth Nielsen 63fd0f72e0 Updated Danish translation
svn path=/trunk/; revision=27345
2008-10-20 21:01:23 +00:00
Martin Nordholts 7c351200b4 menus/image-menu.xml.in app/actions/debug-actions.c Create dump and
* menus/image-menu.xml.in
* app/actions/debug-actions.c
* app/actions/debug-commands.c: Create dump and non-dump
groups. Also added a tooltip to the Benchmark Projection action
and removed report of number of layers.

svn path=/trunk/; revision=27343
2008-10-20 17:21:21 +00:00