Commit Graph

4558 Commits

Author SHA1 Message Date
Michael Natterer a31cb02405 app: return a GFile from gimp_tool_info_build_options_filename()
and rename it to gimp_tool_info_get_options_file().
2014-07-01 15:41:12 +02:00
Michael Natterer 8c8135a881 app: port GimpImageMapTool's settings API from filename to GFile 2014-07-01 15:13:02 +02:00
Michael Natterer 20032907e0 app: use gimp_file_get_utf8_name() in the code ported to GFile earlier 2014-07-01 14:25:37 +02:00
Michael Natterer 113617f526 app: change the GimpData loading API from filename to GFile 2014-07-01 02:30:22 +02:00
Michael Natterer b7c78c5b97 app: use gimp_config_serialize_to_gfile() for dynamics and tool presets 2014-07-01 02:06:44 +02:00
Michael Natterer 6ec5fb80e4 libgimpconfig: add API operating on GFiles instead of filenames
to GimpConfigInterface's wrappers, to GimpConfigWriter and to
GimpScanner.
2014-07-01 01:57:31 +02:00
Michael Natterer 9696e297ac app: turn GimpData's "filename" string into a "file" GFile
One more step, but for now just causes more code in most places to get
to the path inside the GFile.
2014-07-01 01:19:35 +02:00
Michael Natterer f2b265f751 app: more correct code in gimp_projection_chunk_render_iteration()
wasn't broken before, just too obscure.
2014-06-30 23:12:53 +02:00
Michael Natterer 630d74a4c4 app: fix gimp_drawable_merge_filter() to make a copy of the result again
We optimized away so much redundant processing that we now need to
copy the region already processed by the GimpApplicator from its
cache, when it would previously have been created "for free" by all
the redundant processing.
2014-06-30 21:26:01 +02:00
Michael Natterer 48ece1f31d app: revive debug utility function gimp_create_image_from_buffer()
and fix it not to leak the created image.
2014-06-30 21:06:13 +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 16381c9bf9 app: make gimp_gegl_apply_cached_operation() cancelable via GimpProgress
In gimp_drawable_merge_filter(), use that feature to make filter
applying cancelable. Stop projection rendering first, because we have
to run the event loop manually in order to receive input for
canceling, but we don't want the projection to be constructed from
that manual loop running.
2014-06-30 00:10:25 +02:00
Michael Natterer 3795c597ba app: add gimp_projection_stop_rendering()
which stops a running chunk renderer and moves its remaining
unrendered region back to the projection's dirty region.
2014-06-29 23:57:22 +02:00
Michael Natterer 0e2b8f236d Bug 731362 - Merging layers (outside layer folders)...
...causes layer folders to expand

In gimp_image_remove_layer(), don't use the top element of
image->layer_stack as the new active layer, because it is simply some
arbitrary layer that was previously selected. That stack is only good
for finding the last active layer when returning from the channels
dialog. Instead, let the proper logic run and use the new active item
returned by gimp_item_tree_remove_item(), which is the layer below the
removed one, if any, or the one above it otherwise.
2014-06-29 21:00:03 +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 Henning ef79cfdade app: Make GIMP_PROJECTION_CHUNK_TIME a gdouble
Otherwise, it's immediately rounded to 0.
2014-06-22 10:38:44 -04:00
Michael Natterer f04ec31478 app: don't leak the property keys hash tables of duplicated Gegl paramspecs
This leak never happened because the duplicates are currently never
freed.
2014-06-20 09:00:46 +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 3af1fff5af app: make the first image jump to the center of the canvas before rendering
Make GIMP_DISPLAY_SHELL_FILL_IDLE_PRIORITY a bit higher than
GIMP_PROJECTION_IDLE_PRIORITY which is the priority of chunk
rendering.
2014-06-17 23:29:24 +02:00
Michael Natterer 2124ddebe6 app: make gimp_curve_set_n_points and set_n_samples() public API 2014-06-17 20:07:24 +02:00
Michael Natterer f21a649053 app: disable row-fetching optimization in gimppickable-contiguous-region.c
GeglSampler is now much faster. Leave the #ifdefs there for the time
being for benchmarking purposes.
2014-06-17 20:05:05 +02:00
Michael Natterer 35bd3b450d app: use gimp_image_estimate_memsize() in gimp_image_scale_check()
and also improve its result a bit, I think... (whether or not undo
memory should be included here is debatable).
2014-06-15 21:49:38 +02:00
Michael Natterer 57ef7a2959 app: add gimp_image_estimate_memsize()
to be used to estimate an image's memory size at another precision or
size.
2014-06-15 21:40:05 +02:00
Michael Natterer 28e4ae341b app: some cleanup in gimp_template_notify()
- use gimp_babl_mask_format() to get the new image's selection format
- don't call g_object_notify("icon-name"), GimpViewable does that already
2014-06-15 21:29:34 +02:00
Michael Natterer 9f0fde1397 app: add gimp_gegl_pyramid_get_memsize(), used by gimp_projection_get_memsize() 2014-06-15 18:21:05 +02:00
Michael Natterer 02c9dacc8f app: s/GimpPrecision/GimpComponentType/ in gimp_projection_estimate_memsize() 2014-06-14 23:20:52 +02:00
Michael Natterer 909c4b4084 app: add a GimpCpmponentType parameter to GimpDrawable::estimate_memsize()
so we can also estimate converting the drawable to other precisions.
2014-06-14 23:12:22 +02:00
Michael Natterer efd354b733 app: compare gamma-correced colors when finding contiguous regions
This maps threshold changes by moving the mouse more uniformly to the
growing/shrinking of the selected area, and the tools should work
perceptually anyway. Also, it makes things another 10 times as fast on
gamma-corrected drawables.
2014-06-12 23:49:50 +02:00
Michael Natterer 64d9e146d8 app: prefetch entire rows of pixels when finding contiguous regions
Makes the thing about twice as fast (used by fuzzy select, bucket fill)
2014-06-12 23:26:01 +02:00
Michael Natterer 8aa0019c2e app: clean up inclusion of gegl-plugin.h, mostly removals 2014-06-10 03:13:09 +02:00
Michael Henning fd928cde07 app: Return NULL on failure in gimp_drawable_foreground_extract
It is not a void function.
2014-06-03 21:41:04 -04:00
Øyvind Kolås 69b7cda375 app: fix projection and display render chunk-size envvars 2014-06-04 02:07:08 +02:00
Michael Natterer 2c4d5e4391 app: make projection chunk size and display render chunk size configurable
Set the GIMP_PROJECTION_CHUNK_SIZE and GIMP_DISPLAY_RENDER_BUF_SIZE
environment variables to "WIDTHxHEIGHT".
2014-06-04 01:23:41 +02:00
Michael Natterer e2628b9bd0 app: revive gimpdrawable-foreground-extract
Move the extraction graph from the foreground select tool there.
Enable the PDB wrapper again, using default values for now.
Some sytle cleanup in the foreground select tool.
2014-06-03 23:05:23 +02:00
Michael Natterer ee3846cc8b app: make the gimp_drawable_fill*() API symmetric to gimp_edit_fill*() 2014-06-03 14:11:59 +02:00
Michael Natterer 08503835ab app: oops, fix last commit 2014-06-03 14:07:20 +02:00
Michael Natterer 38c86da8e9 app: factor out utility function gimp_get_fill_params()
which returns an error if there is no pattern for GIMP_FILL_PATTERN.
Use it instead of having the same code in 3 variants, and make error
handling consistent with bucket fill.
2014-06-03 14:00:01 +02:00
Michael Natterer 1416743b5c app: use GimpFillType in gimp_drawable_bucket_fill()
GimpBucketFillMode is now tool- and pdb-only.
2014-06-03 01:34:51 +02:00
Øyvind Kolås dcc60e12b6 app: aim for 15fps projection rendering
Allow for more tiles to update, making it possible to see more of the updated
image when tuning paremters / dragging items interactively. Lower frame rate
for more image content is better than 60fps for a small rectangle in the upper
left.
2014-06-03 01:31:02 +02:00
Michael Natterer 425748dab0 libgimpbase, *: rename GimpFillType values: GIMP_FOO_FILL -> GIMP_FILL_FOO
Change all users accordingly and add compat enum values and compat
constants to script-fu and pygimp.
2014-06-03 01:11:32 +02:00
Michael Natterer 069996d75f app: some random code cleanup 2014-06-02 20:17:39 +02:00
Michael Natterer e424b9ebbd app: gimp_channel_new_from_alpha(): use gimp_drawable_get_component_format() 2014-06-02 08:12:48 +02:00
Michael Natterer 8e0563954d app: add gimp_drawable_get_component_format() and _component_index() 2014-06-02 02:31:42 +02:00
Michael Natterer 8424ccbedf app: don't create a temporary GimpChannel in gimp_channel_translate()
a temporary GeglBuffer is enough.
2014-06-02 01:57:17 +02:00
Michael Natterer 06d91251da Bug 731085 - Dragging an image out of the image area freezes GIMP
In GimpProjection, use gimp_rectangle_intersect() instead of ad-hoc
CLAMP() constructs to sanitize rectangles, and don't let rectangles
enter the projection if they don't intersect with the projectable.

