Commit Graph

3543 Commits

Author SHA1 Message Date
3fbbb9b333 app: GimpMotionBuffer API cleanup and refactoring
- start_stroke()/finih_stroke() -> begin_stroke()/end_stroke()
- process_event_queue() -> process_stroke()
- GimpMotionBuffer::motion() -> GimpMotionBuffer::stroke()
- add GimpMotionBuffer::hover() and process_hover()
- remove push_event_history() and pop_event_queue() from API

The thing works like this:

- Motion events are continuously fed into the buffer using motion_event()
- begin_stroke()/end_stroke() correspond to BUTTON_PRESS/BUTTON_RELEASE,
  the period between them is a "stroke"
- If motion_event() returns TRUE, we request "stroke" signals by calling
  process_stroke() and "hover" signals by calling process_hover()
2011-04-18 11:08:24 +02:00
99f5dc9f18 app: move GimpCagePoint from core-types.h to gegl/
and remove the orphaned GimpCagePreview typedef from gimp-gegl-types.h.
2011-04-18 00:09:06 +02:00
6a1b93be1c app: don't include "libgimpmath/gimpvectors.h" in any header
It's types are generally known because it's already included
in core-types.h.
2011-04-17 23:44:45 +02:00
334e4c5d71 app: move process_event_queue() and flush_event_queue() to GimpMotionBuffer
and emit the buffer's "motion" signal when a motion is supposed
to happen. In GimpDisplayShell, connect to GimpMotionBuffer::motion()
and call the tool.
2011-04-17 21:46:29 +02:00
ede0d26b91 app: gimp_data_create_filename(): avoid evil characters in the filename
such as forbidden ones on various platforms. List collected on #gimp
with a fair portion of paranoia involved.
2011-04-13 21:25:10 +02:00
846cc27207 app: implement begin_use()/end_use() in GimpBrushPipe
and call it on all the pipe's sub-brushes
2011-04-12 13:59:39 +02:00
5a4a741936 app: virtualize GimpBrush::begin_use() and ::end_use() 2011-04-12 13:59:04 +02:00
391c74899c app: rename gimp_brush_start_use() to gimp_brush_begin_use() 2011-04-12 09:06:22 +02:00
f7646fd171 app: gimpdrawable-stroke.c: don't try to fill a dot or a line 2011-04-10 22:43:03 +02:00
0f91a11b75 app: use GimpBezierDesc in gimp_channel_select_vectors() too 2011-04-10 22:42:39 +02:00
f316269f71 app: stroke vectors by gimp_vectors_get_bezier(); gimp_scan_convert_add_bezier() 2011-04-10 19:40:40 +02:00
bb9efebbaf app: use the new GimpBezierDesc APIs for stroking a selection
instead of iterating the BoundSegs menually.
2011-04-10 19:19:43 +02:00
8c3698eccc app: add gimp_bezier_desc_translate() which translates all points
Also add back an internal "gboolean closed" parameter which I removed
when copying the function, it might be useful later and doesn't hurt.
2011-04-10 19:16:31 +02:00
1a4ffb3d21 app: add gimp_scan_convert_add_bezier() which adds a GimpBezierDesc
Also remove unused member num_nodes.
2011-04-10 19:07:04 +02:00
3ab59f1bff app: don't try to add a NULL boundary to GimpBrush's boundary cache 2011-04-08 21:22:55 +02:00
6e65d1a392 app: coding styls cleanup in core/gimpbrush-transform.[ch] 2011-04-08 21:18:39 +02:00
71541db52d app: Make scale timer output depend on GIMP_UNSTABLE 2011-04-08 14:04:36 +02:00
a83876040d app: make GimpBrushCache debug spew depend on GIMP_LOG=brush-cache 2011-04-06 09:15:50 +02:00
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
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
c8c1b4ece6 app: remove gimp_brush_spacing_changed(), it should never have been public 2011-04-05 19:09:56 +02:00
054957a1ee app: s/nbrushes/n_brushes/ in GimpBrushPipe 2011-04-05 15:16:06 +02:00
7db7cc111c app: clean up gimpbrush-boundary.c a bit and prepare for outline approximation 2011-04-05 14:52:44 +02:00
eda5cdf666 app: add gimp_bezier_desc_new_from_bound_segs() to GimpBezierDesc
and remove that code from gimpbrush-boundary.c
2011-04-04 22:06:32 +02:00
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
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
ac9b487795 app: fix GimpBrush transform parameter names and coding style 2011-04-04 18:57:48 +02:00
8b4870dad7 app: move GimpBezierDesc from app/vectors/ to app/core/ 2011-04-04 18:40:12 +02:00
6d73eead54 app: emit "notify::tool-options" when GimpToolPreset's options change
Fixes the "dirty" state and thus saving of modified presets.
2011-04-03 19:34:31 +02:00
8bbc475eab Revert "app: initialize GimpToolPreset's tool options from the user context"
This reverts commit b458b1b5c0.

