Commit Graph

166 Commits

Author SHA1 Message Date
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
Michael Natterer b8ae89c37f app: actually use the calculated checksum in gimp_brush_get_checksum() 2016-03-20 21:15:37 +01:00
Michael Natterer 3415d22e58 app: some cleanup in the new symmetry code, mostly harmless 2016-02-03 14:29:23 +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
Alexia Death c1dc0893bd app: handle preview generation for generated brushes separatley 2014-11-19 23:19:42 +02:00
Alexia Death 9a953a9239 app: locking brush size to zoom 2014-11-17 00:03:10 +02:00
Alexia Death 7f6cdf635a Revert "app: apply a cap on brush scaling"
This reverts commit 5a22fb5799.
2014-11-15 22:25:59 +02:00
Alexia Death 5a22fb5799 app: apply a cap on brush scaling 2014-11-15 21:56:51 +02:00
Michael Natterer 5d8824f42e app: move all GimpBrush members to a private struct
Add and use accessors for width, height, x_axis and y_axis.
2014-10-12 01:16:32 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02: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 1bbd3d40a8 app: make the GimpTempBuf struct private and add accessors 2012-05-02 17:51:12 +02:00
Michael Natterer bdf6b48138 app: move GimpTempBuf from base/ to core/
and forget about include policy in base/, it's scheduled for removal
anyway.
2012-05-02 17:51:01 +02:00
Michael Natterer dccb909009 app: make GimpTempBuf reference counted
and remove the "take_ownership" parameter from
gimp_temp_buf_create_buffer(), simply always ref the buf.
2012-05-02 17:51:00 +02:00
Michael Natterer d5d8e36d21 app: gimp_-namespace all GimpTempBuf functions 2012-05-02 17:51:00 +02:00
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer 7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
Michael Natterer c173328a9a app: remove "dest" parameter from temp_buf_copy() and always return a new copy
Also remove the color conversion functions in temp-buf.c
2012-05-02 17:50:58 +02:00
Michael Natterer ff86f85744 app: remove x, y and color parameters from temp_buf_new()
Fix the places that passed the color by either temp_buf_data_clear()
or memset(), and assign x and y manually, they are going to vanish
completely soon.
2012-05-02 17:50:58 +02:00
Alexia Death 2528f656b5 app: remove call to possibly buggy and un-needed scale clamp
It's likely that the removed call and function were causing
random drawing artefacts, but as this was once in a blue
moon bug, I have just a guess to go by however, testing
revealed no regressions, so pushing.
2011-09-10 21:47:52 +03:00
Michael Natterer 5a4a741936 app: virtualize GimpBrush::begin_use() and ::end_use() 2011-04-12 13:59:04 +02:00
Michael Natterer 391c74899c app: rename gimp_brush_start_use() to gimp_brush_begin_use() 2011-04-12 09:06:22 +02:00
Michael Natterer 3ab59f1bff app: don't try to add a NULL boundary to GimpBrush's boundary cache 2011-04-08 21:22:55 +02:00
Michael Natterer 21b8007b29 app: add GimpBrushCache which stores brush stuff based on transform parameters
such as masks and outlines. The cache is currently very stupid and
only cacheds the last transformed object. Add caches to GimpBrush for
its mask, its pixmap and its boundary, and remove the same caches and
a ton of members from GimpBrushCore. This involves adding lots of
const qualifiers because GimpBrush returns const pointers now for
trasnformed stuff.
2011-04-05 22:15:30 +02:00
Michael Natterer e2226e9933 app: add gimp_brush_start_use() and gimp_brush_end_use()
and use them in GimpBrushCore when setting/unsetting a brush. They
will be used for managing some caches inside GimpBrush.
2011-04-05 19:18:26 +02:00
Michael Natterer c8c1b4ece6 app: remove gimp_brush_spacing_changed(), it should never have been public 2011-04-05 19:09:56 +02:00
Michael Natterer cf52b10e9b app: implement gimp_brush_transform_boundary()
There is infinite room for optimization, but the API and pixel-perfect
functionality is there, which is step one.
2011-04-04 21:11:39 +02:00
Michael Natterer 9e1db5dc92 app: add empty stub gimp_brush_transform_boundary()
as a separate commit because it reindents the entire header.
2011-04-04 19:21:25 +02:00
Michael Natterer ac9b487795 app: fix GimpBrush transform parameter names and coding style 2011-04-04 18:57:48 +02:00
Alexia Death 452819143a app: half-sane aspect ratio implementation 2011-01-25 23:28:02 +02:00
Michael Natterer eb04265ce3 app: gimp_brush_core_clamp_brush_scale() -> gimp_brush_clamp_scale() 2011-01-17 23:20:49 +01:00
Michael Natterer c9bde335f0 app: don't additionally ref the standard data objects
Instead, set their statically remembered pointer as a weak pointer so
it's nullified automatically if they are ever finalized. Doesn't
actually get rid of them upon exit yet, this is just a preparation.
2010-06-24 18:38:16 +02:00
Michael Natterer 4fcf34699f app: flip context and name parameters in GimpDataNewFunc 2010-04-10 19:55:42 +02:00
Michael Natterer 430b0e5517 app: add a GimpContext parameter to all functions which create GimpData
and pass a context whereever needed. Fix up gimp_tool_preset_new()
to actually make a copy of the context's active tool's options.
2010-04-05 13:26:31 +02:00
Alexia Death 9774988f30 Real dynamic hardness support for both generated and pixmap brushes.
For generated brushes, dynamic input is applied on top of the set hardness as a factor.
For pixmaps, it influences the amount of blur applied to the stamp. Be warned, process is slow
for large pixmaps. The odd feature previously advertised as hardness is left in but disabled.
If I figure out what it should be exposed as, it might be made available again.
2010-01-01 15:54:31 +02:00
Michael Natterer 22767ca7b8 Seal GimpData completely and add the missing accessors 2009-10-31 18:48:38 +01:00
Michael Natterer 5a145ae4c3 Whitespace cleanup that reduces the diff against master 2009-10-12 13:00:16 +02:00
Alexia Death 04bad5609a Move scale limit so it does not bother generated brushes. 2009-10-11 12:17:29 +03:00
Alexia Death 2656875953 Remove the silly ratio limit from scale and just make sure that transformation result is at least 1px 2009-10-11 10:57:13 +03:00
Martin Nordholts 957cf2cfa9 app: Always use gimp_object_get_name()
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
2009-08-29 12:41:29 +02:00
Michael Natterer e0453b44b1 Make some GimpCoords* params const
Add const to GimpCoords* params in GimpBrush::select_brush() and
want_null_motio().
2009-05-19 21:37:56 +02:00
Stephen Griffiths 40fde28a62 Add status bar feedback for keyboard changes to brush paramaters.
* app/actions/context-commands.c:
include core/gimptoolinfo.h
include pain/gimppaintoptions.h

