Commit Graph

176 Commits

Author SHA1 Message Date
Michael Natterer 1671955655 app: allow to change the affected channels on a running filter
Connect GimpImageMap to the GimpImage's "component-active-changed" signal
and update the channels affected by the filter.
2014-09-25 23:40:05 +02:00
Michael Natterer a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
Michael Henning db4f67048d app: Always return values in non-void functions. 2014-06-29 22:35:34 -04:00
Michael Natterer f4803af808 app: add boolean "cancelable" API to GimpImageMap and gimpdrawable-filter.[ch]
Return booleans indicating success (FALSE == user has canceled), and
allow canceling only in GimpImageMapTool for now.
2014-06-30 01:06:04 +02:00
Michael Natterer c0fbbcdac4 app: fix up obsolete comments in GimpImageMap, and reorder members 2014-06-25 18:53:44 +02:00
Michael Natterer 6eba4c716b app: cleanup in GimpImageMap
- don't allow to create a GimpImageMap of an operation without output
- make "region", "mode" and "gamma-hack" settable on a map that
  already has a graph
- don't insert a useless "over" if the operation is a source op
- do the gamma-hack always on formats with alpha, so we don't lose
  intermediate alpha results on source ops
- simplify graph connection a lot
- in GimpImageMap tool, don't recreate the map when reconfiguring
  "region" and "gamma-hack"
