Commit Graph

42881 Commits

Author SHA1 Message Date
Jehan 72092fbdbc app: improve line art bucket fill by filling unsignificant areas.
The line art imaginary segments/splines are not added when they create
too small zones, unless when these are just too small ("unsignificant").
Why the original algorithm keeps such micro-zones is because there may
be such zones created when several splines or segments are leaving from
a same key point (and we don't necessarily won't to forbid this). Also
we had cases when using very spiky brushes (for the line art) would
create many zones, and such micro-zones would appear just too often
(whereas with very smooth lines, they are much rarer, if not totally
absent most of the time).
Also it is to be noted that the original paper would call these
"unsignificant" indeed, but these are definitely significant for the
artists. Therefore having to "fix" the filling afterwards (with a brush
for instance) kind of defeat the whole purpose of this tool.

I already had code which would special-case (fill) 1-pixel zones in the
end, but bigger micro zones could appear (up to 4 pixels in the current
code, but this could change). Also I don't want to use the "Remove
Holes" (gimp:flood) operation as I want to make sure I remove only
micro-holes created by the line art closure code (not micro-holes from
original line arts in particular).

This code takes care of this issue by filling the micro-holes with
imaginary line art pixels, which may later be potentially bucket filled
when water-filling the line art.
2019-02-07 18:09:30 +01:00
Ell 55f963cb2a app: fix gimp_babl_compat_u8_mask_format()
... post space-invasion
2019-02-07 11:27:14 -05:00
Jehan f8f3a74971 Issue #2920: Dilate and Erode filters' tooltips are untranslatable.
Wrong message contexts!
2019-02-07 15:43:18 +01:00
Ell 82c449496e app, pdb: use compat formats for brushes/patterns in plug-ins
Plug-ins are not prepared to handle high-precision brushes/
patterns, even when they're otherwise aware of high-precision
drawables, so make sure to always use compat formats when
communicating brush/pattern data to plug-ins.

Allowing plug-ins to handle high-precision brush/pattern data would
require some additional API.
2019-02-07 09:19:20 -05:00
sabri ünal 1853770660 2 sentences are marked as translatable.
These sentences are in use on "Preferences - Interface - Help System" page.
2019-02-07 13:54:49 +00:00
Ell 9d19e804ed app: avoid unnecessary calls to gimp_temp_buf_data_clear()
Avoid unnecessary calls to gimp_temp_buf_data_clear() in various
places, where either the entire buffer is being written to, or most
of it is, only requiring clearing the edges.
2019-02-06 16:51:01 -05:00
Ell cbe40000f5 app: small fix in gimpbrushcore-kernels.h 2019-02-06 16:51:01 -05:00
Ell 8ef1113dee Issue #2372 - Reduced quality of the Parametric brush in 2.10
Promote the precision of generated brushes to 32-bit float, and
modify brush preview generation, and gimpbrushcore-loops, to handle
float brushes.  This avoids posterization in large brushes.

Note that non-generated brushes are still uint8.
2019-02-06 14:30:48 -05:00
Ell 12dde445c4 app: add gimp_temp_buf_{lock,unlock}()
In GimpTempBuf, add gimp_temp_buf_lock() and gimp_temp_buf_unlock()
functions, which lock/unlock the buffer for data access.  Unlike
gimp_temp_buf_get_data(), which returns a direct pointer to the
buffer's data, the new functions take a format parameter and may
return a temporary buffer, allowing the buffer to be accessed using
an arbitrary format.
2019-02-06 14:30:47 -05:00
Ryuta Fujii f85870ca13 Update Japanese translation 2019-02-06 13:36:34 +00:00
Ryuta Fujii 50b93d2034 Update Japanese translation 2019-02-06 13:08:23 +00:00
Ell 47dcd4b93a libgimp: avoid libgimp tile-cache in the plug-in tile backend
In GimpTileBackendPlugin, avoid storing read/written tiles in the
libgimp tile-cache, since caching is already done by GEGL.
2019-02-05 17:25:31 -05:00
Jehan 60d407ac21 configure.ac: remove old outdated code.
There was still code for a warning, now irrelevant as it was about
non-recommended GTK+2 version for Windows. Anyway this is now removed.
2019-02-05 15:33:02 +01:00
Jehan 757b8bba7d libgimpbase: style cleanup of gimpreloc.c
No code change, only indentation fixed and opening braces on newline, as
per our style guidelines.
2019-02-05 15:00:44 +01:00
Jehan 4d84c1d7ee app, libgimpbase: --enable-relocatable-bundle replaces --enable-binreloc
Older --enable-binreloc configure option had basically the same purpose
as the newer --enable-relocatable-bundle, though the old binreloc was
only used for gimpenv.c code.
As a consequence, commit 10ce702188 was still not working fine since
gimp_installation_directory_file() also need binreloc enabled (to be
actually relocatable).

