Commit Graph

5086 Commits

Author SHA1 Message Date
Alexia Death a4dee3e281 app: disable hardness blur for pipes, fix other pixmaps to blur only pixmap 2016-11-26 21:21:01 +02:00
Alexia Death 0c04275a32 app: cache bitmap brushes expensive hardness and disable dynamic change 2016-11-26 19:11:26 +02:00
Alexia Death 61475fba83 bug 771621 hardness blur cliping is avoided by shrinking the stamp first 2016-11-26 12:06:16 +02:00
Jehan 84ee79c71d app: clean out many tabs under app/core/. 2016-11-25 05:51:03 +01:00
Jehan 94a5b7c97a app: cleaning out tabs. 2016-11-25 01:42:47 +01:00
Jehan 7a60fd0d7b app: better defaults for image dimension.
Current defaults are from another time. Acceptable defaults could be
common screen resolutions. 1366x768 is apparently the most common
(according to various stats on the web), but since we target advanced
graphics artists, let's go for 1920x1080, which is the second most
common resolution, also known as Full HD.
For unstable builds, let's have at least one odd number, uncommon ratio
and higher values, encouraging tests with less common numbers and bigger
images. I chose 2001x1984. Feel free to update to any other funky values
following these "unstable" rules.
2016-11-24 01:05:58 +01:00
Jehan 391908079a Bug 774906 - Replace File>New default ppi of 72...
... with something more suitable.
72 PPI is from a time where people thought this was a common screen
resolution. This is not the case nowadays, and anyway images targetted
for screen display should not bother with PPI resolution at all, only
with actual pixel dimensions.
PPI resolution is more useful for printing. And for this case, 300 is
quite an accepted OK value for most cases. So this is likely a better
default for GIMP.
2016-11-24 01:03:59 +01:00
Alexia Death cb27605482 app: hardness overrides identity matrix on brush transform 2016-11-23 22:30:37 +02:00
Jehan f5c06a2d38 app: string which should be translated too.
There is no reasons not to translate the "occurs" text which will be
in the color names in palettes extracted from images. It indicates on
how many pixels a given extracted color was occuring. We should also
translate the full string (not just "occurs") since some language will
have to reorder words, and may even use different bracket characters.
So I also add a translator comment to make sure the translators get
what the %s and %d stand for in this string.
2016-11-22 22:42:27 +01:00
Michael Natterer 5129b8519b app: don't g_warning() on filenames that can't be turned into UTF-8
gimp_data_get_identifier(): use g_printerr() instead.
2016-11-16 15:30:44 +01:00
Michael Natterer 82a2754540 Bug 343090 - Most brushes and all patterns appear renameable but aren't
Introduce virtual function GimpViewable::is_name_editable() and class
member "gboolean name_editable" for the default value. Default to
FALSE and only return TRUE if the name can actually be edited by the
user.

When attemting an edit, check the new API and beep instead of starting
the edit.
2016-11-16 15:13:08 +01:00
Michael Natterer 702d050fe3 app: minor indentation fix in gimpdrawablefilter.c 2016-11-14 19:57:42 +01:00
Michael Natterer 17ac37ef8e app: pass a status_callback to gimp_babl_init_fishes()
and make it report progress. Also call it at the end of initialization.
2016-11-11 13:09:12 +01:00
Michael Natterer 49b47674f6 Revert "app: move the call to gimp_gegl_init() to gimp_real_initialize()"
This reverts commit 99c040095d.
2016-11-11 12:33:39 +01:00
Michael Natterer 0788db4702 app: split babl fish creating to a separate function gimp_babl_init_fishes()
and call that function later in gimp_real_initialize() so the splash
is always fully drawn when it's called.
2016-11-11 01:06:14 +01:00
Michael Natterer 99c040095d app: move the call to gimp_gegl_init() to gimp_real_initialize() 2016-11-11 00:48:30 +01:00
Michael Natterer 56ce447bc9 Bug 735895 - Precision Conversion "Dithering" dialog
gimp_drawable_convert_type(): never dither when converting to a higher
bit depth, or to anything more than 16 bits.
2016-11-09 12:45:52 +01:00
Michael Natterer 2f7009d427 app: add 'component-type' and 'linear' properties to GimpTemplate
The new properties are "virtual", they share their storage with the
"precision" property and are not serialized, they are meant for GUI
property widgets.
2016-11-09 12:03:38 +01:00
Alexis Wilhelm 768d06614f Bug 316479 - The Perspective Tool creates an empy image...
...instead of transforming it

Add gimp_matrix3_will_explode() which determines if a transform
matrix will blow up something in a rectangle to infinity, and use
the function so set both the GIMP and GEGL code paths to clip the
transform to the input size.
2016-11-08 17:26:21 +01:00
Michael Natterer 87d38194d7 app, pdb: use GeglDitherMethod instead of simply an integer 2016-11-07 20:41:39 +01:00
Michael Natterer 2a9b20d384 Bug 772789 - Mac DMG 2.8.18 gets plug-ins path wrong, can't open JPEG files
Don't migrate any paths from an older gimprc. This unfortunately kills
all manually added paths, but makes sure all paths default to the
files of the new GIMP version, could be improved by parsing the path
and replacing only the right elements.
2016-11-07 17:04:05 +01:00
Michael Natterer 483c282687 Bug 766988 - Colors applied to images are not color managed
Add color management to GimpDrawableFilter and GimpFilterTool, GEGL
ops applied to drawables can be applied in color managed space
now. Sadly, this is very slow, so disabled by default.

I'm sure the profile guessing based on the operation's format doesn't
always work, but this general bug counts as fixed now.
2016-11-07 15:39:48 +01:00
Jehan 123a9092ed app: fix the angular value when tilt_y == tilt_x == 0.0.
Further improves commit bb17853. We can see in the generic tilt
computation that if tilt_y is 0, whatever the value of tilt_x, tilt
becomes 0.
2016-11-07 13:39:09 +01:00
Michael Natterer be66d1a2be app: make an assertion more correct in GimpDrawableUndo 2016-11-07 13:10:21 +01:00
Jeremiah Darais bb1785396f Bug 760737 - Brush angle jumps when tablet pen is tilted horizontally.
Fix cursor rotation jump when tablet pen is tilted horizontally.
This changes to the correct values for the special case of tilt_x == 0.0.

Reviewer (Jehan)'s note: computing the convergence of the tilt function
in the `else` block, when tilt_x approaches 0, tilt value indeed
converges to 0.25 with tilt_y > 0 and 0.75 (or -0.25 which is the same)
with tilt_y < 0.
2016-11-07 02:51:04 +01:00
Michael Natterer 7c2bfd3246 Bug 745313 - Description of Equalize wrong in PDB
gimp_drawable_equalize(): is mask_only is FALSE, suspend the selection
around gimp_drawable_apply_operation() so the operation affects the
entire drawable.
2016-11-04 22:28:59 +01:00
Michael Natterer 3c7fbe93b3 app: make gimp_item_mask_bounds() and _intersect() honor a suspended selection
and remove the same check from the stroke and fill code.
2016-11-04 22:28:59 +01:00
Michael Natterer 31fcd79dd9 Bug 769738 - Add color tags/labels for layers/channels/paths
Add property "color-tag" of type enum GimpColorTag to GimpItem so all
layers, channels and paths can be tagged with a color.

For interoperability, use the color list from Krita which is a
superset of Photoshop's colors.

Features a "Color Tag" submenu in the layers, channels and paths
menus, a row of color radio buttons in the properties dialogs,
undo and PDB API.

As a side effect, some common code is now factores out into
items-actions.[ch] and items-commands.[ch] which adds visible, linked
and lock actions for layers and channels.
2016-10-29 17:02:16 +02:00
Michael Natterer 33276a000e app: add precondition check on "object" in gimp_context_set_by_type() 2016-10-12 22:44:19 +02:00
Michael Natterer 2e1a5bcba9 app: don't leak GimpTemplate's "color_profile" GFile in finalize() 2016-10-12 21:56:14 +02:00
Michael Natterer d1e3d7c5c7 Bug 731279 - Tool Preset Editor not working correctly
This fixes restoring of brush properties (size, spacing angle etc.)
from presets, which was utterly broken before. The fix consists of
two parts:

