Commit Graph

1209 Commits

Author SHA1 Message Date
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
Michael Natterer 7da52eb917 app: keep the transform graph around during one paint stroke 2012-05-02 17:50:45 +02:00
Michael Natterer 93864e3082 app: remove legacy includes 2012-05-02 17:50:45 +02:00
Michael Natterer 7c2c671703 app: make gimp_paint_core_get_orig_image,proj() return GeglBuffers
and change their users accordingly, getting rid of temp buffers and
useless copies.
2012-05-02 17:50:44 +02:00
Michael Natterer 2c4a59c1e5 app: fix buffer copying offsets in gimp_clone_motion()
so it works again at the image's borders.
2012-05-02 17:50:44 +02:00
Michael Natterer 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
Michael Natterer eb2e658408 app: replace GimpPaintCore->canvas_buf by a GeglBuffer 2012-05-02 17:50:43 +02:00
Michael Natterer c9d0386e0c app: replace GimpPaintCore->saved_proj_tiles by a GeglBuffer 2012-05-02 17:50:43 +02:00
Michael Natterer 50d7242b87 app: remove gimp_image_transform_rgb()
and use gimp_rgba_get_pixel() instead.
2012-05-02 17:50:43 +02:00
Michael Natterer 7f437d7d53 app: remove gimp_image_get_foreground,background()
and use gimp_context_get_foreground,background_pixel() instead.
2012-05-02 17:50:43 +02:00
Michael Natterer 2a853cd1ee app: remove GimpPickable::get_bytes() 2012-05-02 17:50:42 +02:00
Michael Natterer f4a4aa2133 app: use a GEGL graph for perspective clone's transform
Horribly slow, but seems to work.
2012-05-02 17:50:41 +02:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer 39cca4aabd app: more GimpImageType -> Babl 2012-05-02 17:50:40 +02:00
Øyvind Kolås ee97c1f4ff app: correct usage of babl formats
GIMP was doing evil hacks lying to GEGL about it's pixels being in a linear
color space when they are not. This causes incorrect rendering, makes gaussian
blur misbehave etc.

The legacy projection modes should be implemented using the same 2.2 gamma
formats that are correct to specify for sRGB data. (for proper color
management in higher bitdepths; icc backend babl formats should be used.)

For the old image modes correct babl formats are:

R'G'B'A u8  -  8 bit RGB with 2.2 gamma (sRGB) with linear alpha component
R'G'B' u8   -  8 bit RGB with 2.2 gamma (sRGB)
Y'A u8      -  8 bit Grayscale with 2.2 gamma with linear alpha component
Y' u8       -  8 bit Grayscale with 2.2 gamma

Y u8        -  8 bit linear data, used for masks/channels
A u8        -  8 bit linear alpha

-----------------------------------------------

RGBA float  -     32bit floating point linear light RGB
RaGaBaA float  -  32bit floating point linear light RGB, premultiplied alpha
                  to be used for processing that needs to scale by the alpha,
                  (blurs, resampling etc)
R'G'B'A float  -  32bit floating point sRGB with gamma, to be used where
                  the result depends on being closer to perceptual when
                  processing, can be used a cheaper alternative to CIE Lab
                  based modes.

-----------------------------------------------

The legacy layer modes should use the formats with gamma 2.2 only for loading
and rendering legacy XCF files correctly, in the brave new world compositing
should most likely be done in linear light with "RGBA float" and even better
"RaGaBaA float" like GEGL does for porter duff and other compositing modes.