Let's get rid of this whole mess, by implying we want binreloc code to
be used when --enable-relocatable-bundle is ON. We don't need the
m4macros anymore, since AM_BINRELOC was basically just checking that
`/proc/self/maps` was present. But anyway being present at compile time
does not mean it will be at runtime (nor the opposite). So this test is
not that useful. The binreloc code will anyway fallback gracefully to
the non-binreloc code (i.e. trying to use build-time install paths) if
the procfs is lacking at runtime.
2019-02-05 14:50:31 +01:00
Ell b002f20412 app: in GimpRotateTool, improve fuzzy comparisons 2019-02-05 04:39:07 -05:00
Ell 0714510802 libgimpwidgets: add gimp_chain_button_{get,size}_icon_size() to gimpwidgets.def 2019-02-05 03:49:26 -05:00
Ell 1b2ec2961c po-python: add spyro_plus.py copy to POTFILES.skip 2019-02-05 02:50:21 -05:00
Balázs Meskó 8802698945 Update Hungarian translation
(cherry picked from commit d368fabf8e)
2019-02-04 22:55:33 +00:00
Ell 39e23267f7 app: in GimpTransformGridTool, allow linking forward/backward transforms
Add a GimpTransformGridTool::matrix_to_info() virtual function,
which should extract the tool-specific transformation parameters
given a transformation matrix, and the old parameter set (which is
needed in some tools, to derive the parameters that aren't encoded
in the matrix, such as the pivot point).  The transformation matrix
can be any combination of matrices calculated by the tool, and
their inverses.  Subclasses should only implement this function if
every such matrix can be mapped back to transformation parameters.
This is currently the case for all the transform-grid tools, except
for the shear tool (since it only supports shearing along one of
the horizontal or the vertical directions, however, the combined
matrix may require shearing in both directions).

When a transform-grid tool implements this function, show a chain-
button between the two transform-direction radio-buttons in the
tool options.  When the chain-button is linked, whenever the
transform corresponding to the active direction is modified, adjust
the transform corresponding to the non-active direction such that
the overall transform remains the same.

One notable workflow that this enables is transforming a layer
while adjusting a different area than its boundary, by first
defining the area while the transform-directions are linked, and
then transforming the area while the transform-directions are
unlinked.
2019-02-04 16:48:13 -05:00
Ell de8e81f81f app: in GimpTransformGridTool, allow simultaneous forward and backward transforms
In GimpTransformGridTool, allow performing simultaneous forward
(normal) and backward (corrective) transforms, by having each
transform direction operate on an independent set of parameters.
In other words, whereas the transform-grid tools previously had a
single transform, which could be applied either normally or
correctively using the "direction" tool-option, they now have two
independent transforms, one applied normally and the other
applied correctively, which are toggled using the "direction"
option.  The overall transform is the combination of the backward
transform, followed by the forward transform.

Another way to think about it, is that the tool transforms a source
shape into a destination shape.  The source shape is defined by the
backward transform, and the destination shape is defined by the
forward transform.  Wherewas previously only one of these shapes
could be controlled (the other shape always being the item bounds),
it's now possible to control both shapes in a single transform.
The next commit will allow modifying both shapes simultaneously,
making this even more useful.

