Commit Graph

42641 Commits

Author SHA1 Message Date
Anders Jonsson 2847b1143b Update Swedish translation
(cherry picked from commit 90a8819072)
2018-12-30 20:46:00 +00:00
Ell d9b4ffe09e app: in gimp_gegl_apply_cached_operation(), intersect cached rects with dest rect
In gimp_gegl_apply_cached_operation(), intersect the cached rects
with the dest rect, so that we don't unnecessarily (if not
erroneously) copy cached regions outside the dest rect to the dest
buffer.  This can happen when the op's applicator crop-rect changes
dynamically.
2018-12-30 08:05:55 -05:00
Ell e06c4643dc app: in warp tool, crop filter to stroke bounds
In the warp tool, set the drawable-filter's crop area to the
combined stroke bounds, so that, when comitting the tool, only this
area is processed, instead of the entire drawable area.
2018-12-30 05:13:02 -05:00
Ell b846ffed19 app: in GimpDrawableFilter, only update crop/preview area when updating whole drawable
In GimpDrawableFilter, when updating the entire filter area, only
update the crop/preview area (as set by
gimp_drawable_filter_set_{crop,preview}()), instead of the entire
drawable.
2018-12-30 05:13:01 -05:00
Ell 5c27d14fdf app: add gimp_drawable_filter_set_crop()
Add gimp_drawable_filter_set_crop(), which allows setting an output
crop rectangle for the filter; anything outside the rectangle
doesn't get filtered.  The crop area is combined with the preview
area to determine the filtered area during preview, however, unlike
the preview area, the crop area remains in effect while committing
the filter.

Consequently, when merging a drawable filter, if the filter has a
crop, only process the cropped area.
2018-12-30 05:13:01 -05:00
Ell 7534ae53d6 app: rename gimp_applicator_set_preview() to _set_crop(); add _get_crop()
We're going to use GimpApplicator's output crop for more than just
split previews.  Rename gimp_applicator_set_preview() to
gimp_applicator_set_crop(), and add gimp_applicator_get_crop(),
which returns the output crop rectangle, or NULL if cropping is
disabled.
2018-12-30 05:13:00 -05:00
Ell 093e017df8 app: in GimpFilterTool, make region combo insensitive when selection is empty 2018-12-29 20:55:40 -05:00
Ell 7949fd9a28 app: in GimpFilterTool, show region combo for non-point ops
In GimpFilterTool, show the region combo when applying a non-point
op, as well as when applying a position-dependent point op.  The
result of non-point ops may depend on the choice of input region,
even if the op is not position-dependent.
2018-12-29 20:27:42 -05:00
Ell b201f73562 app: use GimpDrawableFilter in gimp_drawable_apply_operation()
In gimp_drawable_apply_operation(), use a temporary
GimpDrawableFilter to apply the operation, instead of using a
shadow buffer.  This renders and composits the op directly into the
drawable buffer, avoiding an intermediate buffer, requiring less
space and speeding up processing.
2018-12-29 14:28:43 -05:00
Ell ab52dc6bca app: in GimpApplicator, allow enabling cache/preview after construction; remove preview cache
Remove the use_split_preview and use_result_cache parameters of
gimp_applicator_new(), and allow enabling/disabling the cache
(through gimp_applicator_set_cache()) and the preview crop (through
gimp_applicator_set_preview()) after construction.

Move the preview crop node after the result cache, and remove the
separate preview cache node.  This eliminates an extra cache
buffer, reducing the space consumed by filters, and speeds up split
preview, since the cached result now includes the output
compositing.
2018-12-29 14:28:42 -05:00
Harald H 42dd3fd939 Added OARS 2018-12-29 10:25:58 +00:00
Ell cba4bc4781 app: in gimp_drawable_merge_filter(), align undo rect to tile grid
In gimp_drawable_merge_filter(), align the region copied to the
undo buffer to the drawable buffer's tile grid, so that the copied
tiles are COWed.
2018-12-28 08:30:59 -05:00
Ell 95393722cc Revert "Bug 796090 - (wrong) true-color preview of GEGL filter ops, ..."
We now perform the conversion of filter output to the drawable
format as part of the individual filter nodes (see the last few
commits), so there's no need for another conversion after the
filter stack.