(apparently I have killed some check that did the same when porting
to cairo regions).
2014-06-01 21:30:11 +02:00
Michael Natterer 1b1f3a60e2 app: enable the buffer copy in gimp_drawable_merge_filter() again
Thanks to gegl:copy-buffer this is now without much overhead.
Edit->Fade now works again on the result of any GEGL op.
2014-06-01 18:37:57 +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 42ba02bcd6 app: don't duplicate code in gimp_drawable_merge_filter()
gimp_gegl_apply_operation() already takes care of the
src_buffer == dest_buffer special case.
2014-05-31 22:32:10 +02:00
Michael Natterer 49818c7179 app: more cleanup in GimpProjection
Pull freeing the update regions into gimp_projection_free_buffer()
because freeing the buffer definitely obsoletes them. Get rid of
the last x1, y1, x2, y2 and use x, y, w, h inatead.
2014-05-31 15:13:32 +02:00
Michael Natterer 0b01f3b2b8 app: remove duplicate typedef GimpProjectionPrivate 2014-05-31 09:58:14 +02:00
Michael Natterer 0349b8972a app: rename gimpimage-contiguous-region.[ch] to gimppickable-....[ch]
The functions don't need to know about sample_merged, in fact they
used the boolean only to either use the passed image or drawable and
otherwise ran the same code. The sample_merged logic belongs into
their callers (and sometimes not even there).
2014-05-31 09:52:44 +02:00
Michael Natterer 5db796e17d app: improve code readability in GimpProjection 2014-05-31 02:58:21 +02:00
Michael Natterer 639319367a app: allow to set a "priority rectangle" on GimpProjection
If it is set, that rectangle gets processed first when
idle-constructing the image via ChunkRender.
2014-05-31 02:34:56 +02:00
Michael Natterer f509fce5d2 app: clean up the projections ChunkRender code
Remove member "running" it was always identical to "idle_id != 0".
Rename and reorder variables to make more sense. Simplify
gimp_projection_chunk_render_iteration() work area calculation.
2014-05-31 01:42:28 +02:00
Michael Natterer 9b341d05bb app: remove GimpArea and use cairo_region_t instead
This may or may not remove some logic that avoids drawing tiny update
regions, and may or may not improve things or make them worse. Will
add code that actually tile-aligns update areas later.
2014-05-31 01:26:06 +02:00
Michael Natterer 6845766200 app: gimp_drawable_merge_filte(): don't create a copy of the applied buffer
This removes the huge delay when applying any GEGL op, at the cost of
breaking Edit->Fade. Need to find a better way to create this buffer.
2014-05-31 01:08:42 +02:00
Michael Natterer a8f0c0e998 app: move all GimpProjection members to a private struct 2014-05-31 00:08:43 +02:00
Michael Natterer a0e8208650 app: GimpUndo's icon should be "edit-undo" not "gtk-undo" 2014-05-31 00:08:10 +02:00
Michael Natterer 21ea6216f7 app: gimp_image_rotate(): fix rotation of sample points
and also notify the image of guide and sample point movements after
rotation. This was probably broken since the introduction of canvas
items.
2014-05-24 22:41:21 +02:00
Michael Natterer 6c5515c676 app: allow to specify the workarea of GEGL ops in the GEGL tool GUI
Add a combo that switches between "selection" and "entire layer".
Need to find a way to hide that thing when the setting makes no
difference. Also the combo is generally pretty much experimantal.
2014-05-24 01:07:28 +02:00
Michael Natterer 7647b0d3a0 Bug 730550 - Layers incorrectly positioned on screen
gimp_group_layer_update_size(): update the group layer's offset node
before reallocating the group's projection, or we might render the
group projection's buffer with the old offsets.
2014-05-22 20:48:50 +02:00
Michael Natterer f0ebc09422 app: remove newline in GimpFilterStack 2014-05-22 20:48:50 +02:00
Michael Natterer d3966c2c90 app: add more accessors to GimpGrid and use them instead of grid->foo 2014-05-21 21:44:28 +02:00
Michael Natterer 5e2ded5020 app: add gimp_grid_get_spacing() and gimp_grid_get_offset()
and do the rounding to integer there instead of in several places.
2014-05-21 21:25:41 +02:00
Michael Natterer 08c6aefa23 Bug 588512 - Grid Spacing errors depending on unit
Always round grid spacings and offsets to integer precision when
using them for snapping and grid drawing. While we might *want* to
have subpixel precision grids, all the UI is pretending it to be
on pixel boundaries. Make that pretense an fact.
2014-05-21 20:43:05 +02:00
Michael Natterer d1b8a715c2 app: ref/unref layer->fs.drawable in gimp_layer_set_floating_sel_drawable()
It always felt wrong not to ref it, but now it started crashing. Dunno
what exactly has changed, but for example the "Weave" script was
triggering it.
2014-05-20 23:39:53 +02:00
Michael Natterer f3092ebfa4 app: minor cosmetic cleanup in the GEGL property code 2014-05-20 20:47:31 +02:00
Øyvind Kolås b919d7a82f app: use step, page and digits as provided by gegl pspecs 2014-05-20 16:16:48 +02:00
Michael Natterer d0e7fdd929 app: don't serialize GEGL properties that are auto-synced with the image 2014-05-17 00:19:20 +02:00
Michael Natterer 43244bd461 app: copy the new GEGL property keys in gimp_param_spec_duplicate() 2014-05-16 02:30:41 +02:00
Michael Natterer 1d55ad1491 app: use "gimp-tool-blend" for GimpGradient, there is no "gimp-gradient" icon 2014-05-15 12:49:34 +02:00
Michael Natterer 8be52f6aa7 app, libgimp*: pass translated blurbs to GIMP_CONFIG_INSTALL_PROP_FOO()
instead of passing N_()-strings; and remove gettext() calls on these
strings when using them. Reduces complexitx, and fixes double- and
untranslated strings. Also enables to treat properties of GIMP and
GEGL objects the same way, which was totally broken before.
2014-05-14 23:34:01 +02:00
Michael Natterer 32feb14fe5 app: some cleanup/refactoring in gimp_param_spec_duplicate() 2014-05-14 22:52:02 +02:00
Michael Natterer 6c7fae9e11 app, libgimp*, pdb: move more enums from app/core to libgimpbase 2014-05-14 00:06:01 +02:00
Michael Natterer 454d5d954b app, libgimpbase: completely remove enum value GIMP_NO_FILL
It should not have been moved to libgimpbase, it was never
PDB-exported and not selectable in the GUI any longer, so its code
paths were dead.
2014-05-13 16:30:02 +02:00
Michael Natterer f636b4ad34 app, libgimpbase: move lots of enums from app/core to libgimpbase
It makes little sense to keep them in one header and parse them with a
pile of perl, just to generate them in another header. Simply keep
them in a place everybody depends on.
2014-05-13 00:27:29 +02:00
Michael Natterer 6873b130a9 app: don't allow a GimpViewable's compat stock-id to be set to NULL
The only purpose of keeping that property around is to load old
config files, and these can never contain NULL stock-ids.
2014-05-08 22:31:36 +02:00
Michael Natterer ae4a41d7a5 themes, icons: move icons from themes/Default/images/ to the toplevel icons/
and install them in datadir/icons.
2014-05-07 21:57:21 +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 cffc8234fa themes, libgimpwidgets: prepare the icons to be named icons from an icon theme
Rename them and move them into folders, e.g.:

