Commit Graph

82 Commits

Author SHA1 Message Date
76f573c981 Bug 648776 - mirror symmetries.
You can now set any paint tool to mirror painting relatively
horizontal/vertical axis or a central point (any combination of these 3
symmetries).
This has been implemented as a new multi-stroke core, where every stroke
is actually handled as a multi-stroke (default of size 1).
This is also the first usage of custom guides for symmetry guiding.
Current version has to be activated in the playground.
2016-02-02 21:15:13 +01:00
7e6320497e follow gegl api changes from commit af5361ca8d, with an abyss policy argument
to gegl_buffer_copy.
2015-05-25 01:27:31 +02:00
7449316898 app: add gimp_dynamics_is_output_enabled()
and use it to further simplify stuff. Almost no place needs to use a
GimpDynamicsOutput directly now.
2015-04-19 21:58:36 +02:00
ca07026642 app: simplify handling of the force output in paint methods 2015-04-19 21:27:48 +02:00
a75a479d81 app: #include "core/gimpdynamicsoutput.c" in some files in paint/ 2015-02-15 20:05:30 +01:00
ace4234a98 app: make all tools capable of dynamic force respect the options slider 2015-01-19 10:55:56 +02:00
b5530e9e3d Use the new GeglAccessMode enum instead of the old values 2014-07-02 02:00:35 +02:00
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
8602fdbecb Bug 699436 - 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-10 21:12:25 +02:00
a0942ae104 Revert "Optimize the heal tool"
This reverts commit d7066a1e2f
because I pushed it accidentially, it still needs some cleanup.
2013-05-02 20:21:10 +02:00
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
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
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
3f51850dc4 Bug 697862 - heal tool quality regression
Fix heal tool's convergence threshold.

