Commit Graph

2243 Commits

Author SHA1 Message Date
375567df6f app/display: sprinkle render code with const qualifiers 2010-09-29 20:34:59 +02:00
b3182be59c app/display: remove obsolete includes 2010-09-29 20:34:59 +02:00
260c8560e4 app: remove gimp_display_shell_render_{init,exit}
The functions had become mostly obsolete and we can just use a
static scratch buffer for rendering.
2010-09-29 20:34:59 +02:00
d5d5f4fb3f app/display: adjust a comment to reflect the current state of the code 2010-09-29 20:34:59 +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
ebeb933350 app: add gimp_display_shell_expose_item() and use it in the draw tool 2010-09-29 20:10:21 +02:00
7367ec1b7c app: fix the extents of filled rectangles and invalidate less pixels
for large unfilled ones: if larger than 64x64 (arbitrary), invalidate
only the actual lines.
2010-09-29 19:58:59 +02:00
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