Commit graph

2016 commits

Author SHA1 Message Date
Michael Natterer
225d22473e app: add a text cursor canvas item class 2010-09-24 20:34:21 +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
9c7cd6d41c app: fix canvas arc extents 2010-09-24 18:54:50 +02:00
Michael Natterer
4e5d47dcbf app: add an arc canvas item class 2010-09-24 18:41:57 +02:00
Michael Natterer
74fe162f93 app: move adding an arc path out to a utility function 2010-09-24 13:12:34 +02:00
Michael Natterer
e98a20c158 app: increase max corner size 2010-09-24 13:11:54 +02:00
Michael Natterer
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
Michael Natterer
a29a7ec4a2 app: add a corner canvas item class 2010-09-24 10:50:05 +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
6ebc29818e app: add arc slices to GimpCanvasHandle 2010-09-24 01:32:09 +02:00
Michael Natterer
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
Michael Natterer
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
Michael Natterer
74bc42edf3 app: implement square handles 2010-09-23 19:24:40 +02:00
Michael Natterer
8dbab53fae app: add a guide line canvas item class 2010-09-23 19:24:16 +02:00
Michael Natterer
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
Michael Natterer
ddc63de6d6 app: remove "gboolean use_offsets" from gimpdisplayshell-transform.[ch] 2010-09-23 19:24:04 +02:00
Michael Natterer
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
Michael Natterer
c80cea5937 app: proper line caps and joins for canvas items 2010-09-23 00:19:44 +02:00
Michael Natterer
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
Michael Natterer
c058ec93ee app: temporarily enable double buffering unconditionally 2010-09-23 00:11:18 +02:00
Michael Natterer
4bedffd2cf app: add a polygon canvas item class (filled polygons unimplemented) 2010-09-23 00:00:57 +02:00
Michael Natterer
f719cf1ea2 app: implement circle handles 2010-09-23 00:00:57 +02:00
Sven Neumann
ddcd5a6983 app: workaround warning about empty private struct 2010-09-22 23:38:08 +02:00
Michael Natterer
1ea16c0770 app: draw the active tool's stuff in the display expose handler 2010-09-22 22:24:22 +02:00
Michael Natterer
284403d99e app: fix width and height properties to allow negative sizes 2010-09-22 21:45:33 +02:00
Michael Natterer
d0f6846ff5 app: remove premature canvas item extents caching optimization again 2010-09-22 10:33:41 +02:00
Michael Natterer
de2ae87047 app: add GimpCanvasHandle which draws tool handles
Currently only a centered cross is implemented.
2010-09-21 19:22:29 +02:00
Michael Natterer
69da253e51 app: move enum GimpHandleType to display-enums.h 2010-09-20 19:26:34 +02:00
Michael Natterer
5e5cacfd4c app: fix canvas line extents 2010-09-19 23:50:35 +02:00
Michael Natterer
46836d950d app: add a canvas line class 2010-09-19 23:46:52 +02:00
Michael Natterer
f17cc0093d app: minor cleanup and fixes 2010-09-19 23:46:06 +02:00
Michael Natterer
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
Michael Natterer
69a898cc9f app: some cairo tool drawing infrastructure for review, please have a look 2010-09-19 19:45:51 +02:00
Michael Natterer
11aecbd090 app: add styles for tool drawing (still unused) 2010-09-19 19:19:24 +02:00
Michael Natterer
f04e16016f app: draw inactive paths blue on white 2010-09-19 19:14:42 +02:00
Michael Natterer
7e28f52dd7 app: remove unused clipping functions in GimpDrawTool and GimpCanvas 2010-09-19 18:58:23 +02:00
Michael Natterer
8a029f3e4e app: enable double buffering when editing vectors 2010-09-17 23:12:42 +02:00
Michael Natterer
cca9257018 app: add functions to set the vectors' cairo style
so all style constants are in one place. Also draw the active path in
red on white instead of black on white.
2010-09-17 22:50:20 +02:00
Michael Natterer
8e33205b65 app: draw all vectors strokes with one cairo_stroke() 2010-09-17 22:30:43 +02:00
Sven Neumann
ae0cf760ab app: only expose the area covered by the vectors object
gimp_display_shell_expose_vectors() exposes the bounding box of
the vectors plus a small border.
2010-09-17 21:32:38 +02:00
Michael Natterer
6bce0641d4 app: add signal GimpImage::update_vectors() and have the image manage updates
...just as we do for drawables. Connect to adding, removing, modifying
and toggling visibility of all vectors and emit "update-vectors"
accordingly. Add an update-vectors signal handler to GimpDisplayShell
and remove all other vectors handlers.
2010-09-17 11:31:57 +02:00
Sven Neumann
372e7316b7 app: adjust line style for cairo-drawn vectors 2010-09-17 00:12:38 +02:00
Sven Neumann
a9a20e8c61 app: cleanup of vectors rendering
Respect the visible property of the active vectors object.
2010-09-16 21:51:23 +02:00
Sven Neumann
5abae32923 app: cache bezier representation in GimpVectors object
Introduce gimp_vectors_get_bezier() which creates the bezier
representation on demand and then caches it for subsequent calls
until the vectors object is frozen.

At some point we should introduce GimpVectors::changed instead
of relying on the fact that a vectors object is always frozen
and thawn whenever it is changed...
2010-09-16 21:36:51 +02:00
Sven Neumann
5ab83e72ac app: don't let the vectors tool draw the active vectors
Let the display shell deal with drawing the vectors. The vectors
tool only draws the handles on the active vectors object.
2010-09-16 21:13:08 +02:00
Sven Neumann
4c57e3f19e app: port GimpVectors drawing to cairo
This is just a rough proof of concept. More changes are about
to follow.
2010-09-16 21:13:08 +02:00
Sven Neumann
22d5dc9752 app: formatting 2010-09-11 21:34:58 +02:00
Alexia Death
d9932ff159 app: Fix potential segfault caused by accessing empty history buffer 2010-09-09 21:56:56 +03:00
Michael Natterer
fd14818035 app: port GimpDisplayShell transform preview drawing to cairo 2010-09-08 19:32:22 +02:00
Michael Natterer
095ae5cc9b app: move mask_bounds() and mask_intersect() from GimpDrawable to GimpItem
There is nothing drawable-specific in there, and having them on
GimpItem enables some simplifications, esp. in upcoming PDB
wrappers. None of these refactorings is in this commit though.
2010-09-07 21:30:46 +02:00