- In tool_manager_preset_changed(), always copy the brush properties
  again after setting the preview on the tool options, in order to
  override brush properites that get copied from a linked brush when
  that brush gets set on the tool options.

But no amount of copying stuff again and again would help without:

- In gimp_context_set_by_type(), don't use g_object_set() to set the
  object (brush, pattern etc.). Instead, build a GValue and call
  gimp_context_set_property(). This may seem odd, but avoids a
  g_object_freeze_notify()/thaw_notify() around the g_object_set(),
  which was causing "notify" to be emitted at the very end, after
  everything this context change has triggered. GimpContext is an
  essential core object and there is an expectation of a reasonable
  order of signal emissions and callbacks being called. The "notify"
  at the end was keeping any callbacks of the context's "foo-changed"
  signals to override anything an earlier callback had done, if a
  "notify" callback was overriding that overriding again.

This was probably the reason for a lot of odd behavior observed over
the years. In fact, I have been searching for this for at least 5
years.
2016-10-12 20:33:23 +02:00
Michael Natterer 184f0929ce Bug 771678 - Parametric Brush Aspect Ratio and Angle values...
...are not submitted to respective Tool Options sliders

Treat brush angle and aspect ratio like all other paint options values
that can be linked to brush defaults and take their default values
from the brush. They were special casing their defaults to constants,
and GimpBrushGenerated was adding the passed dynamic radius and aspect
values to its own. This was totally incomprehensible.

Now GimpBrushGenerated's transform_size() and transform_mask()
implementations just translate between these APIs value ranges and the
brush's own value range and only use the passed values (not the
brush's native values), which makes the editor <-> tool options
interaction and the painted brush shape predictable.

Also connect the active brush's property notifications to the paint
options properties, so the paint options follow a brush edit live if
the respective "linked" toggles are checked.

And some cleanup.
2016-10-12 00:21:12 +02:00
Michael Natterer 997ae1e28b Bug 764024 - Allow to choose fill color when resizing layers and images
Add a GimpFillType argument to GimpItem::resize() and fill type
widgets to the canvas and layer resize dialogs. Fill the new parts of
the drawable according to fill type in gimp_drawable_resize(). Make
sure places that need the old behavior get GIMP_FILL_TRANSPARENT
passed by hardcoding it in the GimpItem::resize() implemetations of
channel, mask, selection etc.
2016-10-10 00:02:16 +02:00
Michael Natterer a06f7e78f1 app: use BG fill in gimp_drawable_fill() if the drawable has no alpha 2016-10-09 21:30:43 +02:00
Michael Natterer ce639f031b app: fall back to BG fill if gimp_get_fill_params() doesn't find a pattern 2016-10-09 21:07:08 +02:00
Michael Natterer e9e1bc1e22 Bug 766988 - Colors applied to images are not color managed
We didn't convert patterns to the target drawable's profile when using
gimp_drawable_fill().

Introduce gimp_drawable_fill_buffer() as single filling utility
function that does things right and use it from gimp_drawable_fill()
and gimp_fill_options_create_buffer().
2016-10-09 15:53:43 +02:00
Michael Natterer 5cf3cf27fd app: make sure a floating selection always has its drawable's format + alpha
we were missing a conversion when pasting whole images to channels
and masks.
2016-10-04 19:49:57 +02:00
Michael Natterer ecf4af88b8 app: add "gboolean new_has_alpha" to gimp_drawable_convert_type()
making its external API "complete". Remove the redundant
"new_base_type" and "new_precision" from the internal (vfunc) API (the
Babl format has the same information).
2016-10-04 01:39:15 +02:00
Michael Natterer e8309826b7 app, libgimpwidgets: use the new config path <-> GFile functions
Gets rid of temporary variables to hold both expanded and unexpanded
paths.
2016-09-30 22:07:00 +02:00
Michael Natterer 009417e450 app: reorder and rename indexed conversion parameters to make more sense 2016-09-27 23:51:33 +02:00
Michael Natterer 81603eaa58 Bug 767178 - Segment fault on deleting an automatic folder tag
The GimpTaggedContainer->tag_ref_counts keeps pointers to GimpTags but
didn't ref them. Ref the tags while they are in the hash table.
2016-09-27 10:14:45 +02:00
Michael Natterer ea98f9967e app: change gimp_pickable_auto_shrink()'s parameters
from x1, y1, x2, y2 to x, y, width, height.
2016-09-25 22:40:28 +02:00
Michael Natterer 88b60e9947 app: make gimp_edit_paste() do what its told to do
Don't change the paste_type to NEW_LAYER just because there is a
complex thing in the clipboard. Instead, honor the request to paste
FLOATING or FLOATING_INTO and reduce the pasted thing to a simple flat
layer. Also remove the message and paste_type change from edit_paste()
in edit-commands.c, it had the same purpose, just with a user
notification.

In order to paste the full layer one needs to explicitly invoke
"Paste as new layer" now.

It still changes the paste_type to NEW_LAYER if it's impossible to
attach a floating selection to the target, the menu item was simply
insensitive before.
2016-09-23 16:49:11 +02:00
Ell 6da1775dd7 app: more performance improvements to fuzzy-select/bucket-fill
Not as dramatic this time...
2016-09-22 17:46:07 +00:00
Michael Natterer 21ec859c4a app: rename gimp_layer_flatten() to gimp_layer_remove_alpha() 2016-09-21 11:56:25 +02:00
Michael Natterer 1d76d085c9 app: fix position of pasted layers in gimp_edit_paste()
and make that code more readable.
2016-09-21 11:15:34 +02:00
Michael Natterer f677e156af app: special case empty layer groups in gimp_edit_get_paste_offset()
They have a size of 1x1, treat them a image-sized when pasting layers
on top of them.

(my commit below was also about gimp_edit_get_paste_offset(), not
 about gimp_edit_paste() as the log claims)
2016-09-21 09:22:30 +02:00
Michael Natterer 7b4895fd1e app: use x,y,width,height instead of x1,y1,x2,y2 in gimp_edit_paste()
and gimp_item_mask_intersect() instead of _bounds().
2016-09-21 00:53:42 +02:00
Michael Natterer 35588d79c8 app: add utility functions to get a generic paste GimpObject
to Gimp and GimpClipboard. The object is either an image or a buffer
or NULL.
2016-09-21 00:11:15 +02:00
Michael Natterer fa94ab03ca app: fix warning in gimp_edit_paste()
gimp_image_add_layer()'s "parent" parameter is a layer.
2016-09-21 00:09:38 +02:00
Michael Natterer 67863dabf9 Bug 637313 - Should be possible to copy/paste whole layers in a single step
Use the newly added clipboard for entire images to copy/paste layers
(we only create single-layer clipboard images, and use only the first
layer of any recieved image, the layers can be arbitrarily complex
though):

- change gimp_edit_copy,cut,paste() to return/take a GimpObject
  that can be a GimpImage or GimpBuffer
- cut/copy the whole layer if there is no selection
- always paste layers as new layers, not floating selections
- always paste news layers on top of the active layer, where
  we would attach a floating selection
- add enum GimpPasteType { FLOATING, FLOATING_INTO, NEW_LAYER }
- add GimpPasteType parameter to gimp_edit_paste() and handle all
  three cases there because there is now a lot of common code
  involved
- change all callers accordingly, use only legacy buffer pasting
  from the PDB for now