stock-foo-16.png -> 16/gimp-foo.png

This change only moves internal stuff around,
it's not visible on any API.
2014-05-06 19:13:04 +02:00
Michael Natterer d9cf36d07d app: remove gimp:cast-format and use gegl:cast-format 2014-05-05 19:30:21 +02:00
Rickard 5ec413a5e8 Bug 729326 - Errors found using a static code analysis program cppcheck
Fixed some memory and file leaks. And removed some code and variables
that are not used.
2014-05-05 10:34:08 +02:00
Massimo Valentini 26738b9ff3 Bug 722487: Something in the attached .gimp-2.8 directory makes...
GIMP fail on start

Make gimp_tool_preset_load() robust against completely failed
deserializing.
2014-05-05 10:34:08 +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 8356003fa2 app: pass the startup monitor to displays opened from the copmmand line
Change gimp_get_display_name() to also return the screen, and its
implementation in the GUI to return the initial monitor during
startup. Retrieve that information in app.c using a weird callback
construct and pass the monitor to file_open_from_command_line().

Half-related, add screen and monitor parameters to GimpDisplayShell
and use these initial values for calculating the canvas's initial
extents.

The image windows still don't position themselves correctly though
because we have no mechanism for that whatsoever just yet, but we now
at least pass the needed monitor information to the right objects.
2014-05-03 00:54:20 +02:00
Michael Natterer 7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
Mukund Sivaraman 499b87d14d app: Unwrap enum constant definition to a single line
gimp-mkenums prints a parse error otherwise though it seems to generate
the correct output.
2014-05-02 23:12:38 +05:30
Michael Natterer e19ded379b app: don't call create_display() in image_new_from_template()
No other gimpimage-new function calls it; instead, call it in
image_new_from_template()'s callers.
2014-05-02 15:38:26 +02:00
Michael Natterer 16819917f5 app: add a boolean "normalize" property to gimp:shapeburst
and do the normalization in the op, instead of exporting the
max_iterations via a property and doing the normalization outside.
2014-05-01 20:40:55 +02:00
Michael Natterer 540d3bb6ae app: port gimp:shapeburst's input from u8 to float 2014-05-01 20:32:26 +02:00
Michael Natterer b60e1779cd app: pass a GimpGradient to gimp_drawable_blend(), not a GimpBlendMode
The blend mode is now only a PDB compat enum, translate between
GimpBlendMode and the built-in gradients in the gimp-edit-blend PDB
wrapper.
2014-04-30 09:17:42 +02:00
Michael Natterer 626da25cf9 app: add accessors for the built-in FG->BG, FG->transparent etc. gradients 2014-04-30 09:15:42 +02:00
Michael Natterer 2ed1c59687 app: the FG/BG hardedge gradient didn't have a unique identifier 2014-04-30 02:02:24 +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 2ff414d799 app,libgimp,pdb: remove enum GimpConvolutionType from the public API
It was exported accidentially and never used for anything.
2014-04-27 23:05:12 +02:00
João S. O. Bueno ad4862c60b Adds new blending mode 'Truncate blend'
Bring repeat behavior on par with GEGL and Cairo,
and sane ways of creating square or circular gradient
shapes.
2014-04-24 12:18:26 -03:00
Jehan 23d0eb16d1 app: update user shortcuts to updated tools-value-[1-4]-* actions.
Commit 0bdb747 changed these action to more user-friendly names. Make
sure we update the user menurc to save any of their customization.
2014-04-21 10:57:30 +12:00
Michael Natterer 614c61a3dd Don't #include <glib.h> before <lcms.h>
The include claimed to be because of "inline" in the lcms header, but
that was probably lcms1, since there is no trace of inline in the
lcms2 header.
2014-04-10 20:48:22 +02:00
Michael Natterer 32e47cf70d libgimpcolor: add gimp_lcms_profile_is_equal()
and remove all of our own MD5 digest code and API. is_equal() uses
lcms' own MD5 API which I missed before. Thanks Elle for pointing that
out :)
2014-03-29 10:40:47 +01:00
Michael Natterer db9f7c195a app: remove sanity checks on the content of the 'icc-profile' parasite
We now validate the parasite at attach time.
2014-03-23 21:19:06 +01:00
Michael Natterer 4f10ff3ad4 app: validate 'icc-profile' parasites before attaching them
The must be persistent and undoable and contain an RGB ICC profile.
2014-03-23 19:46:09 +01:00
Michael Natterer e69ea05102 app: remove some <unistd.h> and other includes
that were needed before we switched to using GLib APIs in these files.
2014-03-22 20:26:20 +01:00
Michael Natterer 60f23afde2 app: add a small infrastructure to validate known parasites
when they are added to items, images or globally, from the PDF or an
XCF file. None of the validation functions does anything currently,
they simply return TRUE.
2014-03-22 00:18:48 +01:00
Michael Natterer 89e0c04d13 app: add gimp_image_get_profile() which returns a cmsHPROFILE 2014-03-17 02:29:46 +01:00
Michael Natterer a83851eb37 app: use gimp_parasite_name() instead of parasite->name in gimpimage.c 2014-03-17 02:29:46 +01:00
Michael Natterer e80eaf2524 app: start an image profile API in core/gimpimage-profile.[ch]
add lowlevel functions gimp_image_get,set_icc_profile() which deal
with ICC profiles in a GimpParasite.
2014-03-16 23:50:41 +01:00
Daniel Sabo 834a7c5a47 app: Use ABYSS_CLAMP for image and drawable previews (bug 709708) 2014-03-14 13:21:47 -07:00
João S. O. Bueno 72ac53705f Adds "fill" arrange modes to the Align Tool
The Align Tool had to be used in a very hacky way if one
intended to evenly distribute items across an image,
or other reference object (it would actually require one to
calculate the item spacing out of GIMP). This adds vertical
and horizontal fill modes: the reference object is divided
in N equal segments, where N is the number of items,
and each item is placed in the center of one of
these segments. The existing "offset" parameter
is used as an extra margin for the distribution,
and can be set to negative values, so that the items can
even get moved outside the boundaries of the reference object.
2014-03-13 03:38:53 -03:00
Michael Natterer e7ff0589cb app: shuffle precision enum values around to make room for U64
and add code to handle the old values from XCF files < version 7.
2014-03-09 01:46:08 +01: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 a7cd595241 app: fix crashing typo in previous commit 2014-02-23 01:28:34 +01:00
Massimo Valentini 9498cc615d Bug 722676: Pasting image from clipboard sometimes does not work.
Change gimp_pixbuf_create_buffer() to copy the pixels if a linear
buffer cannot be created. Add functions that convert between
GimpTempBuf and GdkPixbuf. Fix users of gimp_pixbuf_create_buffer()
to make the least possible copies. Patch modified by Mitch.
2014-02-23 00:49:56 +01:00
Jehan 6af7f47238 Bug 724338: free the GimpImageFile's icon when its contents is updated.
The main consequence was that file icons were stuck to the first
filetype's icon selected in file dialogs.
2014-02-17 12:49:29 +13:00
Jehan 6208d21979 Bug 622758 - Fix error display for thumbnail creation
Do not stay forever in "Creating Preview..." state during
auto-thumbnailing, and fix error showing when creation fails.
2014-02-14 15:08:45 +13:00
Michael Natterer 3e618320d3 Bug 724295 - multiple svg gradients in a single file not listed correctly
Clear the parsed lis of stops after each gradient, or they will all
look the same.
2014-02-13 22:06:12 +01:00
Michael Natterer 4d6640ff79 Bug 721249 - pdb.gimp_context_set_brush_size() dont't work
Port selection/path stroking to using the PDB-controllable
paint options that live in GimpPDBContext.