2014-06-25 18:16:52 +02:00
Michael Natterer 1ff1c687f4 app: add gimp_image_map_set_mode()
which allows to set opacity and paint_mode on the contained
GimpApplicator.
2014-06-24 20:18:34 +02:00
Michael Natterer db2ea536da app: add an optional gegl:cache at the output of GimpApplicator
Add "gboolean use_cache" to gimp_applicator_new(). Don't use a cache
anywhere but in GimpImageMap because it incrementally fills that cache
via the projection update. In gimp_drawable_merge_filter(), get that
cache and pass it to gimp_gegl_apply_cached_operation() which then
avoids doing the work twice for the already cached results. Win!
2014-06-18 18:50:53 +02:00
Michael Natterer 9125f876df app: make GimpImageMap merge the filter before removing it from the drawable
This is a prerequisite for making it use cached results; not quite
there yet.
2014-06-01 16:24:32 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
Michael Natterer d9cf36d07d app: remove gimp:cast-format and use gegl:cast-format 2014-05-05 19:30:21 +02:00
Michael Natterer 114a9d46be app: add gimp_image_set_gamma_hack()
Which when enabled casts between linear and gamma-corrected data at
the operation's input and output. This is experimental stuff meant to
properly check ported gegl ops and prepare for plug-in removal.
2014-05-04 20:42:58 +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
Massimo Valentini 63478e3543 app: image_map always set crop extents 2013-06-01 16:43:54 +02:00
Michael Natterer 304e2975ae app: crop GimpImageMap's operation to the selection bounds
so ops are finally working on the right area
(check e.g. Filters/Decor/Vignette).
2013-05-31 09:05:26 +02:00
Michael Natterer f294225af2 app: add new API gimp_image_map_set_region()
which sets either SELECTION or DRAWABLE. In SELECTION mode (the
previous hardcoded default), the effect is offset to the selection
boundary, in DRAWABLE mode, the effect's coordinates are drawable
coordinates.
2013-05-23 19:29:02 +02:00
Massimo Valentini fd26c2eed4 app: use the update_area passed to gimp_image_map_apply 2013-05-21 19:04:57 +02:00
Michael Natterer ef917b2c5c app: add an "area" parameter to gimp_image_map_apply()
and only update the drawable in that area if it's not NULL. Useful for
expensive interactive operations like warp, where the tool exactly
knows which area has changed.
2013-05-18 01:45:01 +02:00
Michael Natterer 26ad350983 app: another small cleanup in GimpImageMap
Factor out drawable updating to a utility function, and some misc
cleanup.
2013-05-17 23:39:42 +02:00
Michael Natterer e3180de960 app: remove GimpPickable implementation from GimpImageMap
It's not needed because we don't modify the drawable's
pixels any more.
2013-05-17 02:02:28 +02:00
Michael Natterer 6872598260 app: make GimpImageMap more robust
Keep track of whether we have actually added a filter to the drawable,
and of the filtered rectangle, so we don't run into broken states in
commit() or abort(). Also make sure we remove the filter on bailing
out in apply().
2013-05-17 01:51:38 +02:00
Michael Natterer 971007796f app: the selection mask was offset in the wrong direction in GimpImageMap
Spotted my Massimo Valentini.
2013-05-13 22:12:25 +02:00
Michael Natterer 5c705d27a1 Bug 699279 - GEGL tool preview different from result on image without alpha...
gimp_image_map_apply(): don't let the filter affect the drawable
projection's alpha, because it can't affect the drawable buffer's
alpha either when finally merged.
2013-04-30 18:38:32 +02: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 457299f199 app: set the applicator on the filter on gimp_image_map_apply() 2013-04-22 10:58:08 +02:00
Michael Natterer a80795e222 app: remove "GeglRectangle visible" from gimp_image_map_apply()
because we now use a filter and the image projection updates
the visible part only.
2013-04-22 00:29:38 +02:00
Michael Natterer e3b2a54da7 app: add a stock_id to GimpImageMap and use it for its filter
Refactor GimpImageMapTool and GimpOperationTool to set the stock_id,
and to be a bit smarter with the image map's undo string.
2013-04-16 20:32:58 +02:00
Michael Natterer 07a220ee9e app: port GimpImageMap to GimpApplicator 2013-04-14 22:46:52 +02:00
Michael Natterer d1ab98e1c6 app: make GimpImageMap work again when there is no selection 2013-04-12 18:47:12 +02:00
Michael Natterer 1e17f0aed1 app: port GimpImageMap to use the new drawable filters
which makes live update more responsive and removes tons of code, but
adds a delay with progress when finally committing the effect.
2013-04-12 14:35:27 +02:00
Michael Natterer 4dcd1f3ad4 app: use plain gegl_buffer_new() and _dup(), not the gimp_gegl_ variants
unless the buffers end up being drawable->buffer.
2012-05-20 22:02:59 +02:00
Michael Natterer aee7ddd56d app: remove the !use_gegl case from gimp_drawable_apply_buffer()
and its last three parameters because they were only used for legacy
floating selection projection.
2012-05-19 00:14:51 +02:00
Michael Natterer 69893e4f72 app: remove GimpPickable::get_tiles()
and change some legacy places to get their tiles from the buffer
returned by GimpPickable::get_buffer().
2012-05-06 01:01:54 +02:00
Michael Natterer e6975ed065 app: add format parameter to GimpPickable::get_pixel_at()
allowing NULL for the pickable's native format. Fix and simplify auto
cropping to always use "R'G'B'A u8".
2012-05-02 17:51:07 +02:00
Øyvind Kolås 6efd812d08 app: s/GIMP_GEGL_RECT/GEGL_RECTANGLE/
Defining GeglRectangle inline is so useful that it has been added to
GEGL.
2012-05-02 17:50:52 +02:00
Michael Natterer 2a853cd1ee app: remove GimpPickable::get_bytes() 2012-05-02 17:50:42 +02:00
Michael Natterer 5e754a9641 app: remove GimpPickable::get_image_type() 2012-05-02 17:50:42 +02:00
Michael Natterer 89d525c970 app: remove legacy support from GimpImageMap 2012-05-02 17:50:40 +02:00
Øyvind Kolås f68c3c7051 app: adapt to API changes in GEGL 2012-05-02 17:46:15 +02:00
Michael Natterer 7223af17a2 app: completely port GimpDrawable::apply_region()'s API to GeglBuffer
and pass lots of coords that were hidden inside PixelRegions
explicitly.
2012-05-02 17:46:12 +02:00
Michael Natterer 6dfaf8ae50 app: more gimp_drawable_apply_region() -> apply_buffer() 2012-05-02 17:46:10 +02:00
Michael Natterer 99ae46b4ed app: turn the drawable's shadow tiles into a shadow buffer 2012-05-02 17:46:10 +02:00
Michael Natterer 6534ebb866 app: more copy_region() -> gegl_buffer_copy() 2012-05-02 17:46:10 +02:00
Michael Natterer c401cf4cba app: tile_manager_read_pixel_data_1() -> gegl_buffer_sample() 2012-05-02 17:46:10 +02:00
Michael Natterer 0f38966664 app: store GimpImageMap's undo pixels as GeglBuffer, not TileManager 2012-05-02 17:46:10 +02:00
Michael Natterer a0c1007b66 app: port GimpDrawableUndo, GimpDrawable::push_undo() and ::swap_tiles()
which gets rid of the manual implementation of sparse undo buffers,
but GEGL will take care of proper COW here soo enough.
2012-05-02 17:46:08 +02:00
Øyvind Kolås f8b1372038 app: make use of GIMP_GEGL_RECT in more places 2012-05-02 17:46:05 +02:00
Øyvind Kolås fe3220ae6f app: remove write property of GeglBuffer backend 2012-05-02 17:46:05 +02:00
Michael Natterer 0bcae125b5 app: merge gimp_drawable_get_read_buffer() and get_write_buffer()
into get_buffer(). The loss of zero copy will be compensated soon.
2012-05-02 17:46:04 +02:00
Michael Natterer 9a09d3a762 app: drop "babl" from gimp_foo_get_babl_format[_with_alpha]() 2012-05-02 17:45:58 +02:00