d7cb20b0d5
app: add group filling support to GimpCanvasItem and GimpCanvasGroup
...
The code is almost identical to the group stroking feature.
2010-09-27 22:59:36 +02:00
50a34c230a
app: Changed tool display colors and opacities
2010-09-27 20:08:49 +03:00
7db14ffca9
app: remove gimp_display_shell_transform_coords()
2010-09-26 23:09:23 +02:00
3b7999a218
app: remove gimp_display_shell_transform_points()
2010-09-26 23:06:35 +02:00
7ed79e9fe1
app: fix off-by-0.5 in boundary drawing
...
which doesn't seem to have any visual effect...
2010-09-26 23:00:23 +02:00
06da10bc08
app: change boundary drawing by tools to work like the selection
...
- GimpCanvasBoundary takes unsorted BoundSeg arrays now and uses
gimp_display_shell_transform_boundary() and gimp_cairo_add_boundary().
- Nobody calls boundary_sort() any longer for the purpose of displaying
a boundary.
- gimp_display_shell_transform_boundary() got offset parameters
so it can transform things that are not in the image's coordinate
system.
2010-09-26 22:41:04 +02:00
0e17e44ba4
app: move code from GtkObject::destroy() to GObject::dispose()
2010-09-26 22:35:49 +02:00
1d17042efb
app/display: don't evaluate alpha value several times
...
The GIMP_CAIRO_ARGB32_SET_PIXEL() macro will evaluate the alpha
parameter multiple times, so we better calculate alpha beforehand.
2010-09-26 22:25:49 +02:00
2f3c6af28b
app/display: fix cairo drawing of transform tool image preview
...
Don't access the cairo image surface directly, instead use the
GIMP_CAIRO_ARGB32_SET_PIXEL() macro that takes care of
pre-multiplying the colors by the pixels alpha component.
2010-09-26 22:15:07 +02:00
c3102bde81
app: move the GimpCanvasGroup typedef to display-types.h
2010-09-26 19:20:14 +02:00
b0a22bc285
app: change the default item line cap to round
...
but add and API to configure it and set it to suare for handles which
are always axis-aligned.
2010-09-26 17:40:10 +02:00
f284e5f748
app: don't draw the draw tool's items to the wrong display
2010-09-26 16:56:26 +02:00
e6ce564de4
app: add an infrastructure that allows to stroke multiple items at once
...
In order to avoid visually overlapping lines:
- GimpCanvasItem got a "suspend_stroking" API that allows to skip
stroking and instead starts a new sub-path
- GimpCanvasGroup got a "group_stroking" API that sets suspend_stroking
on all its children and does one stroke after calling all items'
draw().
2010-09-26 14:12:54 +02:00
e074d4d151
app: move the GimpCanvasItem typedef to display-types.h
2010-09-25 17:17:02 +02:00
349c1500c9
app: add a canvas group item which keeps around sub-items
...
It can draw them all with one call to draw() and returns a union of
their extents via get_extents().
2010-09-25 17:14:57 +02:00
e89650edd9
app: fix size of outside corner handles
2010-09-25 00:02:26 +02:00
e8d46f7098
app: fix GimpCanvasArc's extents so it doesn't leave artifacts
2010-09-24 22:55:54 +02:00
d6f035a934
app: bye bye XOR :D
2010-09-24 21:03:51 +02:00
225d22473e
app: add a text cursor canvas item class
2010-09-24 20:34:21 +02:00
e7f1d444c3
app: remove much more dead code paths from the draw tool and the canvas
2010-09-24 19:08:19 +02:00
9c7cd6d41c
app: fix canvas arc extents
2010-09-24 18:54:50 +02:00
4e5d47dcbf
app: add an arc canvas item class
2010-09-24 18:41:57 +02:00
74fe162f93
app: move adding an arc path out to a utility function
2010-09-24 13:12:34 +02:00
e98a20c158
app: increase max corner size
2010-09-24 13:11:54 +02:00
870faec210
app: fix bounding box calculation for lines that are not axis-aligned
...
because the square caps make these line extend up to
sqrt(1.5^2 + 1.5^2) beyond the end points.
2010-09-24 11:21:44 +02:00
a29a7ec4a2
app: add a corner canvas item class
2010-09-24 10:50:05 +02:00
41c338ce93
app: remove XOR drawing code paths which are now dead
2010-09-24 02:11:04 +02:00
6ebc29818e
app: add arc slices to GimpCanvasHandle
2010-09-24 01:32:09 +02:00
483efcbff5
app: add a boundary canvas item class
...
This can be done much better, but this one kindof works for now.
2010-09-23 23:38:27 +02:00
d1d89e0dde
app: add a "highlight" mode for the tool FG style
...
such a hack, but looks better than dashed lines
2010-09-23 19:25:22 +02:00
74bc42edf3
app: implement square handles
2010-09-23 19:24:40 +02:00
8dbab53fae
app: add a guide line canvas item class
2010-09-23 19:24:16 +02:00
612aee9f33
app: change segment drawing to using pixel centers and CAP_SQUARE line ends
...
This looks exactly the same for the selection, but is needed like that
for segment drawing in tools.
2010-09-23 19:24:10 +02:00
ddc63de6d6
app: remove "gboolean use_offsets" from gimpdisplayshell-transform.[ch]
2010-09-23 19:24:04 +02:00
7c82f3dc09
app: add gimp_canvas_polygon_new_from_coords()
...
and use it from gimp_draw_tool_draw_strokes().
2010-09-23 00:40:32 +02:00
c80cea5937
app: proper line caps and joins for canvas items
2010-09-23 00:19:44 +02:00
5f349c352f
app: nicer fill style for canvas items
...
Let's see if this works for anything else but filled handles
2010-09-23 00:11:49 +02:00
c058ec93ee
app: temporarily enable double buffering unconditionally
2010-09-23 00:11:18 +02:00
4bedffd2cf
app: add a polygon canvas item class (filled polygons unimplemented)
2010-09-23 00:00:57 +02:00
f719cf1ea2
app: implement circle handles
2010-09-23 00:00:57 +02:00
ddcd5a6983
app: workaround warning about empty private struct
2010-09-22 23:38:08 +02:00
1ea16c0770
app: draw the active tool's stuff in the display expose handler
2010-09-22 22:24:22 +02:00
284403d99e
app: fix width and height properties to allow negative sizes
2010-09-22 21:45:33 +02:00
d0f6846ff5
app: remove premature canvas item extents caching optimization again
2010-09-22 10:33:41 +02:00
de2ae87047
app: add GimpCanvasHandle which draws tool handles
...
Currently only a centered cross is implemented.
2010-09-21 19:22:29 +02:00
69da253e51
app: move enum GimpHandleType to display-enums.h
2010-09-20 19:26:34 +02:00
5e5cacfd4c
app: fix canvas line extents
2010-09-19 23:50:35 +02:00
46836d950d
app: add a canvas line class
2010-09-19 23:46:52 +02:00
f17cc0093d
app: minor cleanup and fixes
2010-09-19 23:46:06 +02:00
96bdf1fec5
app: refactor the canvas items to return a GdkRegion as extents
...
instead of invalidating the canvas themselves.
2010-09-19 23:20:36 +02:00