Note that since both transforms start off as the identity, using
only one of the transform directions has the same behavior as
before.
2019-02-04 16:48:12 -05:00
Ell 9c3f150e25 libgimpwidgets: add GimpChainButton::active property
... which corresponds to the button's toggle state.
2019-02-04 16:05:26 -05:00
Ell 8d6c7e42bf libgimpwidgets: add GimpChainButton::icon-size property
... and corresponding gimp_chain_button_{get,size}_icon_size()
functions, which control the chain-button's icon size.
2019-02-04 16:04:02 -05:00
Ell d549440650 app: add GimpTransformToolClass::undo_desc field
Add an undo_desc field to GimpTransformToolClass, which subclasses
should set to the tool's default undo description.  Provide a
default implementation for the get_undo_desc() vfunc, which returns
(a copy of) undo_desc.  This simplifies transform tools that have a
static undo descrption, as well as provides a fallback when a
detailed undo description can't be generated (not currently
relevant, but will be used in the next commit).
2019-02-04 15:59:55 -05:00
Ell 44c8a1f274 app: improve rotate-tool undo description
When rotating an item around its center using the rotate tool,
i.e., if the pivot point hasn't been moved, don't include the pivot
coordinates in the undo description.
2019-02-04 15:59:55 -05:00
Ell b95bf3fb93 app: improve measure-tool undo description
When straightening an item using the measure-tool, include the
orientation and angle in the undo description.
2019-02-04 15:59:54 -05:00
Ell 40c0913178 app: add GimpToolCompass::effective-orientation property
In GimpToolCompass, add a read-only "effective-orientation"
property, which returns the actual orientation of the compass; in
particular, if the "orientation" property is set to AUTO,
"effective-orientation" returns HORIZONTAL or VERTICAL, depending
on the current compass direction.  In 3-point mode, the property
always returns AUTO.
2019-02-04 15:59:53 -05:00
Ell 7fc5698f32 app: fix CRITICALs in GimpMeasureTool
In GimpMeasureTool, don't try to access the "straighten" button
when halting the tool if it's NULL, which can happen when the
measure tool is selected upon startup, but is changed before its
tool-options GUI is constructed.
2019-02-04 15:59:53 -05:00
Ell 59ef222c7f app: in gimp_transform_matrix_generic(), apply matrix even if invalid
In gimp_transform_matrix_generic(), apply the resulting matrix even
if the transformation is invalid, since GimpGenericTransformTool
relies on the matrix to properly update the transform-grid widget.
2019-02-04 15:59:52 -05:00
Ell 7ed512040e app: in GimpTransformGridTool, fix layer hiding
In GimpTransformGridTool, when the "show-preview" tool-option
changes, don't take the transform validity into account when
deciding whether to hide the current layer -- it should only affect
the visibility of the preview, not the layer.
2019-02-04 15:59:52 -05:00
Ell 3ebda874b5 app: in GimpTransformGridTool, remove flip-tool hack
The flip tool is not a subclass of GimpTransformGridTool; this is
a leftover from GimpTransformTool.
2019-02-04 15:59:51 -05:00
Rodrigo Lledó 9210599021 Update Spanish translation
(cherry picked from commit dc431bbcc1)
2019-02-04 10:43:08 +00:00
Michael Natterer 7998a27b8b app: in the prefs dialog, warn that OpenCL support is experimental 2019-02-04 10:38:43 +01:00
Michael Natterer b85d7c2334 Issue #2898 - Gegl Operations - Color Wrap does not fit the screen on...
...1920*1980 resolution

