458230bf8d
app: use a GimpCanvasPassePartout for drawing the crop highlight
...
and remove all old drawing logic.
2010-11-12 19:47:51 +01:00
a798c9456c
app/display: add new canvas item GimpCanvasPassePartout
...
This is supposed to replace the GimpDisplayShell highlight API,
but it is not yet used.
2010-10-18 22:17:27 +02:00
dc39857238
app: add GimpSegment as replacement for GdkSegment
2010-10-15 12:37:36 +02:00
55f01bf6f3
app: remove gimp_display_shell_draw_vectors()
...
which is the last bit of non-item drawing of stuff that is not
somehow the image itself... wheee!
This involves reverting commit
6bce0641d4
and adding back all the
vectors handlers that were in gimpdisplayshell-callbacks.c before.
Change the callbacks to manage proxy items for all the image's
vectors.
2010-10-08 01:03:56 +02:00
149ba1ec4b
app: add a path canvas item class based on cairo_path_t (GimpBezierDesc)
...
and use it in gimp_display_shell_draw_vectors().
2010-10-06 23:02:16 +02:00
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
3e69ae0039
app: add a layer boundary canvas item class
...
and use it to draw the layer boundary. Remove a lot of stuff
that was there only to draw the boundary before:
- remvoe all layer boundary stuff from the selection code
- remove gimp_display_shell_draw_layer()
- remove enum values GIMP_SELECTION_LAYER_ON,OFF from core-enums.h
- remove all lines calling gimp_image_selection_control() with
the removed enum values
- remove gimp_layer_boundary()
2010-10-03 00:28:40 +02:00
7ffa463273
app: remove obsolete includes
2010-10-02 22:07:31 +02:00
1d45f6295e
app: add a software cursor canvas item
...
and use it to draw the sw cursor. Almost every aspect of the old code
was ugly and hard to read, this is so much nicer...
2010-10-02 21:56:36 +02:00
502d7c815b
app: add a canvas grid item class and use it to draw the grid
...
Remove gimp_display_shell_draw_grid().
2010-10-02 20:57:40 +02:00
26d0035be0
app: draw guides using GimpCanvasItems
...
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
items as needed
- Remove gimp_display_shell_draw_guides()
2010-10-01 10:34:15 +02:00
0c613ba87d
app: port sample point drawing to GimpCanvasItems
...
- Add GimpImage signal "sample-point-moved" and emit it when needed
- Let the shell connect to the sample point add, remove and move signals
and update the canvas items accordingly
- Remove gimp_display_shell_draw_sample_points()
2010-10-01 09:27:57 +02:00
cbd1d8cd51
app: remove gimp_display_shell_draw_sample_point()
...
and draw all sample points in gimp_display_shell_draw_sample_points().
2010-09-30 01:37:28 +02:00
0d11be8fed
app: add a canvas sample point item class
...
and use it in gimp_display_shell_draw_sample_point().
2010-09-30 01:14:23 +02:00
9d36984d37
app: remove the now obsolete gimp_display_shell_draw_guide()
...
and draw the guides in gimp_display_shell_draw_guides().
2010-09-30 00:23:06 +02:00
5a4bcb8c3d
app: use a temporary GimpCanvasGuide to draw guides guides
2010-09-30 00:02:21 +02:00
42e137fc74
app: rename gimp_display_shell_draw_area() to draw_image()
2010-09-29 20:58:13 +02:00
dd1e858921
app/display: introduce a style for dimming
2010-09-29 20:34:59 +02:00
eb5bb6363e
app/display: draw the crop highlight using cairo
...
Instead of dimming the actual pixels, apply a translucent fill to
the area outside the highlight rectangle.
2010-09-29 20:34:59 +02:00
ccee0ec41a
app/display: let cairo render the checkerboard
...
Instead of blending the scaled image data onto the checkerboard and
then painting this image to the screen, render the image data into
an ARGB cairo image surface. Then paint a checkerboard on the canvas
and the image on top of it.
2010-09-29 20:34:59 +02:00
ddc63de6d6
app: remove "gboolean use_offsets" from gimpdisplayshell-transform.[ch]
2010-09-23 19:24:04 +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
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
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
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
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
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
18d3882c5c
app: port GimpDisplayShell pen drawing to cairo
2010-08-23 21:59:27 +02:00
3a1ba90507
app: port GimpDisplayShell cursor drawing to cairo
...
Also add code to invalidate the new cursor location in
gimp_display_shell_update_cursor(), which is needed with
the new manual double buffering code.
2010-08-23 20:39:22 +02:00
1d1ff1fedd
app: port GimpDisplayShell sample point drawing to cairo
...
Same disclaimer about tool uglyness applies here. Will be fixed.
2010-08-12 13:13:15 +02:00
922c330bec
app: port GimpDisplayShell guide drawing to cairo
...
The cairo_t code in GimpMoveTool is still disgusting. This probably
needs some GimpTool API that creates a cairo_t for tools.
2010-08-12 00:51:58 +02:00
03ad3f0027
app: reorder parameters in new style API
2010-08-12 00:09:05 +02:00
002003a2ea
app: add new files gimpdisplayshell-style.[ch]
...
which contains functions to set styles on a cairo_t.
2010-08-11 23:47:46 +02:00
a6d7542c56
app: simplify some GimpDisplayShell drawing code
2010-08-11 15:01:49 +02:00
529ce40a5d
app: port GimpDisplayShell grid drawing to cairo
2010-08-11 13:16:55 +02:00
7549f0fead
app: really clip guide and sample point drawing to the exposed region
2010-05-02 16:08:47 +02:00
2a289a75f4
app: don't draw guides which are out of canvas
2010-05-02 16:01:40 +02:00
02b8eea086
app: restrict sample point drawing to the exposed region
...
With the same limitation as for guides in the last commit.
2010-05-02 15:58:51 +02:00