The ability to chose the legacy layer modes should probably be hidden from the
user unless an old .xcf has been opened.
2012-05-02 17:50:38 +02:00
Michael Natterer 7223af17a2 app: completely port GimpDrawable::apply_region()'s API to GeglBuffer
and pass lots of coords that were hidden inside PixelRegions
explicitly.
2012-05-02 17:46:12 +02:00
Michael Natterer 061e044e0a app: change GimpDrawable::replace_region() by ::replace_buffer() 2012-05-02 17:46:12 +02:00
Michael Natterer 3bb973f24b app: pass the right undo buffer and extents to gimp_drawable_push_undo()
the coords need to be in drawable bounds now that we got rid of the
weird sparse logic.
2012-05-02 17:46:11 +02:00
Michael Natterer 4bcddb04a2 app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer 2012-05-02 17:46:11 +02:00
Michael Natterer ca734f91b7 app: port gimp_paint_core_paste() to gimp_drawable_apply_buffer()
using the new TempBuf-GeglBuffer.
2012-05-02 17:46:11 +02:00
Michael Natterer 6c59c45612 app: replace GimpPaintCore's undo_tiles by a GeglBuffer
and simply use a dumb straight copy of the drawable, it's GEGL's job
to do proper COW.
2012-05-02 17:46:10 +02:00
Michael Natterer a0c1007b66 app: port GimpDrawableUndo, GimpDrawable::push_undo() and ::swap_tiles()
which gets rid of the manual implementation of sparse undo buffers,
but GEGL will take care of proper COW here soo enough.
2012-05-02 17:46:08 +02:00
Michael Natterer 69c52173fb app: change gimp_gegl_color_set_rgba() to gimp_gegl_color_new()
which saves one line of code in every single use case.
2012-05-02 17:46:03 +02:00
Michael Natterer 14b381756b app: fill the smudge accum buffer with GEGL 2012-05-02 17:46:02 +02:00
Michael Natterer 2c62644f94 app: BoundSeg -> GimpBoundSeg, boundary_foo() -> gimp_boundary_foo() 2012-05-02 17:46:02 +02:00
Michael Natterer 9323c2f28c app: move base/boundary.[ch] to core/gimpboundary.[ch]
No other changes yet, just make the move build.
2012-05-02 17:46:02 +02:00
Michael Natterer 0810bd2e44 app: make gimp_image_transform_rgb() transform the alpha too
and remove explicit alpha setting in the returned array in most places.
2012-05-02 17:46:00 +02:00
Michael Natterer 9a09d3a762 app: drop "babl" from gimp_foo_get_babl_format[_with_alpha]() 2012-05-02 17:45:58 +02:00
Michael Natterer 6708baa128 app: use Babl to convert colors in gimp_clone_motion() 2012-05-02 17:45:58 +02:00
Michael Natterer 92a3187571 app: optimize gimp_brush_core_paint_line_pixmap_mask() a lot
by using one single call to babl_process() for one line if the pixmap.
2012-05-02 17:45:58 +02:00
Michael Natterer 57ed75eca4 app: use Babl in gimp_brush_core_paint_line_pixmap_mask()
to convert the brush pixmap's colors. This code still needs some
love...
2012-05-02 17:45:57 +02:00
Michael Natterer dc8d6a3977 app: use gimp_image_transform_rgb() instead of transform_color()
instead of fiddling with gimp_rgb_get_uchar() manually.
2012-05-02 17:45:52 +02:00
Enrico Schröder 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
Michael Henning 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
Nils Philippsen ff6c2807be app: add a little more headroom to the smudge buffer
This fixes crashes when smudging with sizes <= 1.4, filed against Fedora
(rhbz#810850).
2012-04-11 19:04:58 +02:00
Michael Natterer b952f80be0 Bug 658477 - add PDB support for more paint and ink options
Apply heavily modified patch from Es Swartz which adds PDB API for
brush size, angle and aspect ratio, as well as a full interface for
ink. Changed to patch to add all procedures to the "context" group
instead of creating new PDB groups, properly use the new
GimpPDBContext APIs for paint options, and did some general cleanup.
(Warning, completely untested).
2012-03-01 12:58:26 +01:00
Michael Natterer 0e6b703794 app: remove unused typedef GimpDynamicsOptions 2012-02-11 18:12:42 +01:00
Alexia Death f0a7d04cfa app: Fix a segfault in paint core 2012-02-09 21:59:25 +02:00
Massimo Valentini 39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Alexia Death 41b00e2e6b app: Make palette part of paint tools context mask 2012-02-06 21:57:20 +02:00
Michael Natterer dcc9eabbd5 app: formatting fixes in GimpSmudge 2012-01-29 16:59:22 +01:00
Alexia Death 06f99b7402 app: add safety margin to the smudge buffer not to stamp 2012-01-20 23:31:56 +02:00
Alexia Death 4f04c61ed6 app: fix small logical error in smudge 2012-01-20 22:46:44 +02:00
Alexia Death 4fe9955b3e app: fix some brushes not going small enough correctly
That limit may need to be removed completely some day...
2012-01-20 21:12:19 +02:00
Alexia Death ff8cda8138 app: With dynamics fix Smudge can handle changing brushes too 2012-01-18 23:46:52 +02:00
Alexia Death 1322bed1df app: Fix smudge so it can cope with dynamic brushes 2012-01-17 22:27:25 +02:00
Alexia Death 72fb271e00 app: Bug 667241 - Unable to paint after switching away from paint tool using fade tapering
Make sure we up the pixel count when we bail in interpolate on 0-sized brush.
2012-01-09 23:31:33 +02:00
Michael Natterer 92e86baa2d Bug 667427 - Bad ink shape hint
Add translatable descriptions to enum GimpInkBlobType so they appear
as tooltips instead of "GIMP_INK_BLOB_TYPE_FOO".
2012-01-07 22:09:18 +01:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Michael Natterer 4300612962 app: separate handling of reverse-gradient from paint dynamics
because it belongs to the gradient and should be changed whenever the
gradient gets changed.

Introduce gimp_paint_options_copy_gradient_props() and call it at the
right places in the tool manager.
2011-12-06 22:39:29 +01:00
Michael Natterer 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
Alexia Death d32fa80d1d app: Move smooth to painttool and clean up the rest 2011-09-14 20:44:45 +03:00
Alexia Death 159ee0381d app: Complete the reversal of last patch 2011-09-11 22:48:02 +03:00
Alexia Death 79dfee2c9e Revert "app: Remove obsolete way of keeping track of last painted dab"
This reverts commit 1b62a7bff3.
2011-09-11 22:47:55 +03:00
Alexia Death 8beec385ee app: silence a warning in ink tool 2011-09-11 21:56:33 +03:00
Alexia Death 8f11e8743d app: Don't mark coord done untill its actually been painted 2011-09-11 21:56:33 +03:00
Alexia Death c360c53873 app: Fix ink tool smooth handling 2011-09-11 16:20:47 +03:00
Alexia Death 1b62a7bff3 app: Remove obsolete way of keeping track of last painted dab 2011-09-11 13:23:05 +03:00
Alexia Death 9711995d88 app: remove duplicate call to coord smooth
Interpolation function is taking care of
the smooth now. This caused bugs with
spacing while using smooth.
2011-09-11 13:23:05 +03:00
Alexia Death 2528f656b5 app: remove call to possibly buggy and un-needed scale clamp
It's likely that the removed call and function were causing
random drawing artefacts, but as this was once in a blue
moon bug, I have just a guess to go by however, testing
revealed no regressions, so pushing.
2011-09-10 21:47:52 +03:00
Bruce Cowan 841c8a7ebe String review: fix some spelling and formatting issues 2011-08-28 20:07:55 +02:00
Michael Natterer ea27c7bc83 app: add the MIN4() and MAX4() macros to gimp-utils.h
instead of having them in 5 .c files.
2011-06-04 17:16:21 +02:00
Alexia Death 52cd1b9043 app: share brush modifiers along with the brush or dynamics 2011-06-02 21:17:52 +03:00
Michael Natterer c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 2af539020b app: don't include individual files from libgimp* 2011-04-28 14:23:33 +02:00
Alexia Death 2068498b5c app: fix a bug with smooth affecting spacing 2011-04-20 22:03:49 +03:00
Alexandre Prokoudine 316c9fdd45 Reworded the Increment's tooltip
The tooltip for Increment option has a better wording now
at Alexia's suggestion.
2011-04-20 22:47:54 +04:00
Alexandre Prokoudine 3eee39c8fb Terminology fixes and missing tooltips
Options of brush-based tools now have clearer names,
and the options themselves now have tooltips that
had been missing.
2011-04-20 22:24:19 +04:00
Michael Natterer 6a3fe9f9c5 app: restore the original brush size upper limit of 10000
but restrict the tool options sclae to 500.
2011-04-18 21:10:47 +02:00
Michael Natterer 6a1b93be1c app: don't include "libgimpmath/gimpvectors.h" in any header
It's types are generally known because it's already included
in core-types.h.
2011-04-17 23:44:45 +02:00
Michael Natterer 391c74899c app: rename gimp_brush_start_use() to gimp_brush_begin_use() 2011-04-12 09:06:22 +02:00
Michael Natterer 0315f483e6 app: some general GimpPaintCore cleanup 2011-04-06 09:11:25 +02:00
Michael Natterer 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
Michael Natterer e2226e9933 app: add gimp_brush_start_use() and gimp_brush_end_use()
and use them in GimpBrushCore when setting/unsetting a brush. They
will be used for managing some caches inside GimpBrush.
2011-04-05 19:18:26 +02:00
Michael Natterer a50f668d87 app: GimpBrushCore: simplify brush and dynamics setting
by checking for an actual change in the setters. Remove the
"foo != core->foo" checks from all callers.
2011-04-05 19:05:55 +02:00
Michael Natterer d008fcd588 app: remove the entire brush boundary code from GimpBrushCore 2011-04-04 21:24:41 +02:00
Michael Natterer bc8d5f84d6 app: remove the "offset" API from TileManager
It made the transform code hard to read and never belonged into the
tile manager anyway. It's a simple pixel buffer that should not know
about any position in an image. Instead, pass around the offsets of
tile managers explicitly, so everything is less obscure for the price
of having more parameters. This will also help replacing TileManagers
with GeglBuffers.
2011-03-26 08:30:15 +01:00
Alexia Death 41b1bd36da app: Fix smooth intreaction with airbrush 2011-03-16 22:08:19 +02:00
Michael Natterer e3c0a4e549 app: move all GimpDynamics members to private 2011-03-03 18:43:56 +01:00
Eric Grivel 20279459dd Bug 634183 - GIMP crashes when editing very high images
Implemented a fix for the ink blob overflow problem.
2011-02-13 15:09:27 +01:00
Michael Natterer 16b020fc42 app: clean up paint core cleanup 2011-02-06 11:22:23 +01:00
Alexia Death 1cf5295d2e app: Fix couple of bugs in smooth code 2011-02-06 00:17:51 +02:00
Alexia Death 75593c3fea app: Fix missing outline with aspect 0.0 2011-02-02 01:04:24 +02:00
Alexia Death 418632916a app: Fix outline offset 2011-02-02 00:58:09 +02:00
Alexia Death 6a89db0f53 app: Minor aspect ratio fixes 2011-02-02 00:33:08 +02:00
Alexia Death 452819143a app: half-sane aspect ratio implementation 2011-01-25 23:28:02 +02:00
Michael Natterer eb04265ce3 app: gimp_brush_core_clamp_brush_scale() -> gimp_brush_clamp_scale() 2011-01-17 23:20:49 +01:00
Michael Natterer c1b3575648 app: implement GObject::constructed() instead of ::constructor() 2011-01-12 23:06:03 +01:00
Alexia Death 803df9b58a app: Make smooth paint core internal 2011-01-09 22:59:01 +02:00
Michael Natterer c29aefccc2 app: fix coding style in the new smoothing code 2011-01-08 22:18:56 +01:00
Alexia Death 339deed1da app: Clean up smooth so it would be acceptable for master 2011-01-08 22:19:27 +02:00
Alexia Death 082aa272a4 app: G-Pen algorithm for GIMP trunk. Now smoothing function works for Ink and Brush tools.
Rebased/fixed to go on top of current master. Next commit will add cleanup.
Had to change author tag because gnome is not accepting random stuff
in email fields. Original author is tarai, from gimp painter project
in sourceforge.
2011-01-08 22:17:26 +02:00
Michael Natterer bbc3943638 app: some cleanup in the new paint options code 2010-11-25 21:30:29 +01:00
Alexia Death 904048cdcb app: Clearly present Fade and Color dynamics options as such 2010-11-25 19:06:16 +02:00
Alexia Death 20afb328a7 app: Unify direction calculation for painting and stroking 2010-11-17 00:03:07 +02:00
Michael Natterer 41269d35be app: fix antique copyright header 2010-11-14 22:13:36 +01:00