In GimpOperationTool, make the generated GUI scrollable if it is
higher than half the monitor's workarea. This is meant as a last
resort for generated GUIs that do not have a custom constructor that
makes them usable using better layouts.
2019-02-03 18:08:27 +01:00
Michael Natterer c71a887b08 libgimpbase: add gimp_installation_directory_file() to gimpbase.def 2019-02-03 14:50:48 +01:00
Jehan db00616888 libgimpbase: add gimp_installation_directory_file().
Fix previous commit.
Ahahah! Mitch, you didn't test your code before pushing! Bad boy! :P
2019-02-02 18:51:51 +01:00
Michael Natterer 10ce702188 Issue #2867 - iso-codes location is not relocatable on all platforms
gimplanguagestore-parser.c (parse_iso_codes): instead of
special-casing Windows and OS X, use ENABLE_RELOCATABLE_RESOURCES and
find the package relative to ${gimp_installation_directory}, so
relocating it works on all platforms (also flatpack, snap, whatever),
given the --enable-relocatable-bundle configure switch is used.
2019-02-02 17:10:20 +01:00
Piotr Drąg 545ef0228d Update Polish translation 2019-02-02 14:44:52 +01:00
Elad Shahar f6e4145756 Add i18n support for python spyrogimp plugin 2019-02-01 07:41:19 -05:00
Ell 12dbd4aee2 plug-ins: in pygimp/plug-ins/Makefile.am, simplify plug-in copy recipe 2019-02-01 07:41:19 -05:00
Ell 95044d86b3 plug-ins: in pygimp/plug-ins/Makefile.am, re-copy plug-ins upon change
In pygimp/plug-ins/Makefile.am, fix the rule for the generated
plug-in files, so that they're re-copied to the build dir upon
changes to the source plug-in files.
2019-02-01 04:33:55 -05:00
Ell bcd9f55526 plug-ins: in pygimp/plug-ins/Makesfile.am, use tab-width of 8
... like the rest of our makefiles.
2019-02-01 04:33:54 -05:00
Ryuta Fujii 2ea2e84f0f Update Japanese translation 2019-01-31 16:07:48 +00:00
Ell 07d2d5af5a app: fix CRITICAL when initializing the perspective-clone tool
When initializaing the perspective-clone tool in paint mode, the
GimpDrawTool may already be active, causing the call to
gimp_draw_tool_start() to fail with a CRITICAL.  Stop the draw tool
first, if active, to avoid that.
2019-01-31 09:13:00 -05:00
Ell e5c9314a88 app: in perspective-clone tool, fix cursor presicion; hide brush while adjusting
In GimpPerspectiveCloneTool, use PIXEL_CENTER cursor precision
while setting the source, and place the source-position handle at
the center of the selected pixel, rather than at its top-left
corner.

Additionally, disable the paint tool while adjusting the
perspective, so that the brush outline isn't shown, and the cursor
precision remains SUBPIXEL, even if the hard-edge option is
toggled.
2019-01-31 06:22:46 -05:00
Ell 05dd5029ee app: add gimp_paint_tool_set_active()
... which can use to enable/disable certain aspects of
GimpPaintTool (in particular, brush-outline drawing).  Should be
used by subclasses, to temporarily disable the paint tool while in
a non-paint mode (currently, this is only needed by the
perspective-clone tool; see next commit.)
2019-01-31 06:22:45 -05:00
Ell ef2818231f app: fix cursor precision of source tools
In GimpCloneTool, set the cursor precision to PIXEL_CENTER while
setting a source, and have GimpBrushTool snap the brush outline to
pixel centers.
2019-01-31 06:22:45 -05:00
Ell 158705e4ef app: fix cursor precision of various tools
Fix the cursor precision of the cage-transform, foreground-select,
n-point deformation, and warp-transform tools.
2019-01-31 04:39:37 -05:00
Michael Natterer 2c81d9cbcf Issue #1683 - possibly undefined macro: AM_PATH_GTK_3_0
Stop using AM_PATH_GTK_3_0(), it's deprecated, use PKG_CHECK_MODULES()
instead.
2019-01-30 21:47:16 +01:00
Michael Natterer 0fa98d4849 plug-ins: add .gitignore file to file-dds 2019-01-30 18:48:28 +01:00