This reverts commit d6e0ca5054.
2018-12-28 03:56:31 -05:00
Ell 3f45e893bf app: cache result of floating selections
Use an output cache for floating-selection filters, to speed up
anchoring.
2018-12-28 03:55:35 -05:00
Ell 0560c5a6fe app: use drawable format as floating-sel applicator output format
Set the output format of floating-selection applicators to the
target drawable format.  We're going to remove the global
GipDrawable convert-format node, which we use to get correct
previews for indexed drawables, so that each filter now has to do
its own format conversion.
2018-12-28 03:55:34 -05:00
Ell 8e57ee2265 app: in GimpDrawableFilter, use the drawable format as the cache format
In GimpDrawableFilter, set the applicator's output format to the
drawable format, so that the cache uses the drawable format, and so
copying the cached result to the drawble's buffer when comitting
the filter becomes much cheaper, and, in particular, doesn't
require reading tiles out of the swap.  This notably improves
commit speed in large images, at the expense of requiring a few
extra conversions during preview.
2018-12-28 03:55:34 -05:00
Ell b93df0311f app: add gimp_applicator_set_output_format()
In GimpApplicator, add gimp_applicator_set_output_format(), which
can be used to explicitly set the format of the result.  In
particular, this allows controlling the output cache format, which
can speed up the merging of cached filters.
2018-12-28 03:55:33 -05:00
Ell 85e454bae8 app: add GimpDrawable::format-changed signal
... which is emitted when the drawable's format is changed.
2018-12-28 03:55:33 -05:00
Ell ef9b1f6694 app: in GimpLineArt, use "invalidate-preview" signal of input viewable
In GimpLineArt, use the "invalidate-preview" signal of the input
viewable, instead of its "painted" or "rendered" signals, for
asynchronously computing the line art.  Subsequently, remove the
aforementioned signals from GimpDrawable and GimpProjection,
respectively.  This simplifies the code, and reduces the number of
signals.
2018-12-27 17:14:28 -05:00
Ell 12e83350bf app: remove gimp_applicator_dup_apply_buffer()
... nothing uses it after last commit.
2018-12-27 14:00:24 -05:00
Ell ed7ea51fb7 app: remove "Edit -> Fade..."
This commit completely removes the "Edit -> Fade..." feature,
because...

- The main reason is that "fade" requires us to keep two buffers,
  instead of one, for each fadeable undo step, doubling (or worse,
  since the extra buffer might have higher precision than the
  drawable) the space consumed by these steps.  This has notable
  impact when editing large images.  This overhead is incurred even
  when not actually using "fade", and since it seems to be very
  rarely used, this is too wasteful.

- "Fade" is broken in 2.10: when comitting a filter, we copy the
  cached parts of the result into the apply buffer.  However, the
  result cache sits after the mode node, while the apply buffer
  should contain the result of the filter *before* the mode node,
  which can lead to wrong results in the general case.

- The same behavior can be trivially achieved "manually", by
  duplicating the layer, editing the duplicate, and changing its
  opacity/mode.

- If we really want this feature, now that most filters are GEGL
  ops, it makes more sense to just add opacity/mode options to the
  filter tool, instead of having this be a separate step.
2018-12-27 11:44:25 -05:00
Piotr Drąg 10cdef9af1 Update Polish translation 2018-12-24 14:42:38 +01:00
Jehan 503775a5a0 app: rename and merge the spline and segment length properties...
... in GimpBucketFillOptions for the line art algorithm.

Inside GimpLineArt, there are still 2 properties, but we don't show them
anymore in the Bucket Fill tool options. One of the main reason is
probably that it's hard to differentiate their usage. One is to close
with curved lines, the other with straight segments. Yet we don't
actually have any control on one or the other. All one knows is that you
can have "holes" in your drawing of a given size and you want them
close-like for filling. Only reason I can see to have 2 types of closure
is whether you'd want to totally disable one type of closure (then you
set it to 0). But this is a very limited reason for making the options
less understandable overall, IMO.
So for the time being, let's show up only a single option which sets
both properties in GimpLineArt. As patdavid says "it makes sense as a
first pass".

Also rename the option to shorter/simpler "Maximum gap length". Thanks
to patdavid and pippin for helping on figuring out this better label!

