diff --git a/AUTHORS b/AUTHORS index feb35abcf9..75dcfc6e7a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -328,6 +328,7 @@ The following people have contributed art to GIMP: Paul Davey Alexia Death Aurore Derriennic + Philipp Haegi Aryeom Han Tuomas Kuosmanen Karl La Rocca diff --git a/ChangeLog b/ChangeLog index 498b5acf36..e4e2688392 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,1759 @@ +commit 5e662c37d7cc472266989f259c4ae579d66a6617 +Author: Michael Natterer +Date: Fri Apr 27 13:38:31 2018 +0200 + + configure.ac: release GIMP 2.10.0 \o/ + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 36586f291a0358f6677e54db98ad3b5b54471989 +Author: Michael Natterer +Date: Fri Apr 27 13:20:59 2018 +0200 + + docs, etc: system gimprc and its manpage regenerated + + docs/gimprc.5.in | 2 +- + etc/gimprc.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 26c67cf7d2fce1f0ad0058e9b963463e82ede650 +Author: Michael Natterer +Date: Fri Apr 27 11:02:38 2018 +0200 + + devel-docs: more s/2.9/2.10/ + + devel-docs/debugging-tips.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 9cb91971ea508d0b63f4b6c4a23adb69ef527e0e +Author: Jehan +Date: Fri Apr 27 02:59:57 2018 +0200 + + desktop: update release date… again… + + Let's hope it's the last time! + + desktop/org.gimp.GIMP.appdata.xml.in.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f6a56fac519b26a79c5c2169436c22def0d26887 +Author: Ell +Date: Thu Apr 26 16:06:08 2018 -0400 + + app: move exclusion and linear-burn modes to a more logical position + + ... in the layer-mode menu (this only affects UI.) + + app/operations/layer-modes/gimp-layer-modes.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +commit 12904cffc8389bc2afeb0df36589ff4d60b5a69d +Author: Michael Natterer +Date: Thu Apr 26 20:46:32 2018 +0200 + + pdb: fix typo s/chanel/channel/ + + pdb/groups/plug_in_compat.pdb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 9f86c7ec04e21830a6bf406bff783e32f0c0770a +Author: Anders Jonsson +Date: Thu Apr 26 14:49:39 2018 +0000 + + Update Swedish translation + + po-libgimp/sv.po | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 6980904074db4bc037f07465436b17174ecc492b +Author: Piotr Drąg +Date: Thu Apr 26 16:29:57 2018 +0200 + + Update Polish translation + + po-libgimp/pl.po | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit ae509749d478588d78381a6940f9e101afd39757 +Author: Michael Natterer +Date: Thu Apr 26 16:12:28 2018 +0200 + + devel-docs: more s/2.9/2.10/ + + devel-docs/icons.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3c410273b0b65d4503e1f88e4e85ba34835d4b3a +Author: Michael Natterer +Date: Thu Apr 26 16:07:00 2018 +0200 + + README: s/2.9/2.10/ and make it say "stable" + + README | 19 ++++++++----------- + 1 file changed, 8 insertions(+), 11 deletions(-) + +commit b0b381b6c839d85f665f01811e246f48cf46c503 +Author: Michael Natterer +Date: Thu Apr 26 16:06:32 2018 +0200 + + libgimp*: don't say "2.9" in metadata + + libgimp/gimpimagemetadata.c | 2 +- + libgimpbase/gimpmetadata.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 7854fcdc800df942433517194acd9815e0c9dbaa +Author: Michael Natterer +Date: Thu Apr 26 15:56:30 2018 +0200 + + NEWS: make it say "2.10 Stable Branch" + + NEWS | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +commit 4e832722e2447868e85382532d9ccb9868ea890c +Author: Michael Natterer +Date: Thu Apr 26 15:45:44 2018 +0200 + + NEWS: updates and fixes + + NEWS | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit f35c2cdcec4cf189adba92e832da451a2019bd1f +Author: Michael Natterer +Date: Thu Apr 26 15:45:04 2018 +0200 + + script-fu: port chrome-it.scm to non-deprecated color API + + plug-ins/script-fu/scripts/chrome-it.scm | 46 + +++++++++++++++++++++----------- + 1 file changed, 31 insertions(+), 15 deletions(-) + +commit f1db670f1914f38a76d4714388760106f53fdbcb +Author: Øyvind Kolås +Date: Thu Apr 26 14:59:12 2018 +0200 + + configure,app: depend on GEGL-0.4.0 + + app/sanity.c | 4 ++-- + configure.ac | 6 +++--- + 2 files changed, 5 insertions(+), 5 deletions(-) + +commit 6057828582b924640f5d9c14dcd410c85faf4d10 +Author: Jehan +Date: Thu Apr 26 13:16:20 2018 +0200 + + desktop: use tilde for 'rc' separation in version scheme. + + In other words, number the release candidates: 2.10.0~rc*. + In any case, this makes `rpmdev-vercmp` to consider them before + 2.10.0, + unlike using a hyphen separator. + + Though I still leave the trick from commit fb6328b9ad + so that + our unit test succeeds, since `appstream-util` still considers + the other + order. + + desktop/org.gimp.GIMP.appdata.xml.in.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f7788becaa258a66de6dc770ff3b937332447a15 +Author: Michael Natterer +Date: Thu Apr 26 13:02:55 2018 +0200 + + AUTHORS: regenerated + + AUTHORS | 1 + + 1 file changed, 1 insertion(+) + +commit a44e1500fa77dd38ca85b774c6a4a0181654d4ba +Author: Michael Natterer +Date: Thu Apr 26 13:00:18 2018 +0200 + + app: fix rectangle select tool cursor after committing/halting + + gimp_rectangle_select_tool_cursor_update(): always set a cursor and + cursor modifier even if no GimpToolRectangle widget exists, so we are + not stuck with the last set cursor after committing or halting the + tool. + + app/tools/gimprectangleselecttool.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 2d19848277d64897af223300cd0617533480edb3 +Author: Ell +Date: Thu Apr 26 05:33:30 2018 -0400 + + app: don't invalidate gradient cache upon gradient-type changes + + In GimpOperationGradient, since we no longer avoid using the + gradient cache for conical gradients, the gradient type doesn't + affect the cache. + + app/operations/gimpoperationgradient.c | 2 -- + 1 file changed, 2 deletions(-) + +commit 740bfa5c75aa5469d4fcad357f189cecf90fc748 +Author: Jehan +Date: Thu Apr 26 03:03:37 2018 +0200 + + NEWS: add Korean translation update. + + NEWS | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit e46a8497aca1ce910536bf5f9f643691b74dc341 +Author: Aryeom Han +Date: Thu Apr 26 02:09:51 2018 +0200 + + po: update Korean translation. + + po/ko.po | 31509 + +++++++++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 21276 insertions(+), 10233 deletions(-) + +commit d4404aa4bc3b9611929432fa0fe4b2eee8369861 +Author: Jehan +Date: Thu Apr 26 01:10:55 2018 +0200 + + libgimpconfig: fix the fix of the fix! + + So apparently, it's "parenthesis" in singular. + Cf. commit 1b44812ab1. + + libgimpconfig/gimpconfigwriter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 04aff3d4ea0e02818a55e9c247c9cdb8d061f848 +Author: Jehan +Date: Thu Apr 26 00:58:31 2018 +0200 + + NEWS, authors.xml: add the 2.10 splash author. + + See commit ea3de6d524. + Also update the translation list in NEWS. + + NEWS | 3 ++- + authors.xml | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) + +commit bd86c5f6035e1f5252a87e54fd00ab667c48b44c +Author: Jehan +Date: Thu Apr 26 00:50:44 2018 +0200 + + desktop, NEWS: release date and NEWS updated. + + NEWS | 16 ++++++++++++++-- + desktop/org.gimp.GIMP.appdata.xml.in.in | 2 +- + 2 files changed, 15 insertions(+), 3 deletions(-) + +commit 1b44812ab11b8c2768d222f4f26b884746adbb81 +Author: Jehan +Date: Wed Apr 25 23:53:45 2018 +0200 + + libgimpconfig: fix wrong typo fix. + + Actually after re-reviewing previous commit, I found at least + one wrong + fix in commit 4a77ff2d3d. + s/the opening parentheses/the opening parenthese/ + + libgimpconfig/gimpconfigwriter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4a77ff2d3d518dab45da9852c9fb3822a5ed0b28 +Author: luz.paz +Date: Wed Apr 25 14:31:11 2018 -0400 + + Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3) + + Found via `codespell` and grep. + + app/actions/buffers-commands.c | 2 +- + app/actions/dashboard-commands.c | 2 +- + app/actions/data-editor-commands.c | 2 +- + app/actions/debug-actions.c | 2 +- + app/actions/fonts-commands.c | 2 +- + app/actions/gradient-editor-commands.c | 2 +- + app/actions/images-commands.c | 2 +- + app/actions/palettes-commands.c | 2 +- + app/actions/quick-mask-commands.c | 2 +- + app/core/gimpbrush-load.c | 2 +- + app/core/gimpbrush-transform.cc | 4 ++-- + app/core/gimpcurve.c | 6 +++--- + app/core/gimpcurve.h | 2 +- + app/core/gimpimage.c | 2 +- + app/core/gimpitem.c | 2 +- + app/core/gimppalette-import.h | 2 +- + app/core/gimpscanconvert.c | 2 +- + app/core/gimpstrokeoptions.c | 2 +- + app/core/gimptag.c | 2 +- + app/core/gimpviewable.c | 2 +- + app/display/gimpcanvas.c | 2 +- + app/display/gimpdisplayshell-transform.c | 2 +- + app/display/gimptoolrectangle.c | 2 +- + app/operations/gimpcurvesconfig.c | 2 +- + app/operations/gimpoperationflood.c | 2 +- + app/operations/gimpoperationgrow.c | 2 +- + app/operations/gimpoperationshrink.c | 4 ++-- + app/paint/gimppaintcore-loops.cc | 6 +++--- + app/pdb/plug-in-compat-cmds.c | 4 ++-- + app/tests/test-ui.c | 2 +- + app/tests/test-xcf.c | 2 +- + app/text/gimptext-xlfd.c | 2 +- + app/text/gimptextlayout.h | 2 +- + app/tools/gimpcagetool.c | 2 +- + app/tools/gimprectangleselecttool.c | 2 +- + app/widgets/gimpdialogfactory.c | 2 +- + app/widgets/gimpdockwindow.c | 2 +- + app/widgets/gimplayertreeview.c | 2 +- + app/xcf/xcf-load.c | 2 +- + devel-docs/commit-rules.txt | 2 +- + devel-docs/includes.txt | 2 +- + devel-docs/xcf.txt | 2 +- + libgimpconfig/gimpconfigwriter.c | 2 +- + plug-ins/common/curve-bend.c | 2 +- + plug-ins/common/decompose.c | 12 ++++++------ + plug-ins/common/file-ps.c | 2 +- + plug-ins/common/mail.c | 2 +- + plug-ins/common/newsprint.c | 2 +- + plug-ins/common/van-gogh-lic.c | 2 +- + plug-ins/file-jpeg/jpeg-save.c | 2 +- + plug-ins/file-jpeg/jpeg.c | 2 +- + plug-ins/file-psd/psd-save.c | 2 +- + plug-ins/lighting/lighting-image.c | 2 +- + plug-ins/lighting/lighting-main.c | 2 +- + plug-ins/lighting/lighting-main.h | 2 +- + plug-ins/map-object/map-object-apply.c | 2 +- + plug-ins/map-object/map-object-image.c | 2 +- + plug-ins/map-object/map-object-image.h | 2 +- + plug-ins/map-object/map-object-main.c | 2 +- + plug-ins/map-object/map-object-main.h | 2 +- + plug-ins/map-object/map-object-ui.c | 4 ++-- + plug-ins/metadata/metadata-tags.h | 6 +++--- + plug-ins/pygimp/doc/pygimp.html | 4 ++-- + plug-ins/pygimp/doc/pygimp.sgml | 4 ++-- + plug-ins/pygimp/doc/structure-of-plugin.html | 2 +- + plug-ins/pygimp/doc/support-modules.html | 2 +- + plug-ins/pygimp/gimpshelf.py | 2 +- + plug-ins/script-fu/scripts/guides-from-selection.scm | 12 ++++++------ + plug-ins/script-fu/tinyscheme/CHANGES | 2 +- + 69 files changed, 91 insertions(+), 91 deletions(-) + +commit 6e87ceb89618d4645ff3158007215ad95f33dbac +Author: Ell +Date: Wed Apr 25 17:39:10 2018 -0400 + + app: use half the cache size for symmetric conical gradients + + Symmetric conical gradients only span half a revolution (unlike + assymetric ones, which span an entire revolution), and therefore + require only half the cache size. + + app/core/gimpdrawable-gradient.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit ea3de6d52491ef36f3d24d3f46f5728e906a06e2 +Author: Pat David +Date: Wed Apr 25 16:31:56 2018 -0500 + + splash: Add 2.10 splash image + svg + + This image is CC-BY from Philipp Haegi. + https://www.flickr.com/photos/philipphaegi/39057406754 + + I added the graphics overlay for the splash. + + data/images/gimp-splash.png | Bin 399811 -> 3354880 bytes + data/images/gimp-splash.svg | 872001 + +++++++++++++++++++++++++++++++++++++++++ + data/images/gimp-splash.xcf | Bin 707320 -> 0 bytes + 3 files changed, 872001 insertions(+) + +commit c4674037bd412ac286d2274cfbee1ab54c15bfa6 +Author: Anders Jonsson +Date: Wed Apr 25 20:13:38 2018 +0000 + + Update Swedish translation + + po/sv.po | 1422 + ++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 723 insertions(+), 699 deletions(-) + +commit 4cba52277437cb3c14cf093910b343b715a66dd2 +Author: Anders Jonsson +Date: Wed Apr 25 20:10:13 2018 +0000 + + Update Swedish translation + + po-script-fu/sv.po | 22 +++++----------------- + 1 file changed, 5 insertions(+), 17 deletions(-) + +commit d6a7302678787833d8ab2e78c546d7f12120c51a +Author: Ell +Date: Wed Apr 25 15:41:00 2018 -0400 + + app: crop GimpDrawableFilter output + + Add a crop node to the GimpDrawableFilter graph, applied after the + filter's output, cropping the output to the filter area (the same + area used for the input crop node). If we fail to do this, filters + whose op's bounding box is bigger than the input region can affect + areas outside the drawable, when the filter is rendered as part of + the image graph (in contrast to being comitted). This is + particularly relevant to source ops, that may have an infinite + bounding box. + + We probably didn't notice this until now, since before the recent + GimpProjection update-area changes, only the drawable's area would + get invalidated in response to changes in the filter, so regions + outside the drawable wouldn't normally get rendered. However, this + could still have been triggered by causing regions outside the + drawable to be invalidated by other means. + + app/core/gimpdrawablefilter.c | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) + +commit 08f2b2d93bc0b882521e66aca92b6cf303571373 +Author: Piotr Drąg +Date: Wed Apr 25 20:31:40 2018 +0200 + + Update Polish translation + + po-libgimp/pl.po | 15 +- + po/pl.po | 943 + +++++++++++++++++++++++++++---------------------------- + 2 files changed, 479 insertions(+), 479 deletions(-) + +commit fb6328b9ad1ad959b594dd3028e45e035bbf47d5 +Author: Jehan +Date: Wed Apr 25 20:05:31 2018 +0200 + + desktop: preparing appdata for 2.10.0 release. + + Adding today's (hopeful) date. + + Also removing the trick from commit 447d9bbc56 because the bug in + appstream-util has been fixed, but adding the same trick elsewhere for + another bug in this validation script: + https://github.com/hughsie/appstream-glib/issues/234 + + desktop/org.gimp.GIMP.appdata.xml.in.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 5970046e25f5b718bd08b1acbba8fb981e79de48 +Author: Ell +Date: Wed Apr 25 13:58:09 2018 -0400 + + app: use gradient cache for conical gradients + + Add gimp_drawable_gradient_adjust_coords(), which adjusts the + gradient segment coords according to the gradient type, so that, in + cases where the gradient span is unrelated to the segment length, + the gradient cache (in GimpOperationGradient) is big enough not to + produce banding. Use the new function in gimp_drawable_gradient() + and in the gradient tool, instead of duplicating the logic. + + Move the shapreburst coordinate-adjustment logic to the new + function, and add appropriate logic for conical gradients. + + Remove the code that avoids using the gradient cache for conical + gradients from GimpOperationGradient. + + app/core/gimpdrawable-gradient.c | 86 + ++++++++++++++++++++++++++++++---- + app/core/gimpdrawable-gradient.h | 57 ++++++++++++---------- + app/operations/gimpoperationgradient.c | 15 ------ + app/tools/gimpgradienttool.c | 51 +++++++++----------- + 4 files changed, 132 insertions(+), 77 deletions(-) + +commit 38ba45cf31dde26b31809084b15f2e975dc142f7 +Author: Ell +Date: Wed Apr 25 13:05:29 2018 -0400 + + app: in GimpOperationGradient, move cache generation back to process() + + Undo the part of commit fa9a4108c3d4dc52ab73a2af49762832a4ccabc5 + that moved cache generation from process() to prepare(). prepare() + is called after each property change, in order to calculate the + op's bounding box for invalidation. Since we only need the cache + for actual processing, generating it in process() avoids that + overhead. + + app/operations/gimpoperationgradient.c | 40 + +++++++++++++++++++++++++++++----- + app/operations/gimpoperationgradient.h | 1 + + 2 files changed, 35 insertions(+), 6 deletions(-) + +commit ef5bd98e999e567c5b536350650e20a538d13f65 +Author: Michael Natterer +Date: Wed Apr 25 19:20:12 2018 +0200 + + app: protect GimpContext's "parent" pointer against dangling + + with a weak ref and call set_parent(NULL) in dispose(). + + app/core/gimpcontext.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 45be8b259121adc43d1d0199fa545cc621f8b1f3 +Author: Ell +Date: Wed Apr 25 11:12:47 2018 -0400 + + app: use paint composite-mode, instead of AUTO, in more places + + In the various types of fill operations, and in fade operations, + use the paint composite-mode of the current paint mode, which is + the composite mode we use during painting, instead of AUTO, which + results in the default mode we use for layer compositing. This + effectively means that filling using any non-legacy, non- + subtractive mode can paint over transparent areas, rather than + being limited to nontransparent areas. + + app/core/gimpdrawable-bucket-fill.c | 5 ++++- + app/core/gimpdrawable-edit.c | 5 ++++- + app/core/gimpdrawable-fill.c | 5 ++++- + app/core/gimpdrawable-gradient.c | 4 +++- + app/core/gimpimage-fade.c | 5 ++++- + app/tools/gimpgradienttool.c | 8 ++++++-- + 6 files changed, 25 insertions(+), 7 deletions(-) + +commit 95921427d530f9a9fc088d7f313e19b3d2c49dd3 +Author: Ell +Date: Wed Apr 25 10:51:20 2018 -0400 + + app: remove multithreading warning from the preferences dialog + + Since we're prepping for a release, it's a about time we've done + that. I hereby pronounce multithreading support fit for general + use! + + app/dialogs/preferences-dialog.c | 10 ---------- + 1 file changed, 10 deletions(-) + +commit fa9a4108c3d4dc52ab73a2af49762832a4ccabc5 +Author: Ell +Date: Wed Apr 25 09:41:13 2018 -0400 + + app: various improvements to GimpOperationGradient + + Invalidate the gradient cache while setting relevant properties, + and validate it, reconstructing if necessary, during prepare(), + rather than process(), to avoid the need to use a mutex. + + Make sure the cache has at least two elements, corresponding to + the initial and final colors of the gradient, since both colors + might be needed, and to avoid division by zero. + + Avoid using a cache if its necessary size is too big, or if the + gradient type is conical, since the necessary cache size for + conical gradients is unrelated to the gradient line length. + + Improve index rounding during cache lookup. + + Lots of indentation fixes. + + app/operations/gimpoperationgradient.c | 322 + +++++++++++++++++++-------------- + app/operations/gimpoperationgradient.h | 32 ++-- + 2 files changed, 204 insertions(+), 150 deletions(-) + +commit 4fce5d2518898b6c98e44238c5ac4891c37855a9 +Author: Ell +Date: Wed Apr 25 08:40:03 2018 -0400 + + Bug 793714 - Error when merging layer group with Pass through mode + + When merging a pass-through group, change its mode to NORMAL first, + to avoid a critical when duplicating the group as a regular layer. + Preserve the group's blend/composite space/mode while changing its + mode (note that only the composite space currently matters, since + the other parmaeters are immutable for pass-through groups.) + + app/core/gimpimage-merge.c | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +commit bd03ea7617a83b71684b3131d945f6c73ccd16da +Author: Ville Pätsi +Date: Wed Apr 25 13:43:25 2018 +0300 + + Clear kde_hacks and change treeview selected color + + themes/Dark/gtkrc | 204 + ++---------------------------------------------------- + 1 file changed, 4 insertions(+), 200 deletions(-) + +commit 8696c0585552bcab6269c2648dfd9574c45dd8ac +Author: Michael Natterer +Date: Wed Apr 25 00:55:41 2018 +0200 + + app: disable the "Use Applicator" toggle in paint options + + app/tools/gimppaintoptions-gui.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 106fc9309f2884bb91f2c9c6a17a9aa3e67c359b +Author: Jehan +Date: Wed Apr 25 00:19:37 2018 +0200 + + Bug 795510 - SYS_gettid is not available on non-Linux system. + + I could not find for sure what to use on FreeBSD instead, so + let's just + not get this information there. It is quite useful information to know + where thread traces were asked from, but it is more important to make + sure the program can be compiled everywhere. Also we can just check + which thread has gimp_stack_trace*() calls. Thus it can be seen as + redundant information in any case. + + SYS_gettid is apparently defined as a macro, so let's simply check for + it being defined. + + libgimpbase/gimputils.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 44a931e16c4dd50acc295e50c3d7f7a35c3c2e04 +Author: Simon Budig +Date: Tue Apr 24 14:26:08 2018 +0200 + + ripple: put the compat code in the proper place, fix up POTFILES.in + + app/pdb/internal-procs.c | 2 +- + app/pdb/plug-in-compat-cmds.c | 40 ++++++++++----------- + pdb/groups/plug_in_compat.pdb | 81 + +++++++++++++++++++++++++++++++++++++++++++ + po-plug-ins/POTFILES.in | 1 - + 4 files changed, 101 insertions(+), 23 deletions(-) + +commit d18cc028ca0c9a7bc545727fc02bb64e275fcc72 +Author: Timo Jyrinki +Date: Tue Apr 24 12:11:28 2018 +0000 + + Update Finnish translation + + po/fi.po | 33634 + ++++++++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 21277 insertions(+), 12357 deletions(-) + +commit dcefc10eca00ae8473d8f2e9be94e0a95371d47a +Author: Michael Natterer +Date: Tue Apr 24 13:58:30 2018 +0200 + + app: make setting of layer mode on new layers smarter in + layers-commands.c + + If the mode remembered in GimpDialogConfig is NORMAL or NORMAL_LEGACY, + use the image's default new layer mode instead. + + app/actions/layers-commands.c | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) + +commit 1c91cdabc8856a60eaed0fc207efb1b00592b9b2 +Author: Michael Natterer +Date: Tue Apr 24 13:57:24 2018 +0200 + + app: change the default new layer mode in GimpDialogConfig + + to GIMP_LAYER_MODE_NORMAL. + + app/config/gimpdialogconfig.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9ac34bda702bd9702951810e9ee121b1dd7629ff +Author: Michael Natterer +Date: Tue Apr 24 13:56:51 2018 +0200 + + app: change the default paint mode in GimpContext to + GIMP_LAYER_MODE_NORMAL + + app/core/gimpcontext.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 00f3c4e47bc0a177b1ff80018cad9551197eae01 +Author: Michael Natterer +Date: Tue Apr 24 13:55:50 2018 +0200 + + libgimp: use the right layer mode in gimp_layer_new_from_surface() + + gimp_image_get_default_new_layer_mode() instead of + GIMP_LAYER_MODE_NORMAL_LEGACY. + + libgimp/gimplayer.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 709f2484383cfe4e41349b136bc3b9c9ff9fd66c +Author: Jehan +Date: Tue Apr 24 13:33:04 2018 +0200 + + data: make the "Structure" brush obsolete. + + Start obsoleting the most terrible brushes of GIMP. This is definitely + one of them. + + data/brushes/Texture/Makefile.am | 1 - + data/brushes/gimp-obsolete-files/Makefile.am | 1 + + data/brushes/{Texture => gimp-obsolete-files}/Structure.gbr | Bin + 3 files changed, 1 insertion(+), 1 deletion(-) + +commit e6de783b3c7153de5febb2042d5cbd27ab0edf2d +Author: Simon Budig +Date: Tue Apr 24 13:02:07 2018 +0200 + + remove the ripple plugin, provide compat PDB-API + + app/pdb/plug-in-compat-cmds.c | 152 +++++++++ + plug-ins/common/.gitignore | 2 - + plug-ins/common/Makefile.am | 18 - + plug-ins/common/gimprc.common | 1 - + plug-ins/common/plugin-defs.pl | 1 - + plug-ins/common/ripple.c | 736 + ----------------------------------------- + 6 files changed, 152 insertions(+), 758 deletions(-) + +commit 21f891955f59ca6a362b33476e69d25e97d9d992 +Author: Jehan +Date: Tue Apr 24 04:46:37 2018 +0200 + + desktop: fix a few links and a release date in appdata file. + + desktop/org.gimp.GIMP.appdata.xml.in.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 8a899aa5478b2ea2ca5ca7dd60ea02c47d56d385 +Author: Jehan +Date: Tue Apr 24 04:22:06 2018 +0200 + + NEWS: kick up 2.10.0 RC3 news. + + NEWS | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +commit 9325013fb05edf8574942bd80df8ff345c0552cd +Author: Jehan +Date: Tue Apr 24 03:55:04 2018 +0200 + + data: add a gitignore in new "Fun" brush category. + + data/brushes/Fun/.gitignore | 2 ++ + 1 file changed, 2 insertions(+) + +commit 7c0d8a2d2a7173e92db6ff7725de7bad619d2270 +Author: Jehan +Date: Tue Apr 24 03:16:02 2018 +0200 + + Bug 589371 - some new brushes. + + Extract of a selection by Jose Americo Gobbo. + Reviewed by Aryeom and myself for integration. + + From what I could gather, authors are: + - Grunge 01 by Rene Jensen. + - Stone Work 01 by Mathias Jonathan (Griffeur). + - Pencil 03 and Charcoal 03 by Americo. + + According to information from Americo, all data is GPL v3.0. + + data/brushes/Sketch/Charcoal-03.gih | Bin 0 -> 25004 bytes + data/brushes/Sketch/Makefile.am | 2 ++ + data/brushes/Sketch/Pencil-03.gih | Bin 0 -> 6866 bytes + data/brushes/Splatters/Grunge-01.gih | Bin 0 -> 590401 bytes + data/brushes/Splatters/Makefile.am | 1 + + data/brushes/Texture/Hatch-Pen-01.gbr | Bin 0 -> 16425 bytes + data/brushes/Texture/Makefile.am | 2 ++ + data/brushes/Texture/Stone-Work-01.gih | Bin 0 -> 744644 bytes + 8 files changed, 5 insertions(+) + +commit 8d5447645762880c80f223f6de99b27ab4c8e64f +Author: Michael Natterer +Date: Tue Apr 24 02:49:03 2018 +0200 + + Bug 795493 - Warning when removing a text layer + + In gimp_text_tool_connect(), when auto-removing empty text layers upon + text layer or tool change, make sure we don't try to remove a layer + that has already been removed, which can happen if this function is + reached *because* somehow the layer was removed externally (e.g. by + the user in the layers dialog). + + app/tools/gimptexttool.c | 24 +++++++++++++++++------- + 1 file changed, 17 insertions(+), 7 deletions(-) + +commit 9bbd763d3c2434e993e71c5d7c497eb381dbb4ef +Author: Jehan +Date: Tue Apr 24 00:54:53 2018 +0200 + + data: new splash screen. + + Things are getting serious now. We need a reasonnable splash, right? + Just in case we have a RC3! + It follows all rules: full HD and bottom fourth empty for loading + text. + + data/images/gimp-splash.png | Bin 507529 -> 399811 bytes + data/images/gimp-splash.xcf | Bin 13464022 -> 707320 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) + +commit f9cfb55d7e8fb0a9dc61b4b00486fe9d31f0e2c5 +Author: Aryeom Han +Date: Mon Apr 23 23:48:49 2018 +0200 + + data: meeeeeeeh! + + data/brushes/Fun/GEGL-goat.gih | Bin 0 -> 425791 bytes + data/brushes/Fun/Makefile.am | 1 + + 2 files changed, 1 insertion(+) + +commit 57c849df03a71120d3612f91a7346def4741f14b +Author: Aryeom Han +Date: Mon Apr 23 23:40:54 2018 +0200 + + data: Wilber is kitch and he knows it! + + data/brushes/Fun/Makefile.am | 3 ++- + data/brushes/Fun/Wilber.gih | Bin 0 -> 9165111 bytes + 2 files changed, 2 insertions(+), 1 deletion(-) + +commit e87589f35a4e1a204dc281e3a93f1972dcebf9f9 +Author: Jordi Mas +Date: Mon Apr 23 21:06:24 2018 +0200 + + Update Catalan translation + + po/ca.po | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +commit 8cd75a586039943e847b93a97482a59e7e8963b4 +Author: Aryeom Han +Date: Mon Apr 23 20:31:31 2018 +0200 + + data: update pepper brush. + + At least if the fun has to go on, let's have a good quality one! + + data/brushes/Fun/pepper.gbr | Bin 11993 -> 158437 bytes + 1 file changed, 0 insertions(+), 0 deletions(-) + +commit db227148f01a772dd1e9dbd69703a229311003d0 +Author: Michael Natterer +Date: Mon Apr 23 18:18:51 2018 +0200 + + pdb: finally deprecate gimp-color-balance + + Since nobody can tell me how the new gimp-drawable-color-balance can + be improved, it's going to be identical, just with a namespace. + + app/pdb/color-cmds.c | 6 ++++-- + libgimp/gimpcolor_pdb.c | 2 ++ + libgimp/gimpcolor_pdb.h | 1 + + pdb/groups/color.pdb | 1 + + 4 files changed, 8 insertions(+), 2 deletions(-) + +commit f14a865ebf5431d1c1f56781810738e7ebca1bc4 +Author: Anders Jonsson +Date: Mon Apr 23 16:15:10 2018 +0000 + + Update Swedish translation + + po-libgimp/sv.po | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +commit a9fb4f9a3910f794587bb66d89fa4aac1fcdf075 +Author: Michael Natterer +Date: Mon Apr 23 17:10:46 2018 +0200 + + pdb: make all item-transform procedures honor the "linked" flag + + and improve their documentation. + + app/pdb/item-transform-cmds.c | 136 ++++++++++++++++++-- + libgimp/gimpitemtransform_pdb.c | 243 ++++++++++++++++++++++------------- + pdb/groups/item_transform.pdb | 277 + ++++++++++++++++++++++++++++------------ + 3 files changed, 476 insertions(+), 180 deletions(-) + +commit b80036e14f9591c68d23fe5f71572448d00a71e5 +Author: Michael Natterer +Date: Mon Apr 23 15:49:23 2018 +0200 + + pdb: deprecated gimp-layer-translate + + and port all plug-ins/scripts to gimp-item-transform-translate. + + app/pdb/layer-cmds.c | 6 ++++-- + libgimp/gimplayer_pdb.c | 2 ++ + libgimp/gimplayer_pdb.h | 1 + + pdb/groups/layer.pdb | 2 ++ + plug-ins/common/animation-optimize.c | 2 +- + plug-ins/common/file-gif-load.c | 2 +- + plug-ins/common/file-xmc.c | 6 +++--- + plug-ins/pygimp/pygimp-drawable.c | 2 +- + plug-ins/script-fu/scripts/carve-it.scm | 2 +- + plug-ins/script-fu/scripts/difference-clouds.scm | 2 +- + plug-ins/script-fu/scripts/drop-shadow.scm | 2 +- + 11 files changed, 18 insertions(+), 11 deletions(-) + +commit acbdc4d5b49ddd810c7fae8b911083fec9ba4eeb +Author: Michael Natterer +Date: Mon Apr 23 03:06:23 2018 +0200 + + pdb: add gimp-item-transform-translate procedure + + We were only able to translate selections and layers (bot not channels + and paths) via the PDB, this new procedure fixes that. Deprecation of + old API and some more transform consistency to follow... + + app/pdb/internal-procs.c | 2 +- + app/pdb/item-transform-cmds.c | 98 + +++++++++++++++++++++++++++++++++++++++++ + libgimp/gimp.def | 1 + + libgimp/gimpitemtransform_pdb.c | 55 +++++++++++++++++++++++ + libgimp/gimpitemtransform_pdb.h | 3 ++ + pdb/groups/item_transform.pdb | 67 +++++++++++++++++++++++++++- + 6 files changed, 224 insertions(+), 2 deletions(-) + +commit 5b80d3d3be25ecbfdbef86d4e11df5abadb1d064 +Author: Michael Natterer +Date: Mon Apr 23 02:59:35 2018 +0200 + + app: fix source operations on layers with alpha + + They are not supposed to completely overwrite the layer's alpha + channel. Instead, composite them on top of the layer using gegl:over. + + app/core/gimpdrawablefilter.c | 30 ++++++++++++++++++++---------- + 1 file changed, 20 insertions(+), 10 deletions(-) + +commit 6ffa19d59567eb19be67362f6958f72b13576e09 +Author: Simon Budig +Date: Mon Apr 23 01:53:12 2018 +0200 + + fix internal name of the filter-grid help-id + + app/actions/filters-actions.c | 2 +- + app/widgets/gimphelp-ids.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit a31ee3ec22db2f1c02d02900c558dba87937839a +Author: Michael Natterer +Date: Mon Apr 23 01:23:09 2018 +0200 + + app: fix outer border color of GimpSpinScale to look OK on all themes + + it used to be "text" which is almost always too extreme; use "text_aa" + instead which is half way between "text" and "base" and always gives a + reasonable contrast. + + app/widgets/gimpspinscale.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7256f1844751fe242cd204111d22b8308c43d35f +Author: Michael Natterer +Date: Mon Apr 23 01:08:54 2018 +0200 + + app: change offsets parameters of GimpItem::translate() from int + to double + + so we can use it to precisely position paths; use SIGNED_ROUND() in + channel, layer etc. to snap to pixels. + + app/core/gimpchannel.c | 76 + +++++++++++++++++++++-------------------------- + app/core/gimpitem.c | 16 +++++----- + app/core/gimpitem.h | 8 ++--- + app/core/gimplayer.c | 12 ++++---- + app/core/gimpselection.c | 8 ++--- + app/vectors/gimpvectors.c | 8 ++--- + 6 files changed, 61 insertions(+), 67 deletions(-) + +commit b1a36b044ba07551ddc0ae37799ce63b47a6af9d +Author: Michael Natterer +Date: Mon Apr 23 01:07:04 2018 +0200 + + app: cast another argument to g_object_ref() in gimp_tool_info_new() + + app/core/gimptoolinfo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 33d933608384a447171d3c85263bc0f09e7b9944 +Author: Jehan +Date: Mon Apr 23 00:35:01 2018 +0200 + + app: gimp_get_temp_file() / gimp_temp_name() should create tmp/ if... + + ... it doesn't exist. + The tmp/ dir in the config folder should already be created by + GIMP, but + just in case it is not there, try and create it, since all code + calling + these assumes that it exists. + + app/core/gimp.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 08cc37271fc73c430fd382a4b593bc5e502a502b +Author: Jehan +Date: Sun Apr 22 22:11:13 2018 +0200 + + libgimpconfig: create parent directories for config file if necessary. + + The directory should be already created by GIMP. But just in case + it is + not there, for whatever reason, don't just fail. Try and create all + parents. + + libgimpconfig/gimpconfigwriter.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +commit ada987828d1be5d9e7a89f72986c7c5db34bf181 +Author: Jordi Mas +Date: Sun Apr 22 20:35:16 2018 +0200 + + Update Catalan translation + + po/ca.po | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c77c756f6aff1c0e2c6685fd046fa9993103ec55 +Author: Jordi Mas +Date: Sun Apr 22 20:33:24 2018 +0200 + + Update Catalan translation + + po/ca.po | 2954 + ++++++++++++++++++++++++++++++++++---------------------------- + 1 file changed, 1613 insertions(+), 1341 deletions(-) + +commit 87f9e65408ab61c1317113eab01603f654434084 +Author: Jehan +Date: Sun Apr 22 19:51:44 2018 +0200 + + data: move the Pepper brush to a "Fun" category. + + This brush is not to be considered seriously and is mostly a + "troll". If + we want to keep it, let's make a proper category. + + configure.ac | 1 + + data/brushes/Fun/Makefile.am | 8 ++++++++ + data/brushes/{Legacy => Fun}/pepper.gbr | Bin + data/brushes/Legacy/Makefile.am | 1 - + data/brushes/Makefile.am | 1 + + 5 files changed, 10 insertions(+), 1 deletion(-) + +commit d7ced206eea2ef80aa806134027a5a5a9d1dae72 +Author: Piotr Drąg +Date: Sun Apr 22 15:35:12 2018 +0200 + + Update Polish translation + + po/pl.po | 1108 + ++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 569 insertions(+), 539 deletions(-) + +commit a6a8147b195ca2094a495b577c102a187a9ce316 +Author: Ell +Date: Sun Apr 22 03:59:02 2018 -0400 + + app: fix indentation of GimpUndoType enum descriptions + + app/core/core-enums.h | 188 + +++++++++++++++++++++++++------------------------- + 1 file changed, 94 insertions(+), 94 deletions(-) + +commit 37742a9fee417985ebf195beefc5a05fd8c435a9 +Author: Ell +Date: Sun Apr 22 03:39:40 2018 -0400 + + Bug 795410 - Deleting a layer group and then undoing the deletion ... + + ... raises a CRITICAL + + gimp_item_{start,end}_move() currently serves two different + purposes: It is used by GimpLayer to suspend/resume mask resizing + of the layer's ancestors; this is necessary whenever an operation + on a layer might affect the size of its ancestors. It is also used + by GimpGroupLayer to suspend/resume its own mask resizing; this, on + the other hand, is only necessary before applying one of the + transformation functions to the group, so that mask modification is + handled by GimpLayer. In other words, the effects of + gimp_item_{start,end}_move() on group layers are only necessary in + a subset of the cases in which these functions are used. + + While in itself this isn't a problem, it does cause issues when + removing a group layer: gimp_image_remove_layer() calls + gimp_item_start_move() before removing the layer, and + gimp_item_end_move() afterwards. While the former function is + called while the layer is still attached to the image, the latter + function is called after the layer is no longer attached. Since + GimpGroupLayer pushes an undo step in response to these calls, only + the call to start_move() results in an undo step, while the call to + end_move() doesn't, resulting in an unbalanced + GIMP_UNDO_GROUP_LAYER_START_MOVE undo step on the stack. This + causes problems when undoing the operation. + + Add gimp_item_{start,end}_transform() functions, and corresponding + GimpItem::{start,end}_transform() virtual functions, which are more + specialized versions of gimp_item_{start,end}_move(), which should + be used instead of the former before/after transforming an item; in + other cases, such as when removing ot reordering an item, + gimp_item_{start,end}_move() should still be used. The default + implementation of GimpItem::{start,end}_transform() calls + gimp_item_{start,end}_move(), respectively, so subclasses that + override these functions don't have to do that themselves. + + In GimpGroupLayer, override GimpItem::{start,end}_transform(), + instead of GimpItem::{start,end}_move(), for the same purpose of + suspending mask resize. This avoids these functions from being + called when removing a layer group, fixing the bug. + + app/core/core-enums.c | 8 ++--- + app/core/core-enums.h | 4 +-- + app/core/gimpgrouplayer.c | 66 + +++++++++++++++++++-------------------- + app/core/gimpgrouplayer.h | 4 +-- + app/core/gimpgrouplayerundo.c | 20 ++++++------ + app/core/gimpimage-item-list.c | 16 +++++----- + app/core/gimpimage-resize.c | 4 +++ + app/core/gimpimage-undo-push.c | 16 +++++----- + app/core/gimpimage-undo-push.h | 4 +-- + app/core/gimpitem.c | 70 + ++++++++++++++++++++++++++++++++++++------ + app/core/gimpitem.h | 9 ++++++ + 11 files changed, 140 insertions(+), 81 deletions(-) + +commit eeae5b48cab952a9492cb0bfefa82d35de722de4 +Author: Ell +Date: Sun Apr 22 03:36:27 2018 -0400 + + app: avoid pushing undo for nested + gimp_group_layer_{suspend,resume}_mask() + + ... in order not to overshoot the undo-stack estimated memory- + usage. See comment in the code. + + app/core/gimpgrouplayer.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +commit 577e17032abd3201b7eef6edac1a4f88c99f8728 +Author: Ell +Date: Sun Apr 22 03:18:37 2018 -0400 + + app: fix undo when moving a group-layer child outside the group + + In gimp_image_reorder_item(), call gimp_item_start/end_move() + before/after reordering the item (and use an undo group, so that + the resulting undo actions are grouped together with the reordering + undo action,) so that if the item is a child of a group layer, and + reordering moves it out of the group in a way that causes the + group's mask to be resized, the mask will be properly restored when + undoing the operation. + + app/core/core-enums.c | 2 ++ + app/core/core-enums.h | 1 + + app/core/gimpimage.c | 26 +++++++++++++++++++++----- + 3 files changed, 24 insertions(+), 5 deletions(-) + +commit da2430deaad4355cde580de16d27a149df8b9a9b +Author: Jehan +Date: Sat Apr 21 15:59:21 2018 +0200 + + build: fix the forgotten splash screen for dev flatpak. + + ...-update-splash-screen-text-for-2.10.0-RC2.patch | 11722 + +++++++++++++++++++ + build/flatpak/org.gimp.GIMP-dev.json | 6 + + 2 files changed, 11728 insertions(+) + +commit 4d6cba0cfb0e7408d441b8c2537ef6e43788d5a5 +Author: Jehan +Date: Sat Apr 21 15:48:22 2018 +0200 + + app: make --show-playground visible in --help. + + After Alexandre Prokoudine's insistent demand! :-) + I am still not sure how wise this is, since this should be really + considered a "developer-only" option. Basically these tools are really + too buggy and unstable and we should not shine too much light + on these. + The counter-argument is that doing so will favor the bitrot. + + Well ok. At least let's add a big warning message at the top of the + Playground page, to make it very clear (if that were not already the + case) that basically this is not to be considered a secret feature, + but + really more a "we are looking for contributors" option. + + app/dialogs/preferences-dialog.c | 11 +++++++++++ + app/main.c | 2 +- + 2 files changed, 12 insertions(+), 1 deletion(-) + +commit c0eb7858a56f11181b6534a5f9beee0666eaf4bc +Author: Jehan +Date: Sat Apr 21 12:08:46 2018 +0200 + + Bug 795057 - Insensitive text in plug-ins is unreadable with dark + themes + + Don't fix too early! In some cases, PixbufStyle class is not found and + the fix failed. + + libgimp/gimpui.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 8be37da0128ad319778737cafcb824d976cba66a +Author: Michael Natterer +Date: Sat Apr 21 10:38:55 2018 +0200 + + Bug 795418 - Gimp 'critical error' when running luminosity masks + script + + In the gimp-channel-combine-masks PDB wrapper, only push an undo step + if the modified channel is attached to an image. It's a completely + reasonable use case to combine unattached channels. + + app/pdb/channel-cmds.c | 4 +++- + pdb/groups/channel.pdb | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +commit 38a288780299500e543e0d2123863b4647bb37b9 +Author: Jehan +Date: Fri Apr 20 23:32:07 2018 +0200 + + app, pdb: s/gimp_pdb_item_is_modifyable/gimp_pdb_item_is_modifiable/ + + Fix proper English. + + app/pdb/drawable-cmds.c | 4 ++-- + app/pdb/gimppdb-utils.c | 6 +++--- + app/pdb/gimppdb-utils.h | 2 +- + app/pdb/layer-cmds.c | 8 ++++---- + app/pdb/paths-cmds.c | 2 +- + app/pdb/vectors-cmds.c | 4 ++-- + pdb/groups/drawable.pdb | 4 ++-- + pdb/groups/layer.pdb | 8 ++++---- + pdb/groups/paths.pdb | 2 +- + pdb/groups/vectors.pdb | 4 ++-- + 10 files changed, 22 insertions(+), 22 deletions(-) + +commit ee1d62bcb829f6140b750e0a1a5b0dc8f7fa6072 +Author: Matt Kraai +Date: Thu May 11 06:10:43 2017 -0700 + + Bug 795412 - Typo in man file + + Change "extension" to "extensions" + + docs/gimp.1.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a1081bd5956399da6f39301d66df8ea4cafba3fe +Author: Michael Natterer +Date: Fri Apr 20 19:13:47 2018 +0200 + + app: fix gimp_pdb_item_is_modifyable() for channels + + When a channel is position-locked, it is also implicitly + content-locked because we translate channels by modifying their + pixels. + + app/pdb/gimppdb-utils.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit e4f327eca838380868adc11a93d97b8d5bdf5d38 +Author: Michael Natterer +Date: Fri Apr 20 12:31:04 2018 +0200 + + Bug 795385 - Segmentation fault when using gradient tool + + We don't currently use GimpOperationGradient multi-threaded, but + protect cache initialization in process() with a mutex anyway in cae + we ever do. + + app/operations/gimpoperationgradient.c | 6 ++++++ + app/operations/gimpoperationgradient.h | 1 + + 2 files changed, 7 insertions(+) + +commit c0bac871ca4b3ccd9e7229bc74f177484b1ac0b3 +Author: Michael Natterer +Date: Fri Apr 20 10:21:43 2018 +0200 + + Bug 795385 - Segmentation fault when using gradient tool + + Make sure that the gradient cache in GimpOperationBlend contains + at least one pixel (is never NULL). + + app/operations/gimpoperationgradient.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit ee7554678e461b4bb20b0f7f64b85fcf99c29df1 +Author: Ell +Date: Thu Apr 19 15:46:58 2018 -0400 + + Bug 795369 - crop tool not changing from landscape to portrait ... + + ... when using default aspect ratio + + The call to + gimp_{crop,rectangle_select}_tool_update_option_defaults() when + starting the crop/rectangle-select tools seems to no longer be + necessary, while it overrides user modification to the default + ratio's landscape/portrait orinetation (which only really matters + for the crop tool, since the rectangle-select tools' default ratio + is 1:1). Fix this by simply removing the call. + + app/tools/gimpcroptool.c | 2 -- + app/tools/gimprectangleselecttool.c | 2 -- + 2 files changed, 4 deletions(-) + +commit 187f2b4453751b33677e7be02eb3a5cd0b84cf60 +Author: Ell +Date: Thu Apr 19 14:52:02 2018 -0400 + + app: #include in tool_manager.c + + For strcmp() and strlen(). + + app/tools/tool_manager.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit b1df7d5497f72fc04883b27eecc1b1b1a0025f38 +Author: Piotr Drąg +Date: Thu Apr 19 19:52:20 2018 +0200 + + Update POTFILES.in + + po/POTFILES.in | 1 + + 1 file changed, 1 insertion(+) + +commit cb5f5d05e3d6820dbe8e441b81dd13c84831e7f1 +Author: Michael Natterer +Date: Thu Apr 19 18:31:34 2018 +0200 + + app: make the sample point dockable work with more than 4 sample + points + + Keep the color frames in a scrolled list of two columns, show a label + if the image has no sample points, show an icon if there is no image. + + app/widgets/gimpsamplepointeditor.c | 188 + ++++++++++++++++++++++-------------- + app/widgets/gimpsamplepointeditor.h | 7 +- + 2 files changed, 119 insertions(+), 76 deletions(-) + +commit 01e5a6b1334f9ed22f52a738d027f2ef56c90a0c +Author: Michael Natterer +Date: Thu Apr 19 16:20:41 2018 +0200 + + app: improve drawing of sample points so they are always visible + + Draw them a bit brighter and larger, and with a dark shadow like tool + lines so they are visible on all backgrounds. + + app/display/gimpcanvas-style.c | 4 ++-- + app/display/gimpcanvassamplepoint.c | 13 ++++++++----- + 2 files changed, 10 insertions(+), 7 deletions(-) + +commit f2a1fd5bf0e170e79bc3c2f1f162d2f73ecb9747 +Author: Ell +Date: Sat Apr 14 19:02:21 2018 -0400 + + app: refactor gimppaintcore-loops to coalesce iteration + + The gimppaintcore-loops functions perform very little actual + computational work (in case of do_layer_blend(), at least for + simple blend modes), which makes the cost of buffer iteration, and + memory bandwidth, nonnegligible factors. Since these functions are + usually called in succession, acessing the same region of the same + buffers, using the same foramts, coalescing them into a single + function, which performs all the necessary processing in a single + step, can improve performance when these functions are the + bottleneck. + + Add a gimp_paint_core_loops_process() function, which does just + that: it takes a set of algorithms to run, and a set of parameters, + and performs all of them in one go. The individual functions are + kept for convenience, but are merely wrappers around + gimp_paint_core_loops_process(). + + Be warned: the implementation uses unholy C++ from outer space, in + order to make this (sort of) managable. See the comments for more + details. + + app/paint/gimppaintcore-loops.cc | 1494 + ++++++++++++++++++++++++++++++-------- + app/paint/gimppaintcore-loops.h | 116 ++- + app/paint/gimppaintcore.c | 75 +- + 3 files changed, 1315 insertions(+), 370 deletions(-) + +commit 76eedf21987c8bb5df1e9f6e1dff69a08b9b0505 +Author: Ell +Date: Thu Apr 19 04:11:07 2018 -0400 + + configure.ac: require a C++14 compiler + + This didn't take long :) Require a C++14 compiler, for polymorphic + lambdas, which are used in the next commit. + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 66bc050df861d8708a2e31f9c780395ddeaaea55 +Author: Ell +Date: Thu Apr 19 05:17:30 2018 -0400 + + app: indentation fix to last commit + + app/core/gimpdrawable-transform.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 87e6653c9adc832a75027f5c8aee353d816366fb +Author: Ell +Date: Thu Apr 19 04:48:11 2018 -0400 + + app: improve drawable flipping speed + + In gimp_drawable_transform_buffer_flip(), perform flipping tile-by- + tile, instead of row-by-row/column-by-column. + + app/core/gimpdrawable-transform.c | 118 + ++++++++++++++++++++++++++------------ + 1 file changed, 81 insertions(+), 37 deletions(-) + +commit 12d38816a5cf7e5d2796665a78b333dc0c9ad24f +Author: Michael Natterer +Date: Thu Apr 19 01:03:29 2018 +0200 + + pdb: fix formatting of generated code in item_transform.pdb + + app/pdb/item-transform-cmds.c | 29 +++++++++++++++-------------- + pdb/groups/item_transform.pdb | 19 ++++++++++++------- + 2 files changed, 27 insertions(+), 21 deletions(-) + +commit 428110f63f419ff4b88dfa26bd9707e7c51afe68 +Author: Michael Natterer +Date: Wed Apr 18 23:44:34 2018 +0200 + + app: remove non-cut/copy/paste functions from gimp-edit.[ch] + + Move them to the new files gimpdrawable-edit.[ch] and + gimpimage-fade.[ch]. + + app/actions/edit-commands.c | 5 +- + app/core/Makefile.am | 4 ++ + app/core/gimp-edit.c | 119 + ------------------------------------- + app/core/gimp-edit.h | 11 ---- + app/core/gimpdrawable-edit.c | 94 +++++++++++++++++++++++++++++ + app/core/gimpdrawable-edit.h | 29 +++++++++ + app/core/gimpimage-fade.c | 78 ++++++++++++++++++++++++ + app/core/gimpimage-fade.h | 26 ++++++++ + app/core/gimpselection.c | 4 +- + app/dialogs/fade-dialog.c | 4 +- + app/display/gimpdisplayshell-dnd.c | 3 +- + app/pdb/drawable-edit-cmds.c | 9 +-- + app/pdb/edit-cmds.c | 12 ++-- + app/tools/gimpbucketfilltool.c | 4 +- + app/widgets/gimpdrawabletreeview.c | 16 ++--- + pdb/groups/drawable_edit.pdb | 9 +-- + pdb/groups/edit.pdb | 12 ++-- + po/POTFILES.in | 1 + + 18 files changed, 267 insertions(+), 173 deletions(-) + +commit 7caa3398550d5d07d9d5a6cb9481be32289c7a27 +Author: Michael Natterer +Date: Wed Apr 18 22:50:23 2018 +0200 + + devel-docs: some updates to GIMP3-API-Changes.txt + + devel-docs/GIMP3-API-Changes.txt | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +commit ab7fbeed08dc679870f8230edc46a8caac7cb3ee +Author: Anders Jonsson +Date: Wed Apr 18 20:31:56 2018 +0000 + + Update Swedish translation + + po/sv.po | 89 + ++++++++++++++++++++++++++++++++++------------------------------ + 1 file changed, 48 insertions(+), 41 deletions(-) + +commit 147c09f19e0da36241a41312b2aa64d8366c781a +Author: luz.paz +Date: Wed Apr 18 20:57:03 2018 +0200 + + Bug 795161 - Misc. typo fixes in source comments and doxygen + + Found via `codespell` + Follow-up to commit 7fdb963e018c5413036bc1dd547c7a812e20302d + + build/flatpak/flatpak-howto.txt | 2 +- + build/windows/installer/associations.isi | 2 +- + build/windows/installer/configoverride.isi | 2 +- + build/windows/installer/gimp3264.iss | 4 ++-- + build/windows/jhbuild/build.jhbuildrc | 4 ++-- + .../jhbuild/patches/ghostscript-8.71-windows.patch | 2 +- + configure.ac | 4 ++-- + devel-docs/GIMP3-API-Changes.txt | 4 ++-- + devel-docs/debugging-tips.txt | 2 +- + devel-docs/gih.txt | 2 +- + devel-docs/parasites.txt | 2 +- + devel-docs/structure.xml | 2 +- + devel-docs/tools/shooter.c | 2 +- + devel-docs/ui-framework.txt | 2 +- + libgimpbase/gimpdatafiles.h | 2 +- + libgimpbase/gimpsignal.c | 2 +- + libgimpbase/gimpwin32-io.h | 2 +- + libgimpcolor/gimpcolorprofile.c | 10 +++++----- + libgimpthumb/gimpthumbnail.c | 2 +- + libgimpwidgets/Makefile.am | 2 +- + libgimpwidgets/gimpcolorselector.c | 2 +- + libgimpwidgets/gimpeevl.c | 8 ++++---- + libgimpwidgets/gimpenumstore.c | 2 +- + libgimpwidgets/gimppreview.c | 2 +- + libgimpwidgets/gimppropwidgets.c | 2 +- + pdb/lib.pl | 2 +- + pdb/pdbgen.pl | 2 +- + plug-ins/common/blinds.c | 4 ++-- + plug-ins/common/cartoon.c | 2 +- + plug-ins/common/cml-explorer.c | 2 +- + plug-ins/common/compose.c | 2 +- + plug-ins/common/contrast-retinex.c | 2 +- + plug-ins/common/curve-bend.c | 18 + +++++++++--------- + plug-ins/common/decompose.c | 6 +++--- + plug-ins/common/despeckle.c | 6 +++--- + plug-ins/common/file-cel.c | 2 +- + plug-ins/common/file-dicom.c | 2 +- + plug-ins/common/file-jp2-load.c | 2 +- + plug-ins/common/file-pdf-save.c | 2 +- + plug-ins/common/file-ps.c | 8 ++++---- + plug-ins/common/file-raw-data.c | 2 +- + plug-ins/common/film.c | 6 +++--- + plug-ins/common/max-rgb.c | 2 +- + plug-ins/common/photocopy.c | 2 +- + plug-ins/common/sample-colorize.c | 10 +++++----- + plug-ins/common/softglow.c | 2 +- + plug-ins/common/sphere-designer.c | 2 +- + plug-ins/common/tile-small.c | 2 +- + plug-ins/common/unsharp-mask.c | 6 +++--- + plug-ins/file-fits/fits-io.c | 6 +++--- + plug-ins/file-fits/fits.c | 2 +- + plug-ins/file-psd/psd-util.c | 2 +- + plug-ins/file-tiff/file-tiff-load.c | 2 +- + plug-ins/file-tiff/file-tiff-save.c | 2 +- + plug-ins/file-webp/file-webp-save.c | 2 +- + plug-ins/flame/libifs.c | 2 +- + plug-ins/gfig/gfig-style.c | 2 +- + plug-ins/gradient-flare/gradient-flare.c | 6 +++--- + plug-ins/ifs-compose/ifs-compose-utils.c | 2 +- + plug-ins/metadata/metadata-editor.c | 22 + +++++++++++----------- + plug-ins/metadata/metadata-viewer.c | 2 +- + plug-ins/print/print-settings.c | 2 +- + plug-ins/pygimp/ChangeLog.old | 2 +- + plug-ins/pygimp/doc/gimp-module-procedures.html | 2 +- + plug-ins/pygimp/doc/gimp-objects.html | 2 +- + plug-ins/pygimp/doc/procedural-database.html | 2 +- + plug-ins/pygimp/doc/pygimp.html | 6 +++--- + plug-ins/pygimp/doc/pygimp.sgml | 8 ++++---- + plug-ins/pygimp/plug-ins/palette-sort.py | 2 +- + plug-ins/script-fu/ftx/README | 2 +- + plug-ins/script-fu/ftx/ftx-functions.txt | 2 +- + plug-ins/script-fu/scripts/add-bevel.scm | 2 +- + plug-ins/script-fu/scripts/palette-export.scm | 2 +- + plug-ins/script-fu/scripts/script-fu-compat.init | 2 +- + plug-ins/script-fu/tinyscheme/CHANGES | 4 ++-- + plug-ins/script-fu/tinyscheme/Manual.txt | 2 +- + plug-ins/script-fu/tinyscheme/hack.txt | 4 ++-- + plug-ins/script-fu/tinyscheme/scheme.c | 2 +- + plug-ins/selection-to-path/README | 4 ++-- + plug-ins/selection-to-path/bitmap.h | 2 +- + tools/gimp-mkenums | 2 +- + 81 files changed, 138 insertions(+), 138 deletions(-) + +commit 43974c3c6ace840fe675e413a9c03e538d8c259f +Author: Ell +Date: Wed Apr 18 15:02:14 2018 -0400 + + data: update splash-screen text for 2.10.0-RC2 + + data/images/gimp-splash.png | Bin 129666 -> 507529 bytes + data/images/gimp-splash.xcf | Bin 13439283 -> 13464022 bytes + 2 files changed, 0 insertions(+), 0 deletions(-) + +commit 542a04735be9df70377dd4d5020370d2e4437e59 +Author: Ell +Date: Wed Apr 18 13:35:28 2018 -0400 + + app: fix airbrush periodic stamp behavior + + Commit ddfc7715cbcd8d165520902bc0abfff3c09b88f4 changed the + airbrush periodic stamp behavior, so that instead of using the main + brush, it issued a full MOTION event, potentially using a different + brush when using a GIH brush. + + Fix this, by renaming the "timeout" signal of GimpAirbrush to + "stamp", and by adding a new gimp_airbrush_stamp() function, which + should be used for painting the periodic airbrush dab in response, + instead of calling gimp_paint_core_paint() directly, and which + calls gimp_airbrush_paint() instead, as the old code did. + + In order to call this function from the paint thread, we replace + the various gimp_paint_tool_paint_core_foo() functions, introduced + in the above commit, with a generic gimp_paint_tool_paint_push() + function, which takes a callback (and a data pointer) to run on the + paint thread, and queues it for execution (when not using the paint + thread, the function is called directly from the calling thread.) + + app/paint/gimpairbrush.c | 37 +++++- + app/paint/gimpairbrush.h | 12 +- + app/tools/gimpairbrushtool.c | 37 ++++-- + app/tools/gimppainttool-paint.c | 258 + +++++++++++++++------------------------- + app/tools/gimppainttool-paint.h | 46 +++---- + 5 files changed, 186 insertions(+), 204 deletions(-) + +commit ce8c4cb2a0a9ed6ffbe640fdda421700d1383225 +Author: Michael Natterer +Date: Wed Apr 18 20:41:54 2018 +0200 + + Bug 795288 - Layer is moved by arrow keys even after all locks... + + ...(Pixel, Position and Size, Alpha Channel) are enabled. + + gimp_edit_selection_tool_translate(): add checks for locks and bail + out with a message if the item is NULL or locked. + + gimp_move_tool_button_press(): refactor NULL and lock checks to look + more like the new code added above, and also check "lock-content" of + channels and masks: moving them changes their pixels. + + app/tools/gimpeditselectiontool.c | 104 ++++++++++++++++++++++++------ + app/tools/gimpmovetool.c | 129 + +++++++++++++++++++------------------- + 2 files changed, 147 insertions(+), 86 deletions(-) + +commit 64c38edd81abc2fe9f5bbd12e2bea24d0ac6d1cf +Author: Michael Natterer +Date: Wed Apr 18 18:49:47 2018 +0200 + + Bug 795300 - ICC profile conversion artifacts and gamma problems + + Cache the fish in GimpColorTransform as suggested by Massimo. + + libgimpcolor/gimpcolortransform.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 0a39874bda18f66c1d8e09f363c12ddb998350d3 +Author: Michael Natterer +Date: Wed Apr 18 14:54:34 2018 +0200 + + themes: fix "Dark" selected colors in "kde_hack_1" too, whatever + that is + + themes/Dark/gtkrc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit cafb18643f3ae84c9a11564b09fe77da5e931c18 +Author: Michael Natterer +Date: Wed Apr 18 12:45:58 2018 +0200 + + app: another optimization in GimpOperationGradient + + Don't reallocate the cache in prepare() but only on demand in + process(). + + app/operations/gimpoperationgradient.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +commit 12b9d7a4e7789e1f1ab9c709a71a7ecc743acb15 +Author: Jehan +Date: Wed Apr 18 12:34:07 2018 +0200 + + build: update dev flatpak to 2.10.0 RC2. + + build/flatpak/org.gimp.GIMP-dev.json | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 79460c82c36a5eeeb799b2825bae88ce7ae8335b +Author: Anders Jonsson +Date: Wed Apr 18 09:20:38 2018 +0000 + + Update Swedish translation + + po/sv.po | 510 + ++++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 272 insertions(+), 238 deletions(-) + +commit 370dbd3e04532e74cde8f3c731defd1af48fe763 +Author: Alan Mortensen +Date: Wed Apr 18 10:13:19 2018 +0200 + + Updated Danish translation of gimp-tips + + po-tips/da.po | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit e94d3b953ff377bc4c0b8171b88a7b5e07918cca +Author: Alan Mortensen +Date: Wed Apr 18 10:13:19 2018 +0200 + + Updated Danish translation of gimp-plug-ins + + po-plug-ins/da.po | 326 + ++++++++++++++++++++++++++++++++---------------------- + 1 file changed, 192 insertions(+), 134 deletions(-) + +commit 3b412612876fdefb7c79d564140162a157ce79ba +Author: Alan Mortensen +Date: Wed Apr 18 10:13:18 2018 +0200 + + Updated Danish translation + + po/da.po | 3100 + +++++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 1758 insertions(+), 1342 deletions(-) + +commit d32d13b16d91973e301f358eff59c8165e04b8d0 +Author: Alan Mortensen +Date: Wed Apr 18 10:13:17 2018 +0200 + + Updated Danish translation of gimp-libgimp + + po-libgimp/da.po | 397 + +++++++++++++++++++++++++++++++------------------------ + 1 file changed, 221 insertions(+), 176 deletions(-) + +commit 9dbf919d46aeb9604404d551979b7dd511cb0a8f +Author: Michael Natterer +Date: Wed Apr 18 01:11:33 2018 +0200 + + app: speed up gradient rendering a lot + + by using a cache of colors that is calculated once, instead of + calling gimp_gradient_get_color_at() for each rendered pixel. + + app/core/gimpdrawable-gradient.c | 9 ++ + app/operations/gimpoperationgradient.c | 159 + +++++++++++++-------------------- + app/operations/gimpoperationgradient.h | 4 + + app/tools/gimpgradienttool.c | 35 ++++++-- + 4 files changed, 105 insertions(+), 102 deletions(-) + +commit bccaaeb56c98f8d45efce3269f40fb5e94f5e4ca +Author: Michael Natterer +Date: Tue Apr 17 22:24:35 2018 +0200 + + configure.ac: post-release version bump to 2.10.0-RC2-git + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + commit 6582692ec6c8196108b2d42f6758c62076a88d13 Author: Michael Natterer Date: Tue Apr 17 21:27:05 2018 +0200 diff --git a/INSTALL b/INSTALL index 79373cbaf1..789812134a 100644 --- a/INSTALL +++ b/INSTALL @@ -38,7 +38,7 @@ header files installed. You are recommended to install gettext version 0.19 or over. Earlier gettext had issues with script-fu localization, ending up in incomplete GIMP localization. - 3. You need to have GEGL version 0.3.34 or newer and babl version + 3. You need to have GEGL version 0.4.0 or newer and babl version 0.1.46 or newer. You can get them from http://gegl.org/ or clone them from the GNOME git repository: @@ -140,7 +140,7 @@ header files installed. Fontconfig 2.12.4 freetype2 2.1.7 GDK-PixBuf 2.30.8 - GEGL 0.3.34 + GEGL 0.4.0 GIO GLib 2.54.2 glib-networking @@ -196,8 +196,8 @@ packages are included below. Here is an illustration of commands that might be used to build and install GIMP. The actual configuration, compilation and installation output is not shown. - % tar xvfz gimp-2.10.0-RC2.tar.gz # unpack the sources - % cd gimp-2.10.0-RC2 # change to the toplevel directory + % tar xvfz gimp-2.10.0.tar.gz # unpack the sources + % cd gimp-2.10.0 # change to the toplevel directory % ./configure # run the `configure' script % make # build GIMP % make install # install GIMP diff --git a/Makefile.in b/Makefile.in index 2a18f578c7..66105d6eda 100644 --- a/Makefile.in +++ b/Makefile.in @@ -409,7 +409,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/NEWS b/NEWS index eee7d324b0..0f2be9a4e3 100644 --- a/NEWS +++ b/NEWS @@ -1,14 +1,55 @@ ------------------------------ GNU Image Manipulation Program - Development Branch + 2.10 Stable Branch ------------------------------ -This is the unstable development branch of GIMP. Here we are working -towards the next stable release, which will be GIMP 2.10. +This is the stable branch of GIMP. Unlike earlier stable branches, +we do allow some new features here, if they are not too invasive. +Otherwise, this branch is only for bug-fixes. -Generally, all bug fixes that are applied on the stable GIMP 2.8 -branch are also applied here, but they are usually not mentioned -in NEWS. + +Overview of Changes from GIMP 2.10.0 RC1 to GIMP 2.10.0 +======================================================= + +Core: + + - CLI option --show-playground visible in --help. + - Sample point dockable now works with more than 4 sample points. + - Various warnings removed, multi-threading officially not + "experimental" anymore… + - Various fill and fade operations now use the current paint composite + mode, allowing for instance filling to paint over transparent areas. + - Default layer and paint modes are now Normal (instead of Legacy). + - Be smarter about layer modes for new layers. + - Get rid of the remaining places that were using the NORMAL_LEGACY + mode by default (painting, some more). + - Improve painting speed even more by even more evil C++. + - Flipping drawables is much faster because it's now working + tile-by-tile. + - Gradient rendering is now much faster, using a cache. + +Plug-ins: + + - Ripple plugin removed, compat PDB-API "plug-in-ripple" added + instead. + +PDB: + + - New procedure: gimp-item-transform-translate. + - Make gimp-item-transform-* transform linked items too. + - Deprecate gimp-color-balance and gimp-layer-translate. + +Assets / Resources: + + - New "Fun" category for brushes (moving the "Pepper" there, which + also gets improved resolution), and adding Wilber and GEGL brushes. + - "Structure" brush obsoleted. + - 5 new and more serious brushes. + +Translations: + + - 6 translations were updated: Catalan, Danish, Finnish, Korean, + Polish, Swedish. Overview of Changes from GIMP 2.10.0 RC1 to GIMP 2.10.0 RC2 diff --git a/README b/README index d3a13f621d..6d8931ea01 100644 --- a/README +++ b/README @@ -1,16 +1,13 @@ ------------------------------ GNU Image Manipulation Program - 2.9 Development Branch + 2.10 Stable Branch ------------------------------ -This is an unstable development release, an intermediate state on the -way to the next stable release 2.10. GIMP 2.9 may or may not do what -you expect. Save your work early and often. If you want a stable -version, please use GIMP 2.8 instead. +This is a stable release in the GIMP 2.10 series. -GIMP 2.9 replaces earlier GIMP 2.x versions. It is advised that you -uninstall them before installing GIMP 2.9. If you want to keep your -older GIMP 2.x installation in parallel to GIMP 2.9, you have to +GIMP 2.10 replaces earlier GIMP 2.x versions. It is advised that you +uninstall them before installing GIMP 2.10. If you want to keep your +older GIMP 2.x installation in parallel to GIMP 2.10, you have to choose a separate prefix which is not in your default library search path. Otherwise your previous GIMP installation will start to use the new libraries. You have been warned. @@ -85,12 +82,12 @@ The look of GIMP's interface can be customized like any other GTK app by editing the ~/.gtkrc-2.0 file or by using "themes" (ready-made customizations). For downloadable themes and further details, see http://art.gnome.org/themes/gtk2 . Additionally, GIMP reads the file -~/.config/GIMP/2.9/gtkrc so you can have settings that only apply to GIMP. +~/.config/GIMP/2.10/gtkrc so you can have settings that only apply to GIMP. Included is a set of keybindings similar to those in Adobe Photoshop. You can find them in the ps-menurc file. To use them, copy this file -to ~/.config/GIMP/2.9/menurc. You can also manually change the keybindings to -any of your choice by editing ~/.config/GIMP/2.9/menurc. +to ~/.config/GIMP/2.10/menurc. You can also manually change the keybindings +to any of your choice by editing ~/.config/GIMP/2.10/menurc. Have fun, diff --git a/app-tools/Makefile.in b/app-tools/Makefile.in index fa2cf00771..20c3ae1eba 100644 --- a/app-tools/Makefile.in +++ b/app-tools/Makefile.in @@ -328,7 +328,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/Makefile.in b/app/Makefile.in index 93a1a8de4a..8967aef504 100644 --- a/app/Makefile.in +++ b/app/Makefile.in @@ -457,7 +457,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/actions/Makefile.in b/app/actions/Makefile.in index fe6f0192d2..410518746c 100644 --- a/app/actions/Makefile.in +++ b/app/actions/Makefile.in @@ -390,7 +390,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/actions/buffers-commands.c b/app/actions/buffers-commands.c index 454429ec52..8af896219d 100644 --- a/app/actions/buffers-commands.c +++ b/app/actions/buffers-commands.c @@ -43,7 +43,7 @@ #include "gimp-intl.h" -/* public functionss */ +/* public functions */ void buffers_paste_cmd_callback (GtkAction *action, diff --git a/app/actions/dashboard-commands.c b/app/actions/dashboard-commands.c index 2259490fee..d9611f79de 100644 --- a/app/actions/dashboard-commands.c +++ b/app/actions/dashboard-commands.c @@ -32,7 +32,7 @@ #include "gimp-intl.h" -/* public functionss */ +/* public functions */ void diff --git a/app/actions/data-editor-commands.c b/app/actions/data-editor-commands.c index 032084fa06..369626ba5a 100644 --- a/app/actions/data-editor-commands.c +++ b/app/actions/data-editor-commands.c @@ -27,7 +27,7 @@ #include "data-editor-commands.h" -/* public functionss */ +/* public functions */ void data_editor_edit_active_cmd_callback (GtkAction *action, diff --git a/app/actions/debug-actions.c b/app/actions/debug-actions.c index 79d5539c2a..c2fbff694b 100644 --- a/app/actions/debug-actions.c +++ b/app/actions/debug-actions.c @@ -44,7 +44,7 @@ static const GimpActionEntry debug_actions[] = { "debug-benchmark-projection", NULL, "Benchmark _Projection", NULL, "Invalidates the entire projection, measures the time it takes to " - "validate (render) the part that is visible in the active diaplay, " + "validate (render) the part that is visible in the active display, " "and print the result to stdout.", G_CALLBACK (debug_benchmark_projection_cmd_callback), NULL }, diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c index 0c6d75d5b7..fb60dbbafe 100644 --- a/app/actions/edit-commands.c +++ b/app/actions/edit-commands.c @@ -32,6 +32,7 @@ #include "core/gimpbuffer.h" #include "core/gimpcontainer.h" #include "core/gimpdrawable.h" +#include "core/gimpdrawable-edit.h" #include "core/gimpfilloptions.h" #include "core/gimplayer.h" #include "core/gimplayer-new.h" @@ -480,7 +481,7 @@ edit_clear_cmd_callback (GtkAction *action, GimpDrawable *drawable; return_if_no_drawable (image, drawable, data); - gimp_edit_clear (image, drawable, action_data_get_context (data)); + gimp_drawable_edit_clear (drawable, action_data_get_context (data)); gimp_image_flush (image); } @@ -504,7 +505,7 @@ edit_fill_cmd_callback (GtkAction *action, action_data_get_context (data), fill_type, &error)) { - gimp_edit_fill (image, drawable, options, NULL); + gimp_drawable_edit_fill (drawable, options, NULL); gimp_image_flush (image); } else diff --git a/app/actions/filters-actions.c b/app/actions/filters-actions.c index 47a79a23ee..2022a0f09c 100644 --- a/app/actions/filters-actions.c +++ b/app/actions/filters-actions.c @@ -366,7 +366,7 @@ static const GimpStringActionEntry filters_interactive_actions[] = { "filters-grid", GIMP_ICON_GRID, NC_("filters-action", "_Grid..."), NULL, NULL, "gegl:grid", - GIMP_HELP_FILTER_GAUSSIAN_GRID }, + GIMP_HELP_FILTER_GRID }, { "filters-high-pass", GIMP_ICON_GEGL, NC_("filters-action", "_High Pass..."), NULL, NULL, diff --git a/app/actions/fonts-commands.c b/app/actions/fonts-commands.c index 0178ff4fa6..149cfef7c1 100644 --- a/app/actions/fonts-commands.c +++ b/app/actions/fonts-commands.c @@ -30,7 +30,7 @@ #include "fonts-commands.h" -/* public functionss */ +/* public functions */ void fonts_refresh_cmd_callback (GtkAction *action, diff --git a/app/actions/gradient-editor-commands.c b/app/actions/gradient-editor-commands.c index 9ffc70e623..18a0c4702b 100644 --- a/app/actions/gradient-editor-commands.c +++ b/app/actions/gradient-editor-commands.c @@ -65,7 +65,7 @@ static void gradient_editor_replicate_response (GtkWidget *widge GimpGradientEditor *editor); -/* public functionss */ +/* public functions */ void gradient_editor_left_color_cmd_callback (GtkAction *action, diff --git a/app/actions/images-commands.c b/app/actions/images-commands.c index 0e62350f0a..f7260a305b 100644 --- a/app/actions/images-commands.c +++ b/app/actions/images-commands.c @@ -38,7 +38,7 @@ #include "images-commands.h" -/* public functionss */ +/* public functions */ void images_raise_views_cmd_callback (GtkAction *action, diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c index 6f27b4f3c6..ae197d554f 100644 --- a/app/actions/layers-commands.c +++ b/app/actions/layers-commands.c @@ -320,7 +320,14 @@ layers_new_cmd_callback (GtkAction *action, if (! dialog) { - GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config); + GimpDialogConfig *config = GIMP_DIALOG_CONFIG (image->gimp->config); + GimpLayerMode layer_mode = config->layer_new_mode; + + if (layer_mode == GIMP_LAYER_MODE_NORMAL || + layer_mode == GIMP_LAYER_MODE_NORMAL_LEGACY) + { + layer_mode = gimp_image_get_default_new_layer_mode (image); + } dialog = layer_options_dialog_new (image, NULL, action_data_get_context (data), @@ -331,7 +338,7 @@ layers_new_cmd_callback (GtkAction *action, _("Create a New Layer"), GIMP_HELP_LAYER_NEW, config->layer_new_name, - config->layer_new_mode, + layer_mode, config->layer_new_blend_space, config->layer_new_composite_space, config->layer_new_composite_mode, @@ -360,6 +367,7 @@ layers_new_last_vals_cmd_callback (GtkAction *action, GtkWidget *widget; GimpLayer *layer; GimpDialogConfig *config; + GimpLayerMode layer_mode; return_if_no_image (image, data); return_if_no_widget (widget, data); @@ -375,13 +383,21 @@ layers_new_last_vals_cmd_callback (GtkAction *action, return; } + layer_mode = config->layer_new_mode; + + if (layer_mode == GIMP_LAYER_MODE_NORMAL || + layer_mode == GIMP_LAYER_MODE_NORMAL_LEGACY) + { + layer_mode = gimp_image_get_default_new_layer_mode (image); + } + layer = gimp_layer_new (image, gimp_image_get_width (image), gimp_image_get_height (image), gimp_image_get_layer_format (image, TRUE), config->layer_new_name, config->layer_new_opacity, - config->layer_new_mode); + layer_mode); gimp_drawable_fill (GIMP_DRAWABLE (layer), action_data_get_context (data), diff --git a/app/actions/palettes-commands.c b/app/actions/palettes-commands.c index d601c1a766..f3f1f5f8b3 100644 --- a/app/actions/palettes-commands.c +++ b/app/actions/palettes-commands.c @@ -51,7 +51,7 @@ static void palettes_merge_callback (GtkWidget *widget, gpointer data); -/* public functionss */ +/* public functions */ void palettes_import_cmd_callback (GtkAction *action, diff --git a/app/actions/quick-mask-commands.c b/app/actions/quick-mask-commands.c index 49373cfafd..ea699bc47e 100644 --- a/app/actions/quick-mask-commands.c +++ b/app/actions/quick-mask-commands.c @@ -59,7 +59,7 @@ static void quick_mask_configure_callback (GtkWidget *dialog, gpointer user_data); -/* public functionss */ +/* public functions */ void quick_mask_toggle_cmd_callback (GtkAction *action, diff --git a/app/config/Makefile.in b/app/config/Makefile.in index 4e565704a6..49e4489db9 100644 --- a/app/config/Makefile.in +++ b/app/config/Makefile.in @@ -564,7 +564,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/config/gimpdialogconfig.c b/app/config/gimpdialogconfig.c index abf4243f1a..a03ea0b47a 100644 --- a/app/config/gimpdialogconfig.c +++ b/app/config/gimpdialogconfig.c @@ -312,7 +312,7 @@ gimp_dialog_config_class_init (GimpDialogConfigClass *klass) "Default new layer mode", LAYER_NEW_MODE_BLURB, GIMP_TYPE_LAYER_MODE, - GIMP_LAYER_MODE_NORMAL_LEGACY, + GIMP_LAYER_MODE_NORMAL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_LAYER_NEW_BLEND_SPACE, diff --git a/app/core/Makefile.am b/app/core/Makefile.am index b64468551b..1d4855fcc9 100644 --- a/app/core/Makefile.am +++ b/app/core/Makefile.am @@ -154,6 +154,8 @@ libappcore_a_sources = \ gimpdrawable-bucket-fill.h \ gimpdrawable-combine.c \ gimpdrawable-combine.h \ + gimpdrawable-edit.c \ + gimpdrawable-edit.h \ gimpdrawable-equalize.c \ gimpdrawable-equalize.h \ gimpdrawable-fill.c \ @@ -251,6 +253,8 @@ libappcore_a_sources = \ gimpimage-crop.h \ gimpimage-duplicate.c \ gimpimage-duplicate.h \ + gimpimage-fade.c \ + gimpimage-fade.h \ gimpimage-flip.c \ gimpimage-flip.h \ gimpimage-grid.h \ diff --git a/app/core/Makefile.in b/app/core/Makefile.in index 687fd65ee0..a83b93bf9f 100644 --- a/app/core/Makefile.in +++ b/app/core/Makefile.in @@ -151,8 +151,9 @@ am__objects_2 = gimp.$(OBJEXT) gimp-batch.$(OBJEXT) \ gimpdashpattern.$(OBJEXT) gimpdata.$(OBJEXT) \ gimpdatafactory.$(OBJEXT) gimpdocumentlist.$(OBJEXT) \ gimpdrawable.$(OBJEXT) gimpdrawable-bucket-fill.$(OBJEXT) \ - gimpdrawable-combine.$(OBJEXT) gimpdrawable-equalize.$(OBJEXT) \ - gimpdrawable-fill.$(OBJEXT) gimpdrawable-filters.$(OBJEXT) \ + gimpdrawable-combine.$(OBJEXT) gimpdrawable-edit.$(OBJEXT) \ + gimpdrawable-equalize.$(OBJEXT) gimpdrawable-fill.$(OBJEXT) \ + gimpdrawable-filters.$(OBJEXT) \ gimpdrawable-floating-selection.$(OBJEXT) \ gimpdrawable-foreground-extract.$(OBJEXT) \ gimpdrawable-gradient.$(OBJEXT) \ @@ -177,34 +178,35 @@ am__objects_2 = gimp.$(OBJEXT) gimp-batch.$(OBJEXT) \ gimpimage-convert-indexed.$(OBJEXT) \ gimpimage-convert-precision.$(OBJEXT) \ gimpimage-convert-type.$(OBJEXT) gimpimage-crop.$(OBJEXT) \ - gimpimage-duplicate.$(OBJEXT) gimpimage-flip.$(OBJEXT) \ - gimpimage-grid.$(OBJEXT) gimpimage-guides.$(OBJEXT) \ - gimpimage-item-list.$(OBJEXT) gimpimage-merge.$(OBJEXT) \ - gimpimage-metadata.$(OBJEXT) gimpimage-new.$(OBJEXT) \ - gimpimage-pick-color.$(OBJEXT) gimpimage-pick-item.$(OBJEXT) \ - gimpimage-preview.$(OBJEXT) gimpimage-quick-mask.$(OBJEXT) \ - gimpimage-resize.$(OBJEXT) gimpimage-rotate.$(OBJEXT) \ - gimpimage-sample-points.$(OBJEXT) gimpimage-scale.$(OBJEXT) \ - gimpimage-snap.$(OBJEXT) gimpimage-symmetry.$(OBJEXT) \ - gimpimage-undo.$(OBJEXT) gimpimage-undo-push.$(OBJEXT) \ - gimpimageundo.$(OBJEXT) gimpimagefile.$(OBJEXT) \ - gimpitem.$(OBJEXT) gimpitem-exclusive.$(OBJEXT) \ - gimpitem-linked.$(OBJEXT) gimpitem-preview.$(OBJEXT) \ - gimpitempropundo.$(OBJEXT) gimpitemstack.$(OBJEXT) \ - gimpitemtree.$(OBJEXT) gimpitemundo.$(OBJEXT) \ - gimplayer.$(OBJEXT) gimplayer-floating-selection.$(OBJEXT) \ - gimplayer-new.$(OBJEXT) gimplayermask.$(OBJEXT) \ - gimplayermaskpropundo.$(OBJEXT) gimplayermaskundo.$(OBJEXT) \ - gimplayerpropundo.$(OBJEXT) gimplayerstack.$(OBJEXT) \ - gimplayerundo.$(OBJEXT) gimplist.$(OBJEXT) \ - gimpmaskundo.$(OBJEXT) gimpmybrush.$(OBJEXT) \ - gimpmybrush-load.$(OBJEXT) gimpobject.$(OBJEXT) \ - gimpobjectqueue.$(OBJEXT) gimppaintinfo.$(OBJEXT) \ - gimppattern.$(OBJEXT) gimppattern-load.$(OBJEXT) \ - gimppatternclipboard.$(OBJEXT) gimppalette.$(OBJEXT) \ - gimppalette-import.$(OBJEXT) gimppalette-load.$(OBJEXT) \ - gimppalette-save.$(OBJEXT) gimppalettemru.$(OBJEXT) \ - gimpparamspecs.$(OBJEXT) gimpparamspecs-desc.$(OBJEXT) \ + gimpimage-duplicate.$(OBJEXT) gimpimage-fade.$(OBJEXT) \ + gimpimage-flip.$(OBJEXT) gimpimage-grid.$(OBJEXT) \ + gimpimage-guides.$(OBJEXT) gimpimage-item-list.$(OBJEXT) \ + gimpimage-merge.$(OBJEXT) gimpimage-metadata.$(OBJEXT) \ + gimpimage-new.$(OBJEXT) gimpimage-pick-color.$(OBJEXT) \ + gimpimage-pick-item.$(OBJEXT) gimpimage-preview.$(OBJEXT) \ + gimpimage-quick-mask.$(OBJEXT) gimpimage-resize.$(OBJEXT) \ + gimpimage-rotate.$(OBJEXT) gimpimage-sample-points.$(OBJEXT) \ + gimpimage-scale.$(OBJEXT) gimpimage-snap.$(OBJEXT) \ + gimpimage-symmetry.$(OBJEXT) gimpimage-undo.$(OBJEXT) \ + gimpimage-undo-push.$(OBJEXT) gimpimageundo.$(OBJEXT) \ + gimpimagefile.$(OBJEXT) gimpitem.$(OBJEXT) \ + gimpitem-exclusive.$(OBJEXT) gimpitem-linked.$(OBJEXT) \ + gimpitem-preview.$(OBJEXT) gimpitempropundo.$(OBJEXT) \ + gimpitemstack.$(OBJEXT) gimpitemtree.$(OBJEXT) \ + gimpitemundo.$(OBJEXT) gimplayer.$(OBJEXT) \ + gimplayer-floating-selection.$(OBJEXT) gimplayer-new.$(OBJEXT) \ + gimplayermask.$(OBJEXT) gimplayermaskpropundo.$(OBJEXT) \ + gimplayermaskundo.$(OBJEXT) gimplayerpropundo.$(OBJEXT) \ + gimplayerstack.$(OBJEXT) gimplayerundo.$(OBJEXT) \ + gimplist.$(OBJEXT) gimpmaskundo.$(OBJEXT) \ + gimpmybrush.$(OBJEXT) gimpmybrush-load.$(OBJEXT) \ + gimpobject.$(OBJEXT) gimpobjectqueue.$(OBJEXT) \ + gimppaintinfo.$(OBJEXT) gimppattern.$(OBJEXT) \ + gimppattern-load.$(OBJEXT) gimppatternclipboard.$(OBJEXT) \ + gimppalette.$(OBJEXT) gimppalette-import.$(OBJEXT) \ + gimppalette-load.$(OBJEXT) gimppalette-save.$(OBJEXT) \ + gimppalettemru.$(OBJEXT) gimpparamspecs.$(OBJEXT) \ + gimpparamspecs-desc.$(OBJEXT) \ gimpparamspecs-duplicate.$(OBJEXT) gimpparasitelist.$(OBJEXT) \ gimppdbprogress.$(OBJEXT) gimppickable.$(OBJEXT) \ gimppickable-auto-shrink.$(OBJEXT) \ @@ -463,7 +465,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ @@ -861,6 +863,8 @@ libappcore_a_sources = \ gimpdrawable-bucket-fill.h \ gimpdrawable-combine.c \ gimpdrawable-combine.h \ + gimpdrawable-edit.c \ + gimpdrawable-edit.h \ gimpdrawable-equalize.c \ gimpdrawable-equalize.h \ gimpdrawable-fill.c \ @@ -958,6 +962,8 @@ libappcore_a_sources = \ gimpimage-crop.h \ gimpimage-duplicate.c \ gimpimage-duplicate.h \ + gimpimage-fade.c \ + gimpimage-fade.h \ gimpimage-flip.c \ gimpimage-flip.h \ gimpimage-grid.h \ @@ -1271,6 +1277,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpdocumentlist.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpdrawable-bucket-fill.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpdrawable-combine.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpdrawable-edit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpdrawable-equalize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpdrawable-fill.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpdrawable-filters.Po@am__quote@ @@ -1318,6 +1325,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpimage-convert-type.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpimage-crop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpimage-duplicate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpimage-fade.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpimage-flip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpimage-grid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gimpimage-guides.Po@am__quote@ diff --git a/app/core/core-enums.c b/app/core/core-enums.c index 24333819e5..ce5781d468 100644 --- a/app/core/core-enums.c +++ b/app/core/core-enums.c @@ -770,6 +770,7 @@ gimp_undo_type_get_type (void) { GIMP_UNDO_GROUP_IMAGE_CROP, "GIMP_UNDO_GROUP_IMAGE_CROP", "group-image-crop" }, { GIMP_UNDO_GROUP_IMAGE_CONVERT, "GIMP_UNDO_GROUP_IMAGE_CONVERT", "group-image-convert" }, { GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, "GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE", "group-image-item-remove" }, + { GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, "GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER", "group-image-item-reorder" }, { GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, "GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE", "group-image-layers-merge" }, { GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, "GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE", "group-image-vectors-merge" }, { GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, "GIMP_UNDO_GROUP_IMAGE_QUICK_MASK", "group-image-quick-mask" }, @@ -830,8 +831,8 @@ gimp_undo_type_get_type (void) { GIMP_UNDO_GROUP_LAYER_RESUME_RESIZE, "GIMP_UNDO_GROUP_LAYER_RESUME_RESIZE", "group-layer-resume-resize" }, { GIMP_UNDO_GROUP_LAYER_SUSPEND_MASK, "GIMP_UNDO_GROUP_LAYER_SUSPEND_MASK", "group-layer-suspend-mask" }, { GIMP_UNDO_GROUP_LAYER_RESUME_MASK, "GIMP_UNDO_GROUP_LAYER_RESUME_MASK", "group-layer-resume-mask" }, - { GIMP_UNDO_GROUP_LAYER_START_MOVE, "GIMP_UNDO_GROUP_LAYER_START_MOVE", "group-layer-start-move" }, - { GIMP_UNDO_GROUP_LAYER_END_MOVE, "GIMP_UNDO_GROUP_LAYER_END_MOVE", "group-layer-end-move" }, + { GIMP_UNDO_GROUP_LAYER_START_TRANSFORM, "GIMP_UNDO_GROUP_LAYER_START_TRANSFORM", "group-layer-start-transform" }, + { GIMP_UNDO_GROUP_LAYER_END_TRANSFORM, "GIMP_UNDO_GROUP_LAYER_END_TRANSFORM", "group-layer-end-transform" }, { GIMP_UNDO_GROUP_LAYER_CONVERT, "GIMP_UNDO_GROUP_LAYER_CONVERT", "group-layer-convert" }, { GIMP_UNDO_TEXT_LAYER, "GIMP_UNDO_TEXT_LAYER", "text-layer" }, { GIMP_UNDO_TEXT_LAYER_MODIFIED, "GIMP_UNDO_TEXT_LAYER_MODIFIED", "text-layer-modified" }, @@ -867,6 +868,7 @@ gimp_undo_type_get_type (void) { GIMP_UNDO_GROUP_IMAGE_CROP, NC_("undo-type", "Crop image"), NULL }, { GIMP_UNDO_GROUP_IMAGE_CONVERT, NC_("undo-type", "Convert image"), NULL }, { GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, NC_("undo-type", "Remove item"), NULL }, + { GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, NC_("undo-type", "Reorder item"), NULL }, { GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, NC_("undo-type", "Merge layers"), NULL }, { GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, NC_("undo-type", "Merge paths"), NULL }, { GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, NC_("undo-type", "Quick Mask"), NULL }, @@ -927,8 +929,8 @@ gimp_undo_type_get_type (void) { GIMP_UNDO_GROUP_LAYER_RESUME_RESIZE, NC_("undo-type", "Resume group layer resize"), NULL }, { GIMP_UNDO_GROUP_LAYER_SUSPEND_MASK, NC_("undo-type", "Suspend group layer mask"), NULL }, { GIMP_UNDO_GROUP_LAYER_RESUME_MASK, NC_("undo-type", "Resume group layer mask"), NULL }, - { GIMP_UNDO_GROUP_LAYER_START_MOVE, NC_("undo-type", "Start moving group layer"), NULL }, - { GIMP_UNDO_GROUP_LAYER_END_MOVE, NC_("undo-type", "End moving group layer"), NULL }, + { GIMP_UNDO_GROUP_LAYER_START_TRANSFORM, NC_("undo-type", "Start transforming group layer"), NULL }, + { GIMP_UNDO_GROUP_LAYER_END_TRANSFORM, NC_("undo-type", "End transforming group layer"), NULL }, { GIMP_UNDO_GROUP_LAYER_CONVERT, NC_("undo-type", "Convert group layer"), NULL }, { GIMP_UNDO_TEXT_LAYER, NC_("undo-type", "Text layer"), NULL }, { GIMP_UNDO_TEXT_LAYER_MODIFIED, NC_("undo-type", "Text layer modification"), NULL }, diff --git a/app/core/core-enums.h b/app/core/core-enums.h index e0705d5502..bef6da0560 100644 --- a/app/core/core-enums.h +++ b/app/core/core-enums.h @@ -350,107 +350,108 @@ typedef enum /*< pdb-skip >*/ /* Type NO_UNDO_GROUP (0) is special - in the gimpimage structure it * means there is no undo group currently being added to. */ - GIMP_UNDO_GROUP_NONE = 0, /*< desc="<>" >*/ + GIMP_UNDO_GROUP_NONE = 0, /*< desc="<>" >*/ GIMP_UNDO_GROUP_FIRST = GIMP_UNDO_GROUP_NONE, /*< skip >*/ - GIMP_UNDO_GROUP_IMAGE_SCALE, /*< desc="Scale image" >*/ - GIMP_UNDO_GROUP_IMAGE_RESIZE, /*< desc="Resize image" >*/ - GIMP_UNDO_GROUP_IMAGE_FLIP, /*< desc="Flip image" >*/ - GIMP_UNDO_GROUP_IMAGE_ROTATE, /*< desc="Rotate image" >*/ - GIMP_UNDO_GROUP_IMAGE_CROP, /*< desc="Crop image" >*/ - GIMP_UNDO_GROUP_IMAGE_CONVERT, /*< desc="Convert image" >*/ - GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, /*< desc="Remove item" >*/ - GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, /*< desc="Merge layers" >*/ - GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE,/*< desc="Merge paths" >*/ - GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, /*< desc="Quick Mask" >*/ - GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/ - GIMP_UNDO_GROUP_GUIDE, /*< desc="Guide" >*/ - GIMP_UNDO_GROUP_SAMPLE_POINT, /*< desc="Sample Point" >*/ - GIMP_UNDO_GROUP_DRAWABLE, /*< desc="Layer/Channel" >*/ - GIMP_UNDO_GROUP_DRAWABLE_MOD, /*< desc="Layer/Channel modification" >*/ - GIMP_UNDO_GROUP_MASK, /*< desc="Selection mask" >*/ - GIMP_UNDO_GROUP_ITEM_VISIBILITY, /*< desc="Item visibility" >*/ - GIMP_UNDO_GROUP_ITEM_LINKED, /*< desc="Link/Unlink item" >*/ - GIMP_UNDO_GROUP_ITEM_PROPERTIES, /*< desc="Item properties" >*/ - GIMP_UNDO_GROUP_ITEM_DISPLACE, /*< desc="Move item" >*/ - GIMP_UNDO_GROUP_ITEM_SCALE, /*< desc="Scale item" >*/ - GIMP_UNDO_GROUP_ITEM_RESIZE, /*< desc="Resize item" >*/ - GIMP_UNDO_GROUP_LAYER_ADD, /*< desc="Add layer" >*/ - GIMP_UNDO_GROUP_LAYER_ADD_MASK, /*< desc="Add layer mask" >*/ - GIMP_UNDO_GROUP_LAYER_APPLY_MASK, /*< desc="Apply layer mask" >*/ - GIMP_UNDO_GROUP_FS_TO_LAYER, /*< desc="Floating selection to layer" >*/ - GIMP_UNDO_GROUP_FS_FLOAT, /*< desc="Float selection" >*/ - GIMP_UNDO_GROUP_FS_ANCHOR, /*< desc="Anchor floating selection" >*/ - GIMP_UNDO_GROUP_EDIT_PASTE, /*< desc="Paste" >*/ - GIMP_UNDO_GROUP_EDIT_CUT, /*< desc="Cut" >*/ - GIMP_UNDO_GROUP_TEXT, /*< desc="Text" >*/ - GIMP_UNDO_GROUP_TRANSFORM, /*< desc="Transform" >*/ - GIMP_UNDO_GROUP_PAINT, /*< desc="Paint" >*/ - GIMP_UNDO_GROUP_PARASITE_ATTACH, /*< desc="Attach parasite" >*/ - GIMP_UNDO_GROUP_PARASITE_REMOVE, /*< desc="Remove parasite" >*/ - GIMP_UNDO_GROUP_VECTORS_IMPORT, /*< desc="Import paths" >*/ - GIMP_UNDO_GROUP_MISC, /*< desc="Plug-In" >*/ + GIMP_UNDO_GROUP_IMAGE_SCALE, /*< desc="Scale image" >*/ + GIMP_UNDO_GROUP_IMAGE_RESIZE, /*< desc="Resize image" >*/ + GIMP_UNDO_GROUP_IMAGE_FLIP, /*< desc="Flip image" >*/ + GIMP_UNDO_GROUP_IMAGE_ROTATE, /*< desc="Rotate image" >*/ + GIMP_UNDO_GROUP_IMAGE_CROP, /*< desc="Crop image" >*/ + GIMP_UNDO_GROUP_IMAGE_CONVERT, /*< desc="Convert image" >*/ + GIMP_UNDO_GROUP_IMAGE_ITEM_REMOVE, /*< desc="Remove item" >*/ + GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, /*< desc="Reorder item" >*/ + GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, /*< desc="Merge layers" >*/ + GIMP_UNDO_GROUP_IMAGE_VECTORS_MERGE, /*< desc="Merge paths" >*/ + GIMP_UNDO_GROUP_IMAGE_QUICK_MASK, /*< desc="Quick Mask" >*/ + GIMP_UNDO_GROUP_IMAGE_GRID, /*< desc="Grid" >*/ + GIMP_UNDO_GROUP_GUIDE, /*< desc="Guide" >*/ + GIMP_UNDO_GROUP_SAMPLE_POINT, /*< desc="Sample Point" >*/ + GIMP_UNDO_GROUP_DRAWABLE, /*< desc="Layer/Channel" >*/ + GIMP_UNDO_GROUP_DRAWABLE_MOD, /*< desc="Layer/Channel modification" >*/ + GIMP_UNDO_GROUP_MASK, /*< desc="Selection mask" >*/ + GIMP_UNDO_GROUP_ITEM_VISIBILITY, /*< desc="Item visibility" >*/ + GIMP_UNDO_GROUP_ITEM_LINKED, /*< desc="Link/Unlink item" >*/ + GIMP_UNDO_GROUP_ITEM_PROPERTIES, /*< desc="Item properties" >*/ + GIMP_UNDO_GROUP_ITEM_DISPLACE, /*< desc="Move item" >*/ + GIMP_UNDO_GROUP_ITEM_SCALE, /*< desc="Scale item" >*/ + GIMP_UNDO_GROUP_ITEM_RESIZE, /*< desc="Resize item" >*/ + GIMP_UNDO_GROUP_LAYER_ADD, /*< desc="Add layer" >*/ + GIMP_UNDO_GROUP_LAYER_ADD_MASK, /*< desc="Add layer mask" >*/ + GIMP_UNDO_GROUP_LAYER_APPLY_MASK, /*< desc="Apply layer mask" >*/ + GIMP_UNDO_GROUP_FS_TO_LAYER, /*< desc="Floating selection to layer" >*/ + GIMP_UNDO_GROUP_FS_FLOAT, /*< desc="Float selection" >*/ + GIMP_UNDO_GROUP_FS_ANCHOR, /*< desc="Anchor floating selection" >*/ + GIMP_UNDO_GROUP_EDIT_PASTE, /*< desc="Paste" >*/ + GIMP_UNDO_GROUP_EDIT_CUT, /*< desc="Cut" >*/ + GIMP_UNDO_GROUP_TEXT, /*< desc="Text" >*/ + GIMP_UNDO_GROUP_TRANSFORM, /*< desc="Transform" >*/ + GIMP_UNDO_GROUP_PAINT, /*< desc="Paint" >*/ + GIMP_UNDO_GROUP_PARASITE_ATTACH, /*< desc="Attach parasite" >*/ + GIMP_UNDO_GROUP_PARASITE_REMOVE, /*< desc="Remove parasite" >*/ + GIMP_UNDO_GROUP_VECTORS_IMPORT, /*< desc="Import paths" >*/ + GIMP_UNDO_GROUP_MISC, /*< desc="Plug-In" >*/ GIMP_UNDO_GROUP_LAST = GIMP_UNDO_GROUP_MISC, /*< skip >*/ /* Undo types which actually do something */ - GIMP_UNDO_IMAGE_TYPE, /*< desc="Image type" >*/ - GIMP_UNDO_IMAGE_PRECISION, /*< desc="Image precision" >*/ - GIMP_UNDO_IMAGE_SIZE, /*< desc="Image size" >*/ - GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Image resolution change" >*/ - GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/ - GIMP_UNDO_IMAGE_METADATA, /*< desc="Change metadata" >*/ - GIMP_UNDO_IMAGE_COLORMAP, /*< desc="Change indexed palette" >*/ - GIMP_UNDO_IMAGE_COLOR_MANAGED, /*< desc="Change color managed state" >*/ - GIMP_UNDO_GUIDE, /*< desc="Guide" >*/ - GIMP_UNDO_SAMPLE_POINT, /*< desc="Sample Point" >*/ - GIMP_UNDO_DRAWABLE, /*< desc="Layer/Channel" >*/ - GIMP_UNDO_DRAWABLE_MOD, /*< desc="Layer/Channel modification" >*/ - GIMP_UNDO_MASK, /*< desc="Selection mask" >*/ - GIMP_UNDO_ITEM_REORDER, /*< desc="Reorder item" >*/ - GIMP_UNDO_ITEM_RENAME, /*< desc="Rename item" >*/ - GIMP_UNDO_ITEM_DISPLACE, /*< desc="Move item" >*/ - GIMP_UNDO_ITEM_VISIBILITY, /*< desc="Item visibility" >*/ - GIMP_UNDO_ITEM_LINKED, /*< desc="Link/Unlink item" >*/ - GIMP_UNDO_ITEM_COLOR_TAG, /*< desc="Item color tag" >*/ - GIMP_UNDO_ITEM_LOCK_CONTENT, /*< desc="Lock/Unlock content" >*/ - GIMP_UNDO_ITEM_LOCK_POSITION, /*< desc="Lock/Unlock position" >*/ - GIMP_UNDO_LAYER_ADD, /*< desc="New layer" >*/ - GIMP_UNDO_LAYER_REMOVE, /*< desc="Delete layer" >*/ - GIMP_UNDO_LAYER_MODE, /*< desc="Set layer mode" >*/ - GIMP_UNDO_LAYER_OPACITY, /*< desc="Set layer opacity" >*/ - GIMP_UNDO_LAYER_LOCK_ALPHA, /*< desc="Lock/Unlock alpha channel" >*/ - GIMP_UNDO_GROUP_LAYER_SUSPEND_RESIZE,/*< desc="Suspend group layer resize" >*/ - GIMP_UNDO_GROUP_LAYER_RESUME_RESIZE,/*< desc="Resume group layer resize" >*/ - GIMP_UNDO_GROUP_LAYER_SUSPEND_MASK, /*< desc="Suspend group layer mask" >*/ - GIMP_UNDO_GROUP_LAYER_RESUME_MASK, /*< desc="Resume group layer mask" >*/ - GIMP_UNDO_GROUP_LAYER_START_MOVE, /*< desc="Start moving group layer" >*/ - GIMP_UNDO_GROUP_LAYER_END_MOVE, /*< desc="End moving group layer" >*/ - GIMP_UNDO_GROUP_LAYER_CONVERT, /*< desc="Convert group layer" >*/ - GIMP_UNDO_TEXT_LAYER, /*< desc="Text layer" >*/ - GIMP_UNDO_TEXT_LAYER_MODIFIED, /*< desc="Text layer modification" >*/ - GIMP_UNDO_TEXT_LAYER_CONVERT, /*< desc="Convert text layer" >*/ - GIMP_UNDO_LAYER_MASK_ADD, /*< desc="Add layer mask" >*/ - GIMP_UNDO_LAYER_MASK_REMOVE, /*< desc="Delete layer mask" >*/ - GIMP_UNDO_LAYER_MASK_APPLY, /*< desc="Apply layer mask" >*/ - GIMP_UNDO_LAYER_MASK_SHOW, /*< desc="Show layer mask" >*/ - GIMP_UNDO_CHANNEL_ADD, /*< desc="New channel" >*/ - GIMP_UNDO_CHANNEL_REMOVE, /*< desc="Delete channel" >*/ - GIMP_UNDO_CHANNEL_COLOR, /*< desc="Channel color" >*/ - GIMP_UNDO_VECTORS_ADD, /*< desc="New path" >*/ - GIMP_UNDO_VECTORS_REMOVE, /*< desc="Delete path" >*/ - GIMP_UNDO_VECTORS_MOD, /*< desc="Path modification" >*/ - GIMP_UNDO_FS_TO_LAYER, /*< desc="Floating selection to layer" >*/ - GIMP_UNDO_TRANSFORM, /*< desc="Transform" >*/ - GIMP_UNDO_PAINT, /*< desc="Paint" >*/ - GIMP_UNDO_INK, /*< desc="Ink" >*/ - GIMP_UNDO_FOREGROUND_SELECT, /*< desc="Select foreground" >*/ - GIMP_UNDO_PARASITE_ATTACH, /*< desc="Attach parasite" >*/ - GIMP_UNDO_PARASITE_REMOVE, /*< desc="Remove parasite" >*/ + GIMP_UNDO_IMAGE_TYPE, /*< desc="Image type" >*/ + GIMP_UNDO_IMAGE_PRECISION, /*< desc="Image precision" >*/ + GIMP_UNDO_IMAGE_SIZE, /*< desc="Image size" >*/ + GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Image resolution change" >*/ + GIMP_UNDO_IMAGE_GRID, /*< desc="Grid" >*/ + GIMP_UNDO_IMAGE_METADATA, /*< desc="Change metadata" >*/ + GIMP_UNDO_IMAGE_COLORMAP, /*< desc="Change indexed palette" >*/ + GIMP_UNDO_IMAGE_COLOR_MANAGED, /*< desc="Change color managed state" >*/ + GIMP_UNDO_GUIDE, /*< desc="Guide" >*/ + GIMP_UNDO_SAMPLE_POINT, /*< desc="Sample Point" >*/ + GIMP_UNDO_DRAWABLE, /*< desc="Layer/Channel" >*/ + GIMP_UNDO_DRAWABLE_MOD, /*< desc="Layer/Channel modification" >*/ + GIMP_UNDO_MASK, /*< desc="Selection mask" >*/ + GIMP_UNDO_ITEM_REORDER, /*< desc="Reorder item" >*/ + GIMP_UNDO_ITEM_RENAME, /*< desc="Rename item" >*/ + GIMP_UNDO_ITEM_DISPLACE, /*< desc="Move item" >*/ + GIMP_UNDO_ITEM_VISIBILITY, /*< desc="Item visibility" >*/ + GIMP_UNDO_ITEM_LINKED, /*< desc="Link/Unlink item" >*/ + GIMP_UNDO_ITEM_COLOR_TAG, /*< desc="Item color tag" >*/ + GIMP_UNDO_ITEM_LOCK_CONTENT, /*< desc="Lock/Unlock content" >*/ + GIMP_UNDO_ITEM_LOCK_POSITION, /*< desc="Lock/Unlock position" >*/ + GIMP_UNDO_LAYER_ADD, /*< desc="New layer" >*/ + GIMP_UNDO_LAYER_REMOVE, /*< desc="Delete layer" >*/ + GIMP_UNDO_LAYER_MODE, /*< desc="Set layer mode" >*/ + GIMP_UNDO_LAYER_OPACITY, /*< desc="Set layer opacity" >*/ + GIMP_UNDO_LAYER_LOCK_ALPHA, /*< desc="Lock/Unlock alpha channel" >*/ + GIMP_UNDO_GROUP_LAYER_SUSPEND_RESIZE, /*< desc="Suspend group layer resize" >*/ + GIMP_UNDO_GROUP_LAYER_RESUME_RESIZE, /*< desc="Resume group layer resize" >*/ + GIMP_UNDO_GROUP_LAYER_SUSPEND_MASK, /*< desc="Suspend group layer mask" >*/ + GIMP_UNDO_GROUP_LAYER_RESUME_MASK, /*< desc="Resume group layer mask" >*/ + GIMP_UNDO_GROUP_LAYER_START_TRANSFORM, /*< desc="Start transforming group layer" >*/ + GIMP_UNDO_GROUP_LAYER_END_TRANSFORM, /*< desc="End transforming group layer" >*/ + GIMP_UNDO_GROUP_LAYER_CONVERT, /*< desc="Convert group layer" >*/ + GIMP_UNDO_TEXT_LAYER, /*< desc="Text layer" >*/ + GIMP_UNDO_TEXT_LAYER_MODIFIED, /*< desc="Text layer modification" >*/ + GIMP_UNDO_TEXT_LAYER_CONVERT, /*< desc="Convert text layer" >*/ + GIMP_UNDO_LAYER_MASK_ADD, /*< desc="Add layer mask" >*/ + GIMP_UNDO_LAYER_MASK_REMOVE, /*< desc="Delete layer mask" >*/ + GIMP_UNDO_LAYER_MASK_APPLY, /*< desc="Apply layer mask" >*/ + GIMP_UNDO_LAYER_MASK_SHOW, /*< desc="Show layer mask" >*/ + GIMP_UNDO_CHANNEL_ADD, /*< desc="New channel" >*/ + GIMP_UNDO_CHANNEL_REMOVE, /*< desc="Delete channel" >*/ + GIMP_UNDO_CHANNEL_COLOR, /*< desc="Channel color" >*/ + GIMP_UNDO_VECTORS_ADD, /*< desc="New path" >*/ + GIMP_UNDO_VECTORS_REMOVE, /*< desc="Delete path" >*/ + GIMP_UNDO_VECTORS_MOD, /*< desc="Path modification" >*/ + GIMP_UNDO_FS_TO_LAYER, /*< desc="Floating selection to layer" >*/ + GIMP_UNDO_TRANSFORM, /*< desc="Transform" >*/ + GIMP_UNDO_PAINT, /*< desc="Paint" >*/ + GIMP_UNDO_INK, /*< desc="Ink" >*/ + GIMP_UNDO_FOREGROUND_SELECT, /*< desc="Select foreground" >*/ + GIMP_UNDO_PARASITE_ATTACH, /*< desc="Attach parasite" >*/ + GIMP_UNDO_PARASITE_REMOVE, /*< desc="Remove parasite" >*/ - GIMP_UNDO_CANT /*< desc="Not undoable" >*/ + GIMP_UNDO_CANT /*< desc="Not undoable" >*/ } GimpUndoType; diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c index 36662a624d..d60aea0a07 100644 --- a/app/core/gimp-edit.c +++ b/app/core/gimp-edit.c @@ -17,8 +17,6 @@ #include "config.h" -#include - #include #include #include @@ -28,16 +26,10 @@ #include "core-types.h" -#include "gegl/gimp-gegl-utils.h" - #include "gimp.h" #include "gimp-edit.h" -#include "gimp-utils.h" #include "gimpbuffer.h" -#include "gimpchannel.h" #include "gimpcontext.h" -#include "gimpfilloptions.h" -#include "gimpdrawableundo.h" #include "gimpimage.h" #include "gimpimage-duplicate.h" #include "gimpimage-new.h" @@ -48,7 +40,6 @@ #include "gimplist.h" #include "gimppickable.h" #include "gimpselection.h" -#include "gimptempbuf.h" #include "gimp-intl.h" @@ -700,116 +691,6 @@ gimp_edit_named_copy_visible (GimpImage *image, return NULL; } -void -gimp_edit_clear (GimpImage *image, - GimpDrawable *drawable, - GimpContext *context) -{ - GimpFillOptions *options; - - g_return_if_fail (GIMP_IS_IMAGE (image)); - g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); - g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); - g_return_if_fail (GIMP_IS_CONTEXT (context)); - - options = gimp_fill_options_new (context->gimp, NULL, FALSE); - - if (gimp_drawable_has_alpha (drawable)) - gimp_fill_options_set_by_fill_type (options, context, - GIMP_FILL_TRANSPARENT, NULL); - else - gimp_fill_options_set_by_fill_type (options, context, - GIMP_FILL_BACKGROUND, NULL); - - gimp_edit_fill (image, drawable, options, C_("undo-type", "Clear")); - - g_object_unref (options); -} - -void -gimp_edit_fill (GimpImage *image, - GimpDrawable *drawable, - GimpFillOptions *options, - const gchar *undo_desc) -{ - GeglBuffer *buffer; - gint x, y, width, height; - - g_return_if_fail (GIMP_IS_IMAGE (image)); - g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); - g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); - g_return_if_fail (GIMP_IS_FILL_OPTIONS (options)); - - if (! gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height)) - return; /* nothing to do, but the fill succeeded */ - - buffer = gimp_fill_options_create_buffer (options, drawable, - GEGL_RECTANGLE (0, 0, - width, height)); - - if (! undo_desc) - undo_desc = gimp_fill_options_get_undo_desc (options); - - gimp_drawable_apply_buffer (drawable, buffer, - GEGL_RECTANGLE (0, 0, width, height), - TRUE, undo_desc, - gimp_context_get_opacity (GIMP_CONTEXT (options)), - gimp_context_get_paint_mode (GIMP_CONTEXT (options)), - GIMP_LAYER_COLOR_SPACE_AUTO, - GIMP_LAYER_COLOR_SPACE_AUTO, - GIMP_LAYER_COMPOSITE_AUTO, - NULL, x, y); - - g_object_unref (buffer); - - gimp_drawable_update (drawable, x, y, width, height); -} - -gboolean -gimp_edit_fade (GimpImage *image, - GimpContext *context) -{ - GimpDrawableUndo *undo; - - g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE); - g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE); - - undo = GIMP_DRAWABLE_UNDO (gimp_image_undo_get_fadeable (image)); - - if (undo && undo->applied_buffer) - { - GimpDrawable *drawable; - GeglBuffer *buffer; - - drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item); - - g_object_ref (undo); - buffer = g_object_ref (undo->applied_buffer); - - gimp_image_undo (image); - - gimp_drawable_apply_buffer (drawable, buffer, - GEGL_RECTANGLE (0, 0, - gegl_buffer_get_width (undo->buffer), - gegl_buffer_get_height (undo->buffer)), - TRUE, - gimp_object_get_name (undo), - gimp_context_get_opacity (context), - gimp_context_get_paint_mode (context), - GIMP_LAYER_COLOR_SPACE_AUTO, - GIMP_LAYER_COLOR_SPACE_AUTO, - GIMP_LAYER_COMPOSITE_AUTO, - NULL, undo->x, undo->y); - - g_object_unref (buffer); - g_object_unref (undo); - - return TRUE; - } - - return FALSE; -} - /* private functions */ diff --git a/app/core/gimp-edit.h b/app/core/gimp-edit.h index dc8b6ac404..d29f9134d4 100644 --- a/app/core/gimp-edit.h +++ b/app/core/gimp-edit.h @@ -57,16 +57,5 @@ const gchar * gimp_edit_named_copy_visible (GimpImage *image, GimpContext *context, GError **error); -void gimp_edit_clear (GimpImage *image, - GimpDrawable *drawable, - GimpContext *context); -void gimp_edit_fill (GimpImage *image, - GimpDrawable *drawable, - GimpFillOptions *options, - const gchar *undo_desc); - -gboolean gimp_edit_fade (GimpImage *image, - GimpContext *context); - #endif /* __GIMP_EDIT_H__ */ diff --git a/app/core/gimp.c b/app/core/gimp.c index 8acf88a898..85896bb31e 100644 --- a/app/core/gimp.c +++ b/app/core/gimp.c @@ -1183,6 +1183,13 @@ gimp_get_temp_file (Gimp *gimp, dir = gimp_file_new_for_config_path (GIMP_GEGL_CONFIG (gimp->config)->temp_path, NULL); + if (! g_file_query_exists (dir, NULL)) + { + /* Try to make the temp directory if it doesn't exist. + * Ignore any error. + */ + g_file_make_directory_with_parents (dir, NULL, NULL); + } file = g_file_get_child (dir, basename); g_free (basename); g_object_unref (dir); diff --git a/app/core/gimpbrush-load.c b/app/core/gimpbrush-load.c index 30ec7b46b4..7f5117f010 100644 --- a/app/core/gimpbrush-load.c +++ b/app/core/gimpbrush-load.c @@ -584,7 +584,7 @@ gimp_brush_load_abr_brush_v12 (GDataInputStream *input, /* FIXME: support it! * * We can probabaly feed the info into the generated brush code - * and get a useable brush back. It seems to support the same + * and get a usable brush back. It seems to support the same * types -akl */ g_printerr ("WARNING: computed brush unsupported, skipping.\n"); diff --git a/app/core/gimpbrush-transform.cc b/app/core/gimpbrush-transform.cc index fc83488882..0c1d43ec83 100644 --- a/app/core/gimpbrush-transform.cc +++ b/app/core/gimpbrush-transform.cc @@ -92,7 +92,7 @@ gimp_brush_real_transform_size (GimpBrush *brush, * corner points of the destination image to work out the starting * position in the source image and the U and V deltas in the source * image space. It then uses a scan-line approach, looping through - * rows and colummns in the transformed (destination) image while + * rows and columns in the transformed (destination) image while * walking along the corresponding rows and columns (named U and V) in * the source image. * @@ -392,7 +392,7 @@ gimp_brush_real_transform_mask (GimpBrush *brush, * corner points of the destination image to work out the starting * position in the source image and the U and V deltas in the source * image space. It then uses a scan-line approach, looping through - * rows and colummns in the transformed (destination) image while + * rows and columns in the transformed (destination) image while * walking along the corresponding rows and columns (named U and V) in * the source image. * diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c index 6934c96fe0..d89e8368e7 100644 --- a/app/core/gimpchannel.c +++ b/app/core/gimpchannel.c @@ -23,6 +23,7 @@ #include #include +#include "libgimpbase/gimpbase.h" #include "libgimpmath/gimpmath.h" #include "libgimpcolor/gimpcolor.h" @@ -89,8 +90,8 @@ static void gimp_channel_convert (GimpItem *item, GimpImage *dest_image, GType old_type); static void gimp_channel_translate (GimpItem *item, - gint off_x, - gint off_y, + gdouble off_x, + gdouble off_y, gboolean push_undo); static void gimp_channel_scale (GimpItem *item, gint new_width, @@ -634,82 +635,73 @@ gimp_channel_convert (GimpItem *item, static void gimp_channel_translate (GimpItem *item, - gint off_x, - gint off_y, + gdouble off_x, + gdouble off_y, gboolean push_undo) { - GimpChannel *channel = GIMP_CHANNEL (item); - GeglBuffer *tmp_buffer = NULL; - gint width, height; - gint x1, y1, x2, y2; + GimpChannel *channel = GIMP_CHANNEL (item); + gint x, y, width, height; - gimp_item_bounds (GIMP_ITEM (channel), &x1, &y1, &x2, &y2); - x2 += x1; - y2 += y1; + gimp_item_bounds (GIMP_ITEM (channel), &x, &y, &width, &height); /* update the old area */ - gimp_drawable_update (GIMP_DRAWABLE (item), x1, y1, x2 - x1, y2 - y1); + gimp_drawable_update (GIMP_DRAWABLE (item), x, y, width, height); if (push_undo) gimp_channel_push_undo (channel, NULL); - x1 = CLAMP ((x1 + off_x), 0, gimp_item_get_width (GIMP_ITEM (channel))); - y1 = CLAMP ((y1 + off_y), 0, gimp_item_get_height (GIMP_ITEM (channel))); - x2 = CLAMP ((x2 + off_x), 0, gimp_item_get_width (GIMP_ITEM (channel))); - y2 = CLAMP ((y2 + off_y), 0, gimp_item_get_height (GIMP_ITEM (channel))); - - width = x2 - x1; - height = y2 - y1; - - /* make sure width and height are non-zero */ - if (width != 0 && height != 0) + if (gimp_rectangle_intersect (x + SIGNED_ROUND (off_x), + y + SIGNED_ROUND (off_y), + width, height, + 0, 0, + gimp_item_get_width (GIMP_ITEM (channel)), + gimp_item_get_height (GIMP_ITEM (channel)), + &x, &y, &width, &height)) { /* copy the portion of the mask we will keep to a temporary * buffer */ - tmp_buffer = + GeglBuffer *tmp_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height), gimp_drawable_get_format (GIMP_DRAWABLE (channel))); gegl_buffer_copy (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)), - GEGL_RECTANGLE (x1 - off_x, y1 - off_y, width, height), + GEGL_RECTANGLE (x - SIGNED_ROUND (off_x), + y - SIGNED_ROUND (off_y), + width, height), GEGL_ABYSS_NONE, tmp_buffer, GEGL_RECTANGLE (0, 0, 0, 0)); - } - /* clear the mask */ - gegl_buffer_clear (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)), - NULL); + /* clear the mask */ + gegl_buffer_clear (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)), + NULL); - if (width != 0 && height != 0) - { /* copy the temp mask back to the mask */ - gegl_buffer_copy (tmp_buffer, NULL, GEGL_ABYSS_NONE, gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)), - GEGL_RECTANGLE (x1, y1, 0, 0)); + GEGL_RECTANGLE (x, y, 0, 0)); /* free the temporary mask */ g_object_unref (tmp_buffer); - } - /* calculate new bounds */ - if (width == 0 || height == 0) + channel->x1 = x; + channel->y1 = y; + channel->x2 = x + width; + channel->y2 = y + height; + } + else { + /* clear the mask */ + gegl_buffer_clear (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)), + NULL); + channel->empty = TRUE; channel->x1 = 0; channel->y1 = 0; channel->x2 = gimp_item_get_width (GIMP_ITEM (channel)); channel->y2 = gimp_item_get_height (GIMP_ITEM (channel)); } - else - { - channel->x1 = x1; - channel->y1 = y1; - channel->x2 = x2; - channel->y2 = y2; - } /* update the new area */ gimp_drawable_update (GIMP_DRAWABLE (item), diff --git a/app/core/gimpcontext.c b/app/core/gimpcontext.c index c45e87f531..3f2d3cf297 100644 --- a/app/core/gimpcontext.c +++ b/app/core/gimpcontext.c @@ -696,7 +696,7 @@ gimp_context_class_init (GimpContextClass *klass) _("Paint Mode"), _("Paint Mode"), GIMP_TYPE_LAYER_MODE, - GIMP_LAYER_MODE_NORMAL_LEGACY, + GIMP_LAYER_MODE_NORMAL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_OBJECT (object_class, GIMP_CONTEXT_PROP_BRUSH, @@ -964,6 +964,8 @@ gimp_context_dispose (GObject *object) { GimpContext *context = GIMP_CONTEXT (object); + gimp_context_set_parent (context, NULL); + if (context->gimp) { context->gimp->context_list = g_list_remove (context->gimp->context_list, @@ -1479,12 +1481,18 @@ gimp_context_set_parent (GimpContext *context, g_signal_handlers_disconnect_by_func (context->parent, gimp_context_parent_notify, context); + + g_object_remove_weak_pointer (G_OBJECT (context->parent), + (gpointer) &context->parent); } context->parent = parent; if (parent) { + g_object_add_weak_pointer (G_OBJECT (context->parent), + (gpointer) &context->parent); + /* copy all undefined properties from the new parent */ gimp_context_copy_properties (parent, context, ~context->defined_props & @@ -2464,7 +2472,7 @@ gimp_context_real_set_opacity (GimpContext *context, GimpLayerMode gimp_context_get_paint_mode (GimpContext *context) { - g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_LAYER_MODE_NORMAL_LEGACY); + g_return_val_if_fail (GIMP_IS_CONTEXT (context), GIMP_LAYER_MODE_NORMAL); return context->paint_mode; } diff --git a/app/core/gimpcurve.c b/app/core/gimpcurve.c index 9365067979..6417bd57e7 100644 --- a/app/core/gimpcurve.c +++ b/app/core/gimpcurve.c @@ -1005,9 +1005,9 @@ gimp_curve_plot (GimpCurve *curve, /* * the x values of the inner control points are fixed at * x1 = 2/3*x0 + 1/3*x3 and x2 = 1/3*x0 + 2/3*x3 - * this ensures that the x values increase linearily with the + * this ensures that the x values increase linearly with the * parameter t and enables us to skip the calculation of the x - * values altogehter - just calculate y(t) evenly spaced. + * values altogether - just calculate y(t) evenly spaced. */ dx = x3 - x0; @@ -1061,7 +1061,7 @@ gimp_curve_plot (GimpCurve *curve, /* * finally calculate the y(t) values for the given bezier values. We can - * use homogenously distributed values for t, since x(t) increases linearily. + * use homogenously distributed values for t, since x(t) increases linearly. */ for (i = 0; i <= ROUND (dx * (gdouble) (curve->n_samples - 1)); i++) { diff --git a/app/core/gimpcurve.h b/app/core/gimpcurve.h index a069e6f89e..8e6455a14b 100644 --- a/app/core/gimpcurve.h +++ b/app/core/gimpcurve.h @@ -44,7 +44,7 @@ struct _GimpCurve gint n_samples; gdouble *samples; - gboolean identity; /* whether the curve is an identiy mapping */ + gboolean identity; /* whether the curve is an identity mapping */ }; struct _GimpCurveClass diff --git a/app/core/gimpdrawable-bucket-fill.c b/app/core/gimpdrawable-bucket-fill.c index 5396c2e860..e0e31b7ecf 100644 --- a/app/core/gimpdrawable-bucket-fill.c +++ b/app/core/gimpdrawable-bucket-fill.c @@ -31,6 +31,8 @@ #include "gegl/gimp-gegl-mask-combine.h" #include "gegl/gimp-gegl-utils.h" +#include "operations/layer-modes/gimp-layer-modes.h" + #include "gimp.h" #include "gimpchannel.h" #include "gimpdrawable.h" @@ -182,7 +184,8 @@ gimp_drawable_bucket_fill (GimpDrawable *drawable, gimp_context_get_paint_mode (GIMP_CONTEXT (options)), GIMP_LAYER_COLOR_SPACE_AUTO, GIMP_LAYER_COLOR_SPACE_AUTO, - GIMP_LAYER_COMPOSITE_AUTO, + gimp_layer_mode_get_paint_composite_mode ( + gimp_context_get_paint_mode (GIMP_CONTEXT (options))), NULL, x, y); g_object_unref (buffer); diff --git a/app/core/gimpdrawable-edit.c b/app/core/gimpdrawable-edit.c new file mode 100644 index 0000000000..8fec3b6aa0 --- /dev/null +++ b/app/core/gimpdrawable-edit.c @@ -0,0 +1,97 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "config.h" + +#include +#include + +#include "core-types.h" + +#include "operations/layer-modes/gimp-layer-modes.h" + +#include "gimpdrawable.h" +#include "gimpdrawable-edit.h" +#include "gimpcontext.h" +#include "gimpfilloptions.h" + +#include "gimp-intl.h" + + +/* public functions */ + +void +gimp_drawable_edit_clear (GimpDrawable *drawable, + GimpContext *context) +{ + GimpFillOptions *options; + + g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); + g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); + g_return_if_fail (GIMP_IS_CONTEXT (context)); + + options = gimp_fill_options_new (context->gimp, NULL, FALSE); + + if (gimp_drawable_has_alpha (drawable)) + gimp_fill_options_set_by_fill_type (options, context, + GIMP_FILL_TRANSPARENT, NULL); + else + gimp_fill_options_set_by_fill_type (options, context, + GIMP_FILL_BACKGROUND, NULL); + + gimp_drawable_edit_fill (drawable, options, C_("undo-type", "Clear")); + + g_object_unref (options); +} + +void +gimp_drawable_edit_fill (GimpDrawable *drawable, + GimpFillOptions *options, + const gchar *undo_desc) +{ + GeglBuffer *buffer; + gint x, y, width, height; + + g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); + g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); + g_return_if_fail (GIMP_IS_FILL_OPTIONS (options)); + + if (! gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height)) + return; /* nothing to do, but the fill succeeded */ + + buffer = gimp_fill_options_create_buffer (options, drawable, + GEGL_RECTANGLE (0, 0, + width, height)); + + if (! undo_desc) + undo_desc = gimp_fill_options_get_undo_desc (options); + + gimp_drawable_apply_buffer (drawable, buffer, + GEGL_RECTANGLE (0, 0, width, height), + TRUE, undo_desc, + gimp_context_get_opacity (GIMP_CONTEXT (options)), + gimp_context_get_paint_mode (GIMP_CONTEXT (options)), + GIMP_LAYER_COLOR_SPACE_AUTO, + GIMP_LAYER_COLOR_SPACE_AUTO, + gimp_layer_mode_get_paint_composite_mode ( + gimp_context_get_paint_mode (GIMP_CONTEXT (options))), + NULL, x, y); + + g_object_unref (buffer); + + gimp_drawable_update (drawable, x, y, width, height); +} diff --git a/app/core/gimpdrawable-edit.h b/app/core/gimpdrawable-edit.h new file mode 100644 index 0000000000..b8bfc04896 --- /dev/null +++ b/app/core/gimpdrawable-edit.h @@ -0,0 +1,29 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __GIMP_DRAWABLE_EDIT_H__ +#define __GIMP_DRAWABLE_EDIT_H__ + + +void gimp_drawable_edit_clear (GimpDrawable *drawable, + GimpContext *context); +void gimp_drawable_edit_fill (GimpDrawable *drawable, + GimpFillOptions *options, + const gchar *undo_desc); + + +#endif /* __GIMP_DRAWABLE_EDIT_H__ */ diff --git a/app/core/gimpdrawable-fill.c b/app/core/gimpdrawable-fill.c index 0921aea6b4..7fedbfe53c 100644 --- a/app/core/gimpdrawable-fill.c +++ b/app/core/gimpdrawable-fill.c @@ -30,6 +30,8 @@ #include "gegl/gimp-gegl-loops.h" #include "gegl/gimp-gegl-utils.h" +#include "operations/layer-modes/gimp-layer-modes.h" + #include "gimp-utils.h" #include "gimpbezierdesc.h" #include "gimpchannel.h" @@ -258,7 +260,8 @@ gimp_drawable_fill_scan_convert (GimpDrawable *drawable, gimp_context_get_paint_mode (context), GIMP_LAYER_COLOR_SPACE_AUTO, GIMP_LAYER_COLOR_SPACE_AUTO, - GIMP_LAYER_COMPOSITE_AUTO, + gimp_layer_mode_get_paint_composite_mode ( + gimp_context_get_paint_mode (context)), NULL, x, y); g_object_unref (buffer); diff --git a/app/core/gimpdrawable-gradient.c b/app/core/gimpdrawable-gradient.c index 696d7a6bb8..fcd088ffa2 100644 --- a/app/core/gimpdrawable-gradient.c +++ b/app/core/gimpdrawable-gradient.c @@ -21,11 +21,15 @@ #include #include +#include "libgimpmath/gimpmath.h" + #include "core-types.h" #include "gegl/gimp-gegl-apply-operation.h" #include "gegl/gimp-gegl-utils.h" +#include "operations/layer-modes/gimp-layer-modes.h" + #include "gimp.h" #include "gimpchannel.h" #include "gimpcontext.h" @@ -93,6 +97,11 @@ gimp_drawable_gradient (GimpDrawable *drawable, progress); } + gimp_drawable_gradient_adjust_coords (drawable, + gradient_type, + GEGL_RECTANGLE (x, y, width, height), + &startx, &starty, &endx, &endy); + render = gegl_node_new_child (NULL, "operation", "gimp:gradient", "context", context, @@ -128,7 +137,7 @@ gimp_drawable_gradient (GimpDrawable *drawable, opacity, paint_mode, GIMP_LAYER_COLOR_SPACE_AUTO, GIMP_LAYER_COLOR_SPACE_AUTO, - GIMP_LAYER_COMPOSITE_AUTO, + gimp_layer_mode_get_paint_composite_mode (paint_mode), NULL, x, y); gimp_drawable_update (drawable, x, y, width, height); @@ -224,3 +233,79 @@ gimp_drawable_gradient_shapeburst_distmap (GimpDrawable *drawable, return dist_buffer; } + +void +gimp_drawable_gradient_adjust_coords (GimpDrawable *drawable, + GimpGradientType gradient_type, + const GeglRectangle *region, + gdouble *startx, + gdouble *starty, + gdouble *endx, + gdouble *endy) +{ + g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); + g_return_if_fail (region != NULL); + g_return_if_fail (startx != NULL); + g_return_if_fail (starty != NULL); + g_return_if_fail (endx != NULL); + g_return_if_fail (endy != NULL); + + /* we potentially adjust the gradient coordinates according to the gradient + * type, so that in cases where the gradient span is not related to the + * segment length, the gradient cache (in GimpOperationGradient) is big + * enough not to produce banding. + */ + + switch (gradient_type) + { + /* for conical gradients, use a segment with the original origin and + * direction, whose length is the circumference of the largest circle + * centered at the origin, passing through one of the regions's vertices. + */ + case GIMP_GRADIENT_CONICAL_SYMMETRIC: + case GIMP_GRADIENT_CONICAL_ASYMMETRIC: + { + gdouble r = 0.0; + GimpVector2 v; + + r = MAX (r, hypot (region->x - *startx, + region->y - *starty)); + r = MAX (r, hypot (region->x + region->width - *startx, + region->y - *starty)); + r = MAX (r, hypot (region->x - *startx, + region->y + region->height - *starty)); + r = MAX (r, hypot (region->x + region->width - *startx, + region->y + region->height - *starty)); + + /* symmetric conical gradients only span half a revolution, and + * therefore require only half the cache size. + */ + if (gradient_type == GIMP_GRADIENT_CONICAL_SYMMETRIC) + r /= 2.0; + + gimp_vector2_set (&v, *endx - *startx, *endy - *starty); + gimp_vector2_normalize (&v); + gimp_vector2_mul (&v, 2.0 * G_PI * r); + + *endx = *startx + v.x; + *endy = *starty + v.y; + } + break; + + /* for shaped gradients, only the segment's length matters; use the + * regions's diagonal, which is the largest possible distance between two + * points in the region. + */ + case GIMP_GRADIENT_SHAPEBURST_ANGULAR: + case GIMP_GRADIENT_SHAPEBURST_SPHERICAL: + case GIMP_GRADIENT_SHAPEBURST_DIMPLED: + *startx = region->x; + *starty = region->y; + *endx = region->x + region->width; + *endy = region->y + region->height; + break; + + default: + break; + } +} diff --git a/app/core/gimpdrawable-gradient.h b/app/core/gimpdrawable-gradient.h index 75fe93d09c..9e628ae857 100644 --- a/app/core/gimpdrawable-gradient.h +++ b/app/core/gimpdrawable-gradient.h @@ -19,32 +19,39 @@ #define __GIMP_DRAWABLE_GRADIENT_H__ -void gimp_drawable_gradient (GimpDrawable *drawable, - GimpContext *context, - GimpGradient *gradient, - GeglDistanceMetric metric, - GimpLayerMode paint_mode, - GimpGradientType gradient_type, - gdouble opacity, - gdouble offset, - GimpRepeatMode repeat, - gboolean reverse, - GimpGradientBlendColorSpace blend_color_space, - gboolean supersample, - gint max_depth, - gdouble threshold, - gboolean dither, - gdouble startx, - gdouble starty, - gdouble endx, - gdouble endy, - GimpProgress *progress); +void gimp_drawable_gradient (GimpDrawable *drawable, + GimpContext *context, + GimpGradient *gradient, + GeglDistanceMetric metric, + GimpLayerMode paint_mode, + GimpGradientType gradient_type, + gdouble opacity, + gdouble offset, + GimpRepeatMode repeat, + gboolean reverse, + GimpGradientBlendColorSpace blend_color_space, + gboolean supersample, + gint max_depth, + gdouble threshold, + gboolean dither, + gdouble startx, + gdouble starty, + gdouble endx, + gdouble endy, + GimpProgress *progress); -GeglBuffer * -gimp_drawable_gradient_shapeburst_distmap (GimpDrawable *drawable, - GeglDistanceMetric metric, - const GeglRectangle *region, - GimpProgress *progress); +GeglBuffer * gimp_drawable_gradient_shapeburst_distmap (GimpDrawable *drawable, + GeglDistanceMetric metric, + const GeglRectangle *region, + GimpProgress *progress); + +void gimp_drawable_gradient_adjust_coords (GimpDrawable *drawable, + GimpGradientType gradient_type, + const GeglRectangle *region, + gdouble *startx, + gdouble *starty, + gdouble *endx, + gdouble *endy); #endif /* __GIMP_DRAWABLE_GRADIENT_H__ */ diff --git a/app/core/gimpdrawable-transform.c b/app/core/gimpdrawable-transform.c index 54368680ad..233aa74e18 100644 --- a/app/core/gimpdrawable-transform.c +++ b/app/core/gimpdrawable-transform.c @@ -154,15 +154,17 @@ gimp_drawable_transform_buffer_flip (GimpDrawable *drawable, gint *new_offset_x, gint *new_offset_y) { - const Babl *format; - GeglBuffer *new_buffer; - GeglRectangle src_rect; - GeglRectangle dest_rect; - gint orig_x, orig_y; - gint orig_width, orig_height; - gint new_x, new_y; - gint new_width, new_height; - gint i; + const Babl *format; + GeglBuffer *new_buffer; + GeglBufferIterator *iter; + GeglRectangle src_rect; + GeglRectangle dest_rect; + gint bpp; + gint orig_x, orig_y; + gint orig_width, orig_height; + gint new_x, new_y; + gint new_width, new_height; + gint x, y; g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), NULL); @@ -203,6 +205,7 @@ gimp_drawable_transform_buffer_flip (GimpDrawable *drawable, } format = gegl_buffer_get_format (orig_buffer); + bpp = babl_format_get_bytes_per_pixel (format); new_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, new_width, new_height), @@ -262,51 +265,92 @@ gimp_drawable_transform_buffer_flip (GimpDrawable *drawable, if (new_width == 0 && new_height == 0) return new_buffer; + dest_rect.x = new_x; + dest_rect.y = new_y; + dest_rect.width = new_width; + dest_rect.height = new_height; + + iter = gegl_buffer_iterator_new (new_buffer, &dest_rect, 0, NULL, + GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE); + switch (flip_type) { case GIMP_ORIENTATION_HORIZONTAL: - src_rect.x = orig_x; - src_rect.y = orig_y; - src_rect.width = 1; - src_rect.height = orig_height; - - dest_rect.x = new_x + new_width - 1; - dest_rect.y = new_y; - dest_rect.width = 1; - dest_rect.height = new_height; - - for (i = 0; i < orig_width; i++) + while (gegl_buffer_iterator_next (iter)) { - src_rect.x = i + orig_x; - dest_rect.x = new_x + new_width - i - 1; + gint stride = iter->roi[0].width * bpp; - gegl_buffer_copy (orig_buffer, &src_rect, GEGL_ABYSS_NONE, - new_buffer, &dest_rect); + src_rect = iter->roi[0]; + + src_rect.x = (orig_x + orig_width) - + (iter->roi[0].x - dest_rect.x) - + iter->roi[0].width; + + gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, iter->data[0], + stride, GEGL_ABYSS_NONE); + + for (y = 0; y < iter->roi[0].height; y++) + { + guint8 *left = iter->data[0]; + guint8 *right = iter->data[0]; + + left += y * stride; + right += y * stride + (iter->roi[0].width - 1) * bpp; + + for (x = 0; x < iter->roi[0].width / 2; x++) + { + guint8 temp[bpp]; + + memcpy (temp, left, bpp); + memcpy (left, right, bpp); + memcpy (right, temp, bpp); + + left += bpp; + right -= bpp; + } + } } break; case GIMP_ORIENTATION_VERTICAL: - src_rect.x = orig_x; - src_rect.y = orig_y; - src_rect.width = orig_width; - src_rect.height = 1; - - dest_rect.x = new_x; - dest_rect.y = new_y + new_height - 1; - dest_rect.width = new_width; - dest_rect.height = 1; - - for (i = 0; i < orig_height; i++) + while (gegl_buffer_iterator_next (iter)) { - src_rect.y = i + orig_y; - dest_rect.y = new_y + new_height - i - 1; + gint stride = iter->roi[0].width * bpp; - gegl_buffer_copy (orig_buffer, &src_rect, GEGL_ABYSS_NONE, - new_buffer, &dest_rect); + src_rect = iter->roi[0]; + + src_rect.y = (orig_y + orig_height) - + (iter->roi[0].y - dest_rect.y) - + iter->roi[0].height; + + gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, iter->data[0], + stride, GEGL_ABYSS_NONE); + + for (x = 0; x < iter->roi[0].width; x++) + { + guint8 *top = iter->data[0]; + guint8 *bottom = iter->data[0]; + + top += x * bpp; + bottom += x * bpp + (iter->roi[0].height - 1) * stride; + + for (y = 0; y < iter->roi[0].height / 2; y++) + { + guint8 temp[bpp]; + + memcpy (temp, top, bpp); + memcpy (top, bottom, bpp); + memcpy (bottom, temp, bpp); + + top += stride; + bottom -= stride; + } + } } break; case GIMP_ORIENTATION_UNKNOWN: + gegl_buffer_iterator_stop (iter); break; } diff --git a/app/core/gimpdrawablefilter.c b/app/core/gimpdrawablefilter.c index 3ac9a44059..26e80c5c73 100644 --- a/app/core/gimpdrawablefilter.c +++ b/app/core/gimpdrawablefilter.c @@ -77,11 +77,12 @@ struct _GimpDrawableFilter GeglRectangle filter_area; GeglNode *translate; - GeglNode *crop; + GeglNode *crop_before; GeglNode *cast_before; GeglNode *transform_before; GeglNode *transform_after; GeglNode *cast_after; + GeglNode *crop_after; GimpApplicator *applicator; }; @@ -188,6 +189,8 @@ gimp_drawable_filter_new (GimpDrawable *drawable, { GimpDrawableFilter *filter; GeglNode *node; + GeglNode *input; + GeglNode *effect; g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), NULL); @@ -213,9 +216,9 @@ gimp_drawable_filter_new (GimpDrawable *drawable, filter->translate = gegl_node_new_child (node, "operation", "gegl:translate", NULL); - filter->crop = gegl_node_new_child (node, - "operation", "gegl:crop", - NULL); + filter->crop_before = gegl_node_new_child (node, + "operation", "gegl:crop", + NULL); filter->cast_before = gegl_node_new_child (node, "operation", "gegl:nop", @@ -230,25 +233,38 @@ gimp_drawable_filter_new (GimpDrawable *drawable, "operation", "gegl:nop", NULL); + filter->crop_after = gegl_node_new_child (node, + "operation", "gegl:crop", + NULL); + + input = gegl_node_get_input_proxy (node, "input"); + if (gegl_node_has_pad (filter->operation, "input")) { - GeglNode *input = gegl_node_get_input_proxy (node, "input"); + effect = filter->operation; + } + else + { + effect = gegl_node_new_child (node, + "operation", "gegl:over", + NULL); - gegl_node_link_many (input, - filter->translate, - filter->crop, - filter->cast_before, - filter->transform_before, - filter->operation, - NULL); + gegl_node_connect_to (filter->operation, "output", + effect, "aux"); } - gegl_node_link_many (filter->operation, + gegl_node_link_many (input, + filter->translate, + filter->crop_before, + filter->cast_before, + filter->transform_before, + effect, filter->transform_after, filter->cast_after, + filter->crop_after, NULL); - gegl_node_connect_to (filter->cast_after, "output", + gegl_node_connect_to (filter->crop_after, "output", node, "aux"); return filter; @@ -444,7 +460,11 @@ gimp_drawable_filter_sync_region (GimpDrawableFilter *filter) "y", (gdouble) -filter->filter_area.y, NULL); - gegl_node_set (filter->crop, + gegl_node_set (filter->crop_before, + "width", (gdouble) filter->filter_area.width, + "height", (gdouble) filter->filter_area.height, + NULL); + gegl_node_set (filter->crop_after, "width", (gdouble) filter->filter_area.width, "height", (gdouble) filter->filter_area.height, NULL); @@ -464,7 +484,11 @@ gimp_drawable_filter_sync_region (GimpDrawableFilter *filter) "y", (gdouble) 0.0, NULL); - gegl_node_set (filter->crop, + gegl_node_set (filter->crop_before, + "width", width, + "height", height, + NULL); + gegl_node_set (filter->crop_after, "width", width, "height", height, NULL); diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c index e81ba8eb9c..e7612fafbb 100644 --- a/app/core/gimpgrouplayer.c +++ b/app/core/gimpgrouplayer.c @@ -61,7 +61,7 @@ struct _GimpGroupLayerPrivate gint suspend_mask; GeglBuffer *suspended_mask_buffer; GeglRectangle suspended_mask_bounds; - gint moving; + gint transforming; gboolean expanded; gboolean pass_through; @@ -108,9 +108,9 @@ static GimpItem * gimp_group_layer_duplicate (GimpItem *item, static void gimp_group_layer_convert (GimpItem *item, GimpImage *dest_image, GType old_type); -static void gimp_group_layer_start_move (GimpItem *item, +static void gimp_group_layer_start_transform (GimpItem *item, gboolean push_undo); -static void gimp_group_layer_end_move (GimpItem *item, +static void gimp_group_layer_end_transform (GimpItem *item, gboolean push_undo); static void gimp_group_layer_resize (GimpItem *item, GimpContext *context, @@ -270,8 +270,8 @@ gimp_group_layer_class_init (GimpGroupLayerClass *klass) item_class->is_position_locked = gimp_group_layer_is_position_locked; item_class->duplicate = gimp_group_layer_duplicate; item_class->convert = gimp_group_layer_convert; - item_class->start_move = gimp_group_layer_start_move; - item_class->end_move = gimp_group_layer_end_move; + item_class->start_transform = gimp_group_layer_start_transform; + item_class->end_transform = gimp_group_layer_end_transform; item_class->resize = gimp_group_layer_resize; item_class->default_name = _("Layer Group"); @@ -606,23 +606,23 @@ gimp_group_layer_convert (GimpItem *item, } static void -gimp_group_layer_start_move (GimpItem *item, +gimp_group_layer_start_transform (GimpItem *item, gboolean push_undo) { - _gimp_group_layer_start_move (GIMP_GROUP_LAYER (item), push_undo); + _gimp_group_layer_start_transform (GIMP_GROUP_LAYER (item), push_undo); - if (GIMP_ITEM_CLASS (parent_class)->start_move) - GIMP_ITEM_CLASS (parent_class)->start_move (item, push_undo); + if (GIMP_ITEM_CLASS (parent_class)->start_transform) + GIMP_ITEM_CLASS (parent_class)->start_transform (item, push_undo); } static void -gimp_group_layer_end_move (GimpItem *item, +gimp_group_layer_end_transform (GimpItem *item, gboolean push_undo) { - if (GIMP_ITEM_CLASS (parent_class)->end_move) - GIMP_ITEM_CLASS (parent_class)->end_move (item, push_undo); + if (GIMP_ITEM_CLASS (parent_class)->end_transform) + GIMP_ITEM_CLASS (parent_class)->end_transform (item, push_undo); - _gimp_group_layer_end_move (GIMP_GROUP_LAYER (item), push_undo); + _gimp_group_layer_end_transform (GIMP_GROUP_LAYER (item), push_undo); } static void @@ -640,12 +640,10 @@ gimp_group_layer_resize (GimpItem *item, gint x, y; /* we implement GimpItem::resize(), instead of GimpLayer::resize(), so that - * GimpLayer doesn't resize the mask. instead, we temporarily decrement - * private->moving, so that mask resizing is handled by - * gimp_group_layer_update_size(). + * GimpLayer doesn't resize the mask. note that gimp_item_resize() calls + * gimp_item_{start,end}_move(), and not gimp_item_{start,end}_transform(), + * so that mask resizing is handled by gimp_group_layer_update_size(). */ - g_return_if_fail (private->moving > 0); - private->moving--; x = gimp_item_get_offset_x (item) - offset_x; y = gimp_item_get_offset_y (item) - offset_y; @@ -697,8 +695,6 @@ gimp_group_layer_resize (GimpItem *item, } gimp_group_layer_resume_resize (group, TRUE); - - private->moving++; } static gint64 @@ -1504,7 +1500,19 @@ gimp_group_layer_suspend_mask (GimpGroupLayer *group, private = GET_PRIVATE (group); item = GIMP_ITEM (group); - if (! gimp_item_is_attached (item)) + /* avoid pushing an undo step if this is a nested suspend_mask() call, since + * the value of 'push_undo' in nested calls should be the same as that passed + * to the outermost call, and only pushing an undo step for the outermost + * call in this case is enough. we can't support cases where the values of + * 'push_undo' in nested calls are different in a meaningful way, and + * avoiding undo steps for nested calls prevents us from storing multiple + * references to the suspend mask buffer on the undo stack. while storing + * multiple references to the buffer doesn't waste any memory (since all the + * references are to the same buffer), it does cause the undo stack memory- + * usage estimation to overshoot, potentially resulting in undo steps being + * dropped unnecessarily. + */ + if (! gimp_item_is_attached (item) || private->suspend_mask > 0) push_undo = FALSE; if (push_undo) @@ -1549,7 +1557,10 @@ gimp_group_layer_resume_mask (GimpGroupLayer *group, item = GIMP_ITEM (group); - if (! gimp_item_is_attached (item)) + /* avoid pushing an undo step if this is a nested resume_mask() call. see + * the comment in gimp_group_layer_suspend_mask(). + */ + if (! gimp_item_is_attached (item) || private->suspend_mask > 1) push_undo = FALSE; if (push_undo) @@ -1616,8 +1627,8 @@ _gimp_group_layer_get_suspended_mask (GimpGroupLayer *group, } void -_gimp_group_layer_start_move (GimpGroupLayer *group, - gboolean push_undo) +_gimp_group_layer_start_transform (GimpGroupLayer *group, + gboolean push_undo) { GimpGroupLayerPrivate *private; GimpItem *item; @@ -1633,15 +1644,15 @@ _gimp_group_layer_start_move (GimpGroupLayer *group, push_undo = FALSE; if (push_undo) - gimp_image_undo_push_group_layer_start_move (gimp_item_get_image (item), - NULL, group); + gimp_image_undo_push_group_layer_start_transform (gimp_item_get_image (item), + NULL, group); - private->moving++; + private->transforming++; } void -_gimp_group_layer_end_move (GimpGroupLayer *group, - gboolean push_undo) +_gimp_group_layer_end_transform (GimpGroupLayer *group, + gboolean push_undo) { GimpGroupLayerPrivate *private; GimpItem *item; @@ -1652,18 +1663,18 @@ _gimp_group_layer_end_move (GimpGroupLayer *group, item = GIMP_ITEM (group); g_return_if_fail (private->suspend_mask == 0); - g_return_if_fail (private->moving > 0); + g_return_if_fail (private->transforming > 0); if (! gimp_item_is_attached (item)) push_undo = FALSE; if (push_undo) - gimp_image_undo_push_group_layer_end_move (gimp_item_get_image (item), - NULL, group); + gimp_image_undo_push_group_layer_end_transform (gimp_item_get_image (item), + NULL, group); - private->moving--; + private->transforming--; - if (private->moving == 0) + if (private->transforming == 0) gimp_group_layer_update_mask_size (GIMP_GROUP_LAYER (item)); } @@ -1911,10 +1922,10 @@ gimp_group_layer_update_size (GimpGroupLayer *group) } } - /* resize the mask if not moving (in which case, GimpLayer takes care of the - * mask) + /* resize the mask if not transforming (in which case, GimpLayer takes care + * of the mask) */ - if (resize_mask && ! private->moving) + if (resize_mask && ! private->transforming) gimp_group_layer_update_mask_size (group); /* if we show the mask, invalidate the new mask area */ diff --git a/app/core/gimpgrouplayer.h b/app/core/gimpgrouplayer.h index 8a0a6c1a6f..8978103ddf 100644 --- a/app/core/gimpgrouplayer.h +++ b/app/core/gimpgrouplayer.h @@ -69,9 +69,9 @@ void _gimp_group_layer_set_suspended_mask (GimpGroupLayer *grou GeglBuffer * _gimp_group_layer_get_suspended_mask (GimpGroupLayer *group, GeglRectangle *bounds); -void _gimp_group_layer_start_move (GimpGroupLayer *group, +void _gimp_group_layer_start_transform (GimpGroupLayer *group, gboolean push_undo); -void _gimp_group_layer_end_move (GimpGroupLayer *group, +void _gimp_group_layer_end_transform (GimpGroupLayer *group, gboolean push_undo); diff --git a/app/core/gimpgrouplayerundo.c b/app/core/gimpgrouplayerundo.c index cef6c29eac..040bf7361f 100644 --- a/app/core/gimpgrouplayerundo.c +++ b/app/core/gimpgrouplayerundo.c @@ -82,8 +82,8 @@ gimp_group_layer_undo_constructed (GObject *object) case GIMP_UNDO_GROUP_LAYER_SUSPEND_RESIZE: case GIMP_UNDO_GROUP_LAYER_RESUME_RESIZE: case GIMP_UNDO_GROUP_LAYER_SUSPEND_MASK: - case GIMP_UNDO_GROUP_LAYER_START_MOVE: - case GIMP_UNDO_GROUP_LAYER_END_MOVE: + case GIMP_UNDO_GROUP_LAYER_START_TRANSFORM: + case GIMP_UNDO_GROUP_LAYER_END_TRANSFORM: break; case GIMP_UNDO_GROUP_LAYER_RESUME_MASK: @@ -192,22 +192,22 @@ gimp_group_layer_undo_pop (GimpUndo *undo, } break; - case GIMP_UNDO_GROUP_LAYER_START_MOVE: - case GIMP_UNDO_GROUP_LAYER_END_MOVE: + case GIMP_UNDO_GROUP_LAYER_START_TRANSFORM: + case GIMP_UNDO_GROUP_LAYER_END_TRANSFORM: if ((undo_mode == GIMP_UNDO_MODE_UNDO && - undo->undo_type == GIMP_UNDO_GROUP_LAYER_START_MOVE) || + undo->undo_type == GIMP_UNDO_GROUP_LAYER_START_TRANSFORM) || (undo_mode == GIMP_UNDO_MODE_REDO && - undo->undo_type == GIMP_UNDO_GROUP_LAYER_END_MOVE)) + undo->undo_type == GIMP_UNDO_GROUP_LAYER_END_TRANSFORM)) { - /* end group layer move operation */ + /* end group layer transform operation */ - _gimp_group_layer_end_move (group, FALSE); + _gimp_group_layer_end_transform (group, FALSE); } else { - /* start group layer move operation */ + /* start group layer transform operation */ - _gimp_group_layer_start_move (group, FALSE); + _gimp_group_layer_start_transform (group, FALSE); } break; diff --git a/app/core/gimpimage-fade.c b/app/core/gimpimage-fade.c new file mode 100644 index 0000000000..7b625bd911 --- /dev/null +++ b/app/core/gimpimage-fade.c @@ -0,0 +1,81 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "config.h" + +#include +#include + +#include "core-types.h" + +#include "operations/layer-modes/gimp-layer-modes.h" + +#include "gimpcontext.h" +#include "gimpdrawable.h" +#include "gimpdrawableundo.h" +#include "gimpimage.h" +#include "gimpimage-fade.h" +#include "gimpimage-undo.h" + + +/* public functions */ + +gboolean +gimp_image_fade (GimpImage *image, + GimpContext *context) +{ + GimpDrawableUndo *undo; + + g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE); + g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE); + + undo = GIMP_DRAWABLE_UNDO (gimp_image_undo_get_fadeable (image)); + + if (undo && undo->applied_buffer) + { + GimpDrawable *drawable; + GeglBuffer *buffer; + + drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item); + + g_object_ref (undo); + buffer = g_object_ref (undo->applied_buffer); + + gimp_image_undo (image); + + gimp_drawable_apply_buffer (drawable, buffer, + GEGL_RECTANGLE (0, 0, + gegl_buffer_get_width (undo->buffer), + gegl_buffer_get_height (undo->buffer)), + TRUE, + gimp_object_get_name (undo), + gimp_context_get_opacity (context), + gimp_context_get_paint_mode (context), + GIMP_LAYER_COLOR_SPACE_AUTO, + GIMP_LAYER_COLOR_SPACE_AUTO, + gimp_layer_mode_get_paint_composite_mode ( + gimp_context_get_paint_mode (context)), + NULL, undo->x, undo->y); + + g_object_unref (buffer); + g_object_unref (undo); + + return TRUE; + } + + return FALSE; +} diff --git a/app/core/gimpimage-fade.h b/app/core/gimpimage-fade.h new file mode 100644 index 0000000000..d934b3f2b9 --- /dev/null +++ b/app/core/gimpimage-fade.h @@ -0,0 +1,26 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __GIMP_IMAGE_FADE_H__ +#define __GIMP_IMAGE_FADE_H__ + + +gboolean gimp_image_fade (GimpImage *image, + GimpContext *context); + + +#endif /* __GIMP_IMAGE_FADE_H__ */ diff --git a/app/core/gimpimage-item-list.c b/app/core/gimpimage-item-list.c index 4f08e13363..1fb42b8e39 100644 --- a/app/core/gimpimage-item-list.c +++ b/app/core/gimpimage-item-list.c @@ -118,7 +118,7 @@ gimp_image_item_list_translate (GimpImage *image, } for (l = list; l; l = g_list_next (l)) - gimp_item_start_move (GIMP_ITEM (l->data), push_undo); + gimp_item_start_transform (GIMP_ITEM (l->data), push_undo); } for (l = list; l; l = g_list_next (l)) @@ -128,7 +128,7 @@ gimp_image_item_list_translate (GimpImage *image, if (list->next) { for (l = list; l; l = g_list_next (l)) - gimp_item_end_move (GIMP_ITEM (l->data), push_undo); + gimp_item_end_transform (GIMP_ITEM (l->data), push_undo); if (push_undo) gimp_image_undo_group_end (image); @@ -157,7 +157,7 @@ gimp_image_item_list_flip (GimpImage *image, C_("undo-type", "Flip Items")); for (l = list; l; l = g_list_next (l)) - gimp_item_start_move (GIMP_ITEM (l->data), TRUE); + gimp_item_start_transform (GIMP_ITEM (l->data), TRUE); } for (l = list; l; l = g_list_next (l)) @@ -167,7 +167,7 @@ gimp_image_item_list_flip (GimpImage *image, if (list->next) { for (l = list; l; l = g_list_next (l)) - gimp_item_end_move (GIMP_ITEM (l->data), TRUE); + gimp_item_end_transform (GIMP_ITEM (l->data), TRUE); gimp_image_undo_group_end (image); } @@ -196,7 +196,7 @@ gimp_image_item_list_rotate (GimpImage *image, C_("undo-type", "Rotate Items")); for (l = list; l; l = g_list_next (l)) - gimp_item_start_move (GIMP_ITEM (l->data), TRUE); + gimp_item_start_transform (GIMP_ITEM (l->data), TRUE); } for (l = list; l; l = g_list_next (l)) @@ -206,7 +206,7 @@ gimp_image_item_list_rotate (GimpImage *image, if (list->next) { for (l = list; l; l = g_list_next (l)) - gimp_item_end_move (GIMP_ITEM (l->data), TRUE); + gimp_item_end_transform (GIMP_ITEM (l->data), TRUE); gimp_image_undo_group_end (image); } @@ -246,7 +246,7 @@ gimp_image_item_list_transform (GimpImage *image, C_("undo-type", "Transform Items")); for (l = list; l; l = g_list_next (l)) - gimp_item_start_move (GIMP_ITEM (l->data), TRUE); + gimp_item_start_transform (GIMP_ITEM (l->data), TRUE); } for (l = list; l; l = g_list_next (l)) @@ -263,7 +263,7 @@ gimp_image_item_list_transform (GimpImage *image, if (list->next) { for (l = list; l; l = g_list_next (l)) - gimp_item_end_move (GIMP_ITEM (l->data), TRUE); + gimp_item_end_transform (GIMP_ITEM (l->data), TRUE); gimp_image_undo_group_end (image); } diff --git a/app/core/gimpimage-merge.c b/app/core/gimpimage-merge.c index b65ff0ab3e..a344ed94c4 100644 --- a/app/core/gimpimage-merge.c +++ b/app/core/gimpimage-merge.c @@ -336,6 +336,29 @@ gimp_image_merge_group_layer (GimpImage *image, parent = gimp_layer_get_parent (GIMP_LAYER (group)); index = gimp_item_get_index (GIMP_ITEM (group)); + /* if this is a pass-through group, change its mode to NORMAL *before* + * duplicating it, since PASS_THROUGH mode is invalid for regular layers. + * see bug #793714. + */ + if (gimp_layer_get_mode (GIMP_LAYER (group)) == GIMP_LAYER_MODE_PASS_THROUGH) + { + GimpLayerColorSpace blend_space; + GimpLayerColorSpace composite_space; + GimpLayerCompositeMode composite_mode; + + /* keep the group's current blend space, composite space, and composite + * mode. + */ + blend_space = gimp_layer_get_blend_space (GIMP_LAYER (group)); + composite_space = gimp_layer_get_composite_space (GIMP_LAYER (group)); + composite_mode = gimp_layer_get_composite_mode (GIMP_LAYER (group)); + + gimp_layer_set_mode (GIMP_LAYER (group), GIMP_LAYER_MODE_NORMAL, TRUE); + gimp_layer_set_blend_space (GIMP_LAYER (group), blend_space, TRUE); + gimp_layer_set_composite_space (GIMP_LAYER (group), composite_space, TRUE); + gimp_layer_set_composite_mode (GIMP_LAYER (group), composite_mode, TRUE); + } + layer = GIMP_LAYER (gimp_item_duplicate (GIMP_ITEM (group), GIMP_TYPE_LAYER)); diff --git a/app/core/gimpimage-resize.c b/app/core/gimpimage-resize.c index 64b0a06c58..9d692cafd7 100644 --- a/app/core/gimpimage-resize.c +++ b/app/core/gimpimage-resize.c @@ -132,6 +132,10 @@ gimp_image_resize_with_layers (GimpImage *image, if (! resize_text_layers && gimp_item_is_text_layer (item)) continue; + /* note that we call gimp_item_start_move(), and not + * gimp_item_start_transform(). see the comment in gimp_item_resize() + * for more information. + */ gimp_item_start_move (item, TRUE); gimp_object_queue_push (queue, item); diff --git a/app/core/gimpimage-undo-push.c b/app/core/gimpimage-undo-push.c index 4eae6ef275..53ab66b063 100644 --- a/app/core/gimpimage-undo-push.c +++ b/app/core/gimpimage-undo-push.c @@ -672,32 +672,32 @@ gimp_image_undo_push_group_layer_resume_mask (GimpImage *image, } GimpUndo * -gimp_image_undo_push_group_layer_start_move (GimpImage *image, - const gchar *undo_desc, - GimpGroupLayer *group) +gimp_image_undo_push_group_layer_start_transform (GimpImage *image, + const gchar *undo_desc, + GimpGroupLayer *group) { g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_GROUP_LAYER (group), NULL); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (group)), NULL); return gimp_image_undo_push (image, GIMP_TYPE_GROUP_LAYER_UNDO, - GIMP_UNDO_GROUP_LAYER_START_MOVE, undo_desc, + GIMP_UNDO_GROUP_LAYER_START_TRANSFORM, undo_desc, GIMP_DIRTY_ITEM | GIMP_DIRTY_DRAWABLE, "item", group, NULL); } GimpUndo * -gimp_image_undo_push_group_layer_end_move (GimpImage *image, - const gchar *undo_desc, - GimpGroupLayer *group) +gimp_image_undo_push_group_layer_end_transform (GimpImage *image, + const gchar *undo_desc, + GimpGroupLayer *group) { g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL); g_return_val_if_fail (GIMP_IS_GROUP_LAYER (group), NULL); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (group)), NULL); return gimp_image_undo_push (image, GIMP_TYPE_GROUP_LAYER_UNDO, - GIMP_UNDO_GROUP_LAYER_END_MOVE, undo_desc, + GIMP_UNDO_GROUP_LAYER_END_TRANSFORM, undo_desc, GIMP_DIRTY_ITEM | GIMP_DIRTY_DRAWABLE, "item", group, NULL); diff --git a/app/core/gimpimage-undo-push.h b/app/core/gimpimage-undo-push.h index d83398ad5e..22071ff97b 100644 --- a/app/core/gimpimage-undo-push.h +++ b/app/core/gimpimage-undo-push.h @@ -162,11 +162,11 @@ GimpUndo * const gchar *undo_desc, GimpGroupLayer *group); GimpUndo * - gimp_image_undo_push_group_layer_start_move (GimpImage *image, + gimp_image_undo_push_group_layer_start_transform (GimpImage *image, const gchar *undo_desc, GimpGroupLayer *group); GimpUndo * - gimp_image_undo_push_group_layer_end_move (GimpImage *image, + gimp_image_undo_push_group_layer_end_transform (GimpImage *image, const gchar *undo_desc, GimpGroupLayer *group); GimpUndo * gimp_image_undo_push_group_layer_convert (GimpImage *image, diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c index 7176369841..dc33618622 100644 --- a/app/core/gimpimage.c +++ b/app/core/gimpimage.c @@ -3552,7 +3552,7 @@ gimp_image_parasite_attach (GimpImage *image, C_("undo-type", "Attach Parasite to Image"), ©); - /* We used to push an cantundo on te stack here. This made the undo stack + /* We used to push a cantundo on the stack here. This made the undo stack * unusable (NULL on the stack) and prevented people from undoing after a * save (since most save plug-ins attach an undoable comment parasite). * Now we simply attach the parasite without pushing an undo. That way @@ -4155,6 +4155,7 @@ gimp_image_reorder_item (GimpImage *image, const gchar *undo_desc) { GimpItemTree *tree; + gboolean result; g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE); g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE); @@ -4164,14 +4165,29 @@ gimp_image_reorder_item (GimpImage *image, g_return_val_if_fail (tree != NULL, FALSE); - if (push_undo && ! undo_desc) - undo_desc = GIMP_ITEM_GET_CLASS (item)->reorder_desc; + if (push_undo) + { + if (! undo_desc) + undo_desc = GIMP_ITEM_GET_CLASS (item)->reorder_desc; + + gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_ITEM_REORDER, + undo_desc); + } + + gimp_item_start_move (item, push_undo); /* item and new_parent are type-checked in GimpItemTree */ - return gimp_item_tree_reorder_item (tree, item, - new_parent, new_index, - push_undo, undo_desc); + result = gimp_item_tree_reorder_item (tree, item, + new_parent, new_index, + push_undo, undo_desc); + + gimp_item_end_move (item, push_undo); + + if (push_undo) + gimp_image_undo_group_end (image); + + return result; } gboolean diff --git a/app/core/gimpitem.c b/app/core/gimpitem.c index 29dfbccc04..84685e74f7 100644 --- a/app/core/gimpitem.c +++ b/app/core/gimpitem.c @@ -143,9 +143,13 @@ static gboolean gimp_item_real_rename (GimpItem *item, const gchar *new_name, const gchar *undo_desc, GError **error); +static void gimp_item_real_start_transform (GimpItem *item, + gboolean push_undo); +static void gimp_item_real_end_transform (GimpItem *item, + gboolean push_undo); static void gimp_item_real_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo); static void gimp_item_real_scale (GimpItem *item, gint new_width, @@ -261,6 +265,8 @@ gimp_item_class_init (GimpItemClass *klass) klass->rename = gimp_item_real_rename; klass->start_move = NULL; klass->end_move = NULL; + klass->start_transform = gimp_item_real_start_transform; + klass->end_transform = gimp_item_real_end_transform; klass->translate = gimp_item_real_translate; klass->scale = gimp_item_real_scale; klass->resize = gimp_item_real_resize; @@ -606,15 +612,29 @@ gimp_item_real_rename (GimpItem *item, static void gimp_item_real_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo) { GimpItemPrivate *private = GET_PRIVATE (item); gimp_item_set_offset (item, - private->offset_x + offset_x, - private->offset_y + offset_y); + private->offset_x + SIGNED_ROUND (offset_x), + private->offset_y + SIGNED_ROUND (offset_y)); +} + +static void +gimp_item_real_start_transform (GimpItem *item, + gboolean push_undo) +{ + gimp_item_start_move (item, push_undo); +} + +static void +gimp_item_real_end_transform (GimpItem *item, + gboolean push_undo) +{ + gimp_item_end_move (item, push_undo); } static void @@ -1204,6 +1224,26 @@ gimp_item_end_move (GimpItem *item, GIMP_ITEM_GET_CLASS (item)->end_move (item, push_undo); } +void +gimp_item_start_transform (GimpItem *item, + gboolean push_undo) +{ + g_return_if_fail (GIMP_IS_ITEM (item)); + + if (GIMP_ITEM_GET_CLASS (item)->start_transform) + GIMP_ITEM_GET_CLASS (item)->start_transform (item, push_undo); +} + +void +gimp_item_end_transform (GimpItem *item, + gboolean push_undo) +{ + g_return_if_fail (GIMP_IS_ITEM (item)); + + if (GIMP_ITEM_GET_CLASS (item)->end_transform) + GIMP_ITEM_GET_CLASS (item)->end_transform (item, push_undo); +} + /** * gimp_item_translate: * @item: The #GimpItem to move. @@ -1216,8 +1256,8 @@ gimp_item_end_move (GimpItem *item, */ void gimp_item_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo) { GimpItemClass *item_class; @@ -1235,11 +1275,11 @@ gimp_item_translate (GimpItem *item, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_DISPLACE, item_class->translate_desc); - gimp_item_start_move (item, push_undo); + gimp_item_start_transform (item, push_undo); item_class->translate (item, offset_x, offset_y, push_undo); - gimp_item_end_move (item, push_undo); + gimp_item_end_transform (item, push_undo); if (push_undo) gimp_image_undo_group_end (image); @@ -1319,7 +1359,7 @@ gimp_item_scale (GimpItem *item, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_SCALE, item_class->scale_desc); - gimp_item_start_move (item, push_undo); + gimp_item_start_transform (item, push_undo); g_object_freeze_notify (G_OBJECT (item)); @@ -1328,7 +1368,7 @@ gimp_item_scale (GimpItem *item, g_object_thaw_notify (G_OBJECT (item)); - gimp_item_end_move (item, push_undo); + gimp_item_end_transform (item, push_undo); if (push_undo) gimp_image_undo_group_end (image); @@ -1547,6 +1587,16 @@ gimp_item_resize (GimpItem *item, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_RESIZE, item_class->resize_desc); + /* note that we call gimp_item_start_move(), and not + * gimp_item_start_transform(). whether or not a resize operation should be + * considered a transform operation, or a move operation, depends on the + * intended use of these functions by subclasses. atm, we only use + * gimp_item_{start,end}_transform() to suspend mask resizing in group + * layers, which should not happen when reisizing a group, hence the call to + * gimp_item_start_move(). + * + * see the comment in gimp_group_layer_resize() for more information. + */ gimp_item_start_move (item, push_undo); g_object_freeze_notify (G_OBJECT (item)); @@ -1586,7 +1636,7 @@ gimp_item_flip (GimpItem *item, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM, item_class->flip_desc); - gimp_item_start_move (item, push_undo); + gimp_item_start_transform (item, push_undo); g_object_freeze_notify (G_OBJECT (item)); @@ -1594,7 +1644,7 @@ gimp_item_flip (GimpItem *item, g_object_thaw_notify (G_OBJECT (item)); - gimp_item_end_move (item, push_undo); + gimp_item_end_transform (item, push_undo); if (push_undo) gimp_image_undo_group_end (image); @@ -1625,7 +1675,7 @@ gimp_item_rotate (GimpItem *item, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM, item_class->rotate_desc); - gimp_item_start_move (item, push_undo); + gimp_item_start_transform (item, push_undo); g_object_freeze_notify (G_OBJECT (item)); @@ -1634,7 +1684,7 @@ gimp_item_rotate (GimpItem *item, g_object_thaw_notify (G_OBJECT (item)); - gimp_item_end_move (item, push_undo); + gimp_item_end_transform (item, push_undo); if (push_undo) gimp_image_undo_group_end (image); @@ -1668,7 +1718,7 @@ gimp_item_transform (GimpItem *item, gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM, item_class->transform_desc); - gimp_item_start_move (item, push_undo); + gimp_item_start_transform (item, push_undo); g_object_freeze_notify (G_OBJECT (item)); @@ -1677,7 +1727,7 @@ gimp_item_transform (GimpItem *item, g_object_thaw_notify (G_OBJECT (item)); - gimp_item_end_move (item, push_undo); + gimp_item_end_transform (item, push_undo); if (push_undo) gimp_image_undo_group_end (image); @@ -1956,7 +2006,7 @@ gimp_item_replace_item (GimpItem *item, gimp_item_get_ID (item), item); - /* Set image before tatoo so that the explicitly set tatoo overrides + /* Set image before tattoo so that the explicitly set tattoo overrides * the one implicitly set when setting the image */ gimp_item_set_image (item, gimp_item_get_image (replace)); diff --git a/app/core/gimpitem.h b/app/core/gimpitem.h index 783d07a727..3854ad5cdc 100644 --- a/app/core/gimpitem.h +++ b/app/core/gimpitem.h @@ -73,9 +73,13 @@ struct _GimpItemClass gboolean push_undo); void (* end_move) (GimpItem *item, gboolean push_undo); + void (* start_transform) (GimpItem *item, + gboolean push_undo); + void (* end_transform) (GimpItem *item, + gboolean push_undo); void (* translate) (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo); void (* scale) (GimpItem *item, gint new_width, @@ -216,9 +220,14 @@ void gimp_item_start_move (GimpItem *item, void gimp_item_end_move (GimpItem *item, gboolean push_undo); +void gimp_item_start_transform (GimpItem *item, + gboolean push_undo); +void gimp_item_end_transform (GimpItem *item, + gboolean push_undo); + void gimp_item_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo); gboolean gimp_item_check_scaling (GimpItem *item, diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c index fa8aba951e..d5e3106e14 100644 --- a/app/core/gimplayer.c +++ b/app/core/gimplayer.c @@ -136,8 +136,8 @@ static void gimp_layer_start_move (GimpItem *item, static void gimp_layer_end_move (GimpItem *item, gboolean push_undo); static void gimp_layer_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo); static void gimp_layer_scale (GimpItem *item, gint new_width, @@ -1119,8 +1119,8 @@ gimp_layer_end_move (GimpItem *item, static void gimp_layer_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo) { GimpLayer *layer = GIMP_LAYER (item); @@ -1128,7 +1128,9 @@ gimp_layer_translate (GimpItem *item, if (push_undo) gimp_image_undo_push_item_displace (gimp_item_get_image (item), NULL, item); - GIMP_LAYER_GET_CLASS (layer)->translate (layer, offset_x, offset_y); + GIMP_LAYER_GET_CLASS (layer)->translate (layer, + SIGNED_ROUND (offset_x), + SIGNED_ROUND (offset_y)); if (layer->mask) { diff --git a/app/core/gimppalette-import.h b/app/core/gimppalette-import.h index 69dcc1cc36..d1be6aa6cf 100644 --- a/app/core/gimppalette-import.h +++ b/app/core/gimppalette-import.h @@ -29,7 +29,7 @@ GimpPalette * gimp_palette_import_from_image (GimpImage *image, GimpContext *context, const gchar *palette_name, gint n_colors, - gint treshold, + gint threshold, gboolean selection_only); GimpPalette * gimp_palette_import_from_indexed_image (GimpImage *image, GimpContext *context, diff --git a/app/core/gimpscanconvert.c b/app/core/gimpscanconvert.c index d287532ff5..694f0d6154 100644 --- a/app/core/gimpscanconvert.c +++ b/app/core/gimpscanconvert.c @@ -375,7 +375,7 @@ gimp_scan_convert_stroke (GimpScanConvert *sc, /** * gimp_scan_convert_render: * @sc: a #GimpScanConvert context - * @bufferr: the #GeglBuffer to render to + * @buffer: the #GeglBuffer to render to * @off_x: horizontal offset into the @buffer * @off_y: vertical offset into the @buffer * @antialias: whether to apply antialiasiing diff --git a/app/core/gimpselection.c b/app/core/gimpselection.c index 1f693018e8..03e4c8d299 100644 --- a/app/core/gimpselection.c +++ b/app/core/gimpselection.c @@ -29,8 +29,8 @@ #include "gegl/gimp-gegl-apply-operation.h" #include "gimp.h" -#include "gimp-edit.h" #include "gimpcontext.h" +#include "gimpdrawable-edit.h" #include "gimpdrawable-private.h" #include "gimperror.h" #include "gimpimage.h" @@ -49,8 +49,8 @@ static gboolean gimp_selection_is_attached (GimpItem *item); static GimpItemTree * gimp_selection_get_tree (GimpItem *item); static void gimp_selection_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo); static void gimp_selection_scale (GimpItem *item, gint new_width, @@ -217,8 +217,8 @@ gimp_selection_get_tree (GimpItem *item) static void gimp_selection_translate (GimpItem *item, - gint offset_x, - gint offset_y, + gdouble offset_x, + gdouble offset_y, gboolean push_undo) { GIMP_ITEM_CLASS (parent_class)->translate (item, offset_x, offset_y, @@ -751,7 +751,7 @@ gimp_selection_extract (GimpSelection *selection, if (cut_image) { - gimp_edit_clear (image, GIMP_DRAWABLE (pickable), context); + gimp_drawable_edit_clear (GIMP_DRAWABLE (pickable), context); } } else if (cut_image) diff --git a/app/core/gimpstrokeoptions.c b/app/core/gimpstrokeoptions.c index bac3d2a4bd..4433270abc 100644 --- a/app/core/gimpstrokeoptions.c +++ b/app/core/gimpstrokeoptions.c @@ -78,7 +78,7 @@ struct _GimpStrokeOptionsPrivate { GimpStrokeMethod method; - /* options for medhod == LIBART */ + /* options for method == LIBART */ gdouble width; GimpUnit unit; diff --git a/app/core/gimptag.c b/app/core/gimptag.c index 1d1ceff581..9d2a895db2 100644 --- a/app/core/gimptag.c +++ b/app/core/gimptag.c @@ -155,7 +155,7 @@ gimp_tag_get_internal (GimpTag *tag) /** * gimp_tag_set_internal: * @tag: a gimp tag. - * @inernal: desired tag internal status + * @internal: desired tag internal status * * Set internal status of the tag. Internal tags are usually automatically * generated and will not be saved into users tag cache. diff --git a/app/core/gimptoolinfo.c b/app/core/gimptoolinfo.c index bde27ffe1d..2da88ffa10 100644 --- a/app/core/gimptoolinfo.c +++ b/app/core/gimptoolinfo.c @@ -236,7 +236,7 @@ gimp_tool_info_new (Gimp *gimp, if (tool_info->tool_options_type == paint_info->paint_options_type) { - tool_info->tool_options = g_object_ref (paint_info->paint_options); + tool_info->tool_options = g_object_ref (GIMP_TOOL_OPTIONS (paint_info->paint_options)); } else { diff --git a/app/core/gimpviewable.c b/app/core/gimpviewable.c index 21187e7d00..800c93eedb 100644 --- a/app/core/gimpviewable.c +++ b/app/core/gimpviewable.c @@ -1173,7 +1173,7 @@ gimp_viewable_get_dummy_pixbuf (GimpViewable *viewable, /** * gimp_viewable_get_description: * @viewable: viewable object for which to retrieve a description. - * @tooltip: return loaction for an optional tooltip string. + * @tooltip: return location for an optional tooltip string. * * Retrieves a string containing a description of the viewable object, * By default, it simply returns the name of the object, but this can diff --git a/app/dialogs/Makefile.in b/app/dialogs/Makefile.in index 697b9de6b2..7fc97f7e8a 100644 --- a/app/dialogs/Makefile.in +++ b/app/dialogs/Makefile.in @@ -370,7 +370,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/dialogs/authors.h b/app/dialogs/authors.h index 0b68f3fb9d..3728f31df9 100644 --- a/app/dialogs/authors.h +++ b/app/dialogs/authors.h @@ -152,6 +152,7 @@ static const gchar * const authors[] = static const gchar * const artists[] = { "Alexia Death", + "Philipp Haegi", "Aryeom Han", "Ville Pätsi", "Klaus Staedtler", diff --git a/app/dialogs/fade-dialog.c b/app/dialogs/fade-dialog.c index f603a86c3b..d5df6f3742 100644 --- a/app/dialogs/fade-dialog.c +++ b/app/dialogs/fade-dialog.c @@ -25,9 +25,9 @@ #include "dialogs-types.h" -#include "core/gimp-edit.h" #include "core/gimpcontext.h" #include "core/gimpimage.h" +#include "core/gimpimage-fade.h" #include "core/gimpimage-undo.h" #include "core/gimpdrawable.h" #include "core/gimpdrawableundo.h" @@ -206,7 +206,7 @@ fade_dialog_response (GtkWidget *dialog, static void fade_dialog_context_changed (FadeDialog *private) { - if (gimp_edit_fade (private->image, private->context)) + if (gimp_image_fade (private->image, private->context)) { private->applied = TRUE; gimp_image_flush (private->image); diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c index f061cb5b81..7178f90f69 100644 --- a/app/dialogs/preferences-dialog.c +++ b/app/dialogs/preferences-dialog.c @@ -1161,16 +1161,6 @@ prefs_dialog_new (Gimp *gimp, prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0, _("Number of _threads to use:"), GTK_TABLE (table), 4, size_group); - - vbox2 = g_object_new (GIMP_TYPE_HINT_BOX, - "icon-name", GIMP_ICON_DIALOG_WARNING, - "hint", _("Threading support is not yet stable.\n" - "Setting this to greater than one might\n" - "result in image errors or crashes."), - NULL); - gtk_table_attach (GTK_TABLE (table), vbox2, 1, 2, 5, 6, - GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0); - gtk_widget_show (vbox2); #endif /* ENABLE_MP */ /* Hardware Acceleration */ @@ -1553,6 +1543,17 @@ prefs_dialog_new (Gimp *gimp, NULL, &top_iter); + hbox = g_object_new (GIMP_TYPE_HINT_BOX, + "icon-name", GIMP_ICON_DIALOG_WARNING, + "hint", _("These features are unfinished, buggy " + "and may crash GIMP. It is unadvised to " + "use them unless you really know what " + "you are doing or you intend to contribute " + "patches."), + NULL); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show (hbox); + vbox2 = prefs_frame_new (_("Insane Options"), GTK_CONTAINER (vbox), TRUE); diff --git a/app/display/Makefile.in b/app/display/Makefile.in index daf06f578e..d362f573fc 100644 --- a/app/display/Makefile.in +++ b/app/display/Makefile.in @@ -402,7 +402,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/display/gimpcanvas-style.c b/app/display/gimpcanvas-style.c index b902f5e529..de19f21dbb 100644 --- a/app/display/gimpcanvas-style.c +++ b/app/display/gimpcanvas-style.c @@ -36,7 +36,7 @@ /* Styles for common and custom guides. */ static const GimpRGB guide_normal_fg = { 0.0, 0.0, 0.0, 1.0 }; -static const GimpRGB guide_normal_bg = { 0.0, 0.5, 1.0, 1.0 }; +static const GimpRGB guide_normal_bg = { 0.0, 0.8, 1.0, 1.0 }; static const GimpRGB guide_active_fg = { 0.0, 0.0, 0.0, 1.0 }; static const GimpRGB guide_active_bg = { 1.0, 0.0, 0.0, 1.0 }; @@ -56,7 +56,7 @@ static const GimpRGB guide_split_active_fg = { 1.0, 0.0, 1.0, 1.0 }; static const GimpRGB guide_split_active_bg = { 1.0, 0.0, 0.0, 1.0 }; /* Styles for other canvas items. */ -static const GimpRGB sample_point_normal = { 0.0, 0.5, 1.0, 1.0 }; +static const GimpRGB sample_point_normal = { 0.0, 0.8, 1.0, 1.0 }; static const GimpRGB sample_point_active = { 1.0, 0.0, 0.0, 1.0 }; static const GimpRGB layer_fg = { 0.0, 0.0, 0.0, 1.0 }; diff --git a/app/display/gimpcanvas.c b/app/display/gimpcanvas.c index 9c51194dbb..3cf2f8065a 100644 --- a/app/display/gimpcanvas.c +++ b/app/display/gimpcanvas.c @@ -191,7 +191,7 @@ gimp_canvas_focus (GtkWidget *widget, /* override GtkContainer's focus() implementation which would always * give focus to the canvas because it is focussable. Instead, try - * navigating in the focussed overlay child first, and use + * navigating in the focused overlay child first, and use * GtkContainer's default implementation only if that fails (which * happens when focus navigation leaves the overlay child). */ diff --git a/app/display/gimpcanvassamplepoint.c b/app/display/gimpcanvassamplepoint.c index f900ccb929..fa314bb138 100644 --- a/app/display/gimpcanvassamplepoint.c +++ b/app/display/gimpcanvassamplepoint.c @@ -34,7 +34,7 @@ #include "gimpdisplayshell.h" -#define GIMP_SAMPLE_POINT_DRAW_SIZE 10 +#define GIMP_SAMPLE_POINT_DRAW_SIZE 14 enum @@ -245,10 +245,10 @@ gimp_canvas_sample_point_draw (GimpCanvasItem *item, layout = gimp_canvas_get_layout (GIMP_CANVAS (canvas), "%d", private->index); - cairo_move_to (cr, x + 2.5, y + 2.5); + cairo_move_to (cr, x + 3, y + 3); pango_cairo_show_layout (cr, layout); - _gimp_canvas_item_fill (item, cr); + _gimp_canvas_item_stroke (item, cr); } static cairo_region_t * @@ -274,8 +274,8 @@ gimp_canvas_sample_point_get_extents (GimpCanvasItem *item) pango_layout_get_extents (layout, &ink, NULL); - x2 = MAX (x2, 2.5 + ink.width); - y2 = MAX (y2, 2.5 + ink.height); + x2 = MAX (x2, 3 + ink.width); + y2 = MAX (y2, 3 + ink.height); rectangle.x = x1 - 1.5; rectangle.y = y1 - 1.5; @@ -293,6 +293,9 @@ gimp_canvas_sample_point_stroke (GimpCanvasItem *item, if (private->sample_point_style) { + gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr); + cairo_stroke_preserve (cr); + gimp_canvas_set_sample_point_style (gimp_canvas_item_get_canvas (item), cr, gimp_canvas_item_get_highlight (item)); cairo_stroke (cr); diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c index e45ac1b6c5..767b265df3 100644 --- a/app/display/gimpdisplayshell-dnd.c +++ b/app/display/gimpdisplayshell-dnd.c @@ -30,6 +30,7 @@ #include "core/gimp.h" #include "core/gimp-edit.h" #include "core/gimpbuffer.h" +#include "core/gimpdrawable-edit.h" #include "core/gimpfilloptions.h" #include "core/gimpimage.h" #include "core/gimpimage-new.h" @@ -385,7 +386,7 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell, } else { - gimp_edit_fill (image, drawable, options, undo_desc); + gimp_drawable_edit_fill (drawable, options, undo_desc); } gimp_display_shell_dnd_flush (shell, image); diff --git a/app/display/gimpdisplayshell-transform.c b/app/display/gimpdisplayshell-transform.c index 8155c04335..702dffc028 100644 --- a/app/display/gimpdisplayshell-transform.c +++ b/app/display/gimpdisplayshell-transform.c @@ -961,7 +961,7 @@ gimp_display_shell_untransform_bounds_with_scale (GimpDisplayShell *shell, * @width: returns width of display measured in image coordinates * @height: returns height of display measured in image coordinates * - * This function calculates the part of the image, im image coordinates, + * This function calculates the part of the image, in image coordinates, * that corresponds to the display viewport. **/ void diff --git a/app/display/gimptoolrectangle.c b/app/display/gimptoolrectangle.c index e726258551..3836ec2ef0 100644 --- a/app/display/gimptoolrectangle.c +++ b/app/display/gimptoolrectangle.c @@ -191,7 +191,7 @@ struct _GimpToolRectanglePrivate /* How to constrain the rectangle. */ GimpRectangleConstraint constraint; - /* What precision the rectangle will apear to have externally (it + /* What precision the rectangle will appear to have externally (it * will always be double internally) */ GimpRectanglePrecision precision; diff --git a/app/file/Makefile.in b/app/file/Makefile.in index c32a56e631..29b661e0fe 100644 --- a/app/file/Makefile.in +++ b/app/file/Makefile.in @@ -343,7 +343,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/gegl/Makefile.in b/app/gegl/Makefile.in index fd40108630..36efe4d379 100644 --- a/app/gegl/Makefile.in +++ b/app/gegl/Makefile.in @@ -378,7 +378,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/gui/Makefile.in b/app/gui/Makefile.in index 9ba5720a8d..fcaf424a12 100644 --- a/app/gui/Makefile.in +++ b/app/gui/Makefile.in @@ -347,7 +347,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/main.c b/app/main.c index 60e846b4e0..b8515c68a3 100644 --- a/app/main.c +++ b/app/main.c @@ -280,7 +280,7 @@ static const GOptionEntry main_entries[] = N_("Output a sorted list of deprecated procedures in the PDB"), NULL }, { - "show-playground", 0, G_OPTION_FLAG_HIDDEN, + "show-playground", 0, 0, G_OPTION_ARG_NONE, &show_playground, N_("Show a preferences page with experimental features"), NULL }, diff --git a/app/menus/Makefile.in b/app/menus/Makefile.in index fb654f8b75..0d797a8feb 100644 --- a/app/menus/Makefile.in +++ b/app/menus/Makefile.in @@ -346,7 +346,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/operations/Makefile.in b/app/operations/Makefile.in index d1ef7c35cf..e1acdaeae1 100644 --- a/app/operations/Makefile.in +++ b/app/operations/Makefile.in @@ -412,7 +412,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/operations/gimpcurvesconfig.c b/app/operations/gimpcurvesconfig.c index ae9bc71358..013bc5b584 100644 --- a/app/operations/gimpcurvesconfig.c +++ b/app/operations/gimpcurvesconfig.c @@ -672,7 +672,7 @@ gimp_curves_config_save_cruft (GimpCurvesConfig *config, for (j = 0; j < curve->n_points; j++) { - /* don't use gimp_curve_get_point() becaue that doesn't + /* don't use gimp_curve_get_point() because that doesn't * work when the curve type is GIMP_CURVE_FREE */ gdouble x = curve->points[j].x; diff --git a/app/operations/gimpoperationflood.c b/app/operations/gimpoperationflood.c index f9de086a4c..386876cf54 100644 --- a/app/operations/gimpoperationflood.c +++ b/app/operations/gimpoperationflood.c @@ -781,7 +781,7 @@ gimp_operation_flood_process_propagate_horizontal (GimpOperationFloodContext GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE); } - /* The new water level is the maximum of the curernt ground level, + /* The new water level is the maximum of the current ground level, * and the minimum of the current and previous water levels. Recall * that `level` holds the previous water level, and that the current * water level is never less than the ground level. diff --git a/app/operations/gimpoperationgradient.c b/app/operations/gimpoperationgradient.c index 8382285946..36241f3fd1 100644 --- a/app/operations/gimpoperationgradient.c +++ b/app/operations/gimpoperationgradient.c @@ -36,7 +36,9 @@ #include "gimpoperationgradient.h" -//#define USE_GRADIENT_CACHE 1 +#define GRADIENT_CACHE_N_SUPERSAMPLES 4 +#define GRADIENT_CACHE_MAX_SIZE ((1 << 20) / sizeof (GimpRGB)) + enum { @@ -63,111 +65,109 @@ typedef struct GimpGradient *gradient; gboolean reverse; GimpGradientBlendColorSpace blend_color_space; -#ifdef USE_GRADIENT_CACHE GimpRGB *gradient_cache; gint gradient_cache_size; -#else GimpGradientSegment *last_seg; -#endif gdouble offset; gdouble sx, sy; GimpGradientType gradient_type; gdouble dist; gdouble vec[2]; GimpRepeatMode repeat; - GimpRGB leftmost_color; - GimpRGB rightmost_color; - GRand *seed; GeglBuffer *dist_buffer; } RenderBlendData; typedef struct { - GeglBuffer *buffer; - gfloat *row_data; - gint roi_x; - gint width; - GRand *dither_rand; + GeglBuffer *buffer; + gfloat *row_data; + gint roi_x; + gint width; + GRand *dither_rand; } PutPixelData; /* local function prototypes */ -static void gimp_operation_gradient_dispose (GObject *gobject); -static void gimp_operation_gradient_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec); -static void gimp_operation_gradient_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec); +static void gimp_operation_gradient_dispose (GObject *gobject); +static void gimp_operation_gradient_finalize (GObject *gobject); +static void gimp_operation_gradient_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec); +static void gimp_operation_gradient_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec); -static void gimp_operation_gradient_prepare (GeglOperation *operation); +static void gimp_operation_gradient_prepare (GeglOperation *operation); -static GeglRectangle gimp_operation_gradient_get_bounding_box (GeglOperation *operation); +static GeglRectangle gimp_operation_gradient_get_bounding_box (GeglOperation *operation); -static gdouble gradient_calc_conical_sym_factor (gdouble dist, - gdouble *axis, - gdouble offset, - gdouble x, - gdouble y); -static gdouble gradient_calc_conical_asym_factor (gdouble dist, - gdouble *axis, - gdouble offset, - gdouble x, - gdouble y); -static gdouble gradient_calc_square_factor (gdouble dist, - gdouble offset, - gdouble x, - gdouble y); -static gdouble gradient_calc_radial_factor (gdouble dist, - gdouble offset, - gdouble x, - gdouble y); -static gdouble gradient_calc_linear_factor (gdouble dist, - gdouble *vec, - gdouble offset, - gdouble x, - gdouble y); -static gdouble gradient_calc_bilinear_factor (gdouble dist, - gdouble *vec, - gdouble offset, - gdouble x, - gdouble y); -static gdouble gradient_calc_spiral_factor (gdouble dist, - gdouble *axis, - gdouble offset, - gdouble x, - gdouble y, - gboolean clockwise); +static gdouble gradient_calc_conical_sym_factor (gdouble dist, + gdouble *axis, + gdouble offset, + gdouble x, + gdouble y); +static gdouble gradient_calc_conical_asym_factor (gdouble dist, + gdouble *axis, + gdouble offset, + gdouble x, + gdouble y); +static gdouble gradient_calc_square_factor (gdouble dist, + gdouble offset, + gdouble x, + gdouble y); +static gdouble gradient_calc_radial_factor (gdouble dist, + gdouble offset, + gdouble x, + gdouble y); +static gdouble gradient_calc_linear_factor (gdouble dist, + gdouble *vec, + gdouble offset, + gdouble x, + gdouble y); +static gdouble gradient_calc_bilinear_factor (gdouble dist, + gdouble *vec, + gdouble offset, + gdouble x, + gdouble y); +static gdouble gradient_calc_spiral_factor (gdouble dist, + gdouble *axis, + gdouble offset, + gdouble x, + gdouble y, + gboolean clockwise); -static gdouble gradient_calc_shapeburst_angular_factor (GeglBuffer *dist_buffer, - gdouble x, - gdouble y); -static gdouble gradient_calc_shapeburst_spherical_factor (GeglBuffer *dist_buffer, - gdouble x, - gdouble y); -static gdouble gradient_calc_shapeburst_dimpled_factor (GeglBuffer *dist_buffer, - gdouble x, - gdouble y); +static gdouble gradient_calc_shapeburst_angular_factor (GeglBuffer *dist_buffer, + gdouble x, + gdouble y); +static gdouble gradient_calc_shapeburst_spherical_factor (GeglBuffer *dist_buffer, + gdouble x, + gdouble y); +static gdouble gradient_calc_shapeburst_dimpled_factor (GeglBuffer *dist_buffer, + gdouble x, + gdouble y); -static void gradient_render_pixel (gdouble x, - gdouble y, - GimpRGB *color, - gpointer render_data); +static void gradient_render_pixel (gdouble x, + gdouble y, + GimpRGB *color, + gpointer render_data); -static void gradient_put_pixel (gint x, - gint y, - GimpRGB *color, - gpointer put_pixel_data); +static void gradient_put_pixel (gint x, + gint y, + GimpRGB *color, + gpointer put_pixel_data); -static gboolean gimp_operation_gradient_process (GeglOperation *operation, - GeglBuffer *input, - GeglBuffer *output, - const GeglRectangle *result, - gint level); +static gboolean gimp_operation_gradient_process (GeglOperation *operation, + GeglBuffer *input, + GeglBuffer *output, + const GeglRectangle *result, + gint level); + +static void gimp_operation_gradient_invalidate_cache (GimpOperationGradient *self); +static void gimp_operation_gradient_validate_cache (GimpOperationGradient *self); G_DEFINE_TYPE (GimpOperationGradient, gimp_operation_gradient, @@ -184,6 +184,7 @@ gimp_operation_gradient_class_init (GimpOperationGradientClass *klass) GeglOperationFilterClass *filter_class = GEGL_OPERATION_FILTER_CLASS (klass); object_class->dispose = gimp_operation_gradient_dispose; + object_class->finalize = gimp_operation_gradient_finalize; object_class->set_property = gimp_operation_gradient_set_property; object_class->get_property = gimp_operation_gradient_get_property; @@ -326,6 +327,7 @@ gimp_operation_gradient_class_init (GimpOperationGradientClass *klass) static void gimp_operation_gradient_init (GimpOperationGradient *self) { + g_mutex_init (&self->gradient_cache_mutex); } static void @@ -333,12 +335,24 @@ gimp_operation_gradient_dispose (GObject *object) { GimpOperationGradient *self = GIMP_OPERATION_GRADIENT (object); + gimp_operation_gradient_invalidate_cache (self); + g_clear_object (&self->gradient); g_clear_object (&self->context); G_OBJECT_CLASS (parent_class)->dispose (object); } +static void +gimp_operation_gradient_finalize (GObject *object) +{ + GimpOperationGradient *self = GIMP_OPERATION_GRADIENT (object); + + g_mutex_clear (&self->gradient_cache_mutex); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + static void gimp_operation_gradient_get_property (GObject *object, guint property_id, @@ -445,23 +459,33 @@ gimp_operation_gradient_set_property (GObject *object, else self->gradient = g_object_ref (gradient); } + + gimp_operation_gradient_invalidate_cache (self); } break; case PROP_START_X: self->start_x = g_value_get_double (value); + + gimp_operation_gradient_invalidate_cache (self); break; case PROP_START_Y: self->start_y = g_value_get_double (value); + + gimp_operation_gradient_invalidate_cache (self); break; case PROP_END_X: self->end_x = g_value_get_double (value); + + gimp_operation_gradient_invalidate_cache (self); break; case PROP_END_Y: self->end_y = g_value_get_double (value); + + gimp_operation_gradient_invalidate_cache (self); break; case PROP_GRADIENT_TYPE: @@ -478,10 +502,14 @@ gimp_operation_gradient_set_property (GObject *object, case PROP_GRADIENT_REVERSE: self->gradient_reverse = g_value_get_boolean (value); + + gimp_operation_gradient_invalidate_cache (self); break; case PROP_GRADIENT_BLEND_COLOR_SPACE: self->gradient_blend_color_space = g_value_get_enum (value); + + gimp_operation_gradient_invalidate_cache (self); break; case PROP_SUPERSAMPLE: @@ -900,7 +928,6 @@ gradient_render_pixel (gdouble x, switch (rbd->repeat) { - case GIMP_REPEAT_TRUNCATE: case GIMP_REPEAT_NONE: break; @@ -922,29 +949,32 @@ gradient_render_pixel (gdouble x, factor = 1.0 - factor; } break; + + case GIMP_REPEAT_TRUNCATE: + if (factor < 0.0 || factor > 1.0) + { + gimp_rgba_set (color, 0.0, 0.0, 0.0, 0.0); + return; + } + break; } /* Blend the colors */ - if (factor <= 0.0) + if (rbd->gradient_cache) { - *color = rbd->leftmost_color; - } - else if (factor >= 1.0) - { - *color = rbd->rightmost_color; + factor = CLAMP (factor, 0.0, 1.0); + + *color = + rbd->gradient_cache[ROUND (factor * (rbd->gradient_cache_size - 1))]; } else { -#ifdef USE_GRADIENT_CACHE - *color = rbd->gradient_cache[(gint) (factor * (rbd->gradient_cache_size - 1))]; -#else rbd->last_seg = gimp_gradient_get_color_at (rbd->gradient, NULL, rbd->last_seg, factor, rbd->reverse, rbd->blend_color_space, color); -#endif } } @@ -1008,35 +1038,16 @@ gimp_operation_gradient_process (GeglOperation *operation, RenderBlendData rbd = { 0, }; - rbd.gradient = NULL; - rbd.reverse = self->gradient_reverse; - rbd.blend_color_space = self->gradient_blend_color_space; + if (! self->gradient) + return TRUE; - if (self->gradient) - rbd.gradient = g_object_ref (self->gradient); - else - rbd.gradient = GIMP_GRADIENT (gimp_gradient_new (NULL, "Gradient-Temp")); + gimp_operation_gradient_validate_cache (self); -#ifdef USE_GRADIENT_CACHE - { - GimpGradientSegment *last_seg = NULL; - gint i; - - rbd.gradient_cache_size = ceil (sqrt (SQR (sx - ex) + SQR (sy - ey))); - rbd.gradient_cache = g_new0 (GimpRGB, rbd.gradient_cache_size); - - for (i = 0; i < rbd.gradient_cache_size; i++) - { - gdouble factor = (gdouble) i / (gdouble) (rbd.gradient_cache_size - 1); - - last_seg = gimp_gradient_get_color_at (rbd.gradient, NULL, last_seg, - factor, - rbd.reverse, - rbd.blend_color_space, - rbd.gradient_cache + i); - } - } -#endif + rbd.gradient = self->gradient; + rbd.reverse = self->gradient_reverse; + rbd.blend_color_space = self->gradient_blend_color_space; + rbd.gradient_cache = self->gradient_cache; + rbd.gradient_cache_size = self->gradient_cache_size; /* Calculate type-specific parameters */ @@ -1086,26 +1097,6 @@ gimp_operation_gradient_process (GeglOperation *operation, rbd.gradient_type = self->gradient_type; rbd.repeat = self->gradient_repeat; - if (rbd.repeat == GIMP_REPEAT_NONE) - { - gimp_gradient_segment_get_left_flat_color (rbd.gradient, NULL, - rbd.gradient->segments, - &rbd.leftmost_color); - gimp_gradient_segment_get_right_flat_color (rbd.gradient, NULL, - gimp_gradient_segment_get_last ( - rbd.gradient->segments), - &rbd.rightmost_color); - - if (rbd.reverse) - { - GimpRGB temp; - - temp = rbd.leftmost_color; - rbd.leftmost_color = rbd.rightmost_color; - rbd.rightmost_color = temp; - } - } - /* Render the gradient! */ if (self->supersample) @@ -1137,6 +1128,7 @@ gimp_operation_gradient_process (GeglOperation *operation, { GeglBufferIterator *iter; GeglRectangle *roi; + GRand *seed = NULL; iter = gegl_buffer_iterator_new (output, result, 0, babl_format ("R'G'B'A float"), @@ -1144,7 +1136,7 @@ gimp_operation_gradient_process (GeglOperation *operation, roi = &iter->roi[0]; if (self->dither) - rbd.seed = g_rand_new (); + seed = g_rand_new (); while (gegl_buffer_iterator_next (iter)) { @@ -1153,9 +1145,9 @@ gimp_operation_gradient_process (GeglOperation *operation, gint endy = roi->y + roi->height; gint x, y; - if (rbd.seed) + if (seed) { - GRand *dither_rand = g_rand_new_with_seed (g_rand_int (rbd.seed)); + GRand *dither_rand = g_rand_new_with_seed (g_rand_int (seed)); for (y = roi->y; y < endy; y++) for (x = roi->x; x < endx; x++) @@ -1201,14 +1193,65 @@ gimp_operation_gradient_process (GeglOperation *operation, } if (self->dither) - g_rand_free (rbd.seed); + g_rand_free (seed); } -#ifdef USE_GRADIENT_CACHE - g_free (rbd.gradient_cache); -#endif - - g_object_unref (rbd.gradient); - return TRUE; } + +static void +gimp_operation_gradient_invalidate_cache (GimpOperationGradient *self) +{ + g_clear_pointer (&self->gradient_cache, g_free); +} + +static void +gimp_operation_gradient_validate_cache (GimpOperationGradient *self) +{ + GimpGradientSegment *last_seg = NULL; + gint cache_size; + gint i; + + if (! self->gradient) + return; + + g_mutex_lock (&self->gradient_cache_mutex); + + if (self->gradient_cache) + { + g_mutex_unlock (&self->gradient_cache_mutex); + + return; + } + + cache_size = ceil (hypot (self->start_x - self->end_x, + self->start_y - self->end_y)) * + GRADIENT_CACHE_N_SUPERSAMPLES; + + /* have at least two values in the cache */ + cache_size = MAX (cache_size, 2); + + /* don't use a cache if its necessary size is too big */ + if (cache_size > GRADIENT_CACHE_MAX_SIZE) + { + g_mutex_unlock (&self->gradient_cache_mutex); + + return; + } + + self->gradient_cache = g_new0 (GimpRGB, cache_size); + self->gradient_cache_size = cache_size; + + for (i = 0; i < self->gradient_cache_size; i++) + { + gdouble factor = (gdouble) i / (gdouble) (self->gradient_cache_size - 1); + + last_seg = gimp_gradient_get_color_at (self->gradient, NULL, last_seg, + factor, + self->gradient_reverse, + self->gradient_blend_color_space, + self->gradient_cache + i); + } + + g_mutex_unlock (&self->gradient_cache_mutex); +} diff --git a/app/operations/gimpoperationgradient.h b/app/operations/gimpoperationgradient.h index b63686a43b..9cbbc99ef3 100644 --- a/app/operations/gimpoperationgradient.h +++ b/app/operations/gimpoperationgradient.h @@ -38,23 +38,27 @@ typedef struct _GimpOperationGradientClass GimpOperationGradientClass; struct _GimpOperationGradient { - GeglOperationFilter parent_instance; + GeglOperationFilter parent_instance; - GimpContext *context; + GimpContext *context; - GimpGradient *gradient; - gdouble start_x, start_y, end_x, end_y; - GimpGradientType gradient_type; - GimpRepeatMode gradient_repeat; - gdouble offset; - gboolean gradient_reverse; - GimpGradientBlendColorSpace gradient_blend_color_space; + GimpGradient *gradient; + gdouble start_x, start_y, end_x, end_y; + GimpGradientType gradient_type; + GimpRepeatMode gradient_repeat; + gdouble offset; + gboolean gradient_reverse; + GimpGradientBlendColorSpace gradient_blend_color_space; - gboolean supersample; - gint supersample_depth; - gdouble supersample_threshold; + gboolean supersample; + gint supersample_depth; + gdouble supersample_threshold; - gboolean dither; + gboolean dither; + + GimpRGB *gradient_cache; + gint gradient_cache_size; + GMutex gradient_cache_mutex; }; struct _GimpOperationGradientClass diff --git a/app/operations/gimpoperationgrow.c b/app/operations/gimpoperationgrow.c index 9b7f413239..1e3b79d8a6 100644 --- a/app/operations/gimpoperationgrow.c +++ b/app/operations/gimpoperationgrow.c @@ -372,7 +372,7 @@ gimp_operation_grow_process (GeglOperation *operation, GEGL_AUTO_ROWSTRIDE); } - /* undo the offsets to the pointers so we can free the malloced memmory */ + /* undo the offsets to the pointers so we can free the malloced memory */ circ -= self->radius_x; max -= self->radius_x; diff --git a/app/operations/gimpoperationshrink.c b/app/operations/gimpoperationshrink.c index 86a318d269..0339e7e7c4 100644 --- a/app/operations/gimpoperationshrink.c +++ b/app/operations/gimpoperationshrink.c @@ -423,11 +423,11 @@ gimp_operation_shrink_process (GeglOperation *operation, GEGL_AUTO_ROWSTRIDE); } - /* undo the offsets to the pointers so we can free the malloced memmory */ + /* undo the offsets to the pointers so we can free the malloced memory */ circ -= self->radius_x; max -= self->radius_x; - /* free the memmory */ + /* free the memory */ g_free (circ); g_free (buffer); g_free (max); diff --git a/app/operations/layer-modes-legacy/Makefile.in b/app/operations/layer-modes-legacy/Makefile.in index 5682bb130d..6b10d35d39 100644 --- a/app/operations/layer-modes-legacy/Makefile.in +++ b/app/operations/layer-modes-legacy/Makefile.in @@ -361,7 +361,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/operations/layer-modes/Makefile.in b/app/operations/layer-modes/Makefile.in index 1215c3b891..69ee052f3e 100644 --- a/app/operations/layer-modes/Makefile.in +++ b/app/operations/layer-modes/Makefile.in @@ -376,7 +376,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/operations/layer-modes/gimp-layer-modes.c b/app/operations/layer-modes/gimp-layer-modes.c index e26ac6fb44..f53da44b2a 100644 --- a/app/operations/layer-modes/gimp-layer-modes.c +++ b/app/operations/layer-modes/gimp-layer-modes.c @@ -863,6 +863,7 @@ static const GimpLayerMode layer_mode_group_default[] = GIMP_LAYER_MODE_LUMA_DARKEN_ONLY, GIMP_LAYER_MODE_MULTIPLY, GIMP_LAYER_MODE_BURN, + GIMP_LAYER_MODE_LINEAR_BURN, GIMP_LAYER_MODE_SEPARATOR, @@ -877,6 +878,7 @@ static const GimpLayerMode layer_mode_group_default[] = GIMP_LAYER_MODE_SEPARATOR, GIMP_LAYER_MODE_DIFFERENCE, + GIMP_LAYER_MODE_EXCLUSION, GIMP_LAYER_MODE_SUBTRACT, GIMP_LAYER_MODE_GRAIN_EXTRACT, GIMP_LAYER_MODE_GRAIN_MERGE, @@ -895,12 +897,7 @@ static const GimpLayerMode layer_mode_group_default[] = GIMP_LAYER_MODE_LCH_CHROMA, GIMP_LAYER_MODE_LCH_COLOR, GIMP_LAYER_MODE_LCH_LIGHTNESS, - GIMP_LAYER_MODE_LUMINANCE, - - GIMP_LAYER_MODE_SEPARATOR, - - GIMP_LAYER_MODE_EXCLUSION, - GIMP_LAYER_MODE_LINEAR_BURN + GIMP_LAYER_MODE_LUMINANCE }; static const GimpLayerMode layer_mode_group_legacy[] = diff --git a/app/operations/tests/Makefile.in b/app/operations/tests/Makefile.in index 087d38e6e5..0fd1141d35 100644 --- a/app/operations/tests/Makefile.in +++ b/app/operations/tests/Makefile.in @@ -290,7 +290,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/paint/Makefile.in b/app/paint/Makefile.in index 5f92d6a536..bb624126da 100644 --- a/app/paint/Makefile.in +++ b/app/paint/Makefile.in @@ -379,7 +379,7 @@ GUDEV_LIBS = @GUDEV_LIBS@ HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@ HARFBUZZ_LIBS = @HARFBUZZ_LIBS@ HARFBUZZ_REQUIRED_VERSION = @HARFBUZZ_REQUIRED_VERSION@ -HAVE_CXX11 = @HAVE_CXX11@ +HAVE_CXX14 = @HAVE_CXX14@ HAVE_FINITE = @HAVE_FINITE@ HAVE_ISFINITE = @HAVE_ISFINITE@ HAVE_VFORK = @HAVE_VFORK@ diff --git a/app/paint/gimpairbrush.c b/app/paint/gimpairbrush.c index 042cb2b33b..c30cc248be 100644 --- a/app/paint/gimpairbrush.c +++ b/app/paint/gimpairbrush.c @@ -38,7 +38,7 @@ enum { - TIMEOUT, + STAMP, LAST_SIGNAL }; @@ -88,11 +88,11 @@ gimp_airbrush_class_init (GimpAirbrushClass *klass) paint_core_class->paint = gimp_airbrush_paint; - airbrush_signals[TIMEOUT] = - g_signal_new ("timeout", + airbrush_signals[STAMP] = + g_signal_new ("stamp", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, - G_STRUCT_OFFSET (GimpAirbrushClass, timeout), + G_STRUCT_OFFSET (GimpAirbrushClass, stamp), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -114,6 +114,8 @@ gimp_airbrush_finalize (GObject *object) airbrush->timeout_id = 0; } + g_clear_object (&airbrush->sym); + G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -158,6 +160,13 @@ gimp_airbrush_paint (GimpPaintCore *paint_core, fade_point = gimp_paint_options_get_fade (paint_options, image, paint_core->pixel_dist); + airbrush->drawable = drawable; + airbrush->paint_options = paint_options; + + if (airbrush->sym) + g_object_unref (airbrush->sym); + airbrush->sym = g_object_ref (sym); + /* Base our timeout on the original stroke. */ coords = gimp_symmetry_get_origin (sym); @@ -180,6 +189,8 @@ gimp_airbrush_paint (GimpPaintCore *paint_core, paint_options, sym, paint_state, time); + + g_clear_object (&airbrush->sym); break; } } @@ -221,7 +232,23 @@ gimp_airbrush_timeout (gpointer data) airbrush->timeout_id = 0; - g_signal_emit (airbrush, airbrush_signals[TIMEOUT], 0); + g_signal_emit (airbrush, airbrush_signals[STAMP], 0); return G_SOURCE_REMOVE; } + + +/* public functions */ + + +void +gimp_airbrush_stamp (GimpAirbrush *airbrush) +{ + g_return_if_fail (GIMP_IS_AIRBRUSH (airbrush)); + + gimp_airbrush_paint (GIMP_PAINT_CORE (airbrush), + airbrush->drawable, + airbrush->paint_options, + airbrush->sym, + GIMP_PAINT_STATE_MOTION, 0); +} diff --git a/app/paint/gimpairbrush.h b/app/paint/gimpairbrush.h index 7aa802cc53..4efb8d73f7 100644 --- a/app/paint/gimpairbrush.h +++ b/app/paint/gimpairbrush.h @@ -34,9 +34,13 @@ typedef struct _GimpAirbrushClass GimpAirbrushClass; struct _GimpAirbrush { - GimpPaintbrush parent_instance; + GimpPaintbrush parent_instance; - guint timeout_id; + guint timeout_id; + + GimpSymmetry *sym; + GimpDrawable *drawable; + GimpPaintOptions *paint_options; }; struct _GimpAirbrushClass @@ -44,7 +48,7 @@ struct _GimpAirbrushClass GimpPaintbrushClass parent_class; /* signals */ - void (* timeout) (GimpAirbrush *airbrush); + void (* stamp) (GimpAirbrush *airbrush); }; @@ -53,5 +57,7 @@ void gimp_airbrush_register (Gimp *gimp, GType gimp_airbrush_get_type (void) G_GNUC_CONST; +void gimp_airbrush_stamp (GimpAirbrush *airbrush); + #endif /* __GIMP_AIRBRUSH_H__ */ diff --git a/app/paint/gimppaintcore-loops.cc b/app/paint/gimppaintcore-loops.cc index c02335dca0..92c8ab5eb7 100644 --- a/app/paint/gimppaintcore-loops.cc +++ b/app/paint/gimppaintcore-loops.cc @@ -34,11 +34,1149 @@ extern "C" #include "gimppaintcore-loops.h" +} /* extern "C" */ + #define MIN_PARALLEL_SUB_SIZE 64 #define MIN_PARALLEL_SUB_AREA (MIN_PARALLEL_SUB_SIZE * MIN_PARALLEL_SUB_SIZE) +/* In order to avoid iterating over the same region of the same buffers + * multiple times, when calling more than one of the paint-core loop functions + * (hereafter referred to as "algorithms") in succession, we provide a single + * function, gimp_paint_core_loops_process(), which can be used to perform + * multiple algorithms in a row. This function takes a pointer to a + * GimpPaintCoreLoopsParams structure, providing the parameters for the + * algorithms, and a GimpPaintCoreLoopsAlgorithm bitset, which specifies the + * set of algorithms to run; currently, the algorithms are always run in a + * fixed order. For convenience, we provide public functions for the + * individual algorithms, but they're merely wrappers around + * gimp_paint_core_loops_process(). + * + * We use some C++ magic to statically generate specialized versions of + * gimp_paint_core_loops_process() for all possible combinations of algorithms, + * and, where relevant, formats and input parameters, and to dispatch to the + * correct version at runtime. + * + * To achieve this, each algorithm provides two components: + * + * - The algorithm class template, which implements the algorithm, following + * a common interface. See the AlgorithmBase class for a description of + * the interface. Each algorithm class takes its base class as a template + * parameter, which allows us to construct a class hierarchy corresponding + * to a specific set of algorithms. Some classes in the hierarchy are not + * algorithms themselves, but are rather helpers, which provide some + * functionality to the algorithms further down the hierarchy, such as + * access to specific buffers. + * + * - A dispatch function, which takes the input parameters, the requested set + * of algorithms, the (type of) the current algorithm hierarchy, and a + * visitor object. The function calls the visitor with a (potentially) + * modified hierarchy, depending on the input. Ihe dispatch function for + * an algorithm checks if the requested set of algorithms contains a + * certain algorithm, adds the said algorithm to the hierarchy accordingly, + * and calls the visitor with the new hierarchy. See the AlgorithmDispatch + * class, which provides a dispatch-function implementation which + * algorithms can use instead of providing their own dispatch function. + * + * Helper classes in the hierarchy may also provide dispatch functions, + * which likewise modify the hierarchy based on the input parameters. For + * example, the dispatch_paint_mask() function adds a certain PaintMask + * specialization to the hierarchy, depending on the format of the paint + * mask buffer; this can be used to specialize algorithms based on the mask + * format; an algorithm that depends on the paint mask may dispatch through + * this function, before modifying the hierarchy itself. + * + * The dispatch() function is used to construct an algorithm hierarchy by + * dispatching through a list of functions. gimp_paint_core_loops_process() + * calls dispatch() with the full list of algorithm dispatch functions, + * receiving in return the algorithm hierarchy matching the input. It then + * uses the algorithm interface to perform the actual processing. + */ + + +enum +{ + ALGORITHM_PAINT_BUF = 1u << 31, + ALGORITHM_PAINT_MASK = 1u << 30, + ALGORITHM_STIPPLE = 1u << 29 +}; + + +template +struct identity +{ + using type = T; +}; + + +/* dispatch(): + * + * Takes a list of dispatch function objects, and calls each of them, in order, + * with the same 'params' and 'algorithms' parameters, passing 'algorithm' as + * the input hierarchy to the first dispatch function, and passing the output + * hierarchy of the previous dispatch function as the input hierarchy for the + * next dispatch function. Calls 'visitor' with the output hierarchy of the + * last dispatch function. + * + * Each algorithm hierarchy should provide a 'filter' static data member, and + * each dispatch function object should provide a 'mask' static data member. + * If the bitwise-AND of the current hierarchy's 'filter' member and the + * current dispatch function's 'mask' member is equal to 'mask', the dispatch + * function is skipped. This can be used to make sure that a class appears + * only once in the hierarchy, even if its dispatch function is used multiple + * times, or to prevent an algorithm from being dispatched, if it cannot be + * used together with another algorithm. + */ + +template +static inline void +dispatch (Visitor visitor, + const GimpPaintCoreLoopsParams *params, + GimpPaintCoreLoopsAlgorithm algorithms, + identity algorithm) +{ + visitor (algorithm); +} + +template +struct dispatch_impl +{ + template + static void + apply (Visitor visitor, + const GimpPaintCoreLoopsParams *params, + GimpPaintCoreLoopsAlgorithm algorithms, + identity algorithm, + Dispatch disp, + DispatchRest... disp_rest) + { + disp ( + [&] (auto algorithm) + { + dispatch (visitor, params, algorithms, algorithm, disp_rest...); + }, + params, algorithms, algorithm); + } +}; + +template +struct dispatch_impl +{ + template + static void + apply (Visitor visitor, + const GimpPaintCoreLoopsParams *params, + GimpPaintCoreLoopsAlgorithm algorithms, + identity algorithm, + Dispatch disp, + DispatchRest... disp_rest) + { + dispatch (visitor, params, algorithms, algorithm, disp_rest...); + } +}; + +template +static inline void +dispatch (Visitor visitor, + const GimpPaintCoreLoopsParams *params, + GimpPaintCoreLoopsAlgorithm algorithms, + identity algorithm, + Dispatch disp, + DispatchRest... disp_rest) +{ + dispatch_impl::apply ( + visitor, params, algorithms, algorithm, disp, disp_rest...); +} + + +/* value_to_float(): + * + * Converts a component value to float. + */ + +static inline gfloat +value_to_float (guint8 value) +{ + return value / 255.0f; +} + +static inline gfloat +value_to_float (gfloat value) +{ + return value; +} + +template +static inline gfloat +value_to_float (T value) = delete; + + +/* AlgorithmBase: + * + * The base class of the algorithm hierarchy. + */ + +struct AlgorithmBase +{ + /* Used to filter-out dispatch functions; see the description of dispatch(). + * Algorithms that redefine 'filter' should bitwise-OR their filter with that + * of their base class. + */ + static constexpr guint filter = 0; + + /* See CanvasBufferIterator. */ + static constexpr gint canvas_buffer_iterator = -1; + static constexpr GeglAccessMode canvas_buffer_access = {}; + + /* The current number of iterators used by the hierarchy. Algorithms should + * use the 'n_iterators' value of their base class as the base-index for + * their iterators, and redefine 'n_iterators' by adding the number of + * iterators they use to this value. + */ + static constexpr gint n_iterators = 0; + + /* Non-static data members should be initialized in the constructor, and + * should not be further modified. + */ + explicit + AlgorithmBase (const GimpPaintCoreLoopsParams *params) + { + } + + /* Algorithms should store their dynamic state in the 'State' member class + * template. This template will be instantiated with the most-derived type + * of the hierarchy, which allows an algorithm to depend on the properties of + * its descendants. Algorithms that provide their own 'State' class should + * derive it from the 'State' class of their base class, passing 'Derived' as + * the template argument. + * + * Algorithms can be run in parallel on multiple threads. In this case, each + * thread uses its own 'State' object, while the algorithm object itself is + * either shared, or is a copy of a shared algorithm object. Either way, the + * algorithm object itself is immutable, while the state object is mutable. + */ + template + struct State + { + }; + + /* The 'init()' function is called once per state object before processing + * starts, and should initialize the state object, and, if necessary, the + * iterator. + * + * 'params' is the same parameter struct passed to the constructor. 'state' + * is the state object. 'iter' is the iterator; each distinct state object + * uses a distinct iterator. 'roi' is the full region to be processed. + * 'area' is the subregion to be processed by the current state object. + * + * An algorithm that overrides this function should call the 'init()' + * function of its base class first, using the same arguments. + */ + template + void + init (const GimpPaintCoreLoopsParams *params, + State *state, + GeglBufferIterator *iter, + const GeglRectangle *roi, + const GeglRectangle *area) const + { + } + + /* The 'init_step()' function is called once after each + * 'gegl_buffer_iterator_next()' call, and should perform any necessary + * initialization required before processing the current chunk. + * + * The parameters are the same as for 'init()'. + * + * An algorithm that overrides this function should call the 'init_step()' + * function of its base class first, using the same arguments. + */ + template + void + init_step (const GimpPaintCoreLoopsParams *params, + State *state, + GeglBufferIterator *iter, + const GeglRectangle *roi, + const GeglRectangle *area) const + { + } + + /* The 'process_row()' function is called for each row in the current chunk, + * and should perform the actual processing. + * + * The parameters are the same as for 'init()', with the addition of 'y', + * which is the current row. + * + * An algorithm that overrides this function should call the 'process_row()' + * function of its base class first, using the same arguments. + */ + template + void + process_row (const GimpPaintCoreLoopsParams *params, + State *state, + GeglBufferIterator *iter, + const GeglRectangle *roi, + const GeglRectangle *area, + gint y) const + { + } +}; + + +/* BasicDispatch: + * + * A class template implementing a simple dispatch function object, which adds + * an algorithm to the hierarchy unconditionally. 'AlgorithmTemplate' is the + * alogithm class template (usually a helper class, rather than an actual + * algorithm), and 'Mask' is the dispatch function mask, as described in + * 'dispatch()'. + */ + +template