2016-09-20 00:20:07 +02:00
Michael Natterer 7130ba95e1 app: add gimp->clipboard_image and API to set/get it 2016-09-19 20:13:39 +02:00
Michael Natterer f0acb3301a app: factor gimp_edit_get_paste_offset() out of gimp_edit_paste()
and also use it for "paste as new layer", so we get the same
positioning logic for both paste variants.
2016-09-19 17:30:41 +02:00
Michael Natterer 557965e593 app, menus: rename everything "paste as new" to "paste as new image"
Actions, functions, variables, help IDs. Also added user profile
migration code for importing old menurc files.
2016-09-19 12:15:39 +02:00
Michael Natterer de5bbd637e app: don't call gimp_layer_set_lock_alpha() on layer groups
in gimp_image_new_from_drawable().
2016-09-17 19:19:30 +02:00
Michael Natterer d85157c376 app: rename gimp->global_buffer to gimp->clipboard_buffer
Also rename the "buffer-changed" signal and the setter, and add a
getter.
2016-09-17 17:39:54 +02:00
Michael Natterer 21f8a0fd1e app: clean up and simplify gimp_selection_extract()
It was ported to GEGL pretty much 1:1, leaving too many and even
one completely redundant if()s around.
2016-09-17 15:32:22 +02:00
Michael Natterer d5ffc50c2e app: rename w, h to width, height in gimp_item_mask_bounds() 2016-09-16 23:57:24 +02:00
Michael Natterer dba7d58b56 app: port gimp_drawable_bucket_fill() to x, y, width, height
because x1, y1, x2, y2 are evil.
2016-09-16 23:31:56 +02:00
Michael Natterer cbac0a4ddc app: don't show the "Fonts" startup status message if we don't loas fonts 2016-09-15 18:47:55 +02:00
Ell 7e6d67ac4b app: various performance improvements to fuzzy-select/bucket-fill
thru gimp_pickable_contiguous_region_by_seed()
2016-09-15 14:57:04 +00:00
Michael Natterer 3ee5df9ee8 Bug 771484 - text loading impossible, in version commit 4b4e1c8
gimp_restore(): the call to gimp_fonts_load() got lost in
commit 64a2c395d1.

Also adjust init progress percentages again.
2016-09-15 14:48:51 +02:00
Michael Natterer 572d556643 Bug 553855 - Bucket fill colour is always blended with filled pixel colour...
...when threshold > 0

Add an "Antialias" toggle to the bucket fill options and set it on the
GimpFillOptions. In gimp_drawable_bucket_fill(), pass it to
gimp_pickable_contiguous_region_by_seed() instead of always defaulting
to TRUE.

The position of the toggle and its huge tooltip may need some
adjustment.
2016-09-15 12:24:37 +02:00
Michael Natterer ea6946edf0 app: small whitespace fix in gimppickable-contiguous-region.h 2016-09-15 10:22:53 +02:00
Massimo Valentini 0ecd936f57 Bug 771208: 'Y' axis name of Flow Graph Parameter...
on Paint Dynamics curve is wrong
2016-09-14 18:32:16 +02:00
Michael Natterer 20a32d970d Bug 599573 - Remember dialog defaults between Gimp sessions
Add GimpFillOptions and GimpStrokeOptions to GimpDialogConfig and use
them in the Fill/Stroke Selection/Path dialogs and for the "with last
values" commands. Add GUI for them to Preferences -> Dialog Defaults.

This requires most of the stuff in my last few commits, and some
more changes:

GimpFillOptions is a GimpContext which has all sorts of connections to
everything, including a Gimp pointer. Hack around in GimpDialogConfig
to add a Gimp property, and add "gimp" parameters to quite some GimpRC
functions. Treat the Gimp* as a GObject* in all public API because
core/ stuff is not known in config/.
2016-09-14 01:27:42 +02:00
Michael Natterer 7daa7d080a app: implement GimpConfig::serialize() in GimpFillOptions
so it doesn't inherit GimpContext's changed implementation.
2016-09-14 00:27:31 +02:00
Michael Natterer f1897b655e app: free Gimp members in reverse order of creation 2016-09-13 12:44:10 +02:00
Michael Natterer 314027f0c9 app: create members of the Gimp instance earlier
Move fonts, data factories, document list, paint methods and user
context creation to gimp_init() or gimp_constructed() so that most
members are created when gimp_new() is done. This does not load any
data earlier, it just makes sure that all containers exist when
gimp_load_config() is called. It's also cleaner and less fragile,
2016-09-13 09:47:27 +02:00
Michael Natterer 631110e061 app: merge units.[ch] into core/gimp-units.[ch]
and initialize units in gimp_init(). This was completely
over-engineered but in the end boils down to a bad hack that needs a
static "the_unit_gimp" pointer anyway, so let's at least have the hacks
in one file.
2016-09-12 23:51:29 +02:00
Jehan 4b4e1c8e60 app: use Freedesktop standard "edit-paste" icon rather than "gtk-paste". 2016-09-12 03:59:53 +02:00
Michael Natterer 64a2c395d1 app: add gimp-data-factories.[ch] with some code from gimp.c
This should improve readability in gimp.c, and moves all data factory
handling code to a common place.
2016-09-12 02:55:49 +02:00
Jehan 6c674e973c app, libgimp*, plug-ins, icons: revert icon names into freedesktop...
... standard icon names and GTK+ icon names as second choice.
We should only use GIMP specific icon names as last resort, when there
is no standard or GTK+ names dedicated to the function.
This is made possible thanks to commit 3cc77b0.

s/gimp-document-recent/document-open-recent/
s/gimp-indent/format-indent-more/
s/gimp-next/go-next/
s/gimp-previous/go-previous/
s/gimp-save/document-save/
s/gimp-save-as/document-save-as/
s/gimp-revert/document-revert/
s/gimp-open/document-open/
s/gimp-document-recent/document-open-recent/
s/gimp-quit/window-close/ ou s/gimp-quit/application-exit/
s/gimp-warning/dialog-warning/
s/gimp-edit-clear/edit-clear/

s/gimp-justify-.*/gtk-justify-.*/
s/gimp-font/gtk-select-font/
s/gimp-color-palette/gtk-select-color/
s/gimp-cancel/gtk-cancel/
2016-09-03 15:49:29 +02:00
Michael Natterer 3a14a646f5 app: add new config class GimpDialogConfig
which will keep all settings of the "don't ask me again" kind. For
now, moved the "color-profile-policy" there.
2016-08-14 22:21:59 +02:00
Michael Natterer f06f691a92 Bug 768952 - Select by color works correctly only in srgb
Separate clearing/creating the image's cached color transforms from
clearing/creating its color profile. Clear the transforms when the
color profile changes, and when image type or precision change. Create
the transforms only on demand, so clearing them multiple times doesn't
trigger any redundant (and expensive) transform creations.
2016-07-25 00:04:12 +02:00
Jehan 7d5ebbe225 app: rename mirror properties to mirror-position-x|y.
As proposed by Mitch. This completes first renaming attempt (commit
08ffc10) with even less ambiguous names.
"horizontal-axis-position" and "vertical-axis-position" are now
respectively "mirror-position-y" and "mirror-position-x".
2016-07-19 14:24:54 +02:00
Jehan 65be37b37b Bug 768871: improve symmetry labels. 2016-07-19 12:34:01 +02:00
Jehan 08ffc1035b app: rename properties s/(horizontal|vertical)-position/\1-axis-position/.
"Horizontal position" and "Vertical position" could be mistaken as
meaning respectively the x and y coordinates, hence the vertical (resp.
horizontal) guide's positions.
The more accurate "horizontal-axis-position" and "vertical-axis-position"
namings are less misleading.
2016-07-18 02:52:37 +02:00
Massimo Valentini 23d5944ef8 Bug 768625: gimp-gradient-segment-range-move crashes...
...GIMP invoked with end-segment < 0

