Commit Graph

527 Commits

Author SHA1 Message Date
Michael Natterer 2acbf8a70f Bug 730071 - Selection bounds miscalculated for multiples of 128
gimp_gegl_mask_bounds(): when we succeed avoiding iterating a tile by
checking its upper-left and bottom-right, use the function's internal
meaning of x2, y2, which is the rightmost/bottommost selected pixel,
while the external meaning is the pixel right/below it.
 Short: use "foo - 1" not "foo".
2014-05-13 21:46:31 +02:00
Michael Natterer 22c222291d libgimpbase,*: clean up enum values in gimpbaseenums.h
GIMP_ADD_foo_MASK -> GIMP_ADD_MASK_foo
GIMP_foo_MODE -> GIMP_BLEND_foo
GIMP_foo_CLONE -> GIMP_CLONE_foo
GIMP_foo -> GIMP_DODGE_BURN_TYPE_foo
GIMP_foo -> GIMP_TRANSFER_foo

Add compat values for the old names and compat code to script-fu
and pygimp.
2014-04-29 20:58:30 +02:00
Michael Natterer 3c918353fb app: add double precision support, for completeness
and because it makes us look utterly cool.
2014-03-09 00:43:55 +01:00
Michael Natterer 30ae88ef07 Bug 725556 - Feather selection extremely slow
gimp_gegl_apply_feather(): add a "dest_rect" parameter to restrict
the feather area. Pass the selection bounds plus the feather radius.