When we switched from [0,255] to [0,1] pixel range, the amount of numerical
error to tolerate should have been reduced proportionally.
2013-04-21 20:36:19 +02:00
6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
0cfdf38726 app: port heal to RGBA float 2012-12-08 22:41:33 +01:00
1a624d4df4 app: remove many includes of "gegl/gimp-gegl-utils.h" 2012-05-10 23:12:39 +02:00
2d34092f48 app: Fix heal tool behavior at top and left edge (Bug 568098)
Fixes calculation of the mask buffer's rectangle.
2012-05-10 20:43:32 +03:00
a3a62b4546 app: add shortcut functions gimp_dynamics_get_foo_value()
and use them for simple use cases instead of dynamics_get_output() and
output_get_foo_value().
2012-05-02 17:51:19 +02:00
bdf6b48138 app: move GimpTempBuf from base/ to core/
and forget about include policy in base/, it's scheduled for removal
anyway.
2012-05-02 17:51:01 +02:00
dccb909009 app: make GimpTempBuf reference counted
and remove the "take_ownership" parameter from
gimp_temp_buf_create_buffer(), simply always ref the buf.
2012-05-02 17:51:00 +02:00
42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
f07f01664e app: heal the paint_buffer directly, without an intermediate copy 2012-05-02 17:50:54 +02:00
1c60024250 app: port GimpHeal to GEGL, using insane buffer casting tricks 2012-05-02 17:50:53 +02:00
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
c5c555c834 app: add "take_ownerspip" param to gimp_temp_buf_create_buffer()
and get rid of some more intermediate buffer creation/destruction, and
some redundant temp_buf_free() plus g_object_unref().
2012-05-02 17:50:51 +02:00
b4996f2605 app: port GimpSourceCore and its classes to painting to the paint_buffer 2012-05-02 17:50:51 +02:00
93009ef274 app: use gimp_temp_buf_create_buffer() all over the place
instead of creating linear buffers manually.
2012-05-02 17:50:46 +02:00
2af0681587 app: don't create copies in gimp_paint_core_get_orig_image,proj()
and instead simply return the paint_core owned buffers. Also, move
graph creation and source buffer fiddling out of perspective clone's
inner loop, and set an area to be processed manually, which makes it
responsive again.
2012-05-02 17:50:46 +02:00
95bf75d7a5 app: in GimpSourceCore's vfuncs, pass GeglBuffers around not PixelRegions
which simplifies a lot of code, just don't look at GimpHeal until
it's completely ported ;)
2012-05-02 17:50:44 +02:00
39cca4aabd app: more GimpImageType -> Babl 2012-05-02 17:50:40 +02:00
8cd272bb80 Heal: Make HealTool work when brush is partially outside of layer
Fix for bug 568098 https://bugzilla.gnome.org/show_bug.cgi?id=568098
Removes condition for not applying heal when (destination)brush is partially outside of layer.
Instead heal is not applied when brush is completely outside.
2012-04-24 22:21:25 +03:00
2920344524 app: Prevent uninitialized values in the heal tool.
Previously, the black checkers of the left hand edge of the solution
matrix were not being assigned a value.
2012-04-24 22:08:44 +03:00
f92df81a47 Bug 630028 - Improvement of the healing tool
Apply patch from Jean-Yves Couleaud that replaces the heal algorithm
with one that actually works. After trying some images, I don't just
consider this an "improvement" any longer, the old code was obviously
broken, or an early prototype, or whatever.
2011-10-17 21:47:01 +02:00
21b8007b29 app: add GimpBrushCache which stores brush stuff based on transform parameters
such as masks and outlines. The cache is currently very stupid and
only cacheds the last transformed object. Add caches to GimpBrush for
its mask, its pixmap and its boundary, and remove the same caches and
a ton of members from GimpBrushCore. This involves adding lots of
const qualifiers because GimpBrush returns const pointers now for
trasnformed stuff.
2011-04-05 22:15:30 +02:00
e3c0a4e549 app: move all GimpDynamics members to private 2011-03-03 18:43:56 +01:00
355f1bfd56 app: Fix tabs to spaces for dynamics 2009-12-19 17:36:27 +02:00
b95dda6eea app: Fix dynamics mixing for inputs&outputs that have paint options toggles 2009-12-18 20:51:23 +02:00
0c81d491fb Change coords in GimpDynamicsOutput from call-by-value to "const GimpCoords*" 2009-10-27 14:30:20 +01:00
210a4b5044 Merge resolution 2009-10-17 21:42:02 +03:00
f7ff0903ff Fix a width/height confusion in the healing tool algorithm
As pointed out by Massimo Valentini in bug #519503, the code used
height where width should have been used. Correct.
2009-10-16 22:06:34 +02:00
8394a3db68 Handle dynamic opacity in GimpSourceCore for all its subclasses 2009-10-13 21:02:10 +02:00
77faffe4b7 Rename the output members of GimpDynamics from foo_dynamics to foo_output 2009-10-12 14:45:12 +02:00
dab5f9e691 Rename all GimpDynamicsOutput functions to gimp_dynamics_output_foo() 2009-10-11 15:54:59 +02:00
330d406acc Move dynamics includes to the .c files where they belong 2009-10-11 15:41:54 +02:00
3a041ad252 Lots of improvements on dynamics 2009-10-03 18:53:25 +03:00
4aa3d3f7b0 Build fixes to the dynamics branch. it now builds. 2009-07-21 22:27:29 +03:00
96baac783f Fade dynamics. Add fade as one more dynamics driving factor on GUI. Implement fading dynamics calculation. Let fade work with all driven factors. Add pixel_dist parameter to get_dynamic_x. Adjusted function calls for get_dynamic_x.
* app/paint/gimppaintoptions.c: Add initialization for fading dynamics. Add fading related variables similar to Random. Adjust get_dynamics_mix function. Add fading calculation in get_dynamics_x functions. Adjust get_dynamic_x functions for fade dynamics.

	* app/paint/gimppaintoptions.h: Add fading_options in GimpDynamicOptions.

	* app/tools/gimppaintoptions-gui.c: Add the function fading_options_gui.

	* app/paint/gimpclone.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimpsmudge.c
	* app/paint/gimpairbrush.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpconvolve.c: Adjust function calls. get_dynamic_opacity function calls were adjusted to have one more parameter, paint_core->pixel_dist.

some key words:
get_dynamic_
pixel_dist
paint_core->pixel_dist
2009-07-11 15:45:54 -03:00
cee39b090f Add more GimpCoords* parameters to reduce usage of global paint_core states
Add GimpCoords* to GimpPaintCore::get_paint_area(),
gimp_brush_core_paste_canvas(), gimp_brush_core_replace_canvas(),
gimp_brush_core_get_brush_mask(), gimp_brush_core_color_area_with_pixmap()
and change callers accordingly.
2009-05-17 22:45:06 +02:00