correct a typo
2016-07-10 17:21:32 +02:00
Michael Natterer 954f50a097 app: fix description of GIMP_COLOR_PROFILE_POLICY_CONVERT in the header
it was only fixed in the generated .c file.
2016-07-08 15:07:41 +02:00
Michael Natterer d3de67a9de app: always return a profile from gimp_drawable_transform_buffer_*()
Assign the buffer_profile return value early, so it doesn't stay
uninitialized when we bail out half way through the functions.
2016-07-06 20:29:56 +02:00
Michael Natterer eae2261f16 app: tag the symmetry properties as pixel-coordinate/pixel-distance
so they get the proper soft limits in the generated GUI. Also rename
some properties for consisency, and add some blank lines for better
readability.
2016-07-06 12:37:10 +02:00
Michael Natterer 8c2c22ccb4 app: don't pass a NULL profile to gimp_image_convert_color_profile()
In gimp_image_import_color_profile(), when converting
non-interactively, pass the image's built-in profile.
2016-07-04 12:28:42 +02:00
Jehan 38f1b50a15 app: type s/Thia/This/. 2016-07-01 19:50:13 +02:00
Jehan e8aac6d5ac app: do not allow mandala center position out of the image dimensions. 2016-07-01 14:58:24 +02:00
Jehan 4e6d320591 app: remove current implementation of GimpSpinScale soft bounds.
Mitch gets a better idea to deal with soft limits (i.e. min/max values
different from the property min/max) applied to a spin scale created by
gimp_prop_spin_scale_new().
So let's just remove the current implementation (using locale data on
the GimpConfig object). The symmetry spin scales are back with crazy
huge maximums, which makes quite a horrible GUI, but this is only
temporary until Mitch commits his new implementation.
2016-07-01 13:58:55 +02:00
Ell f4e8cf29f2 app: add missing cleanup to the previous commit 2016-06-30 18:55:09 +00:00
Ell bd5544394b app: eliminate double application of the selection mask ...
... in gimp_drawable_bucket_fill()

gimp_drawable_apply_buffer() already takes the selection mask into
account.  Intersecting the selection mask with the fill region
prior to that leads to wrong (too low) alpha values, in general,
when partial selection is involved.

This commit eliminates the intersection of the fill region and
selection mask data before the apply_buffer() call, although it
does calculate the intersection of their bounds, to avoid
processing regions that won't be visible anyway.
2016-06-30 18:42:55 +00:00
Jehan a10b688b64 app: rename "update-ui" signal to "gui-param-changed".
Therefore having a signal name more in line with other signals. This
reflects the property flag's naming: GIMP_SYMMETRY_PARAM_GUI.
2016-06-28 20:04:38 +02:00
Jehan f713c86d9f app: disconnect symmetries' callbacks connected to image signals...
... on symmetry destruction.
Use g_signal_connect_object() which does this automatically.
2016-06-28 19:30:44 +02:00
Ell 8e9a89d0b9 app: always use the image's mask format for quick mask
Previously, activating quick mask while the selection was empty
would use the image's channel format for the mask, instead of its
mask format; these formats are different for sRGB images.
2016-06-28 13:30:49 +00:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Jehan cafa912c98 app: allow locale lower and upper values in gimp_prop_spin_scale_new().
Currently a GimpSpinScale created with gimp_prop_spin_scale_new() will
use the associated property's lower and upper values.
Unfortunately these generic values may not be always relevant and we
may want to construct a spin scale UI adapted to the current image.
For instance, several symmetry painting have a x/y property which has
to stay within the image's dimension, but changing the property's lower
and upper values would affect the symmetry on the class level (i.e. for
all similar symmetries on all images).
Let's allow setting data on object with key "property-name:min|max" to
provide locale min/max values specifically for this object.
This is used only on the symmetry dock for now, but could be used as
well on GEGL op UIs.
2016-06-14 16:52:52 +02:00
klausstaedtler 2696611d1e icons: Bug 759904
add
gimp-group-layer

patch
gimpgrouplayer.c
2016-06-10 13:50:45 +02:00
Alexandre Prokoudine 3e01419b0c Introduce consistent use of 'soft-proofing' in user-visible messages 2016-06-08 00:21:51 +03:00
Michael Natterer 741be87d0f app: don't let display color management settings affect file import
gimp_image_import_color_profile(): get the intent and bpc settings
from the profile import dialog instead of asking the global
GimpColorConfig.
2016-06-05 22:36:52 +02:00
Michael Natterer b4f34375b7 Bug 767062 - Lags when zooming or dragging zoomed image (cmsFLAGS_NOOPTIMIZE)
Use cmsFLAGS_NOOPTIMIZE only for actual image buffer or single color
transforms, but not for previews or the image display. Makes things a
lot more responsive again.
2016-06-05 16:50:02 +02:00
Jehan 730547e0bb libgimpwidgets: fix commit e6ba618.
- Missing comma;
- headers from libgimpwidgets can't be included in app/core. So icon
  macros can't be used there.
2016-06-02 20:06:54 +02:00
klausstaedtler e6ba618bb9 icons: add new icon gimp-color-palette
patch
gimppalette.c
gimpicons.c
gimpicons.h
2016-06-02 18:24:29 +02:00
Jehan 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Michael Natterer 790cde3dd8 app: don't validate the terminating \0 of a gimp-comment parasite
Valid UTF-8 doesn't contain nul bytes.
2016-05-31 22:28:44 +02:00
Michael Natterer cf3b6903c0 Bug 766824 - Invalid comment string causes export crash
UTF-8 validate the "gimp-comment" parasite and reject it on failure.
2016-05-30 18:56:29 +02:00
Michael Natterer be8146d529 app: don't invalidate all images on color config changes
Now all previews and the display shell connect to the color config
itself, there is no need any longer to connect to the global color
config's "notify" any longer from GimpImage. Also, the settings there
are for display purposes only, so nothing in the image itself needs
to be notified of the config change.
2016-05-30 10:51:18 +02:00
Michael Natterer b3c6163450 Bug 766988 - Colors applied to images are not color managed
Color manage the applied pattern in gimp_fill_options_create_buffer()
so filling and stroking with a pattern look right.
2016-05-29 19:41:12 +02:00
Michael Natterer fc2a4cd589 app: add gimp_fill_options_create_buffer()
Which creates a buffer from GimpFillOptions that can be applied to a
drawable. Eliminates three slightly different copies of the same
code. Also adds to the color history for each color fill, we missed
two places before.
2016-05-29 18:25:14 +02:00
Michael Natterer 4fefc3817c Bug 766988 - Colors applied to images are not color managed
Color manage colors applied when painting, and when filling, merging,
resizing and transforming drawables.
2016-05-29 17:51:06 +02:00
Michael Natterer 0f98eda5a5 app: remove gimp_context_[get|set]_[foreground|background]_pixel()
Artifacts from early GEGL posting.
2016-05-28 09:35:25 +02:00
Michael Natterer 0bfa402c1a Argh, this was meant to be squashed into the previous commit... 2016-05-26 22:18:50 +02:00
Michael Natterer cc92887908 libgimpcolor: add new object GimpColorTransform
which encapsulates a cmsHTRANSFORM and does all the pixel format
conversion magic. It has API to create transforms and proofing
transforms, and to convert pixels arrays and GeglBuffers.

Before, each place which has a transform had to keep around the
transform and its input and output Babl formats, and had to implement
lots of stuff itself. Now all that lives in GimpColorTransform,
removing lots of logic from many places, and pretty much removing lcms
from the public API entirely.

This removes including <lcms2.h>, LCMS_LIBS and LCMS_CFLAGS from
almost all directories and potentially allows to replace lcms by
something else.
2016-05-26 22:15:54 +02:00
Michael Natterer 5b4d0219d8 app: add GimpPickable::srgb_to_pixel()
which isn't really for "picking", but it just fits too nicely into
GimpPickable to not put it there.

Also add utility function gimp_pickable_srgb_to_image_color() which
takes a "real" (sRGB) GimpRGB value, transforms it to the pickable's
colorspace and puts it into an "image color" GimpRGB.
2016-05-23 01:33:52 +02:00
Michael Natterer f7842bc8db app: add gimp_image_color_profile_srgb_to_pixel()
which is the reverse of gimp_image_color_profile_pixel_to_srgb()
2016-05-23 01:18:55 +02:00
Michael Natterer 26251695b0 Bug 748749 - picked colors don't match image colors...
...when a color profile is active

