Øyvind Kolås
c993adf91e
app: remove a trampoline in layer/paint mode dispatch
...
Fully removes one trampoline level and passing fewer args through the remaining
trampoline.
2017-01-21 14:10:03 +01:00
Michael Natterer
a1b844897c
app: make GimpPaintOptions' "use-applicator" default to FALSE again
2017-01-21 00:29:41 +01:00
Michael Natterer
485094b9da
app: fix painting with the new layer mode code
...
by creating temp buffers matching the format needed by the
GimpLayerMode's process_pixels() function.
2017-01-21 00:27:48 +01:00
Michael Natterer
2acd2fe74c
app: do_layer_blend(): pass the right blend/composite parameters
...
based on the used GimpLayerMode.
2017-01-21 00:02:22 +01:00
Øyvind Kolås
e9d72ef2a8
app: finish GimpLayerColorSpace rename
2017-01-19 19:22:40 +00:00
Michael Natterer
349cff8c16
app: remove "gboolean linear" from gimp_get_layer_mode_function()
...
and get rid of the two process_pixels() functions in the LCH modes,
they always take linear now.
2017-01-19 18:43:31 +01:00
Øyvind Kolås
41fff6990e
app: make layer modes more configurable
...
Implement a common utility function gimp_blend_composite that uses utility
functions for implementing layer modes, with separate (possibly SIMD) optimized
loops for blending and compositing, with configured linear TRC, perceptual
gamma TRC or even using CIE Lab as the space.
2017-01-19 01:04:15 +01:00
Michael Natterer
1262370544
app: remove "gboolean linear" parameters
...
from gimp_applicator_new() and gimp_gegl_mode_node_set_mode().
Compositing doesn't depend on the layer format any longer, only on the
layer mode. Painting with "use applicator" unchecked is still broken
in some cases and needs more fixing.
2017-01-18 00:15:55 +01:00
Michael Natterer
69c4644e15
app: rename GimpLayerModeFunction to GimpLayerModeFunc
...
like all other function typedefs and add GimpBlendFunc typedef which
will be needed soon. Also rename get_layer_mode_function() to
gimp_get_layer_mode_function().
2017-01-16 22:44:01 +01:00
Øyvind Kolås
0bc45c8cd0
app: default to use gegl applicator in paint tools
...
Temporarily slower - but permits paint modes like overlay/softlight to work at
all for linear TRC pixel encodings. Should be reverted when the non-graph
approach works properly again.
2017-01-12 18:55:38 +01:00
Michael Natterer
77f9659c98
app: move gimplayermodefunctions.[ch] to layer-modes/
2017-01-11 14:58:43 +01:00
Michael Natterer
66060e3307
app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
...
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Michael Natterer
350c6ca1f7
Bug 775134 - mypaint-brush: Saved color in a brush isn't taken into account
...
gimp_mybrush_core_create_brushes(): don't set the current FG or BG on
the brush if its RESTORE_COLOR setting is 1.0 (TRUE).
2016-12-11 19:39:33 +01:00
Alexia Death
43681a6d4c
app: flush blur cache and other caches when invalid
2016-11-29 21:25:25 +02:00
Alexia Death
0c04275a32
app: cache bitmap brushes expensive hardness and disable dynamic change
2016-11-26 19:11:26 +02:00
Jehan
4a0653e12d
Bug 773960 - smudge tool not working in tiling symmetry.
...
Initialization was failing when a paint buffer could not be returned for
a stroke (which was bound to happen in tiling). Instead it must just
ignore the coordinates which won't result in painting, and continue to
the next ones.
2016-11-06 17:14:55 +01:00
Michael Natterer
184f0929ce
Bug 771678 - Parametric Brush Aspect Ratio and Angle values...
...
...are not submitted to respective Tool Options sliders
Treat brush angle and aspect ratio like all other paint options values
that can be linked to brush defaults and take their default values
from the brush. They were special casing their defaults to constants,
and GimpBrushGenerated was adding the passed dynamic radius and aspect
values to its own. This was totally incomprehensible.
Now GimpBrushGenerated's transform_size() and transform_mask()
implementations just translate between these APIs value ranges and the
brush's own value range and only use the passed values (not the
brush's native values), which makes the editor <-> tool options
interaction and the painted brush shape predictable.
Also connect the active brush's property notifications to the paint
options properties, so the paint options follow a brush edit live if
the respective "linked" toggles are checked.
And some cleanup.
2016-10-12 00:21:12 +02:00
Michael Natterer
f40e36ffab
Bug 770171 - Mypaint eraser won't work unless there is an alpha channel
...
In eraser mode, paint with the background color on layers without alpha.
2016-09-03 15:48:02 +02:00
Michael Natterer
73c664ec97
app: fix code duplication in GimpMybrushCore, and clean up coding style
...
Also fixes a case where converting to the color managed image color
via gimp_pickable_srgb_to_image_color() was forgotten.
2016-08-20 23:46:23 +02:00
Michael Natterer
4fefc3817c
Bug 766988 - Colors applied to images are not color managed
...
Color manage colors applied when painting, and when filling, merging,
resizing and transforming drawables.
2016-05-29 17:51:06 +02:00
Michael Natterer
5080da50e6
app: move the undo impl object typedefs out of the *-types.h files
...
They are completely private to the undo system and don't need to
be used anywhere else. Removes some clutter from the typed headers.
2016-05-20 18:29:13 +02:00
Michael Natterer
265dfec525
app: split GimpApplicator's opacity and mode API into two functions
...
Added gimp_applicator_set_opacity() and remove the opacity argument
from set_mode().
2016-05-18 01:51:09 +02:00
Michael Natterer
4110840382
app: the range of GimpInkOption's and GimpBlobEditor's angle is [-PI..PI]
...
not [-90..90]. This will warn on startup for saved values which are
now out-of-range, but only until the tool options got saved again.
2016-03-21 10:37:56 +01:00
Michael Natterer
d588bff8be
Bug 763547 - GIMP git segfaults on exit when the airbrush tool is active
...
Fix GimpAirbrush to not keep a GimpSymmetry instance around across
paint strokes. The symmetry refs its drawable but lacks the code of
dropping the reference when the drawable is removed from the image, or
the image is closed.
Also cleaned up gimp_airbrush_paint() a bit.
2016-03-13 13:15:19 +01:00
Michael Natterer
ed821c8184
app: formatting cleanup in gimppaintbrush.c
2016-03-13 13:15:19 +01:00
Michael Natterer
a0b18c7929
app: make GimpApplicator's preview feature optional
...
Don't add the preview nodes if use_preview_cache is FALSE in
gimp_applicator_new().
2016-02-16 21:36:35 +01:00
Michael Natterer
e5b6806fe2
app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
...
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880 .
2016-02-11 23:46:24 +01:00
Michael Natterer
02f76b4c7b
app: rename GimpImage.selected_symmetry to .active_symmetry
...
because that's the usual naming. Also change the set/get API accordingly.
2016-02-03 21:25:17 +01:00
Jehan
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
Daniel Sabo
71e8ef6103
app: mypaint: Honor selection mask
2016-01-27 08:47:26 -08:00
Mukund Sivaraman
e14c1a0156
Use GQueue for strokes list
2016-01-25 10:56:15 +05:30
Jehan
2cf381d211
app: fix typos in comment.
2016-01-20 21:30:55 +01:00
Michael Natterer
dd171bbf0c
Bug 760175 - paintbrush size not applied in python scripts in version 2.9
...
Remove the code that links size, spacing etc. to brush defaults from
the GimpPaintOptions class impl and add it to gimppaintoptions-gui.c
as a callback instead.
It's not a core thing and that magic with side effects should only be
applied to the GimpPaintOptions behind the tool options GUI.
2016-01-06 01:24:56 +01:00
Daniel Sabo
78cdbdb794
app: mypaint: Remove inaccurate comment
2015-12-30 08:21:30 -08:00
Daniel Sabo
dd0b253fea
app: mypaint: Add some hacky code to allow line drawing
2015-12-29 14:30:28 -08:00
Daniel Sabo
6d9aee3d73
app: mypaint: Remove another stray #if 0
2015-12-29 14:30:28 -08:00
Daniel Sabo
b48ac23690
app: mypaint: Remove #if 0'ed code for libmypaint-gegl
2015-12-29 09:56:38 -08:00
Michael Natterer
660a7aed16
app: formatting cleanup in the last commit
2015-12-29 17:08:51 +01:00
Alexia Death
53eb8677ea
app: Allow for mypaint tool to differentiate extended and non-extended events
...
This adds a boolean to GimpCoords struct that is true for enabled
extended non-mouse devices and false for all the rest allowing
the mypaint brush to override the the pressure sent to the paint library.
2015-12-29 15:44:53 +02:00
Michael Natterer
2e40af5dcf
app: remove virtual function GimpToolOptions::reset()
...
and use GimpConfig::reset() instead.
2015-12-29 12:47:04 +01:00
Daniel Sabo
eec556f614
app: mypaint: Use GimpConfig->reset instead of GimpToolOptions->reset
2015-12-28 17:07:45 -08:00
Daniel Sabo
d6b52b7f0c
app: mypaint: Fix missing chain up in gimp_mybrush_options_reset
2015-12-28 16:47:45 -08:00
Daniel Sabo
cba2f07854
app: mypaint: Make the reset-to-defaults button reset to the current myb's defaults
2015-12-28 16:02:36 -08:00
Daniel Sabo
677b1f2d82
app: mypaint: Add a toggle to change between erase & paint mode
2015-12-28 15:25:47 -08:00
Daniel Sabo
e0fc362b12
app: mypaint: Add colorize mode
2015-12-28 13:58:38 -08:00
Daniel Sabo
315972fea8
app: mypaint: Get rid of mixbuf, fix transparent pixel color when masking is active
2015-12-28 13:42:04 -08:00
Daniel Sabo
c97a529968
app: Change mypaint dependency from libmypaint-gegl to just libmypaint
2015-12-28 09:18:46 -08:00
Michael Natterer
d01ba07ed6
configure.ac, app: make libmypaint a hard dependency
...
and move the MyPaint brush tool out of the playground.
2015-12-21 21:39:48 +01:00
Michael Natterer
ccd8ec5dee
app: connect the MyPaint brush core with the new brush container
...
and remove all hackish temp code that did the same. Remove quite
some #ifdefs around code that doesn't depend on libmypaint.
2015-12-21 12:28:46 +01:00
Daniel Sabo
bf161e7b14
app: MyBrush: Improve blend math
2015-12-20 17:04:18 -08:00
Michael Natterer
d4aa39a7cd
app, libgimpwidgets, icons: rename mypaint brush icons and help ID
...
from "mybrush" to "mypaint brush".
2015-12-21 00:09:55 +01:00
Michael Natterer
c6586ec6e4
app: rename GimpMybrush to GimpMybrushCore
...
so GimpMybrush can be used for the actual brush object.
2015-12-20 01:03:56 +01:00
Daniel Sabo
812526f0f0
app: GimpMybrush: Don't treat time == 0 as a magic value
2015-12-19 15:27:44 -08:00
Daniel Sabo
df21e07855
app: Fix MyPaint brush rendering, implement MyPaintSurface in a native format
2015-12-15 14:48:18 -08:00
Jehan
bcbc83dc5a
app: replace some tabs with spaces in app/paint.
2015-12-15 23:45:18 +01:00
Michael Natterer
93fdaa0597
Bug 731279 - Tool Preset Editor not working correctly
...
This (doesn't quite) fix an obscure part of the tool preset bugs: when
changing the brush on a GimpPaintOptions instance, we might or might
not change the brush size, aspect etc. to the set brush's native
values, possibly overwriting the intended values from a tool preset.
Implement GimpConfig::copy() and copy the affected values again after
the entire object has been copied, so we actually use the value of
gimp_config_copy()'s "source" object.
This would fix that particular tool preset problem if there wasn't
another bug that is still unfixed, stay tuned...
2015-10-14 23:02:07 +02:00
Jehan
c7adff4f6f
Revert "app: save gradient first and last color with dynamics color output..."
...
This reverts commit 15b5b2c8b3
.
This feature is "undiscoverable" according to Mitch, and we are not sure
how much the endpoint colors are special to the user.
2015-10-08 19:33:07 +02:00
Jehan
15b5b2c8b3
app: save gradient first and last color with dynamics color output...
...
in the recently used colors palette.
2015-09-30 17:30:50 +02:00
Jehan
52f6a2aeb4
app: save color history when a color is used.
...
Now the history of recently used colors is not updated when selecting
in the color dialog anymore, but when a color is actually used.
Tools supported right now are: Ink, MyPaint brush, all PaintBrush tools,
bucket fill and eraser (background color on non-alpha drawables).
Moreover from now on, colors already saved are properly moved to first
position when reused.
2015-09-30 16:39:05 +02:00
Michael Natterer
22fc50c279
app: rename all values of enum GimpContextPropMask
...
from GIMP_CONTEXT_FOO_MASK to GIMP_CONTEXT_PROP_MASK_FOO.
Also rename the FIRST and LAST values of enum GimpContextPropType.
2015-09-08 21:18:49 +02:00
Michael Natterer
4479cedf13
app: rename mask enum values GIMP_COMPONENT_RED,GREEN,BLUE etc.
...
to GIMP_COMPONENT_MASK_RED,GREEN,BLUE etc.
2015-09-07 00:35:02 +02:00
Michael Natterer
db386eb361
app: fix selection mask offset in do_layer_blend()
...
Fixes painting when there is both a layer offset and a selection.
Offsets between offsets are hard...
2015-07-04 13:28:59 +02:00
Michael Natterer
5422646d91
Bug 750674 - Stroke selection doesn't honor brush size set in paint tool options
...
Implement GimpConfigInterface::duplicate() and after duplicating the
paint options, copy the brush-related properties again, because they
might have been changed by setting the brush on the copy (if they are
set to be linked to the brush's native values).
2015-06-14 20:43:45 +02:00
Thomas Manni
a7b84ded8e
Bug 325564 - Use CIE LCH instead of HSL for layer mode Color
...
Add Hue, Chroma, Color and Lightness layer modes in LCH color space.
2015-06-02 01:37:26 +02:00
Michael Natterer
9f9865afb8
app: fix the build with MyPaint brushes enabled, and some formatting foo
2015-05-25 02:15:03 +02:00
Øyvind Kolås
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
Michael Natterer
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
Michael Natterer
ca07026642
app: simplify handling of the force output in paint methods
2015-04-19 21:27:48 +02:00
Jehan
5217900748
configure/app: libmypaint becomes an optional dependency.
2015-03-30 22:38:35 +02:00
Jehan
5460c414db
app: move the MyPaint brush into the playground.
2015-03-30 22:38:35 +02:00
Jehan
77b04551c8
app: clean compilation with external libmypaint.
...
The work-in-progress was using a source tree of libmypaint embedded
into GIMP tree. This is a cleaning with pkg-config test in configure,
and correct includes.
2015-03-30 22:38:35 +02:00
Michael Natterer
9629befec6
app: make a copy of the drawable's buffer in MyPaint native format
2015-03-30 22:38:34 +02:00
Michael Natterer
071ede915a
app: first draft of GimpMybrushTool, which uses MyPaint brushes
2015-03-30 22:38:34 +02:00
Michael Natterer
a75a479d81
app: #include "core/gimpdynamicsoutput.c" in some files in paint/
2015-02-15 20:05:30 +01:00
Alexia Death
ace4234a98
app: make all tools capable of dynamic force respect the options slider
2015-01-19 10:55:56 +02:00
Alexia Death
b0dbb2edf2
Bug 741200 - paint options spacing differs from brush spacing
...
Add "link" buttons to the tool options that are duplicates of brush
properties, so the tool options values can be set to change along with
the current brush.
2015-01-11 23:20:31 +01:00
Michael Natterer
a101ed2aef
app, pdb: change range of brush-spacing to 0.01..5.0
...
And only use percent in the GUI.
2014-11-17 23:56:16 +01:00
Michael Natterer
7c2e226566
app: simplify logic in gimp_paint_options_get_brush_mode()
2014-11-17 23:35:10 +01:00
Michael Natterer
548df1fa32
app: change brush-hardness and brush-force range to [0.0..1.0]
...
and set a factor of 100 on the GUI.
2014-11-17 23:17:13 +01:00
Michael Natterer
c9e75b1fa0
app: some cleanup in the new paint options code
2014-11-17 21:45:01 +01:00
Alexia Death
2a7dbbd438
app: fix force slider dynamics interacttion to just dynamics when activated
2014-11-17 17:05:54 +02:00
Alexia Death
d0862180c4
app: fix force default handling
2014-11-17 15:40:33 +02:00
Alexia Death
32e545277b
app: fixes for force and hardness
2014-11-17 15:24:59 +02:00
Alexia Death
4421070a6a
app: add explicit paint options sliders for hardness and force
2014-11-17 13:13:18 +02:00
Alexia Death
6ef522b38b
app: fix spacing to copy between paint tools
2014-11-17 00:03:15 +02:00
Alexia Death
9a953a9239
app: locking brush size to zoom
2014-11-17 00:03:10 +02:00
Alexia Death
7f6cdf635a
Revert "app: apply a cap on brush scaling"
...
This reverts commit 5a22fb5799
.
2014-11-15 22:25:59 +02:00
Alexia Death
5a22fb5799
app: apply a cap on brush scaling
2014-11-15 21:56:51 +02:00
Michael Natterer
9f492273cb
Revert "app: reorder spacing after size in the new spacing override code/ui"
...
This reverts commit 492e1ab560
,
but keeps the code cleanups, and adds some more.
2014-11-13 00:37:19 +01:00
Michael Natterer
492e1ab560
app: reorder spacing after size in the new spacing override code/ui
2014-11-12 23:55:46 +01:00
Alexia Death
0c6848e79e
app: make spacing override part of paint options
2014-11-13 00:08:40 +02:00
Alexia Death
69e09e0775
app: whitespace fix
2014-11-13 00:08:38 +02:00
Michael Natterer
5d8824f42e
app: move all GimpBrush members to a private struct
...
Add and use accessors for width, height, x_axis and y_axis.
2014-10-12 01:16:32 +02:00
Simon Budig
9a8d2f577e
fix some pieces of nonsensical code
...
Spotted by Andrey Karpov using static code analysis:
http://www.viva64.com/en/b/0273/
2014-08-16 00:37:13 +02:00
Michael Natterer
b5530e9e3d
Use the new GeglAccessMode enum instead of the old values
2014-07-02 02:00:35 +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
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
a4223766f2
all,libgimp*: move GimpConvolveType and GimpInkBlobType to libgimpbase
...
and make GimpConvolveType's values sane.
2014-04-29 22:44:58 +02:00
Michael Natterer
5a89c15ba1
app: remove unused enum value GIMP_CUSTOM_CONVOLVE
2014-04-29 21:06:42 +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
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
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
Massimo Valentini
b81641e25f
app: fix two typos
2013-11-28 19:44:45 +01: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
125cf2a2a3
app: use the image instead of the projection for accessing a pickable
2013-09-13 23:29:06 +02:00
Michael Natterer
d1795ac204
Bug 700193 - undoing paint tools doesn't update last_coords properly
...
paint_core->start_coords is in fact the last stroke's endpoint and
only used for storing it in GimpPaintCoreUndo, so the last endpoint
can be resotred for straight-line painting after an undo. Make the
code actually doing that.
2013-07-15 00:41:43 +02:00
Michael Muré
c2da46d810
app: adapt to the transform ops API change in GEGL
2013-06-06 19:58:48 +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
741792875e
app: add the GimpApplicator back for painting, but make its use optional
...
Default to using the new code. This is out of pure curiosity how
GEGL changes affect painting with a purely graph-based method.
2013-05-21 18:55:03 +02:00
Daniel Sabo
cd91144f9e
Faster paintcore
...
Directly access the brush and paint buffers rather than using
GEGL iterators.
Replicate the relevant parts of GimpApplicator using direct
access.
2013-05-21 04:03:28 -07:00
Loren Merritt
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
Michael Natterer
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
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
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
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
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
Loren Merritt
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
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
Téo Mazars
afa57a507c
Bug 641951 - Weird spacing with flat brushes
...
Take brush orientation into account when computing distances in the
coordinate space of the brush.
2013-03-23 18:23:18 +01:00
Michael Natterer
cc6d3bb1eb
app: use gegl_node_blit() instead of GeglProcessor in GimpPerspectiveClone
...
the speedup is hardly measurable, but why not get rid of some overhead
anyway.
2013-03-07 22:15:29 +01:00
Ville Skyttä
6b0d1038cc
Bug 692641 - Various spelling fixes
2013-01-27 18:59:02 +01:00
Michael Natterer
0cfdf38726
app: port heal to RGBA float
2012-12-08 22:41:33 +01:00
Michael Natterer
084ba8f84f
app: port smudge blending to RGBA float
2012-12-08 22:16:05 +01:00
Daniel Sabo
4c7dc6a494
app: cache values to speed up GEGL paintbrush
...
Cache values in GimpApplicator to avoid the overhead of gegl_node_set().
Don't reallocate paint_core->paint_buffer if it's already the correct size.
2012-12-08 19:54:24 +01:00
Michael Natterer
908f727f0a
Chain up unconditionally in GObject::constructed()
...
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer
406c71ae9a
Bug 533590 - Perspective clone of a pattern doesn't apply perspective
...
Fix pattern cloning by adding gegl:tile and gegl:crop. There is
still some glitch that seems to limit the cloning to 3x3 patterns.
2012-11-10 20:49:14 +01:00
Michael Natterer
66bd90c9f2
Bug 533590 - Perspective clone of a pattern doesn't apply perspective
...
Implement perspective cloning from a pattern. This needed quite some
refactoring, so GimpSourceCore would be able call its get_source()
vfunc also for a GimpClone subclass: essentially this commit adds a
new GimpSourceCore::use_source() vfunc that replaces the
source_options->use_source flag hack, and makes sure the graph used in
GimpPerspectiveClone's get_source() impl reads from the pattern
instead the drawable.
This version does not properly tile the pattern yet, so you can only
clone one copy of the pattern (gegl:tile is not quite doing the right
thing, so it's disabled).
2012-11-01 21:39:14 +01:00
Michael Natterer
eb89a545d5
app: move core/gimp-apply-operation.[ch] to gegl/gimp-gegl-apply-operation.[ch]
2012-10-22 16:03:40 +02:00
Michael Natterer
957a4ba2f6
app: port gimp_brush_core_color_area_with_pixmap() to "RGBA float" too
...
forgetting this one made pixmap brush painting look really funny.
2012-09-26 11:29:28 +02:00
Michael Natterer
a5953020ad
app: keep GimpBrushCore's solid mask cache around as "Y float"
...
because that's how we later access it.
2012-09-23 00:01:35 +02:00
Michael Natterer
eb2f638e7d
app: create the paint tools' paint_buffer as RGBA float
...
instead of the drawable's native format plus alpha, because we access
these buffers as RGBA float later.
2012-09-21 10:51:23 +02:00
Michael Natterer
e8937b2f51
app: port GimpInk mask painting from guchar to float
2012-09-19 00:07:32 +02:00
Michael Natterer
930832d542
app: keep GimpPaintCore->canvas_buffer around as "Y float"
...
instead of "Y u8" because all operations on it are using float.
2012-09-19 00:06:35 +02:00
Michael Natterer
bef35224b3
app: small cleanup in gimp_paint_core_start()
2012-06-11 12:39:42 +02:00
Michael Natterer
e254fd7c4d
app: actually commit the rest of the patch...
2012-05-26 12:42:52 +02:00
Michael Natterer
6a7173074d
app: gimp_gegl_convolve() needs a linear buffer or it will horribly fail
2012-05-23 22:41:14 +02:00
Michael Natterer
1d043b7d4c
app: don't include pixel-region.h in gimpsmudge.h
2012-05-21 01:14:39 +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
198a2f0a51
Bug 675976 - GimpOperationEraseMode doesn't work on layers without alpha
...
Don't try to "fix" GimpOperationEraseMode because it's not broken. Instead
simply "erase" non-alpha layers with NORMAL mode and the background color.
2012-05-20 17:14:09 +02:00
Michael Natterer
5247f461aa
app: remove paint-funcs-types.h
2012-05-19 01:13:21 +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
1a624d4df4
app: remove many includes of "gegl/gimp-gegl-utils.h"
2012-05-10 23:12:39 +02:00
Michael Henning
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
Michael Natterer
f8716b3949
app: use a native GeglBuffer in gimp_convolve_motion(), and don't leak it
2012-05-07 02:48:11 +02:00
Michael Natterer
47c495a8f9
app: don't leak all buffers in gimp_brush_core_replace_canvas()
2012-05-07 02:47:39 +02:00
Michael Natterer
5738c866a1
app: rename gimp_gegl_combine_mask() to gimp_gegl_combine_mask_weird()
...
because it is.
2012-05-06 22:51:11 +02:00
Michael Natterer
3ad73b3658
libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
...
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer
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
Michael Natterer
46ce18f994
app: don't disable perspective clone on indexed drawables any longer
2012-05-02 17:51:19 +02:00
Michael Natterer
f857f1f53f
app: fold the foo_to_bar_buffer() functions into their callers
...
They contained a single function call now.
2012-05-02 17:51:12 +02:00
Michael Natterer
4772d3e832
app: add gimp_gegl_combine_mask() and use it in GimpPaintCore
2012-05-02 17:51:12 +02:00
Michael Natterer
c07790fa54
app: add gimp_gegl_apply_mask() and use it in GimpPaintCore
2012-05-02 17:51:12 +02:00
Michael Natterer
1bbd3d40a8
app: make the GimpTempBuf struct private and add accessors
2012-05-02 17:51:12 +02:00
Michael Natterer
a016b8102b
app: change the maskPR in gimp_drawable_replace_buffer() to GeglBuffer
2012-05-02 17:51:12 +02:00
Michael Natterer
a295589157
app: enable blur/sharpen via GimpConvolve on indexed drawables
2012-05-02 17:51:12 +02:00
Michael Natterer
5273a6dbab
app: the paint_mask buffer in gimp_paint_core_replace() contains a GimpTempBuf
...
not a TileManager, so use the right API to get a PixelRegion on it.
2012-05-02 17:51:12 +02:00
Michael Natterer
028d492937
app: GimpBrushCore: hardode one less brush mask format
2012-05-02 17:51:11 +02:00
Michael Natterer
a15056095b
app: enable GimpDodgeBurn on indexed drawables
2012-05-02 17:51:11 +02:00
Michael Natterer
678255604d
app: add a GimpPrecision enum that for now contains GIMP_PRECISION_U8
...
Add gimp_image_get_precision(), and a "precision" argument to
gimp_babl_format(). Change code accordingly and do some more format
related cleanups.
2012-05-02 17:51:09 +02:00
Michael Natterer
3af70584d0
app: remove bpp <-> format conversion stuff from gimp-gegl-utils.[ch]
...
Fix stuff by picking formats as we get data from the "outside", like a
GdkPixbuf, and pass around more proper formats from where we know them.
2012-05-02 17:51:08 +02:00
Michael Natterer
793bebe2d3
app: enable smudge on indexed images
2012-05-02 17:51:06 +02:00
Michael Natterer
c3ceb8698d
app: add gimp_gegl_smudge_blend(), a brute-force port of blend_region()
...
and use it in GimpSmudge. This only to get functionality ported and
the API done, and not the final state.
2012-05-02 17:51:05 +02:00
Michael Natterer
9a4d84e683
app: port gimp_brush_core_color_area_with_pixmap() to GeglBufferIterator
...
This can be simplified, needs revisiting.
2012-05-02 17:51:03 +02:00
Michael Natterer
95cb77edc9
app: change gimp_image_get_format() to take a base_type and a with_alpha boolean
...
which kills almost all remaining use of GimpImageType.
2012-05-02 17:51:03 +02:00
Michael Natterer
685a48d59a
app: move gimp_gegl_buffer_get_temp_buf() to gimptempbuf.[ch]
2012-05-02 17:51:02 +02:00
Øyvind Kolås
25030ce6c4
app: no need to clear newly created buffers
...
Freshly created GeglBuffers, that are native GeglBuffers are already sparse
and all tiles are implicit COW empty tiles.
2012-05-02 17:51:01 +02:00
Michael Natterer
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
Michael Natterer
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
Michael Natterer
d5d8e36d21
app: gimp_-namespace all GimpTempBuf functions
2012-05-02 17:51:00 +02:00
Michael Natterer
42a5f01be3
app: rename TempBuf to GimpTempBuf
2012-05-02 17:51:00 +02:00
Michael Natterer
7441a1f6f7
app: turn the TempBuf's "bytes" into "format" and port everything to it
2012-05-02 17:50:59 +02:00
Michael Natterer
ff86f85744
app: remove x, y and color parameters from temp_buf_new()
...
Fix the places that passed the color by either temp_buf_data_clear()
or memset(), and assign x and y manually, they are going to vanish
completely soon.
2012-05-02 17:50:58 +02:00
Michael Natterer
0e9581b956
app: pass the paint area's coords to gimp_brush_core_color_area_with_pixmap()
...
They are no longer stored in the paint area TempBuf.
2012-05-02 17:50:58 +02:00
Michael Natterer
36fb008197
app: port GimpPaintCore's paste and replase APIs to GeglBuffer
2012-05-02 17:50:54 +02:00
Michael Natterer
f07f01664e
app: heal the paint_buffer directly, without an intermediate copy
2012-05-02 17:50:54 +02:00
Michael Natterer
1c60024250
app: port GimpHeal to GEGL, using insane buffer casting tricks
2012-05-02 17:50:53 +02:00
Michael Natterer
441120b6b5
app: use gimp_gegl_dodgeburn() in GimpDodgeBurn
2012-05-02 17:50:53 +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
a76f44a9de
app: port GimpConvolve to gimp_gegl_convolve()
2012-05-02 17:50:52 +02:00
Michael Natterer
49dcc3d78a
app: remove obsolete include
2012-05-02 17:50:51 +02:00
Michael Natterer
c0fdfbd226
app: port GimpInk blob rendering to GeglBufferIterator
2012-05-02 17:50:51 +02:00
Michael Natterer
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
Michael Natterer
7b5252ac54
app: replace GimpPaintCore::get_paint_area() by ::get_paint_buffer()
...
and remove the public TempBuf based get_paint_area() API.
2012-05-02 17:50:51 +02:00
Michael Natterer
b4996f2605
app: port GimpSourceCore and its classes to painting to the paint_buffer
2012-05-02 17:50:51 +02:00
Michael Natterer
0c8cf5ef73
app: more GEGL in gimp_smudge_motion()
2012-05-02 17:50:50 +02:00
Michael Natterer
60ae55f87b
app: don't return bogus paint buffers if get_paint_area() returned NULL
2012-05-02 17:50:50 +02:00
Michael Natterer
70c6885e7e
app: replace GimpSmudge's accum buffer by a TempBuf
2012-05-02 17:50:50 +02:00
Michael Natterer
4455d3e75d
app: more GEGL in gimp_smudge_start()
2012-05-02 17:50:49 +02:00
Michael Natterer
1037c7e88b
app: more GEGL in GimpDodgeBurn, still uses gimp_lut_process()
2012-05-02 17:50:49 +02:00
Michael Natterer
0da63f9526
app: port GimpConvolve to GEGL apart from the call to convolve_region()
2012-05-02 17:50:49 +02:00
Michael Natterer
db0eb0f77c
app: paint ink's color into the paint_buffer not the paint_area
2012-05-02 17:50:47 +02:00
Michael Natterer
9ac79ddc9c
app: port paintbrush and eraser to paint to GEGL buffers
2012-05-02 17:50:47 +02:00
Michael Natterer
12ac0bea13
app: add gimp_paint_core_get_paint_buffer()
...
which is the same as gimp_paint_core_get_paint_area() but returns a
GeglBuffer to paint to, not a TempBuf.
2012-05-02 17:50:47 +02:00
Michael Natterer
ab29daf758
app: remove unneeded includes from gimpairbush.c
2012-05-02 17:50:47 +02:00
Michael Natterer
1dbadb772d
app: rename GimpPaintCore->canvas_buf to ->paint_area
...
because that's what it's called in public API. This has confused me
long enough now.
2012-05-02 17:50:46 +02:00
Michael Natterer
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
Michael Natterer
2957795372
app: add gimp_gegl_node_set_matrix() and use it instead of manual fiddling
2012-05-02 17:50:46 +02:00
Michael Natterer
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
Michael Natterer
77c34a835b
app: pattern-clone using gegl_buffer_set_pattern()
...
instead of tons and tons of legacy code.
2012-05-02 17:50:45 +02:00