Finally I am bumping the default for the gaps to 100px. The original
values were ok for the basic small images used in demos, but not for
real life image where it was always too short (even 100px may still be
too short actually, but much better than the 20 and 60px from before!).
2018-12-24 13:33:58 +01:00
Piotr Drąg cbee0ed5a3 Update Polish translation 2018-12-23 13:53:27 +01:00
Michael Natterer 822f1b9090 app: fix capitalization of the "Line Art Detection" frame 2018-12-22 21:06:50 +01:00
Alexandre Prokoudine b8bf6b86e5 Unified transform: enable Constraint:Scale by default 2018-12-21 01:54:31 +03:00
Ell 93f4b18704 app: improve gradient color-sampling speed
Improve the speed of gimp_gradient_get_color_at(), which is used by
gimp:gradient during processing when the gradient cache is too big,
by disabling type checking, and inlining and avoiding some function
calls.
2018-12-20 08:32:17 -05:00
Jehan 5a61959b74 build: sync recent flatpak's stable manifest to the nightly one. 2018-12-20 10:48:52 +01:00
Jehan 182786b4fb app: fix type warning.
I missed this warning when reviewing commit a9a979b2d0.
My bad!
2018-12-19 16:01:06 +01:00
Jehan 6dfca83c2a app: show the layer mode dropdown list properly.
Showing it was only displaying the top modes, with a lot of top space,
and you had to slowly scroll down the list. This is the same as #2642
(as Alexandre noted in a comment), so I just use the same "fix" though I
don't fully understand it. It feels more of a side effect of
gtk_combo_box_set_wrap_width() working around a bug of GtkComboBox. So
if anyone has a better fix and understand the issue, feel free to patch
(maybe GTK+ directly?). In the meantime, it works well enough. :-)
2018-12-19 15:05:49 +01:00
Kevin Stoffler a9a979b2d0 app: add gtk_combo_box_set_wrap_width for scale menu 2018-12-18 16:03:33 +00:00
Jehan 0a2d066168 app: allow setting line art spline and segment length to 0.
Practically it means that the algorithm won't close line art anymore
with both settings at 0. This can nevertheless still be a very useful
tool when you have a drawing style with well-closed lines. In such a
case, you will still profit from the color flooding under the line art
part of the algorithm.
Moreover with such well-closed zones from start, you don't get the
over-segmentation anymore and the threaded processing will be faster
obviously.
2018-12-17 15:46:47 +01:00
Ell fda53f9c18 app: update definition of "{cache,swap}-compressed" dashboard vars
Update the definition of the "cache-compressed" and "swap-
compressed" dashboard variables, to reflect the changes made by
GEGL commit gegl@dc22e997757ab91c180244d5290d094d2ea8572f.
2018-12-17 06:39:59 -05:00
Piotr Drąg 079c70cc0b Update Polish translation 2018-12-16 12:13:49 +01:00
Jehan c3ac722995 Issue #2664: add a tooltip to "better compression" checkbox.
Zlib is a "better" compression in the meaning that it is a more advanced
and complex algorithm than RLE. And in most cases, it should end up in
smaller file sizes. But as any algorithm, there may be cases when the
expectations are not met (worst cases or such). That's the nature of the
maths. Still we should not make the checkbox text over-complicated (it
is not the place to teach algorithmic), yet we can at least add a small
tooltip text.
2018-12-15 21:57:01 +01:00
lillolollo 132a378bed Fix Problem found in ./libgimpbase/gimpbase.def
the following symbols are in the library,
  but are not listed in the .def-file:
     + gimp_bucket_fill_area_get_type
