Commit graph

32781 commits

Author SHA1 Message Date
Loren Merritt
d7066a1e2f Optimize the heal tool
Adjust over-relaxation factor as a function of problem size.
Remove the second array, and update in-place.
Factor branches and indexing out of the inner loop, instead precompute a list
of pixels inside the brush mask and what neighbors they have.
Switch from scalar double to simd float.

Speedup (of the laplace part, excluding gamma correction): 10x-20x, depending on brush size.
2013-05-02 09:22:25 +02:00
Daniel Sabo
8d88b71fad Implement gimp_drawable_get_linear 2013-04-30 15:36:22 -07:00
Michael Natterer
0255a01f95 app: add gegl:checkerboard to <Image>/Filters/Render/Pattern 2013-04-30 19:20:18 +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
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
5bdadcc17d app: whitespace fix in gimpcanvaspen.h 2013-04-30 17:18:28 +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
abbe2ecba9 app: build the foreground select tool again, minus the calls to SIOX
the interaction is completely there again, it just doesn't nothing
fancy with the mask :)
2013-04-30 00:04:28 +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
c7879266d4 app: fix GimpDisplayShell mask drawing, again 2013-04-29 23:15:37 +02:00
Jehan
64fe3af1a9 app: GimpContainerEntry's text is red when not a valid item.
If the selected item in a GimpContainerEntry is invalid, or else when the entry
is being updated, the text shows in red.
2013-04-29 08:45:41 +09:00
Michael Natterer
77d1b49edc app: small optimization in gimp_operation_normal_mode_process()
Move some calculations out of the R,G,B loop, including a floating
point division, now there is only one division left per pixel.
2013-04-28 23:35:23 +02:00
Alexia Death
6e332505ca plugin: Fix gih exporter to default first rank equal to number of cells 2013-04-28 22:21:45 +03:00
Michael Natterer
87584d2f82 Bug 699100 - Move tool: space-bar inhibits function of Move tool
Don't try to switch to the move tool if the move tool is already active.
Also never bail out early from gimp_display_shell_space_pressed() so we
don't end up in an inconsistent state.
2013-04-28 15:28:18 +02:00
Michael Natterer
f6ec4f4af2 app: remove the image map tool overlay before hiding it again
Which means I have given up finding that last bug (for now).
2013-04-28 14:57:57 +02:00
Michael Natterer
77e70f3550 app: remove the manual double buffering from the canvas
It is messing with overlay widgets. Is was effectively disabled since
cairo tool drawing was introduced, but not completely.
2013-04-28 14:56:07 +02:00
Michael Natterer
e19c7eb36c app: fix various artifacts of the cancas' overlay children
gimp_overlay_child_size_allocate(): invalidate the old and new
position of the child, and simplify the code by calling our own
invalidate() function instead of duplicating its code.

gimp_overlay_child_expose(): process pending updates on the overlay
child's offscreen window before getting its pixmap.
2013-04-28 04:05:52 +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
eafcc4801c app: accidentially removed a function's return type 2013-04-27 08:23:58 +02:00
Michael Natterer
244439f35e app: some more precondition checks in gimpoverlaychild.c 2013-04-27 00:23:04 +02:00
Michael Natterer
9de6e41abb app: remove prepare() implementations from all layer mode operations
so the one in GimpOperationPointLayerMode is used which can switch
between RGBA and R'G'B'A.
2013-04-26 23:48:05 +02:00
Michael Natterer
5322d6a544 app: sense the input format in gimp:mask-components
because it can work on RGBA and R'G'B'A without conversions.
2013-04-26 23:29:03 +02:00
Michael Natterer
915b0f3eec app: re-enable and port the display shell mask rendering code
for the ported foreground select tool. Untested!
2013-04-26 10:33:10 +02:00
Michael Natterer
2a0472b57e app: don't forward key events to the curves tool graph if the tool isn't active 2013-04-26 00:11:51 +02:00
Michael Natterer
24d150f537 app: handle canvas overlays better in gimp_window_key_press_event()
forward events first not only if a GimpCanvas has the focus, but also
it one of its children has.
2013-04-25 23:53:39 +02:00
Michael Natterer
595f52bf09 app: more cleanup in GimpImageMapTool's overlay dialog handling
gimp_image_map_tool_initialize(): clean up adding the overlay.