Change gimp_item_stroke()'s "use_default_values" boolean which was
introduced at a time where we had no better way by a GimpPaintOptions
parameter. If a non-NULL paint_options is passed (when called from the
PDB), use it for stroking; if NULL is passed, use the actual paint
tool options from the GUI (when called from the menus or the stroke
dialog). In the PDB wrappers, get the right paint options object from
the PDB context associated with the calling plug-in.
2014-02-06 23:26:53 +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
Michael Natterer 7fca15c27d Bug 722975 - crash when removing tag from palette while filtering by same tag
Each of the following cleans up tag refcounting, fixes access to
released memory, or other small glitches. Not sure which change
actually fixed the bug:

gimp_data_remove_tag(): remove the found tag, not the passed in tag
(which is to be treated only as a value for comparison).

gimp_tagged_remove_tag(): don't continue the loop after the tag to
remove has been found, there can only be one matching tag, and the
list element has become invalid.

gimptagentry.c: keep references around for the members of
entry->common_tags, and make sure the references are always dropped
properly. In assign_tags(), reference the "add" and "remove" lists for
paranoia and safety reasons.
2014-01-26 21:03:28 +01:00
Michael Natterer ef85845372 app: add gimp_paint_options_set_default_brush_size()
and use it globally instead of two different methods, one of which was
forgotten to be ported to the new aspect ratio range where 0.0 means
1:1. Add a FIXME comment in paint_tools.pdb where I think setting the
default size is a bug, see #721249.
2014-01-04 15:48:34 +01:00
Michael Natterer 00cd9b4e47 app: add some CPPFLAGS in core/Makefile.am to fix the build on OSX 2013-12-11 00:41:24 +01:00
Jehan 8707701bee Bug 720163 - Typo fix for a console gimp-error message
s/configuation/configuration/
2013-12-10 14:48:08 +13:00
Michael Natterer 6a02f4a19e app: fix formatting in gimpselection.c 2013-12-08 23:43:47 +01:00
Jehan 7ef45be890 app: handle migration on OSX of GIMP 2.8.2's config folder.
GIMP 2.8.2's config was "~/Library/Gimp/x.y", before it got moved to
"~/Library/Application Support/x.y" and after being saved in the home
like other UNIXes. The migration code will now check all 3 places in the
right order on OSX.
Thanks to Simone Karin Lehmann for the original proposition.
2013-12-05 11:48:20 +13:00
Michael Henning 95becc7615 Bug 719593 - On clang, brush outline is not displayed
Don't access path_data->len after path_data has been freed.
2013-11-30 16:34:37 -05:00
Michael Natterer 2eb74becb8 app: add G_GNUC_PRINTF() to places where the args are a va_list
The trick is to use G_GNUC_PRINTF (n, 0).
2013-11-29 00:33:05 +01:00
Michael Natterer 174dee3427 Bug 525705 - skip thumbnailing entirely on files with insufficient...
...read permissions