This hides preset errors form users and creates confusion in case
of presets with bugs distributed among users. It also tries to set
resources from user context when that context doesnt exist yet.
2011-04-03 12:34:52 +03:00
b458b1b5c0 app: initialize GimpToolPreset's tool options from the user context
so that if deserializing wants to set an unknown brush, pattern etc.,
the previously set default value will be used instead.
2011-04-03 00:47:41 +02:00
f7bb4afbd8 app: add gimp_image_pick_layer_by_bounds() and use it in GimpAlignTool
Also do some refactoring in the align tool, like adding
gimp_align_tool_halt() and using it to shut down the tool.
2011-03-29 13:58:23 +02:00
c38eb0df4a app: core-enums.h: fix type macros of the align type enums 2011-03-29 12:45:54 +02:00
babc2186c5 app: move the enum of indexes into the trans_info array to the .c files
and turn #defines from 0 to N into enums.
2011-03-28 00:50:46 +02:00
eb4f01039a app: add utility function gimp_transform_polygon_is_convex()
and use it in GimpTransformTool and GimpCanvasTransformPreview.
2011-03-27 22:04:33 +02:00
92aeeadecf app: remove unused macros from gimpdrawable-transform.c 2011-03-27 16:53:48 +02:00
88ee23aa29 app: move some of the new tile offset variables to local scopes 2011-03-26 18:37:34 +01:00
047d31fa68 app: gimp_drawable_transform: place new the tiles at offset_x, offset_y
and not at offset_y, offset_y (typo).
2011-03-26 16:50:38 +01:00
bc8d5f84d6 app: remove the "offset" API from TileManager
It made the transform code hard to read and never belonged into the
tile manager anyway. It's a simple pixel buffer that should not know
about any position in an image. Instead, pass around the offsets of
tile managers explicitly, so everything is less obscure for the price
of having more parameters. This will also help replacing TileManagers
with GeglBuffers.
2011-03-26 08:30:15 +01:00
41ab7d8e10 Remove broken include 2011-03-26 10:55:21 +05:30
b590804212 app: move GimpFilteredContainer's match logic to a utility function 2011-03-24 13:10:43 +01:00
aec66d0c26 app: make GimpTaggedContainer properly memory manage the filter list
instead of leaking it. Also make the fact that tags in the list can
validly be NULL obvious by adding utility functions
gimp_tag_or_null_ref/unref().
2011-03-24 12:28:45 +01:00
ac7aab2376 app: forgot to remove member GimpTaggedContainer:src_container 2011-03-24 09:43:21 +01:00
d64eae8c4e app: use gimp_tagged_has_tag() instead of imlementing the same
and some general cleanup.
2011-03-24 09:17:44 +01:00
39d2067058 app: add gimp_tagged_has_tag(), and some cleanup in GimpTagged 2011-03-24 09:17:39 +01:00
f2d5831ee2 app: virtualize the add/remove/freeze/thaw logic of GimpFilteredContainer
and derive GimpTaggedContainer from it, removing a lot od code
dupliucation.
2011-03-23 22:12:49 +01:00
014a333d27 app: fix GimpTaggedContainer's base class
And make it use the sort_func from the src_container which must
now be a GimpList (which is likely temporary).
2011-03-23 21:51:56 +01:00
b49fdd4fd0 app: fix GimpTaggedContainer to work with multiple views
Refactor the container so it dynamically inserts/removes items when
their tags change, rather than implicitly relying on the filter logic
that was only triggered when the view called set_filter(). Before,
another view on the same original container would not update
automatically.
2011-03-23 20:57:04 +01:00
2aeac1cf4e Merge branch 'soc-2010-cage-2' 2011-03-23 20:07:17 +01:00
91195e8593 app: remove the old tool presets system
Instead, keep around a GimpFilteredContainer in GimpToolInfo that
maintains a per-tool list of presets from the global preset factory.
Turn the tool options dialog's preset Save/Restore/Edit/Delete menus
and buttons into shortcuts for managing the active tool's presets.
2011-03-23 09:27:29 +01:00