gimp_image_map_tool_dialog_hide(): hide the overlay before removing it.
2013-04-25 22:46:05 +02:00
Michael Natterer
8230e948a8 app: allow to call gimp_image_map_tool_dialog_hide() multiple times
don't try to remove a GimpOverlayDialog from the canvas twice.
2013-04-25 22:23:32 +02:00
Michael Natterer
9e1dee9ceb Bug 697862 - heal tool quality regression
Next attempt: don't reset the heal buffer' formats back to bogus.
Instead, read and write them using the right gamma-corrected format.
2013-04-25 15:27:16 +02:00
Michael Natterer
325d7541c7 app: always show the tool progress in the center of the canvas
getting rid of one more untransform_viewport().
2013-04-25 09:41:21 +02:00
Michael Natterer
62c5a737fd app: fix conditions for guide and sample point moving/removing
Simply check the transfomred coords against the canvas extents and the
untransformed against the image contents instead of using
untransform_viewport(). The code is easier to read now, and
untransform_viewport() is still broken and can't really be implemented
properly when the canvas is rotated.
2013-04-25 09:30:46 +02:00
Mukund Sivaraman
36853815f9 build: Require dependencies of file-compressor
Without the dependencies of file-compressor (currently zlib, libbzip2
and liblzma), configure fails now. file-compressor is referenced in too
many places for its functionality to be optional.
2013-04-25 12:46:37 +05:30
Michael Natterer
89081075f3 app: don't subtract the offset twice in zoom_xy() and transform_xy() 2013-04-25 09:13:30 +02:00
Michael Natterer
5d0450e4ea app: draw guides across the entire canvas also when rotated 2013-04-25 09:12:35 +02:00
Michael Natterer
37d589335f app: consolidate all transform API in gimpdisplayshell-transform.[ch]
Added complete API for zoom/unzoom (scale and scroll) and
rotate/unrotate, with the same set of functions as the existing
transform/untransform. Moved some special case functions to the
namespaces they belong.
2013-04-25 00:29:58 +02:00
Sven Claussner
3bc112bd07 Bug 692956 - Bring back 'Color from gradient' option to Paint tools
This patch adds a Dynamic for the 'Color From Gradient' option
and three Paint tool presets (Airbrush, Paintbrush, Pencil), which
use this preset.

	new file:   data/dynamics/Color-From-Gradient.gdyn
	new file:   data/tool-presets/Paint/Airbrush-Color-From-Gradient.gtp
	new file:   data/tool-presets/Paint/Paintbrush-Color-From-Gradient.gtp
	new file:   data/tool-presets/Paint/Pencil-Color-From-Gradient.gtp
	modified:   data/dynamics/Makefile.am
	modified:   data/tool-presets/Paint/Makefile.am
 	modified:   AUTHORS
 	modified:   authors.xml
(cherry picked from commit 54b28a5b60)
2013-04-24 19:59:08 +02:00
Rafael Ferreira
03637b0ff9 Revert "Updated Brazilian Portuguese translation"
This reverts commit ab168fa279 because
it was the wrong branch - should be gimp-2-8
2013-04-24 00:41:15 -03:00
Enrico Nicoletto
ab168fa279 Updated Brazilian Portuguese translation 2013-04-24 00:34:02 -03:00
Michael Natterer
aea94211b1 app: add an unrotated canvas item group to GimpDisplayShell
and put the software cursor and the tool progress there.
2013-04-24 00:01:01 +02:00
Loren Merritt
c3c4287bdf Bug 697862 - heal tool quality regression
Switch heal tool back to sRGB, which produces better quality than
linear-light. It is, after all, trying to correct for differences in
perceived brightness.
2013-04-23 22:51:43 +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
076f375e78 app: make gimp_dock_window_constructed() more readable
by adding a local "factory_context" variable instead of calling
gimp_dialog_factory_get_context (dock_window->p->dialog_factory)
multiple times.
2013-04-23 21:05:33 +02:00
Mikael Magnusson
8cc53bbbdf app: forgot to invert the matrix in corrective mode when transforming the selection. 2013-04-23 17:15:23 +02:00
Simon Budig
fba2b610c5 add default shortcut <shift>1 to reset rotation. 2013-04-23 00:36:31 +02:00
Michael Natterer
a4d8ce6d11 app: update the rotate dialog's spinbutton when the view is rotated 2013-04-22 23:18:27 +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
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