Apply modified patch from Sven Neumann which implements just that.
2013-11-23 18:05:55 +01:00
Michael Natterer c2eda33c1c app: also copy the metadata in gimp_image_duplicate() 2013-11-21 21:43:28 +01:00
Jehan 4b14ed2e5e file-export* labels and actions renamed.
Follows updated save+export specification.
For renamed actions (file-export and file-export-to respectively to
file-export-as and file-export to mimick file-save*), menurc from
GIMP 2.8 will be correctly migrated.
2013-11-18 09:07:32 +13:00
Michael Natterer 83bd1c86fa app: gimp_brush_load_brush(): add special error for possible old files
The obsolete .gbp format had a 3-byte pattern following a 1-byte
brush, when embedded in a brush pipe, the current code tries to load
that pattern as a brush, and encounters the '3' in the header. Detect
that and suggest to re-save the file because the plug-in still loads
the legacy format.
2013-11-17 01:28:57 +01:00
Michael Natterer 2b7f38f473 app: don't ignore the return value of gimp_rectangle_intersect()
In gimp_drawable_resize(), don't blindly copy the width and height
returned by gimp_rectangle_intersect(), we have to check if the
function actually returned TRUE.
2013-11-16 09:38:29 +01:00
Michael Natterer 3e711fec09 Bug 711476 - Problems using animated GIH brushes
Show the error message from gimp_brush_load_brush() instead of
a generic "File is corrupt". Doesn't fix anything.
2013-11-16 08:51:25 +01:00
Hartmut Kuhse 8dc7ff4504 app: metadata undo: unref instead of free 2013-11-14 21:45:06 +01:00
Michael Natterer 98cef1273b Bug 704980 - uclibc - base-utils.c: execinfo.h: No such file or directory
Forgot to apply the same fix to master.
2013-11-10 22:09:54 +01:00
Hartmut Kuhse 21bed1e2fb Completely rewrite metadata handling using gexiv2
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:

- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
  include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
  including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
  changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
2013-10-27 01:02:17 +02:00
Michael Natterer 33f361f634 app: include gimp-gegl-nodes.h in gimpchannel.c 2013-10-20 00:35:20 +02: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 e0c64a817d Bug 701232 - Painting tools still slow when used in Quick Mask mode
Set the format of GimpChannel's gegl:color node depending on whether
the buffer is linear or gamma-corrected.
2013-10-18 01:01:26 +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 96f5254324 Bug 709398 - All layer compositing treated as "Normal" on load or undo
gimp_filter_stack_reorder(): really fix setting of "is-last-node".
2013-10-12 00:07:53 +02:00
Michael Natterer 47ec9e2e1a app: handle an index of -1 generically in GimpContainer::reorder()
by turning the -1 into n_children - 1 directly in gimp_container_reorder()
instead of having all subclasses deal with the -1 separately. Remove -1
handling from gimp_list_reorder().

