Commit Graph

2243 Commits

Author SHA1 Message Date
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
69a898cc9f app: some cairo tool drawing infrastructure for review, please have a look 2010-09-19 19:45:51 +02:00
11aecbd090 app: add styles for tool drawing (still unused) 2010-09-19 19:19:24 +02:00
f04e16016f app: draw inactive paths blue on white 2010-09-19 19:14:42 +02:00
7e28f52dd7 app: remove unused clipping functions in GimpDrawTool and GimpCanvas 2010-09-19 18:58:23 +02:00
8a029f3e4e app: enable double buffering when editing vectors 2010-09-17 23:12:42 +02:00
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
8e33205b65 app: draw all vectors strokes with one cairo_stroke() 2010-09-17 22:30:43 +02:00
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
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
372e7316b7 app: adjust line style for cairo-drawn vectors 2010-09-17 00:12:38 +02:00
a9a20e8c61 app: cleanup of vectors rendering
Respect the visible property of the active vectors object.
2010-09-16 21:51:23 +02:00
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
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
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
22d5dc9752 app: formatting 2010-09-11 21:34:58 +02:00
d9932ff159 app: Fix potential segfault caused by accessing empty history buffer 2010-09-09 21:56:56 +03:00
fd14818035 app: port GimpDisplayShell transform preview drawing to cairo 2010-09-08 19:32:22 +02:00
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
0dc4b5de72 Fix a bunch of warnings 2010-08-31 22:46:36 +02:00
274f210e4c app: remove obsolete includes 2010-08-28 15:33:25 +02:00
02abdff8aa app: move the wilber drawing functions to gimpcairo.c 2010-08-28 15:30:02 +02:00
c0e475e7e2 app: add comment about cairo_t and double buffering 2010-08-28 11:44:11 +02:00
d1393686ab app: move creating of the cairo_t to gimp_display_shell_canvas_expose()
and pass it down to the drawing functions.
2010-08-28 00:09:31 +02:00
f0c40d3717 app: port GimpDisplayShell image drawing to cairo 2010-08-27 23:15:25 +02:00
9c63f3d4f1 app: remove gimp_display_shell_draw_selection_segments()
and move its code into selection_render_mask().
2010-08-27 15:03:03 +02:00
f260cd766e app: add gimp_cairo_add_segments()
which adds an array of GdkSegments to the current path, and use it in
gimpdisplayshell-draw.c instead of duplicating the code three times.
2010-08-27 14:58:43 +02:00
f4f1c563a2 app: don't include "gimpcanvas.h" any longer 2010-08-27 14:52:27 +02:00
3e1b14fd1a app: add widgets/gimpcairo.[ch] for cairo utility functions
and move the stipple pattern creation function there.
2010-08-27 14:41:30 +02:00
b7b93d3d7b app/display: add some const qualifiers 2010-08-26 21:02:47 +02:00
a6ce99afe0 app: remove point drawing API from GimpCanvas, it's not used any longer 2010-08-26 21:01:21 +02:00
be2bd189cd app: completely switch to cairo-drawing the selection
and remove all old selection drawing code. Thanks to Benjamin Otte for
pointing out the right optimization.

Also fixes bug #479875 - performance problem drawing a complex selection.
2010-08-26 20:52:52 +02:00
d745ab3871 app: move the GIMP_CURSOR_SIZE define to a single place in the right header 2010-08-26 19:13:49 +02:00
98ee5e14a2 app: forgot to remove some disabled code 2010-08-26 18:21:04 +02:00
58db8a3ef0 app: port GimpDisplayShell selection drawing to cairo
but keep the old code around because it's much faster. The new code is
enabled by defining the CAIRO_SELECTION environment variable.
2010-08-26 18:09:33 +02:00
cd192adf09 app: undo some of the previous refactorings and keep using GdkSegment
It's not going to be deprecated, so there is no harm in using it; get
rid of all the added _old() functions too.
2010-08-25 21:21:16 +02:00
d73f088408 app: move the calls to cairo_translate() out of gimpdisplayshell-style.c
and keep them next to the drawing code so it becomes clear why we use
pixel centers in these cases.
2010-08-25 13:01:12 +02:00
3f6bb75129 app: pass transformed segments to gimp_display_shell_draw_layer_boundary()
and duplicate quite some code in the spirit of the previous commit
(rename stuff using GdkSegment to _old() and add new functions that
return arrays of BoundSegs, for the lack of a nicer struct). This is
all very ugly and will change.
2010-08-25 01:58:00 +02:00
3127d36216 app: rename gimp_display_shell_transform_segments()
to gimp_display_shell_transform_segments_old() as step one
of porting selection drawing to cairo.
2010-08-25 01:37:19 +02:00
4e0925a67c app: port GimpDisplayShell layer boundary drawing to cairo
The boundary is temporarily kept around as both BoundSeg and
GdkSegment arrays now, but this uglyness will go away once porting to
cairo is complete.
2010-08-24 18:07:31 +02:00
0d39da7ce8 app: s/num_segs/n_segs/ 2010-08-24 17:36:42 +02:00
ea5acef4a5 app: remove redundant call to gimp_display_shell_scroll_get_render_start_offset() 2010-08-23 22:18:03 +02:00