For consistency, newly add gimp_gegl_apply_border,grow,shrink() and use
them in gimpchannel.c
2014-03-04 22:11:50 +01:00
Michael Natterer 6e4f9185be Bug 725112 - Small canvas doesn't update when zoomed out
gimp_tile_handler_projection_invalidate(): need to invalidate
all levels up to max_z not max_z - 1. Spotted by Massimo.
2014-03-04 19:32:14 +01:00
Michael Natterer 4be11a8c0e Bug 725112 - Small canvas doesn't update when zoomed out
Remove all code that tries to calculate the maximum level of the tile
pyramid, because that's essentially impossible. Instead simply keep
track of the max_z encountered in GeglTileSource::command().
2014-02-28 23:05:02 +01:00
Daniel Sabo db52f88308 app: Set Gimp specific TileHandler properties
Remove a dependency on GEGL setting Gimp specific properties
on custom tile handlers.
2014-02-02 02:12:02 -08:00
Daniel Sabo 71bddaa23c app: Remove deprecated "babl-tolerance" setting 2013-10-19 17:02:04 -07:00
Michael Natterer 41c92af49b app: add gimp_gegl_node_set_color() and use it in GimpChannel 2013-10-19 17:31:56 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer b5ff4fbab4 app: support src ops in gimp_gegl_apply_operation() 2013-09-13 09:42:53 +02:00
Daniel Sabo 34c50b0fea app, plug-ins: Don't modify iter->length
The new by-row iteration doesn't re-write the length
value for each row. In general it is not safe to modify
the iterator data because the internal logic depends
on the public data, but this specific case is new.
2013-09-12 17:43:54 -07:00
Massimo Valentini dae8291065 app: do not recurse to invalidate the pyramid 2013-08-10 16:24:16 +02:00
Michael Natterer b44ffdd198 app: add gimp_tile_handler_projection_undo_invalidate()
which removes a rectangle from the handler's dirty region, for cases
where the caller knows that the rectangle has been explicitly
constructed. Only needed by the gtk3-port branch.
2013-08-02 20:19:00 +02:00
Ville Sokk 9daf2b8443 app: remove flush parameter from write-buffer op in GimpApplicator 2013-07-06 21:24:12 +03:00
Michael Natterer f56f6d1255 app: follow the GEGL invert -> invert-linear vs. invert-gamma change
and invert masks using invert-linear and other drawables using
invert-gamma. drawable_invert_cmd_callback() still always uses
invert-gamma even though it can be used on layer masks.
2013-06-24 00:45:04 +02:00
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 150a3e9c7e app: don't run graphs that read and write the same buffer
Work around artifacts at processing chunk borders by dup()ing the
source buffer. See bug #701875.
2013-06-18 08:06:24 +02:00
Michael Natterer f70e4cdba9 app: don't reset the mode node's opacity when changing the layer mode
gimp_gegl_mode_node_set_mode(): re-set the previously set opacity.
2013-06-12 22:13:01 +02:00
Michael Natterer d6b3a81821 app: add gimp_babl_print_pixel (format, pixel)
which returns a NULL-terminated string array with the pixels's
components, converted to text in the current locale.
2013-06-10 00:30:18 +02:00
Michael Henning 87bcc4aa3d app: Use gegl:scale-ratio instead of the deprecated gegl:scale 2013-06-09 15:10:15 -04:00
Michael Muré c2da46d810 app: adapt to the transform ops API change in GEGL 2013-06-06 19:58:48 +02:00
Michael Natterer 30e1f39ba6 app: remove support for the old GeglConfig:cache-size property 2013-06-06 00:03:26 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 260c62ed94 app: don't pass "hard-edges" to the transform ops, it's gone 2013-06-04 01:16:13 +02:00
Michael Natterer 1cc9d7d7aa app: add "Use OpenCL" toggle to Prefs -> Environment
and configure GEGL accordingly. Let's see if it's really runtime
switchable :)
2013-06-01 23:04:03 +02:00
Daniel Sabo 8d88b71fad Implement gimp_drawable_get_linear 2013-04-30 15:36:22 -07:00
Michael Natterer 9c93df2d4b app: add gimp_drawable_get_linear() which currently always returns FALSE
Add "linear" parameter to GimpApplicator. Pass the drawable's "linear"
to the applicator, and to all calls to gimp_gegl_mode_node_set_mode(),
instead of hardcoding FALSE everywhere.
2013-04-27 08:41:06 +02:00
Michael Natterer eafcc4801c app: accidentially removed a function's return type 2013-04-27 08:23:58 +02:00
Michael Natterer a93eaa9122 app: set paint_mode and opacity separately on mode nodes
so we don't constantly change the operation only because the opacity
varies during painting.
2013-04-22 22:53:07 +02:00
Michael Natterer 72a32dd79f app: allow a NULL src_buffer in gimp_gegl_apply_operation()
in which case the function just does nothing on the passed operation's
input and expects it to be already conntected to something. Also allow
to pass an operation that is already part of another graph.
2013-04-22 10:55:09 +02:00
Michael Natterer c20838fa26 app: add gimp_applicator_dup_apply_buffer()
which copies a rectangle of the layer mode node's "aux" input into
a newly allocated buffer.
2013-04-22 10:54:05 +02:00
Michael Natterer e3557ac3a5 app: remove gimp_gegl_create_apply_[buffer_]node() 2013-04-17 16:21:15 +02:00
Michael Natterer 69a321ac29 app: turn GimpApplicator into a general-purpose "input + aux -> output" thing
which means adding a lot of proper API. Input, output and aux can be
pads or buffers. Make sure it uses the minimum possible graph in all
cases and doesn't reconfigure nodes unless needed. Port GimpPaintCore
to the new API.
2013-04-14 22:44:21 +02:00
Michael Natterer 670fa2d670 app: add gimp_gegl_create_apply_node()
which is simply a more general version of
gimp_gegl_create_apply_buffer_node()
2013-04-12 14:34:20 +02:00
Michael Natterer ddc4a057e4 app: factor our more lowlevel GimpChannel code to GeglBuffer utils 2013-04-09 00:38:46 +02:00
Michael Natterer 5cd8b98efb app: factor out the core mask combine functions to gegl-only functions
so we can use them on plain GeglBuffers. Use them in
gimpchannel-combine.c for now.
2013-04-08 21:54:46 +02:00
Michael Natterer 586bb73293 app: add gimp_gegl_apply_feather()
and use it in gimp_channel_real_feather() so the magic factor of 3.5
to turn feather radius into gegl:gaussian-blur's std_dev is hidden
behind an API.
2013-04-08 14:16:33 +02:00
Michael Natterer 1a23ceaa21 app: update GimpTileHandlerProjection's max_z when a propertiy changes
not for each gimp_tile_handler_projection_invalidate() call.
2013-04-01 01:26:43 +02:00
Michael Natterer 06968d9bf9 Bug 690325 - Image Display broken: a rectangle undrawn to the top left
Let GimpTileHandlerProjection know how large the projection is so it
can calculate the number of levels in the pyramid, and always
invalidate all levels.
2013-03-30 17:44:59 +01:00
Michael Natterer a6862af834 app: shorten the labels of the cage tool options by adding newlines
This is an exception because the tool only has three option widgets.
2013-03-24 22:11:20 +01:00
Michael Natterer 4f7cb88132 app: implement GimpConfigInterface::equal() in gimp-gegl-config-proxy.c
so the automatically saved timestamped presets don't fill up with
duplicates of identical settings. The default impl considers them
different because of their timestamps.
2013-03-12 19:09:22 +01:00
Michael Natterer a66de41f60 app: use the right enum for gegl_node_blit() (no logic changed) 2013-03-04 14:02:33 +01:00
Michael Natterer d0ef6a5af6 app: use gegl_node_blit() in GimpApplicator too
Speeds up applying by at least a factor of two. Patch from Massimo.
2013-03-02 18:50:34 +01:00
Michael Natterer dfeb16d9ee app: don't use a GeglProcessor when we don't need a progress
Instead, use gegl_node_blit() directly which is more than ten times
faster in gimp_gegl_apply_operation(). Patch from Massimo Valentini.
2013-03-02 18:32:34 +01:00
Nicolas Robidoux dc19ead94f Add the Nohalo sampler (previously called Lohalo, which now does something different 2012-12-31 15:27:07 -05:00
Michael Natterer 68de31bd64 app: port gimp_gegl_convolve() to float 2012-12-19 01:03:13 +01:00
Michael Natterer 12a9f01139 app: fix off-by-one over-invalidation in GimpTileHandlerProjection
It sometimes invalidated entire rows/columns of tiles too much.
2012-12-15 19:25:42 +01:00
Michael Natterer 9b6703371e app: remove premultiplied blending code from the few ops that had it
Change GimpOperationPointLayerMode's "premultiplied" to "linear" and
set format to "RGBA float" if it's TRUE. Everything defaults to FALSE
so nothing changes.
2012-12-13 22:58:38 +01:00
Michael Natterer 084ba8f84f app: port smudge blending to RGBA float 2012-12-08 22:16:05 +01:00