Also, optimize reordering to the same index away without increasing
the function's cost (it was doing a gimp_container_have() before, now
it doees gimp_container_get_child_index(), which both have the same
cost).
2013-10-11 23:09:30 +02:00
Michael Natterer 665e7d9a7d app: some whitespace and indentation in gimppalette-load.c 2013-09-24 22:14:10 +02:00
Jehan 951393b34e app: disallow a theoretical infinite loop if we run out of ids.
In practice, that's likely impossible to ever happen. This was just
itching my perfectionist self, who enjoys flawless design.
2013-09-20 02:42:40 +12:00
Michael Henning d02dd9f0da app: Rename the pallete loading functions from last commit. 2013-09-17 19:39:12 -04:00
Warren Turkal 198f2514ab app: Refactor palette loaders.
I specifically moved the file opening/closing logic to the common
code. This makes the code easier to understand for me since there
is less duplication. In fact, this commit removes more lines than
it adds.
2013-09-17 17:54:54 -04:00
Jehan c7aa623a55 app: clean out a big bunch of leading tabs.
For some unknown reason, most calls to gimp_message_literal() were
indented with tabs.
2013-09-15 04:59:20 +12:00
Michael Natterer 125cf2a2a3 app: use the image instead of the projection for accessing a pickable 2013-09-13 23:29:06 +02:00
Michael Natterer 4d01e21104 app: implement the GimpPickable interface for GimpImage
by delegating to the image's projection.
2013-09-13 23:25:30 +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
Michael Natterer a694970d1c app: set the filters' "is-last-node" correctly in GimpFilterStack
Call gimp_filter_set_is_last_node() directly from the
GimpContainer::add(), ::remove() and ::reorder() implementations so it
is always called and things always have the correct state. More
precisely, don't call it in functions that are only called if the
stack has a graph, or that are called while the graph is being
created, because it has the side effect of emitting a signal that
might (and in fact did) trigger another recursive creation of the same
graph.
2013-09-12 01:30:47 +02:00
Michael Natterer a4dd86fcda app: add a read-only "buffer" property to GimpPickableInterface
and implement it in GimpDrawable and GimpProjection. Will need this
later.
2013-09-05 10:37:09 +02:00
Massimo Valentini 8ec824f158 app: do not render many tiles twice
removing the area that is going to be rendered from the dirty area
before rendering it, prevents tile-handler-projection to render it
again.

This was the reason why caching showed an improvement also during
the construction of the projection. And it was a regression that
I introduced in a previous commit
2013-08-11 08:49:38 +02:00
Michael Henning cff668f876 app: Fix merging floating selections when undo is diabled. 2013-08-10 13:43:12 -04:00
Michael Henning e7b749d55d app: Ensure the graph for fs filters is always constructed when needed. 2013-08-10 12:37:18 -04:00
Massimo Valentini 5b7953a423 app: do not invalidate always the whole layer 2013-08-10 16:43:08 +02:00
Massimo Valentini 40f41055b9 app: fix the tile pyramid invalidation bug
when toggling the visibility of a single layer image with
alpha channel, zoomed at 50%, the projection wasn't
properly redrawn. It seems there's a GEGL bug exposed
by normal layer mode operation fast path.
2013-08-10 16:22:27 +02:00
Michael Natterer c32c1208b0 app: return a GError when flattening the image failed 2013-08-09 21:35:36 +02:00
Simon Budig 514f22f53d app: fix crash when flattening an image with no visible layers 2013-08-09 21:32:42 +02:00
Michael Natterer 40e7ca7442 app: speed up image rendering by removing expose overhead
measure the time it takes to render projection chunks and continue
rendering until 0.01 seconds have passed. This ways we avoid excessive
expose roundtrips.
2013-08-09 20:20:02 +02:00
Michael Natterer b05ff480fd app: move the work of construction the projection into the chunk renderer
so we can control how much time it takes, and can further optimize it.
This is needed for gtk3 because it should happen between clock ticks,
not in the expose handler, and in gtk2 the old code would have the
unfortunate property to potentially render at very high frame rates,
including all the overhead of exposing.
2013-08-09 19:17:02 +02:00
Michael Natterer e72cf05ccb app: port mtime code in gimp_data_save() to GIO
because it gets its stat() calls right.
2013-08-04 16:51:31 +02:00
Michael Natterer 0289eb8898 Bug 705397 - Layer groups are not exported properly/fully
In gimpgrouplayer.c always gimp_pickable_flush() after
gimp_projectable_structure_changed() so all queued updates are
actually flushed to the projection buffer's invalid area, and are
constructed upon reading. This would have been neccessary before for
group layers, but worked anyway until we changed
gimp_projection_get_buffer() to construct the buffer on idle time
initially in order to make images appear more responsively after
loading.
2013-08-04 14:52:01 +02:00
Michael Natterer 3b12541d61 app: rename GimpProjection's IdleRender stuff to ChunkRender
and separate the chunk rendering logic from the fact that it's invoked
from an idle callback. Idle rendering no longer works in GTK+ 3.8 and
later because the expose logic was changed from an idle function to a
frame clock, and when we switch to that in gtk3-port, the diff to
master should stay readable (and rebasable) in this critical part of
the code.
2013-07-28 15:57:28 +02:00
Michael Natterer 37372555e5 Bug 704118 - crash on invalid number of PLTE entries
Make sure an indexed image always has a colormap. This was the case
before, except one could set a NULL colormap via the PDB.

Add gimp_image_unset_colormap(), and make gimp_image_set_colormap()
never set the colormap to NULL, even if NULL is passed. Change the
only places where actual unsetting makes sense to use unset().

