Michael Natterer
2c62644f94
app: BoundSeg -> GimpBoundSeg, boundary_foo() -> gimp_boundary_foo()
2012-05-02 17:46:02 +02:00
Massimo Valentini
39368a410d
plugged memory leaks
2012-02-07 17:32:02 +01:00
Michael Natterer
d38ded387d
Bug 663121 - guides are below rotate/transform/shear/perspective preview
...
Add a canvas item group for previews, and a small preview infrastructure
to GimpDrawTool, and put the transform preview into the preview group,
which is below all guides, grid and layer boundaries.
2011-11-16 21:32:29 +01:00
Michael Natterer
ffc9948d6e
app: add a canvas group for tool items
...
so we can control where in the canvas item stack they appear.
Put the group right below the software cursor.
2011-11-16 21:10:43 +01:00
Michael Natterer
c2e6f24687
app: add GimpCanvasTransformGuides and use them in the transform tool
...
which removes a lot of code from the transform tool, and reduces the
number of canvas items used for the transform grid from possibly
gazillions to one.
2011-07-24 18:42:13 +02:00
Michael Natterer
be5c0df173
app: add "n-lines" property to GimpCanvasRectangleGuides
...
and add handling of the N_LINES guides type. Hardcode "4" in
GimpdrawTool for now, it's currently unused anyway.
2011-07-24 17:49:31 +02:00
Michael Natterer
8b57ef51cc
app: clean up the new brush outline stuff a bit
2011-06-30 09:27:43 +02:00
Alexia Death
3c3657f780
app: Refactor path code to support styles and add outline style for use in brush outline
2011-06-29 23:05:14 +03:00
Michael Natterer
4e6f43a890
app: add new item class GimpCanvasRectangleGuides and use it
...
Removes a lot of code from the rectangle tool and fixes off-by-one
drawing problems because in image coordinates, lines can't be aligned
correctly with rectangles.
2011-05-22 22:09:09 +02:00
Michael Natterer
b04c6889ac
app: remove the STRICT_TOOL_CHECKS define and ifdefs
...
Tools behave more predictably than before already, and whatever
remaining warnings will be sorted out before 2.8.
2011-04-16 20:21:52 +02:00
Michael Natterer
99e0e73fc6
app: add "x" and "y" properties to GimpCanvasPath
...
so paths can be rendered at any position. Pass 0,0 from all places
that draw GimpVectors.
2011-04-04 20:58:38 +02:00
Michael Natterer
e1bc19faf6
app: make state checks on tool much more strict
...
so wrong calls will run into precondition checks and warnings. This is
optional, but currently enabled, to reduce the risk of introducing
permanent new warnings for 2.8. See STRICT_TOOL_CHECKS in gimptool.h.
2011-04-01 22:56:32 +02:00
Michael Natterer
20bed2c609
app: add gimp_draw_tool_add_transform_preview() and use it
2011-03-28 02:18:00 +02:00
Michael Natterer
7a3dc6ee38
app: remove unused #includes
2010-11-15 00:23:18 +01:00
Michael Natterer
63fcfb15a2
app: use the new shifting API instead of reimplementing it
2010-11-09 11:32:40 +01:00
Michael Natterer
5b64b83569
app: introduce enum GimpHandleAnchor as replacement for GtkAnchorType
...
because the latter is gone in GTK+ 3.0
2010-10-18 12:50:17 +02:00
Michael Natterer
11bc11d2f7
app: add back the draw timeout
2010-10-11 22:27:32 +02:00
Michael Natterer
3de4d7263a
app: Bug 631619 - Drawing artifacts spread by paintbrush outline on canvas
...
Add a transform matrix to GimpCanvasBoundary and get rid of the whole
BoundSeg transform code in boundary.c and gimpbrushcore.c, it was
impossible to get this right on that level. Also fix te extents of
GimpCanvasBoundary os it leaves no artifacts.
2010-10-09 22:00:19 +02:00
Michael Natterer
54a65fa9c3
app: add gimp_draw_tool_add_path() and use it in the vector tool
...
Also clean up gimp_vector_tool_draw() a bit.
2010-10-07 14:10:57 +02:00
Michael Natterer
4151d9f693
app: some draw tool cleanup
...
- call undraw() from draw() instead of duplicating its code
- merge clear_items() into undraw()
2010-10-04 23:31:25 +02:00
Sven Neumann
8587e1e920
app/tools: introduce gimp_draw_tool_add_crosshair()
...
gimp_draw_tool_add_crosshair() is a convenience function that
adds two intersecting guide lines in a stroke group.
2010-10-04 22:02:12 +02:00
Michael Natterer
b693269060
app: simplify creating of stroke and fill groups a lot
...
- add gimp_draw_tool_push_group()/pop_group() which manage a stack
of groups; all items automatically get added to the stack's top group
- use push_group()/pop_group() all over the place, which saves a lot
of code in most cases
- return GimpCanvasGroup not GimpCanvasItem pointers from
gimp_draw_tool_add_stroke_group() and fill_group()
Unrelated:
- add GipmCanvasGroup parameter to gimp_rectangle_tool_draw()
- put rect select's round corners into the stroke group to
avoid ugly overdrawing (the mis-alignment of arcs becomes
very visible now however, will fix that soon)
2010-10-04 14:03:37 +02:00
Michael Natterer
64d9d76722
app: gimp_draw_tool_add_arc() pass the "filled" parameter down to the item
...
instead of always passing FALSE.
2010-10-04 13:58:29 +02:00
Michael Natterer
d88a348c18
app: add public API for the "guide-style" and "sample-point-style" properties
...
of the guide and sample point canvas items. They are too obscure to
additionally hide them, and these items are used rarely enough to
justify the additional parameter to the new() functions.
2010-10-03 22:14:40 +02:00
Michael Natterer
f3450431a3
app: add a pen canvas item class and use it in the foreground select tool
...
Remove gimp_display_shell_draw_pen().
2010-10-03 02:26:40 +02:00
Michael Natterer
33ab94517f
app: add gimp_draw_tool_add_stroke_group() and add_fill_group()
...
and use it in all tools which have groups.
2010-10-01 14:24:46 +02:00
Michael Natterer
201bfe3e25
app: add a "shell" property to GimpCanvasItem
...
and pass it to all constructors. The GimpDisplayShell is needed
because items are going to become more powerful soon.
2010-10-01 14:13:45 +02:00
Michael Natterer
2ced18cc87
app: add gimp_draw_tool_add_sample_point()
...
and use it in the color tool. Also rename
gimp_draw_tool_add_guide_line() to gimp_draw_tool_add_guide().
2010-09-30 02:03:16 +02:00
Michael Natterer
7edfa2ca54
app: start an infrastructure where the shell keeps around its canvas items
...
- Invalidate the proper area when an item gets added or removed.
- Draw the kept canvas items instead of calling a draw tool function.
- The draw tool now sets its item on the shell.
2010-09-29 22:12:01 +02:00
Michael Natterer
ebeb933350
app: add gimp_display_shell_expose_item() and use it in the draw tool
2010-09-29 20:10:21 +02:00
Michael Natterer
b173707c84
app: add gimp_draw_tool_remove_item()
2010-09-26 14:15:47 +02:00
Michael Natterer
970a062b01
app: argh! never add even only one line of code without testing...
2010-09-26 00:30:09 +02:00
Michael Natterer
b3af235e79
app: rename all gimp_draw_tool_draw_foo() functions
...
to gimp_draw_tool_add_foo() because that's what they do now.
2010-09-25 19:02:22 +02:00
Michael Natterer
5089b9a706
app: remove gimp_draw_tool_in_radius()
...
It was used only once and that code is not less readable when using
gimp_draw_tool_calc_distance_square().
2010-09-25 18:24:38 +02:00
Michael Natterer
dfd5a265eb
app: remove gimp_draw_tool_draw_dashed_line()
...
Instead, draw a normal line and set the "highlight" property on the
returned canvas item.
2010-09-25 18:04:40 +02:00
Michael Natterer
e91dce5f9f
app: remove gimp_draw_tool_draw_arc_by_anchor()
...
Instead, draw a circular handle and set the angles on the returned
canvas item.
2010-09-25 17:59:56 +02:00
Michael Natterer
5cda4393d0
app: return the created item from gimp_draw_tool_draw_foo()
2010-09-25 17:52:56 +02:00
Michael Natterer
02924e1e70
app: change the unit of angles in the draw tool's draw_arc() functions
...
from the weird X 1/64 of a degree to radian.
2010-09-25 17:35:40 +02:00
Michael Natterer
df44ced093
app: keep the draw tool's items around in a GimpCanvasGroup
...
which reduces the number of invalidations on the canvas to one.
2010-09-25 17:20:08 +02:00
Michael Natterer
62f8f559a7
app: add gimp_draw_tool_add_item() and use it all over the place
2010-09-25 11:19:00 +02:00
Michael Natterer
cbaf997ae2
app: undraw the old canvas items only before drawing new ones
...
or when the draw tool is really stopped. This seems to get rid of any
remaining flickering and also reduces expose events. Also get rid of
the "is_drawn" state and API because they make no sense any longer.
2010-09-24 23:25:19 +02:00
Michael Natterer
5d14e9befc
app: move clearing and invalidating canvas items to utility functions
2010-09-24 21:25:01 +02:00
Michael Natterer
313f8bee1e
app: remove "gboolean use_cairo" from the draw tool again
...
It's always TRUE now.
2010-09-24 21:14:49 +02:00
Michael Natterer
a5c961ae6f
app: remove the last traces of gimp_canvas_draw_foo() from the draw tool
2010-09-24 20:40:02 +02:00
Michael Natterer
957acb42e8
app: add support for cairo text cursor drawing
2010-09-24 20:35:14 +02:00
Michael Natterer
e7f1d444c3
app: remove much more dead code paths from the draw tool and the canvas
2010-09-24 19:08:19 +02:00
Michael Natterer
67708a65a1
app: add support for cairo arcs
2010-09-24 18:42:36 +02:00
Michael Natterer
6fb802f77b
app: add draw tool support for cairo corners
2010-09-24 10:50:44 +02:00
Michael Natterer
41c338ce93
app: remove XOR drawing code paths which are now dead
2010-09-24 02:11:04 +02:00
Michael Natterer
1c550d4623
app: suppose arc slices
2010-09-24 01:32:57 +02:00