Add GimpPickable::pixel_to_srgb() which puts a picked raw image
pixel into a GimpRGB. Default to gimp_rgba_set_pixel() but implement
pixel_to_srgb() in GimpLayer, GimpProjection and GimpImage and
run the pixel through gimp_image_color_profile_pixel_to_srgb().
2016-05-22 23:28:31 +02:00
Michael Natterer bb43a89ef8 app: treat the layer mask correctly in gimp_layer_get_opacity_at()
Only take the mask into account if it is actually applied.
2016-05-22 19:53:10 +02:00
Michael Natterer ce8e484764 app: fix color profile logic in gimp_image_convert_precision()
Not only the logic was broken, a local variable was also shadowing the
"dest_profile" variable and preventing the broken logic to be applied
at all. Double fail.
2016-05-21 00:37:28 +02:00
Michael Natterer 5080da50e6 app: move the undo impl object typedefs out of the *-types.h files
They are completely private to the undo system and don't need to
be used anywhere else. Removes some clutter from the typed headers.
2016-05-20 18:29:13 +02:00
Michael Natterer 2ef8719cbe app: rename more stuff from "floating sel" to "floating selection" 2016-05-20 16:46:26 +02:00
Michael Natterer 28e1a379e6 app: remove const qualifiers from all object parameters
They are unreliable because every type checking cast discards them,
they are useless anyway, visual clutter, added inconsistently, and
generally suck. Wanted to do this a long time ago, it was a bad idea
in the first place.
2016-05-19 23:54:14 +02:00
Michael Natterer 2b170e3a80 app: include gimpdrawable-floating-selection.h in gimplayer-floating-sel.c 2016-05-19 19:22:09 +02:00
Michael Natterer 81fd3e9c3f app: move GimpDrawable's FS to gimpdrawable-floating-selection.[ch]
and refactor it a bit to have separate functions for adding, removing
and updating the FS' drawable filter. Should be a lot more
understandable now.
2016-05-19 17:40:33 +02:00
Michael Natterer 201b11e230 app: add separate opacity and mode API to GimpDrawableFilter 2016-05-18 09:47:58 +02:00
Michael Natterer 265dfec525 app: split GimpApplicator's opacity and mode API into two functions
Added gimp_applicator_set_opacity() and remove the opacity argument
from set_mode().
2016-05-18 01:51:09 +02:00
Michael Natterer c0fb136203 app: add tooltips that mention that disabling color management == sRGB
Also say "better leave this enabled".
2016-05-16 17:41:04 +02:00
Michael Natterer 9fb70a44f2 app: rename GimpImageMap to GimpDrawableFilter
and gimpdrawable-filter.[ch] to gimpdrawable-filters.[ch] because of
the name clash.
2016-05-12 01:49:53 +02:00
Michael Natterer cb1a6024ff app: normalize gegl:distance-transform, it's unusuable otherwise 2016-05-12 00:13:33 +02:00
Michael Natterer 43990e8e0e app: more cleanup in GimpImageMap
Remove the filter area calculation code from gimp_image_map_apply().
Instead, automatically update the area when adding the filter to the
drawable, and when the selection changes. Also, connect to the
drawable's "removed" and remove the filter when the drawable gets
removed from the image.
2016-05-11 22:53:49 +02:00
Michael Natterer 4f0521c7cf app: don't call gimp_gegl_progress_connect() with a NULL text 2016-05-11 22:50:05 +02:00
Michael Natterer 477987dce3 app: make GimpImageMap a subclass of GimpFilter
Reduces members and all sorts of duplication and is a much better
abstraction of what it does. Also make it a lot smarter and
self-updating, chop up the apply() function and move its parts where
they belong. Also, it's now aware of selection changes and does the
right thing.

Don't abort GimpImageMapTool on selection changes, it now nicely
handles that.
2016-05-09 21:40:20 +02:00
Michael Natterer 143a2bcb95 app: make GimpImageMap setters update the drawable by itself
As in, don't require a call to gimp_image_map_apply() after setting.
2016-05-09 01:40:01 +02:00
Michael Natterer 54c0b047b2 app: add basic support for creating images with color profiles
Add "gboolean color_managed" and "GFile *color_profile" to
GimpTemplate. Add a toggle and profile combo to GimpTemplateEditor.
Honor the new template properties in gimp_image_new_from_template().

Using a GFile property instead of a GIMP_TYPE_CONFIG_PATH is
preliminary, see the previous commit. I'd like to use GFile more
directly when dealing with config files, this is for testing that.
2016-05-08 23:20:26 +02:00
Ell 8b11a505d9 app: Handle zero radius in gimp_channel_border()
Can only be triggered through PDB.  Currently assigns illegal values
to the GEGL ops' properties.
2016-05-08 19:22:24 +00:00
Ell 15d4908076 app, pdb: Modify gimp_channel_border() to take a style parameter
isntead of the feather parameter, and pass it to
gimp_gegl_apply_border().

Make the necessary changes to the rest of the code to maintain the
current behavior.

Mass parameter alignment changes to gimpchannel.h. Sigh #2...
2016-05-08 19:22:24 +00:00
Ell 45efe6c405 app: Modify gimp_gegl_apply_border() to take a style parameter
instead of the feather parameter.

The BORDER_STYLE_HARD and BORDER_STYLE_FEATHERED styles are implemented
using the "gimp:border" operation, as was done previously.  The
BORDER_STYLE_SMOOTH style is implemented by performing a "gimp:grow" and
a "gimp:shrink", and subtracting the shrunk image from the grown image
using "gegl:substract".

gimp_channel_border() is modified to pass either BORDER_STYLE_HARD or
BORDER_STYLE_FEATHER, depending on its feather parameter, to maintain
the current behavior.  The next commit replaces it with a style
parameter as well.

Mass parameter alignment changes to gimp-gegl-apply-operation.h.  Sigh...
2016-05-08 19:22:24 +00:00
Ell 46a9690353 app: Add GimpChannelBorderStyle enum
Will be used as a parameter to control the behavior of
gimp_channel_border(), and the corresponding "Select -> Border..."
action, instead of the feather flag.

Can be one of:

  - GIMP_CHANNEL_BORDER_STYLE_HARD: Current behavior, unfeathered.
  - GIMP_CHANNEL_BORDER_STYLE_SMOOTH: Smooth border, better handling
    partial selection, implemented as explained in the next commit.
  - GIMP_CHANNEL_BORDER_STYLE_FEATHERED: Current behavior, feathered.