2018-12-14 01:24:20 +00:00
Ask Hjorth Larsen e4e4422f5c revert last commit of Danish translation -- file incomplete 2018-12-12 21:18:48 +01:00
Alan Mortensen 15049da94e Updated Danish translation 2018-12-12 21:14:37 +01:00
Ell 7958387d54 app: in the warp tool, blink behavior combo when the current behavior is invalid
In the warp tool, when the warp is empty and the current behavior
has no effect as a result (i.e., when it's ERASE or SMOOTH), show
an error message in the status bar, and blink the behavior combo
widget in the tool options, to hint at the source of the error.
2018-12-12 11:23:34 -05:00
Ell 17cc44a7be app: in the warp tool, blink stroke frame when no events are selected
In the warp tool, when no stroke events are selected, blink the
stroke frame widget in the tool options, in addition to showing an
error message in the status bar, to hint at the source of the
error.
2018-12-12 11:23:33 -05:00
Ell 2085cb4a37 app: s/GEGL_WARP_BEHAVIOR/GIMP_WARP_BEHAVIOR/
The enumerators of the GimpWarpBehavior enum, except for MOVE, had
a GEGL_ prefix, rather than a GIMP_ prefix, for some reason.

Change all of them to GIMP_.
2018-12-12 11:23:33 -05:00
Jehan cd924f453a app: do not make line art bucket fill a GimpSelectCriterion anymore.
This was my initial choice, but the more I think about it, the less I am
sure this was the right choice. There was some common code (as I was
making a common composite bucket fill once the line art was generated),
but there is also a lot of different code and the functions were filled
of exception when we were doing a line art fill. Also though there is a
bit of color works (the way we decide whether a pixel is part of a
stroke or not, though currently this is basic grayscale threshold), this
is really not the same as other criterions. In particular this was made
obvious on the Select by Color tool where the line art criterion was
completely meaningless and would have had to be opted-out!

This commit split a bit the code. Instead of finding the line art in the
criterion list, I add a third choice to the "Fill whole selection"/"Fill
similar colors" radio. In turn I create a new GimpBucketFillArea type
with the 3 choices, and remove line art value from GimpSelectCriterion.

I am not fully happy yet of this code, as it creates a bit of duplicate
code, and I would appreciate to move some code away from gimpdrawable-*
and gimppickable-* files. This may happen later. I break the work in
pieces to not get too messy.
Also this removes access to the smart colorization from the API, but
that's probably ok as I prefer to not freeze options too early in the
process since API needs to be stable. Probably we should get a concept
of experimental API.
2018-12-12 15:27:48 +01:00
Jehan 74a7a5d3e2 Issue #2495: different code for Windows and Linux on duplicate devices.
After discussing with Mitch, it turn out commit 717c183a3e was fixing
(or rather working around) actual issues of broken device/usb stack
issues on Linux, as expected.
Nevertheless on Windows, this broke in turn many tablets (see commit
ce24e16083). Therefore we do a very ugly #ifdef to bail from duplicate
devices on Windows whereas we continue on Linux. This fix and difference
of behavior is completely empirical, rather than based on actual good
logics, so that's quite annoying, but well… not much choice here.

Also note that since we had no report of breakage on other OSes (such as
macOS/BSD), at least that I know of, I let them with the Linux code
path.
2018-12-11 16:05:41 +01:00
Jehan 3e967ed02c devel-docs: 0 at end of layer and channel pointer list is a pointer too. 2018-12-11 12:52:37 +01:00
Ell 5a2dee29d7 app: in gimp_widget_blink_cancel(), avoid redrawing non-blinking widget
Since commit fe139e5662, when
blinking a widget, we cancel blinking for all its ancestors.  Avoid
redrawing all the ancestors as a result, unless they're actually
blinking.  This prevents some noticeable lag when blinking a
widget.
2018-12-10 14:19:17 -05:00
Jehan 5a157bf1ba app: allow switching fill type with Alt even when Pattern fill selected.
Currently in bucket fill tool, the modifier was only switching fg to bg
and bg to fg, and was doing nothing when pattern was set. I make it
switch to fg as well (and remember which was the original value).
2018-12-10 16:47:47 +01:00
Ell 637105b962 app: in all tools, blink lock box when the current item is locked
In all tools, when the current item can't be edited due to its lock
mask, use gimp_tools_blink_lock_box(), added in the previous
commit,to blink the lock box of the corresponding dockable, in
addition to showing an error message in the status bar, to hint at
the source of the error.
2018-12-10 08:55:17 -05:00
Ell 9bdaec3a49 app: add gimp_tools_blink_lock_box()
Add gimp_tools_blink_lock_box() utility function, in a new
gimptools-utils.c file, which takes a GimpItem, and blinks the
GimpItemTreeView lock-box of the corresponding dockable.  This can
be used to hint that the item's lock toggles are preventing it from
being edited.
2018-12-10 08:55:17 -05:00
Ell fe139e5662 app: in gimp_widget_blink(), cancel blinking of parent widgets
When blinking a widget using gimp_widget_blink(), cancel the
blinking of all its ancestors, to reduce visual clutter.
2018-12-10 08:55:17 -05:00
Ell 464bf1b0a9 app: in the paint tools, blink mode box when the current mode is invalid
In the paint tools, when the current paint mode is invalid, i.e.,
when it requires an alpha channel, but the the current drawable has
no alpha channel, or its alpha channel is locked, blink the paint-
mode box widget in the tool options, in addition to showing an
error message in the status bar, to hint at the source of the
error.
2018-12-10 08:55:14 -05:00