context_opacity_cmd_callback()
context_brush_spacing_cmd_callback()
context_brush_spikes_cmd_callback()
context_brush_hardness_cmd_callback()
context_brush_aspect_cmd_callback()
use 'action_select_property()' for statusbar feedback

* app/core/gimpbrush.c: added translable string for brush spacing
* app/paint/gimppaintoptions.c: add blurb to prop double brush-aspect-ratio
2009-05-16 15:34:41 +02:00
Alexia Death 6aafd34380 Adds dynamic aspect ratio for brushes. 2009-04-25 20:53:09 +03:00
Sven Neumann 306374a851 Bug 99457 – Support for dynamics on tilt
2009-02-14  Sven Neumann  <sven@gimp.org>

	Bug 99457 – Support for dynamics on tilt

	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrush-transform.[ch]
	* app/paint/gimpbrushcore.c
	* app/paint/gimpsmudge.c: applied patch from Alexia Death,
	separates brush scaling for x and y.


svn path=/trunk/; revision=28036
2009-02-14 22:00:48 +00:00
Sven Neumann 30c118b53c Bug 520078 – Rotate brushes
2009-02-05  Sven Neumann  <sven@gimp.org>

	Bug 520078 – Rotate brushes

	Applied patch from Alexia Death:

	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrush-transform.[ch]: affine transformations for
	brushes. So far only scaling and rotation is supported. The
	transformation is done using nearest-neighbour. This is a
	regression and we need to add back interpolation before the next
	release.

	* app/paint/gimpsmudge.c
	* app/paint/gimppaintoptions.[ch]
	* app/paint/gimpbrushcore.[ch]: allow to control the brush
	rotation angle.

	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimpbrushtool.c: added UI for controlling the
	brush rotation angle.

	* app/actions/tools-actions.c
	* app/actions/tools-commands.[ch]: add actions for controlling 
the
	brush rotation angle.


svn path=/trunk/; revision=27987
2009-02-05 21:47:57 +00:00
Martin Nordholts 2716d25dd5 Rename brush stuff with 'scale' to 'transform'.
Applied patch from Alexia Death that prepares brushes for
arbitrary transforms by renaming stuff with 'scale' to
'transform'. Takes us one step closer to fixing bug #520078.

* app/core/gimpbrush.[ch]
* app/core/gimpbrushgenerated.c
* app/paint/gimpbrushcore.[ch]
* app/paint/gimpsmudge.c

* app/core/gimpbrush-transform.[ch]: New names of
* app/core/gimpbrush-scale.[ch]

* app/core/Makefile.am: Update.

svn path=/trunk/; revision=27975
2009-02-01 11:08:22 +00: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
Martin Nordholts 364d2cd84f Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimpdata.c: Implement GimpTagged::get_identifier() and
GimpTagged::get_checksum().

* app/core/gimpbrush.c: 
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: Implement GimpTagged::get_checksum().
They all use the GimpData implementation of
GimpTagged::get_identifier().

svn path=/trunk/; revision=27784
2008-12-13 11:58:24 +00:00
Martin Nordholts ddaa0b48ec s/temp_buf_data/temp_buf_get_data/
* app/base/pixel-region.c
* app/base/temp-buf.c
* app/base/temp-buf.h
* app/core/gimpbrush-load.c
* app/core/gimpbrush-scale.c
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpgradient.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern-load.c
* app/core/gimppattern.c
* app/core/gimppreviewcache.c
* app/core/gimpviewable.c
* app/paint-funcs/paint-funcs-generic.h
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimpink.c
* app/paint/gimppaintbrush.c
* app/pdb/brush-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/drawable-cmds.c
* app/pdb/image-cmds.c
* app/pdb/pattern-cmds.c
* app/pdb/patterns-cmds.c
* app/text/gimpfont.c
* app/tools/gimpiscissorstool.c
* app/vectors/gimpvectors-preview.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimppatternselect.c
* app/widgets/gimpviewrenderer.c

svn path=/trunk/; revision=27782
2008-12-13 10:35:53 +00:00
Martin Nordholts 70ed5218d6 Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimpdata.[ch] (gimp_data_make_internal): Add an
'identifier' parameter/instance struct member that can be used to
identify the internal GimpData object across sessions. It is the
internal-object counterpart to a file path.

* app/core/gimp.c
* app/core/gimpcurve.c
* app/core/gimpbrush.c
* app/core/gimppattern.c
* app/core/gimppalette.c
* app/core/gimpgradient.c
* app/core/gimp-gradients.c: Assign an identifier to the the
internal GimpData objects.

svn path=/trunk/; revision=27781
2008-12-12 07:03:42 +00:00