2016-05-08 19:22:24 +00:00
Michael Natterer a544ad4718 app: #include "gimpimage-color-profile.h" in gimplayer-new.c 2016-05-08 19:56:16 +02:00
Michael Natterer 1da4236e44 app: set the image's "is color managed" in gimp_image_new_from_drawable()
based on the src image's setting.
2016-05-08 19:53:16 +02:00
Michael Natterer 8eb6cdf488 app: pass profiles around along with the buffers in the transform code
"transform" as in flip, rotate, affine. Same reasoning as in the
gimp_selection_float() commit below.
2016-05-08 18:35:40 +02:00
Michael Natterer 2739c34573 app: pass the right color profile around in gimp_selection_float()
This doesn make any difference because a NULL profile would do the
same, but it's safer to pass the actual profile instead of relying on
the magic meaning of NULL in the call to
gimp_layer_new_from_gegl_buffer().
2016-05-08 18:33:22 +02:00
Michael Natterer 5ec6d2c0f7 app: same fix as below in gimplayer-new.c
Don't use the (wrong) global display color managment switch to
determine whether or not to convert the buffer to the image's
profile. Use the image's "is color managed" switch.
2016-05-08 18:30:17 +02:00
Michael Natterer 0e3c7ea204 app: handle profile conversion correctly in gimp_layer_convert()
We used to depend on the global color management OFF switch from
prefs, but that's meant for display color management. Now, don't do a
profile transform if the target image's color management is disabled.
2016-05-08 18:23:09 +02:00
Michael Natterer cc9154b425 app: don't return any cached transforms is the image is not color managed 2016-05-08 18:20:19 +02:00
Michael Natterer 34a826d735 app: return built-in profiles from GimpColorManaged::get_color_profile(image)
if the image is not color managed.
2016-05-08 18:15:36 +02:00
Michael Natterer c28244c49d app: enable color management when the image is converted to a profile 2016-05-08 18:12:28 +02:00
Michael Natterer 7fffa9dc2a app: don't run and color profile import if the image is not color managed 2016-05-08 18:10:50 +02:00
Michael Natterer 801b1bb9bc app: reorder private functions in gimpimage-color-profile.c 2016-05-08 18:06:16 +02:00
Michael Natterer 81845552ef app: add a per-image "is color managed" switch
in order to enable/disable color management for this image. Completely
unused at the moment.
2016-05-08 18:02:57 +02:00
Michael Natterer 08b67de9bf app: don't disable profile import when display color management is off
It's the wrong switch, and the dialog has its own "don't ask me again"
logic.
2016-05-03 23:57:04 +02:00
Michael Natterer 58f8808847 app: transfer the right profile in gimp_image_new_from_drawable()
Use the drawable's profile not the image's.
2016-05-03 12:51:52 +02:00
Michael Natterer f1f91ecc2f app: don't reverse lists in GimpFilterStack and GimpUndoEditor
GimpList has a tail pointer now and can be traversed in reverse order.
2016-05-03 01:05:49 +02:00
Michael Natterer a659036b40 app: switch the list of tools to using "append" mode
and ret rid of registering tools in reverse order, and reversing the
list after deserializing it.
2016-05-01 16:05:44 +02:00
Michael Natterer 0ab6e6be69 app: make sure the last *visible* layer is displayed in normal mode
The bottom visible layer must be rendered in normal mode because
every other mode on top of nothing renders nothing.

Before, we would display a stack's last layer in normal mode, which
was a braindead attempt to make the layer stack look like in 2.8. Now
we set GimpFilter's "is-last-node" property the right way by looking
at the filters' visibility in GimpFilterStack.
2016-05-01 15:38:36 +02:00
Michael Natterer 39909b6008 app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
2016-05-01 15:22:44 +02:00
Michael Natterer 7ae81e70b9 app: move the "visible" property from GimpItem to GimpFilter
Same for the "visibility_changed" signal. GimpItem keeps its
visibility API because it adds undo over GimpItem's API.
2016-05-01 14:27:43 +02:00
Michael Natterer 8c107963e6 app: implement GimpColorManaged in GimpDrawable
so now all drawables have a profile. Default to the babl format's
bultin profile and override to use the image's format in GimpLayer.
2016-04-30 23:41:32 +02:00
Michael Natterer 329d5c0a0f app: #include gimp-babl.h in gimpimage-convert-type.c 2016-04-30 18:50:23 +02:00
Michael Natterer 12f9aa9bd2 Bug 765176 - ICC profile conversions between grayscale and RGB images
Add a dest_profile parameter to gimp_image_convert_type() so a profile
can be chosen when converting between RGB and GRAY. Has no GUI yet.
2016-04-30 18:35:52 +02:00
Michael Natterer 33adec2a3e app: add gimp_image_validate_color_profile_by_format()
which checks if a color profile is suited for pixels of a Babl format.
2016-04-30 18:35:52 +02:00
Michael Natterer ef8b802032 app: move indexed conversion to gimpimage-convert-indexed.[ch]
It's so much code and takes so many additional parameters over RGB and
GRAY conversion, it got its own place and function now.
2016-04-30 18:35:52 +02:00
Michael Natterer 4086932e8d app: tiny and completely irrelevant stylistic cleanup 2016-04-30 18:35:52 +02:00
Michael Natterer ef4ab94a12 app: change GimpDrawable::convert_type() to take a target profile
instead of just a boolean "convert_profile". This takes the logic to
figure the right target profile out of gimp_layer_convert_type(), it
can't possibly know everything about how to convert anyway, and having
the logic in the callers conveniently splits it up and distributes its
parts to the places they belong.

This commit should cause no behavor change and is just preparation for
fixing bug 765176.
2016-04-30 18:35:52 +02:00
Massimo Valentini 022439e463 Bug 765492: Memory leak in gimp_brush_cache_add
g_free the lru 'unit' when removed from the cache

and keep track of the list length and last item
while looking for a duplicate already present in
the cache.
2016-04-24 19:41:22 +02:00
Michael Natterer 19738412ce app: simplify gimp_image_convert_type()
It's pretty pointless to have 5 differently-styled if(INDEXED) blocks
after each other, with zero non-INDEXED code in between.
2016-04-24 00:55:04 +02:00
Jehan 77a68e00af Bug 765459 - Artifacts symmetry painting with big brushes.
Use gegl_node_blit() instead of gegl_node_process() as proposed by
Massimo in the bug report.
2016-04-24 00:01:45 +05:30
Massimo Valentini a357bfec89 Bug 765247: Foreground select tool does not respect item offsets 2016-04-20 06:48:04 +02:00
Michael Natterer 3968226644 Bug 765176 - ICC profile conversions between grayscale and RGB images
gimp_image_convert_type(): call gimp_drawable_convert_type() with
convert_profile = TRUE.
2016-04-20 04:20:58 +01:00
Michael Natterer 66525e634e app: fix wrong parameter name in gimp_drawable_real_convert_type() 2016-04-20 04:19:44 +01:00
Thomas Manni f4cb2dd881 Bug 109161 - Improve Histogram with Luminance Channel
Add a luminance channel to GimpHistogram
2016-04-18 19:35:06 +01:00
Michael Natterer 29f55a95ef app, pdb: minor cleanup in the new font loading code 2016-04-17 21:06:00 +01:00
Kristian Rietveld 30b73125f8 Bug 449848 - Startup: initialize fontconfig in the background ...
... to avoid long pause on start

On non-Linux operating systems the fontconfig cache is often not
initialized by default. The first time GIMP was launched, this led
to a non-responding application, confusing many users.

The initialization of fontconfig has now been moved to a separate
thread. The main thread will wait for this fontconfig thread to
complete, regularly pulsing the UI.

This patch was partly based on an earlier patch by Tor Lillqvist.
2016-04-17 17:27:06 +01:00
Kristian Rietveld ca9365f2b5 core: bail out of gimp_exit if exit was cancelled by user 2016-04-16 14:20:43 +01:00
Kristian Rietveld 1e4cbd3232 core: move final unref of images from gimp_real_exit to gimp_exit
We needed to get rid of these images at a later point. This fixes (at
least) a crash seen on Mac OS X, where the images were being unreffed
before the last GimpActions (with a reference to the image) were
unreffed.
2016-04-16 13:55:46 +01:00
Michael Natterer 3fd6435198 app: add gimp_babl_format_get_color_profile()
and remove the code duplication added a few commits before.
2016-04-15 23:02:19 +01:00
Michael Natterer 5f8b6ce8da app: s/gimp_babl_get_description/gimp_babl_format_get_description/ 2016-04-15 19:19:09 +01:00
Michael Natterer 0a5ba05e45 app: GimpBuffer: same preview colorspace fixes as below for images/layers
Plus, implement GimpColorManaged so the view renderer can ask the
buffer for its profile.

This also fixes colors in cross-application copy & paste when GIMP
is the source.
2016-04-15 18:16:15 +01:00
Michael Natterer 9e8499bb48 Bug 478528 - Layer and Image previews are not color managed
Change gimp_viewable_get_[new]_preview() to return buffers of the
image's and layers' colorspace, but in u8. This way layer and image
previews can transform them correctly to the display profile.

Note: this makes plug-ins receive thumbnail buffers in that
pixel format too.

