Commit Graph

23 Commits

Author SHA1 Message Date
Ell 45fc4cb4f9 app: add gimp_fill_options_fill_buffer()
... which is similar to gimp_fill_options_create_buffer(), however,
it fills an existing buffer, instead of creating a new buffer.

Implement gimp_fill_options_create_buffer() in terms of the new
function.
2018-12-02 03:10:30 -05:00
Michael Natterer 38dcb73bfc Issue #2386 - Pattern fill with selection is shifted in 2.10
Add pattern offset parameters to gimp_fill_options_create_buffer() and
pass the selection's top-left corner so that pattern fills on the same
drawable are aligned.
2018-10-22 16:39:19 +02:00
Ell 3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01: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 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 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 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 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 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
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer 5ad45dae03 app: move all GimpFillOptions members to private 2011-03-05 20:26:41 +01:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Michael Natterer efb6d15acf add "gboolean use_context_color" parameter to gimp_stroke_options_new()
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: add "gboolean use_context_color"
	parameter to gimp_stroke_options_new() and set the passed context
	as parent of the new options only if it's TRUE. Also fixed the
	GimpConfig::duplicate() implementation to really duplicate the
	object and not just return an object containing default values.

	* app/core/gimpfilloptions.[ch]: add gimp_fill_options_new().

	* app/actions/select-commands.c
	* app/dialogs/stroke-dialog.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE to gimp_stroke_options_new().

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27393
2008-10-25 08:52:20 +00:00
Michael Natterer 90c26cf10e add non-serializable properties pattern-view-type and pattern-view-size
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpfilloptions.[ch]: add non-serializable properties
	pattern-view-type and pattern-view-size which are used only by the
	new UI below.

	* app/widgets/gimpfilleditor.[ch]: added boolean edit-context
	property. If TRUE, add widgets to edit the context's foreground and
	pattern. Add "edit_context" parameter to gimp_fill_editor_new().

	* app/widgets/gimpstrokeeditor.[ch]: add the same parameter here.

	* app/widgets/gimpwidgets-utils.[ch]: add gimp_enum_radio_box_add()
	which does the same as the existing gimp_enum_radio_frame_add().

	* app/dialogs/stroke-dialog.c: pass FALSE for "edit_context"
	because this dialog takes its foreground and pattern from the user
	context and doesn't need it's own GUI for them.


svn path=/trunk/; revision=27392
2008-10-24 22:34:24 +00:00
Michael Natterer 3dfef0f15a rename GimpStrokeStyle to GimpFillStyle.
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle.

	* app/core/gimpfilloptions.[ch]
	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27379
2008-10-23 21:30:28 +00:00
Michael Natterer 67a5eaea68 Merge a part of SOC 2006's vector layer branch:
2008-10-23  Michael Natterer  <mitch@gimp.org>

	Merge a part of SOC 2006's vector layer branch:

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpfilloptions.[ch]: new GimpContext subclass factored
	out of GimpStrokeOptions. Has "style" and "antialias" properties.

	* app/core/gimpstrokeoptions.[ch]: derive from GimpFillOptions
	and remove said properties.

	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27378
2008-10-23 21:18:39 +00:00