Make some GUI places deal gracefully with palettes/colormaps with zero
entries.
2013-07-14 22:25:44 +02:00
Michael Natterer 13614f6182 app: change GimpData:mtime from time_t to gint64 2013-07-12 16:33:12 +02:00
Massimo Valentini 3cc923d5a5 Bug 703806: GIMP crashes when scaling an image
during an image rescale, while spinning the main-loop,
layer-groups preview generation used to start before their
layers were fully rescaled, so it tried to access tiles that
were not yet there
2013-07-09 19:41:52 +02:00
Michael Natterer f33d11b99c app: keep the layer mode node's "linear" property up-to-date
Implement GimpDrawable::set_buffer() and update the mode node if
the layer's "linear" property has changed.
2013-06-29 23:34:12 +02:00
Michael Natterer c8912ceb10 app: remove disabled code from gimp_drawable_real_get_buffer() 2013-06-29 22:12:52 +02:00
Daniel Sabo ff9c91ce6f Use gegl_malloc in GimpTempBuf
Which allocates 16 byte aligned memory for SSE code.
2013-06-25 20:40:27 -07: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
Clayton Walker 03f559923b app: properly initialize more variables
Found by Coverity
2013-06-23 13:10:44 +02:00
Michael Natterer 0a8135b8b0 Bug 701335 - Gimp crashing on creating huge clipboard brush
Change the maximum size of clipboard patterns and brushes to 1024x1024.
2013-06-21 12:45:20 +02:00
Michael Natterer 3cf2c4dd87 app: use the "no-cpu-accel" command line option again
Call gimp_cpu_accel_set_use() in app_run(). Add "use_cpu_accel"
parameter to gimp_new() and keep it around in the Gimp instance. Pass
the flag to plug-ins again.
2013-06-19 20:45:17 +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
Mikael Magnusson 0091645129 app: remove pointless NULL checks 2013-06-16 01:31:13 +02:00
Michael Natterer 571350270b app: return 0.0..1.0 from gimp_histogram_get_mean(), median(), std_dev()
Display the float values in the histogram dockable and add a compat
hack to the gimp_histogram() PDB wrapper.
2013-06-12 02:01:24 +02:00
Michael Natterer 6c97908a9e app: add "gboolean gamma_corrected" to gimp_histogram_new()
so we can make histograms of the gamma-corrected image data. Pass
TRUE all over the place so the histogram works perceptually. This
needs more thinking...
2013-06-12 01:02:25 +02:00
Michael Natterer 0f0590426d app: must CLAMP() all valus to 0..1 for calculating histogram bins
The histogram does only 0..1, there are no bins outside that range.
2013-06-11 23:11:37 +02:00
Michael Natterer 8d1cbd95d2 app: rename gimp_histogram_get_channel() to get_component()
Because that's what it is. It also takes a "gint component"
(0..4) and not a "GimpHistogramChannel channel".
2013-06-11 21:32:08 +02:00
Michael Natterer a7f42de4c0 app: turn GimpHistorgram into a GimpObject, no other changes 2013-06-11 21:23:32 +02:00
Michael Natterer 48d312ed94 app: create > 8-bit histograms with 1024 bins
Seems to calculate and draw correctly, just the view's range is
broken now, will fix.
2013-06-11 08:49:28 +02:00
Michael Natterer 96d569a50e app: make GimpHistogram use floats, and make the number of bins flexible
It's still always 256 currently.
2013-06-11 02:24:53 +02:00
Michael Natterer 330d511b33 app: gimp_pickable_pick_color(): return the right color index 2013-06-10 00:30:17 +02:00
Michael Natterer 4e9661bd20 app: use RGBA double to pick and average in gimp_pickable_pick_color()
It was still putting all picked colors through a guchar[4].
2013-06-09 20:13:50 +02:00
Clayton Walker 264d09b417 Rename colour and greyscale to color and grayscale respectively 2013-06-06 23:26:16 +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
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 3b68ae0f3c app, pdb, libgimp: Remove all traces of the supersampling recursion level
from all transform APIs. This is no longer used since we use GEGL to
transform, the value was only passed around and never used.
2013-05-31 01:15:32 +02:00
Michael Natterer b8558f8859 app: add coordinates to GimpColorTool's and GimpImageMapTool's "picked"
signals and vfuncs. This is currently unused, but GEGL operations
can soon pick coordinates just like they can pick colors.
2013-05-30 19:29:36 +02:00
Mukund Sivaraman 84f90455b9 app: Remove unused macro 2013-05-30 10:52:09 +05:30
Michael Natterer 5280a02ed8 Bug 700215 - Gradient name changes do not persist across sessions...
if the gradient itself isn't changed.

GimpData: implement GimpObject::name_changed() and set the "dirty"
flag to TRUE. Don't set dirty in GimpData::dirty()'s default impl
because that calls gimp_object_name_changed() anyway.
2013-05-29 22:29:29 +02:00
Michael Natterer 308431f7b6 Bug 701053 - Opening jpg files from Canon camera displays...
...PNG Description encoding error.