Also change gimp_viewable_get_[new]_pixbuf() to always return sRGB
buffers that can reasonably be put to screen directly, or put into DND
buffers. This is at least more correct now.
2016-04-15 16:52:25 +01:00
Michael Natterer 0ee27de463 app: cache more lcms transforms in GimpImage
Keep around transforms not only to/from the image's pixels to
"R'G'B'A double" (GimpRGB's format), but also to/from "R'G'B'A u8"
(GdkPixbuf's format). Also add API to access all cached transforms
and the Babl formats expected when calling lcms.
2016-04-15 16:49:36 +01:00
Michael Natterer 8f8da22389 Bug 764630 - Preview curtain: can there be a switch "left/right"...
...for the preview?

Change to allow for split previews in all 4 directions. Remove the
direction controls from the filter dialog, and instead implement
shift- and control-clicking on the split guide to switch
original/filtered sides, or orientation.
2016-04-14 02:34:45 +01:00
Michael Natterer 076ef278d4 app: get rid of x1, y1, x2, y2 in gimp_channel_real_flood()
Use, x, y, width, height instead.
2016-04-10 16:34:53 +02:00
Michael Natterer f34aa5fa6b Bug 756389 - Color-managing grayscale images
Rename profile constructors to say "d65_gray" instead of just "gray",
"srgb_trc" instead of "srgb_gamma", and drop the "srgb" from
"srgb_linear" because we now say "d65". This should be a naming scheme
that doesn't conflict with whatever future functions we might add.
2016-04-09 18:47:51 +02:00
Sven Claussner f4adb9a078 Rename UI strings
After discussion in IRC some weeks ago give the Selection-Flood items
the more meaningful name Selection-Remove holes.
	modified:   app/actions/select-actions.c
        modified:   app/core/gimpselection.c
2016-04-08 08:22:47 +00:00
Michael Natterer 112dd804bc app: add a "split preview" feature to GEGL ops that can be dragged around
We also commonly call this "preview curtain".
2016-04-04 22:19:30 +02:00
Michael Natterer 8984df028f app: add a canvas style for "split view" guides 2016-04-04 22:12:33 +02:00
Michael Natterer 0e050bed7c app: don't push move and remove undo steps for custom guides 2016-04-03 20:33:01 +02:00
Michael Natterer 1b6f414d4d app: add g_return_if_fail() to gimp_guide_get_style() and is_custom() 2016-04-03 20:33:01 +02:00
Michael Natterer e76f7174fc Bug 761270 - layer boundary not re-drawn correctly on scrolling
Pass the display scroll offset down to gimp_cairo_stipple_pattern_create()
and set it as offset on the created cairo pattern, so stipple patterns
look the same no matter how the display is scrolled.
2016-03-26 22:50:10 +01:00
Michael Natterer 2c0ba5cf38 app: fix typo in gimpimagemap.h 2016-03-26 16:34:46 +01:00
Michael Natterer 47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
Øyvind Kolås 2e46850131 app: remove old GEGL multiline prop type/handling
We're using ui_meta keys now, and no longer specialized param spec subclasses
nor tagging with custom qdata.
2016-03-26 12:29:04 +01:00
Jehan 59f4ee55c9 app: do not migrate theme settings.
Themes from 2.8 and before are not fully compatible with 2.10.
In particular, embedded icons would not work and you would end up with
the Symbolic icon theme (light colors), which may not work well with a
custom theme.
It is better to reset to the new defaults upon migration and users can
still try and configure the theming afterwards if they wish.
2016-03-25 21:43:58 +01:00
Michael Natterer f7962c27e1 app: implement get_memsize() and get_checksum() in GimpMybrush 2016-03-20 21:16:04 +01:00
Michael Natterer b8ae89c37f app: actually use the calculated checksum in gimp_brush_get_checksum() 2016-03-20 21:15:37 +01:00
Michael Natterer c09a724bda app: change parameters of gimp_fill_options_new()
to be the same as of gimp_stroke_options_new() because it's about to
be needed for the same purposes.
2016-03-15 20:10:16 +01:00
Michael Natterer ff1c678058 app: add GimpItem::fill() which fills what is outlined by ::stroke()
For selections, it's different from gimp_edit_fill() because it
ignores the selection while filling, just as stroking does. Currently
unused, stay tuned...
2016-03-14 19:02:18 +01:00
Michael Natterer 7b7b8f5d03 app: remove some #includes 2016-03-11 22:45:15 +01:00
Michael Natterer 3b6ab62c1e app: remove boolean return value from gimp_edit_clear() and gimp_edit_fill() 2016-03-11 22:41:25 +01:00
Michael Natterer d71f53dfe9 app: change gimp_drawable_bucket_fill() to use GimpFillOptions
and get rid of gimp_drawable_bucket_fill_internal().
2016-03-11 22:05:33 +01:00
Michael Natterer e1e77f88fa app: change gimp_edit_fill() to take a GimpFillOptions
instead of a long list of parameters. Get rid of gimp_edit_fill_full().
2016-03-11 19:55:50 +01:00
Michael Natterer 00932b57af app: add gimp_fill_options_set_by_fill_mode()
which takes a context and a GimpBucketFillMode and configures the
GimpFillOptions accordingly.
2016-03-11 19:48:26 +01:00
Michael Natterer 9ef2428fcb app: add gimp_fill_options_get_undo_desc()
which returns an undo string to be used when filling with the option's
settings.
2016-03-11 18:47:03 +01:00
Michael Natterer d0b113d1ca app: add "style" and "antialias" setters to GimpFillOptions 2016-03-08 19:49:17 +01:00
Michael Natterer 9fa832c5aa app: add gimp_fill_options_set_by_fill_type()
which sets color, pattern and fill style on a GimpFillOptions, based
on a context and a GimpFillType.
2016-03-08 01:51:10 +01:00
Michael Natterer ad2c01f8d8 app: move gimp_drawable_fill() to gimpdrawable-fill.[ch]
and get rid of gimp_drawable_fill_full().
2016-03-08 01:44:35 +01:00
Michael Natterer 3f1c39c1b9 app: rename gimp_selection_push,pop_stroking() to selection_suspend,resume() 2016-03-07 21:39:41 +01:00
Michael Natterer f2a98566d5 app: add gimpdrawable-fill.[ch]
for the filling code from gimpdrawable-stroke.[ch]; and clean up and
untangle the stroking and filling functions.
2016-03-07 21:33:42 +01:00
Michael Natterer b5bc15c9b9 app: add support for a preview rectangle to GimpImageMap 2016-02-16 21:36:36 +01:00
Michael Natterer bda7ddc0fd app: disable the preview area in gimp_drawable_merge_filter()
This call has no effect if there was no preview area in the first place.
2016-02-16 21:36:35 +01:00
Michael Natterer a0b18c7929 app: make GimpApplicator's preview feature optional
Don't add the preview nodes if use_preview_cache is FALSE in
gimp_applicator_new().
2016-02-16 21:36:35 +01:00
Michael Natterer c2cef394b2 app: don't invalidate the buffer source in gimp_drawable_real_update()
This was an artifact from the times of the initial GEGL port,
apparently something was broken in GEGL at the time.
2016-02-14 22:41:23 +01:00
Michael Natterer f2d581a536 Bug 761170 - Warnings building with clang
Fix a bunch of clang warnings.
2016-02-12 22:49:47 +01:00
Michael Natterer bd5d851364 Bug 752071 - less tool preset defaults checked
Don't check palette and gradient, but special case the blend tool for
gradient. The idea is that we check everything except colors.
2016-02-12 00:12:00 +01:00
Michael Natterer e5b6806fe2 app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880.
2016-02-11 23:46:24 +01:00
Jehan 7364c37158 app: update documentation comment of gimp_guide_custom_new().
Say in the doc that custom guides do not follow snapping settings.
2016-02-11 17:40:45 +01:00
Jehan fa19271859 app: do not snap to custom guides.
I am still not sure whether custom guides should follow snapping rules.
Yet I could easily imagine you could want some normal guides with
snapping and in the same time symmetry without snapping to axis of
symmetry. So for the time being, let's disable snapping to custom guides
all the time and see if logic could be improved later.
2016-02-11 17:35:21 +01:00
Jehan 790f72d4fe app: update "horizontal/vertical guide position" labels.
"Guide" is our internal representation. In geometry, we'll talk about
an "axis" of symmetry.
2016-02-11 17:15:53 +01:00
Jehan 0107335938 app: allow the mirror axis position within image's dimensions only.
This is not ideal since the scale widget is crazy huge, thus
impractical, but the solution used on properties of other symmetries
(updating min/max of the class property) is wrong since it applies to
the whole class.
For the time being, it avoid setting obviously bad values until we
figure out the ideal automatic UI construction.
2016-02-11 17:12:45 +01:00
Jehan 60dc82d08c app: mirror axis should also be settable by scale widget...
... not only by guide moving. Both ways are complementary.
2016-02-11 17:12:45 +01:00
Jehan 609dcc5448 app: mandala center coordinates should also be settable by number...
... not only by guide moving. Both ways are complementary.
2016-02-11 17:12:44 +01:00
Jehan 04d8a2eed6 app: fix removing a GimpSymmetry from an image. 2016-02-11 16:45:50 +01:00
Michael Natterer 18316c41a5 app: use the new GIMP_CONFIG_PROP_FOO()
instead of manual g_object_class_install_property().
2016-02-10 01:38:08 +01:00
Jehan c4a87e7a49 app: fix coordinates computation when tile-painting with x-shift. 2016-02-07 15:54:10 +01:00
Jehan 931752f353 app: minor space cleanup. 2016-02-07 15:33:12 +01:00
Jehan a49e6d015a app: update tiling stroke coordinates when intervals change. 2016-02-07 15:17:20 +01:00
Michael Natterer 8bb00c639a app: simplify symmetry GUI generation
Remove GimpSymmetry::get_settings() and instead tag the properties that
should have a GUI with the GIMP_SYMMETRY_PARAM_GUI flag. Also use plain
g_object_class_install_property() because that allows for separate nick
and blurb. Finally, use gimp_prop_gui_new() to generate the GUI,
2016-02-06 23:20:44 +01:00
Michael Natterer 8b7939d226 app: ref the symmetry in gimp_image_symmetry_add()
so we have proper ref/unref symmetry in symmetry_add/remove().
2016-02-04 20:58:00 +01:00
Jehan 6e38cd1bde app: cleaning out unused variable. 2016-02-04 12:15:28 +01:00
Jehan f61b58ff38 app: class label is a translated string.
This will make the parasite name change with language, which isn't
what we want. Uses the GType name instead.
2016-02-04 01:20:27 +01:00
Michael Natterer 02f76b4c7b app: rename GimpImage.selected_symmetry to .active_symmetry
because that's the usual naming. Also change the set/get API accordingly.
2016-02-03 21:25:17 +01:00
Michael Natterer dfb6a496ef app: core-enums.c was regenerated 2016-02-03 21:11:04 +01:00
Jehan 73389033d2 app: remove redundant "type" member of GimpSymmetry.
Use G_TYPE_FROM_INSTANCE() instead.
2016-02-03 20:11:31 +01:00
Jehan e01d56969d app: move all guide styling to gimpcanvas-style. 2016-02-03 19:38:32 +01:00
Michael Natterer 3415d22e58 app: some cleanup in the new symmetry code, mostly harmless 2016-02-03 14:29:23 +01:00
Michael Natterer 9e5329df77 app: some cleanup in gimpdrawable-blend.c 2016-02-03 10:44:07 +01:00
Alexandre Prokoudine 7cc0a9d4ba Fix a typo in a user-visible message 2016-02-03 10:22:59 +03:00
Jehan 1f4839288e Bug 648776 - fixes symmetry painting after Massimo and Mitch's reviews.
Use a GType for the PROP_SYMMETRY property of GimpImage, and create
a default "identity" symmetry for an image.
I still use a GimpIntComboBox but store the property value in the
user-data column because gpointer isn't a subset of gint.
Adds in libgimpwidgets:
- gimp_int_combo_box_set_active_by_user_data()
- gimp_int_combo_box_get_active_user_data()
- gimp_int_store_lookup_by_user_data()
- gimp_prop_pointer_combo_box_new() to create a GimpIntComboBox and
  attach it to a gpointer property.
Thanks Massimo and Mitch for reviewing my code.
2016-02-02 21:15:13 +01:00
Jehan 1c0a0a47de app: add a "Mandala" symmetry.
This is basically a multiple rotation around a given center.
2016-02-02 21:15:13 +01:00
Jehan b5811b05ad app: add a "Tiling" symmetry. 2016-02-02 21:15:13 +01:00
Jehan 76f573c981 Bug 648776 - mirror symmetries.
You can now set any paint tool to mirror painting relatively
horizontal/vertical axis or a central point (any combination of these 3
symmetries).
This has been implemented as a new multi-stroke core, where every stroke
is actually handled as a multi-stroke (default of size 1).
This is also the first usage of custom guides for symmetry guiding.
Current version has to be activated in the playground.
2016-02-02 21:15:13 +01:00
Jehan b8fadf3ad7 app: add a "custom" guide concept.
With gimp_guide_custom_new(), you can create a custom guide with a different
style on canvas (other pattern/color/width). A custom guide won't be saved
and could be used, for instance, for specific GEGL op guiding.
2016-02-02 21:15:13 +01:00
Michael Henning d52bb9ca58 app: Remove dead code in gimpdrawable-blend 2016-02-01 21:20:19 +01:00
Michael Henning a0a6d6139e app: Use gimp:blend in gimp_drawable_blend 2016-02-01 21:20:19 +01:00
Michael Henning f545b7fe72 app: Place shapeburst buffers at the right offset. 2016-02-01 21:20:19 +01:00
Michael Henning ae84fe9ec8 app/core: Expose creating shapeburst distmaps in gimpdrawable-blend. 2016-02-01 21:18:51 +01:00
Michael Henning 54ab3047b3 core: Remove unused parameter. 2016-02-01 21:18:51 +01:00
Michael Henning 892fec9512 Revert "app: use the new distance-transform operation in the blend tool"
While the tool should definitely use the new op, we want the code in
gimpdrawable-blend to use the old one for compat reasons. The new op
will be exposed via a separate pdb call in the future.

This reverts commit 8af3fec689.
2016-02-01 21:18:51 +01:00
Michael Natterer 2c48d55f75 app: add gimp_g_queue_get_memsize() and gimp_g_queue_get_memsize_foreach() 2016-01-27 23:04:31 +01:00
Jehan ecaae0788c app: minor fix of parameter alignment. 2016-01-26 00:11:51 +01:00
Ell 71119d41c0 app: Add "Flood" select action
and associated UI entries.

This action applies the "gimp:flood" operation to the selection.
2016-01-25 22:58:33 +01:00
Ell 3f04e349cf app: Add gimp_channel_flood() function
This function applies the "gimp:flood" operation to the channel.
2016-01-25 22:58:28 +01:00
Jehan ea13e816ab Bug 750105 - Migrating 2.8 themes to 2.9/2.10
Old themes should not be copied over to the GIMP 2.9/2.10 config at
first launch since they won't be compatible anyway. Let's go the less
painful way by dropping old themes rather than trying to salvage themes
which we know will be broken by design.
2016-01-19 22:36:27 +01:00
Ell e0b1aa1c26 app: Add diagonal_neighbors parameter to gimp_channel_select_fuzzy()
and propagate it to gimp_pickable_contiguous_region_by_seed(), in
preperation for adding a diagonal-neighbors setting to PDB.
2016-01-17 00:46:54 +01:00
Ell 350c7ca338 app: Add "Diagonal neighbors" option to the bucket fill tool
When checked, diagonally neighboring pixels are considered connected
when calculating the affected area.

This commit also adds a corresponding diagonal_neighbors parameter to
gimp_drawable_bucket_fill(), and modifies the callers, other than the
bucket fill tool, to pass FALSE for this parameter, to retain the
current behavior.
2016-01-17 00:46:54 +01:00