Commit Graph

17 Commits

Author SHA1 Message Date
Ville Sokk c291524e6c app: added hard light, difference, subtract, grain extract, grain merge and difference gegl blending modes 2012-05-02 17:51:08 +02:00
Michael Natterer 53bda86ceb app: code cleanup in the GEGL ops 2012-05-02 17:51:06 +02:00
Ville Sokk c24d9d76e5 app: added addition, burn, darken only, dodge, multiply, overlay, screen and soft light gegl blending modes 2012-05-02 17:51:06 +02:00
Øyvind Kolås eea7a40dbc app: update GeglOps to new GEGL API 2012-03-29 19:22:22 +01:00
Michael Natterer 011b058945 app: follow GEGL API changes 2012-03-26 01:13:37 +02:00
Michael Natterer 9f6827be7c app: add back individual operation classes for the layer modes
They are derived from GimpOperationPointLayerMode and are completely
empty and unused, but can be filled with code and enabled one-by-one
now.
2009-12-30 15:22:35 +01: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
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
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
Martin Nordholts 509c025f39 Remove local channel offset defines.
* app/gegl/gimpoperationadditionmode.c: Remove local channel
offset defines.

svn path=/trunk/; revision=27331
2008-10-19 15:29:08 +00:00
Martin Nordholts 87d4596563 Refer to the input as 'in' instead of 'src', the layer as 'layer' instead
* app/gegl/gimpoperationadditionmode.c: Refer to the input as 'in'
instead of 'src', the layer as 'layer' instead of 'aux', and the
result as 'out' instead of 'dest'. The old terminology clashes
with at least the SVG 1.2 compositing terminology [1] and there is
no reason for creating confusion.

[1] http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html

svn path=/trunk/; revision=27321
2008-10-19 11:22:09 +00:00
Martin Nordholts 7501c23bd9 Use local variants of channel offset defines, namely RED instead of
* app/gegl/gimpoperationadditionmode.c: Use local variants of
channel offset defines, namely RED instead of RED_PIX etc, to
increase readability.

svn path=/trunk/; revision=27320
2008-10-19 10:57:43 +00:00
Martin Nordholts bce95343c8 Update with a new version that is the best known so far (maybe it's even
* app/gegl/gimpoperationadditionmode.c
(gimp_operation_addition_mode_process): Update with a new version
that is the best known so far (maybe it's even correct?).

svn path=/trunk/; revision=27269
2008-10-13 19:27:43 +00:00
Michael Natterer 3f9e82004e renamed this class...
2008-10-12  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationpointcomposer.[ch]: renamed this class...

	* app/gegl/gimpoperationlayermode.[ch]: ...to this and add
	an own process() virtual function so we are free to hack even
	more badly in order to support legacy layer modes and proper
	ones which do meningfiul things to alpha. Simply redirect
	GeglOperationPointComposer's compose() calls to our own vfunc
	for now.

	* app/gegl/gegl-types.h
	* app/gegl/Makefile.am: changed accordingly.

	* app/gegl/gimpoperation*mode.[ch]: changed parent class and
	implemented process() method accordingly.


svn path=/trunk/; revision=27251
2008-10-12 20:26:27 +00:00
Michael Natterer 138781daf9 commit some #if 0'ed experimental code.
2008-10-12  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationadditionmode.c: commit some #if 0'ed
	experimental code.

	* app/actions/view-commands.c (view_use_gegl_cmd_callback): use
	gimp_image_update(), simply exposing the shell doesn't reconstruct
	the projection.


svn path=/trunk/; revision=27247
2008-10-12 19:01:22 +00:00
Martin Nordholts ae75c33bfd Implement this one.
* app/gegl/gimpoperationadditionmode.c
(gimp_operation_addition_mode_process): Implement this one.

svn path=/trunk/; revision=27241
2008-10-11 19:12:49 +00:00
Michael Natterer 414cc45abf add an empty abstract GeglOperationPointComposer subclass which can be
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationpointcomposer.[ch]: add an empty abstract
	GeglOperationPointComposer subclass which can be used to hook in
	common debug or test or whatever code for below layer modes.

	* app/gegl/gimpoperation*mode.[ch]: add empty stubs of layer mode
	operations which do nothing but copying input to output.

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h: add them here and reordered things a bit.

	* app/gegl/gimp-gegl.c (gimp_gegl_init): register the new
	operations.

	* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
	return the new operations.


svn path=/trunk/; revision=27239
2008-10-11 17:20:20 +00:00