1. 01 Nov, 2008 4 commits
  2. 31 Oct, 2008 2 commits
    • Martin Nordholts's avatar
      Implemented Erase, Anti Erase, Color Erase and Replace. These are not · 5d7bf3ca
      Martin Nordholts authored
      * app/gegl/gimpoperationpointlayermode.c
      (gimp_operation_point_layer_mode_process): Implemented Erase, Anti
      Erase, Color Erase and Replace. These are not normal layer modes
      and handle alpha in their own way. In addition to this, the
      behavior of Replace doesn't map very well to GEGL which uses
      infinite sized "layers".
      
      Completely works the same:
       o Erase
       o Anti Erase
       o Color Erase
      
      Works different but similar:
       o Replace
      
      * app/paint-funcs/paint-funcs.[ch]: Expose
      paint_funcs_color_erase_helper() so it can be used in the
      GimpOperationPointLayerMode implementation. Once the migration is
      complete this function can be moved entirely to the op and be
      tailored to work on premultiplied data.
      
      svn path=/trunk/; revision=27502
      5d7bf3ca
    • Martin Nordholts's avatar
      Formating, simplification and fixed operator precedence for the seed (not · b5733dd3
      Martin Nordholts authored
      * app/gegl/gimpoperationpointlayermode.c
      (gimp_operation_point_layer_mode_process): Formating,
      simplification and fixed operator precedence for the seed (not
      that it matters much).
      
      svn path=/trunk/; revision=27487
      b5733dd3
  3. 30 Oct, 2008 2 commits
    • Martin Nordholts's avatar
      Formating and simplification. · fc7e65e7
      Martin Nordholts authored
      * app/gegl/gimpoperationpointlayermode.c
      (gimp_operation_point_layer_mode_process): Formating and
      simplification.
      
      svn path=/trunk/; revision=27486
      fc7e65e7
    • Martin Nordholts's avatar
      The GEGL API actually allows us to handle the Dissolve layer mode as a · 12ea533f
      Martin Nordholts authored
      * app/gegl/gimpoperationpointlayermode.c
      (gimp_operation_point_layer_mode_process): The GEGL API actually
      allows us to handle the Dissolve layer mode as a point op. The
      GEGL implementation of Dissolve uses a faster implementation for
      deterministic behavior than the legacy Dissolve implementation.
      The end result should be identical (although not on the
      pixel-level).
      
      Completely works the same:
       o Dissolve
      
      svn path=/trunk/; revision=27485
      12ea533f
  4. 29 Oct, 2008 2 commits
    • Sven Neumann's avatar
      Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8 · b1ff252c
      Sven Neumann authored
      2008-10-29  Sven Neumann  <sven@gimp.org>
      
      	Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8
      
      	* app/pdb/gimp-pdb-compat.c
      	* app/gegl/gimpoperationtilesink.c
      	* app/gegl/gimpoperationtilesource.c
      	* app/tools/gimpgegltool.c: applied patches from Eric Lamarque
      	fixing the build using Sun CC on Solaris.
      
      
      svn path=/trunk/; revision=27467
      b1ff252c
    • Martin Nordholts's avatar
      Implemented the layer modes Hue, Saturation, Color and Value. · 5aa338c6
      Martin Nordholts authored
      * app/gegl/gimpoperationpointlayermode.c
      (gimp_operation_point_layer_mode_process): Implemented the layer
      modes Hue, Saturation, Color and Value.
      
      Works the same for 100% opaque layers:
       o Hue
       o Saturation
       o Color
       o Value
      
      * libgimpcolor/gimphsl.[ch]: Added gimp_hsl_set().
      
      svn path=/trunk/; revision=27466
      5aa338c6
  5. 28 Oct, 2008 1 commit
  6. 26 Oct, 2008 8 commits
  7. 25 Oct, 2008 5 commits
    • Martin Nordholts's avatar
      Implement a bunch of layer modes. Use the exact SVG 1.2 formula for layer · cdb3f701
      Martin Nordholts authored
      * 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
      cdb3f701
    • Martin Nordholts's avatar
      Completed the rename with gimp:layer-mode -> gimp:point-layer-mode and · 1f7b2c25
      Martin Nordholts authored
      * 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
      1f7b2c25
    • Martin Nordholts's avatar
      Rename to · 67c80e15
      Martin Nordholts authored
      * 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
      67c80e15
    • Martin Nordholts's avatar
      Instead of having one GEGL operation per layer mode, make · 1a19f731
      Martin Nordholts authored
      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
      1a19f731
    • Martin Nordholts's avatar
      Make layer modes work on premultiplied data. This makes compositing 40% · 5c05c609
      Martin Nordholts authored
      * 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
      5c05c609
  8. 23 Oct, 2008 1 commit
    • Martin Nordholts's avatar
      For alpha compositing consistency, all layers should affect alpha in the · 06b46fef
      Martin Nordholts authored
      * 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
      06b46fef
  9. 19 Oct, 2008 5 commits
    • Martin Nordholts's avatar
      Remove local channel offset defines. · 509c025f
      Martin Nordholts authored
      * app/gegl/gimpoperationadditionmode.c: Remove local channel
      offset defines.
      
      svn path=/trunk/; revision=27331
      509c025f
    • Martin Nordholts's avatar
      Refer to the input as 'in' instead of 'src', the layer as 'layer' instead · 1bb7794c
      Martin Nordholts authored
      * app/gegl/gimpoperation*mode.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'.
      
      svn path=/trunk/; revision=27329
      1bb7794c
    • Martin Nordholts's avatar
      Rename the convenient channel offset defines from FOO_PIX to FOO as this · e38ca549
      Martin Nordholts authored
      * app/base/base-types.h: Rename the convenient channel offset
      defines from FOO_PIX to FOO as this increases readability.
      
      * app/base/color-balance.c
      * app/base/colorize.c
      * app/base/desaturate.c
      * app/base/hue-saturation.c
      * app/base/siox.c
      * app/base/threshold.c
      
      * app/core/gimp-edit.c
      * app/core/gimp-transform-region.c
      * app/core/gimpchannel.c
      * app/core/gimpdrawable-bucket-fill.c
      * app/core/gimpdrawable-convert.c
      * app/core/gimpdrawable-stroke.c
      * app/core/gimpdrawable.c
      * app/core/gimpimage-convert.c
      * app/core/gimpimage.c
      * app/core/gimppalette-import.c
      * app/core/gimppickable.c
      
      * app/gegl/gimpoperation*mode.c
      * app/gegl/gimpoperationcolorbalance.c
      * app/gegl/gimpoperationcolorize.c
      * app/gegl/gimpoperationhuesaturation.c
      * app/gegl/gimpoperationlevels.c
      * app/gegl/gimpoperationposterize.c
      * app/gegl/gimpoperationthreshold.c
      
      * app/paint-funcs/subsample-region.c
      
      * app/paint/gimpclone.c
      * app/paint/gimppaintbrush.c
      
      * app/widgets/gimpviewrenderer.c: Adapt.
      
      svn path=/trunk/; revision=27324
      e38ca549
    • Martin Nordholts's avatar
      Refer to the input as 'in' instead of 'src', the layer as 'layer' instead · 87d45965
      Martin Nordholts authored
      * 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
      87d45965
    • Martin Nordholts's avatar
      Use local variants of channel offset defines, namely RED instead of · 7501c23b
      Martin Nordholts authored
      * 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
      7501c23b
  10. 14 Oct, 2008 2 commits
    • Michael Natterer's avatar
      configure.in require GEGL >= 0.0.21. · 880a699c
      Michael Natterer authored
      2008-10-14  Michael Natterer  <mitch@gimp.org>
      
      	* configure.in
      	* app/sanity.c: require GEGL >= 0.0.21.
      
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable-brightness-contrast.c
      	* app/core/gimpdrawable-invert.c
      	* app/core/gimpimage.c
      	* app/core/gimpimagemap.c
      	* app/core/gimplayer.c
      	* app/gegl/gimp-gegl-utils.c
      	* app/tools/gimpbrightnesscontrasttool.c: GEGL operation names
      	are now "gegl:"-prefixed.
      
      	* app/core/gimpimagemap.c: set the node's "dont-cache" property
      	unconditionally.
      
      
      svn path=/trunk/; revision=27284
      880a699c
    • Michael Natterer's avatar
      remove function gimp_bpp_to_babl_format_linear() and add "gboolean linear" · 79463b20
      Michael Natterer authored
      2008-10-13  Michael Natterer  <mitch@gimp.org>
      
      	* app/gegl/gimp-gegl-utils.[ch]: remove function
      	gimp_bpp_to_babl_format_linear() and add "gboolean linear"
      	parameter to gimp_bpp_to_babl_format().
      
      	* app/gegl/gimpoperationtilesink.c (process)
      	* app/gegl/gimpoperationtilesource.c (prepare): simply pass
      	self->linear to above changed function instead of selecting
      	between the two old functions.
      
      
      svn path=/trunk/; revision=27275
      79463b20
  11. 13 Oct, 2008 1 commit
  12. 12 Oct, 2008 4 commits
    • Michael Natterer's avatar
      remove warning because the missing layer modes are now "implemented", ha · 6e6c9213
      Michael Natterer authored
      2008-10-13  Michael Natterer  <mitch@gimp.org>
      
      	* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
      	remove warning because the missing layer modes are now
      	"implemented", ha ha.
      
      
      svn path=/trunk/; revision=27252
      6e6c9213
    • Michael Natterer's avatar
      renamed this class... · 3f9e8200
      Michael Natterer authored
      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
      3f9e8200
    • Michael Natterer's avatar
      Removed these accidentially commited files. · 931482e5
      Michael Natterer authored
      
      svn path=/trunk/; revision=27249
      931482e5
    • Michael Natterer's avatar
      commit some #if 0'ed experimental code. · 138781da
      Michael Natterer authored
      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
      138781da
  13. 11 Oct, 2008 3 commits
    • Martin Nordholts's avatar
      Implement this one. · ae75c33b
      Martin Nordholts authored
      * app/gegl/gimpoperationadditionmode.c
      (gimp_operation_addition_mode_process): Implement this one.
      
      svn path=/trunk/; revision=27241
      ae75c33b
    • Michael Natterer's avatar
      it's gimp-screen-node not gimp-screen_mode. · 7a260b8f
      Michael Natterer authored
      2008-10-11  Michael Natterer  <mitch@gimp.org>
      
      	* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
      	it's gimp-screen-node not gimp-screen_mode.
      
      
      svn path=/trunk/; revision=27240
      7a260b8f
    • Michael Natterer's avatar
      add an empty abstract GeglOperationPointComposer subclass which can be · 414cc45a
      Michael Natterer authored
      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
      414cc45a