Don't unconditionally display all error messages from thumbnail saving.
Instead, return the error from gimp_imagefile_create_thumbnai()
and gimp_imagefile_save_thumbnail() and display it only if thumbnail
creation was the actual user-intended action (like clicking the preview
in a file dialog). Do not display the error when thumbnailing is just
a side effect of loading/saving an image.
2013-05-26 21:31:06 +02:00
Michael Natterer a7dc8d4429 app: remove gimp_get_number_of_processors(), use g_get_num_processors() 2013-05-25 22:50:23 +02:00
Michael Natterer f9b7979af0 app: somehow the new app/core/gimpsettings.[ch] didn't get committed 2013-05-25 16:48:38 +02:00
Michael Natterer a9ddcde6ed app: change projection idle chunk size back to 256x128
because it made applying of expensive filters pretty unresponsive.
Don't revert commit b7b504d624 tho
because it also moves the #defines to a proper place.
2013-05-25 16:37:52 +02:00
Michael Natterer 9072bf331a app: rename GimpImageMapConfig to GimpSettings
It was misnamed from the beginning and has no relation to GimpImageMap
except that it happens to be used by GimpImageMapTools. Now it feels
less weird to potentially use it for other settings too.
2013-05-25 15:26:18 +02:00
Michael Natterer 51181648f7 Bug 700707 - Missing time data in tool-options/*.settings files
strftime() the time using %H:%M:%S which should work on
all platforms, unlike %T.
2013-05-25 11:21:15 +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
Michael Natterer b7b504d624 app: double the chunks of the projection idle renderer: 256x128 -> 512x256 2013-05-22 21:20:23 +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 Muré 7e962d36e2 app: add a quick doc for gimp_item_mask_intersect() 2013-05-18 01:26:13 +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
Miroslav Talasek 0d7b10cb74 app: add gimp_channel_new_from_buffer() and gimp_layer_mask_new_from_buffer() 2013-05-07 23:06:43 +02:00
Mikael Magnusson d15f18647e app: Remove an unused variable and associated dead code. 2013-05-02 20:14:40 +02:00
Daniel Sabo 8d88b71fad Implement gimp_drawable_get_linear 2013-04-30 15:36:22 -07: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 c55c2b0c4d app: fix gimp_image_get_active_mask() for GRAY and INDEXED modes
Need to check image->active[ALPHA_G,I] for the alpha component.
2013-04-30 18:35:05 +02:00
Michael Natterer f4d7d1475d app: add debug utility function gimp_create_image_from_buffer() 2013-04-30 17:17:43 +02:00
Michael Natterer 3e132ba18a app: fix GimpScanConvert compositing (as opposed to replacing)
It's only used in the foreground select tool so nobody noticed
that it was broken.
2013-04-29 23:58:44 +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 bacc9c9635 Bug 688348 - Layer tab and Images tab: not updated on dropping...
...one image onto another

gimp_dock_window_display_changed(): make sure the "auto-follow-active"
logic works both ways: when the active image or display is changed in
a dockable, update the global context. Fixes multi-window mode.

gimp_context_real_set_display(): make sure a context's display and
image are always in a consistent state and never have a display that
is not display->image: when display is the same as context->display,
check that the context's image matches display->image, so that after a
gimp_context_set_display(), the context is consistent in all
cases. Fixes single-window mode.
2013-04-23 21:05:33 +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 190fc5bec2 app: gimp_drawable_merge_filter(): remember the aux input in the undo step
Which means that now all color operations and gegl filters can be
modified with Edit->Fade. Poor hackers's nondestructive editing :)
2013-04-22 10:58:37 +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 cdffff7091 app: add gimp_filter_get,set_applicator()
The filter does absolutely nothing with the applicator, this API is
just for associating an applicator with a filter so it can be found by
other parts of the code.
2013-04-22 10:56:53 +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
Massimo Valentini 0909a30b06 app: histogram typos
correctly offset the mask,
don't crash computing the histogram of a GRAY image selection
and don't use an integer division
2013-04-21 20:15:34 +02:00
Michael Natterer e2bcad3cfd app: use GimpApplicator in gimp_image_merge_layers() 2013-04-17 16:17:39 +02:00
Michael Natterer bba89aa87d app: use a GimpApplicator in gimp_drawable_real_apply_buffer() 2013-04-17 14:24:33 +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 9504e85a7e app: set an icon on the floating selection filter 2013-04-16 20:30:13 +02:00
Michael Natterer 2538d6fea7 app: add gimp_drawable_get_filters() which returns the filter stack 2013-04-16 20:20:00 +02:00
Michael Natterer 8bfb1769b7 app: use a GimpApplicator for floating selection compositing 2013-04-15 01:44:18 +02:00
Michael Natterer 07a220ee9e app: port GimpImageMap to GimpApplicator 2013-04-14 22:46:52 +02:00
Michael Natterer 1235013177 app: add local "private" variables to make drawable's FS code more readable 2013-04-12 21:07:56 +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 38e983c724 app: fix regression: make the selection clip the FS again 2013-04-12 18:26:34 +02:00
Michael Natterer 05e6f6d848 app: simply merge the FS filter with the drawable to anchor the FS 2013-04-12 16:58:18 +02:00
Michael Natterer 39ab59e032 app: add gimp_drawable_get_floating_sel_filter() 2013-04-12 16:57:39 +02:00
Michael Natterer b16f75b8af app: make the FS' drawable update itself when the active components change
which removes more FS knowledge from the image.
2013-04-12 15:58:42 +02:00
Michael Natterer 538e3813be app: make floating selection compositing honor the image's active components
This was a regression from 2.8
2013-04-12 15:54:05 +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 dc964956e7 app: add gimp_drawable_merge_filter() which applies a filter to a drawable
permanently, with undo and progress.
2013-04-12 14:31:50 +02:00
Michael Natterer a1ddd7dfda app: use the newly added drawable filter api to add/remove the fs filter 2013-04-12 12:56:01 +02:00
Michael Natterer 85fef12865 app: add gimpdrawable-filter.[ch] to access the filters 2013-04-12 12:55:15 +02:00
Michael Natterer f3308e6ba3 app: add a GimpFilterStack to each GimpDrawable
which is part of the drawable's source_node, so we can generically
filter a drawable's pixels. Reading from the source_node will
transparently give the filtered results.

Turn floating selection compositing into a GimpFilter and add it to
the filter stack while we have a floating selection on the drawable.
2013-04-11 19:06:23 +02:00
Michael Natterer 7c96952bd4 app: add gimp_filter_stack_new(filter_type) 2013-04-11 19:04:51 +02:00
Michael Natterer a203a270df app: add gimp_filter_new(name) 2013-04-11 19:03:10 +02:00
Michael Natterer fc2ec83723 app: simply put GimpImage's layer and channel stacks on top of each other
which gets rid of the gegl:over we used to combine them.
2013-04-11 14:40:41 +02:00
Michael Natterer e7babfed2e app: make sure GimpFilterStack's initial empty graph passes through 2013-04-11 14:37:43 +02:00
Michael Natterer 51d28340f3 app: always connect GimpFilterStack's input too
so it is actually a "filter" stack and not only an "output" stack :)
2013-04-11 13:03:37 +02:00