summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-06 12:36:11 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-06 12:36:11 +0100
commit7f08a51c6615242273f92cf69489d7cb540b7826 (patch)
tree69632f2e55a18a656f9df94361e9863092894ac3
parent2dcf578c120e3dab375bbe345f0f8f5bac151be9 (diff)
downloadlogdiag-7f08a51c6615242273f92cf69489d7cb540b7826.tar.gz
logdiag-7f08a51c6615242273f92cf69489d7cb540b7826.tar.xz
logdiag-7f08a51c6615242273f92cf69489d7cb540b7826.zip
Extend symbol area to whole pixels.
This gives better cairo performance.
-rw-r--r--liblogdiag/ld-canvas.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/liblogdiag/ld-canvas.c b/liblogdiag/ld-canvas.c
index b449560..84aaf67 100644
--- a/liblogdiag/ld-canvas.c
+++ b/liblogdiag/ld-canvas.c
@@ -1056,6 +1056,11 @@ get_symbol_area (LdCanvas *self, LdDiagramSymbol *symbol, LdRectangle *rect)
object_y + area.y + area.height,
&x2, &y2);
+ x1 = floor (x1);
+ y1 = floor (y1);
+ x2 = ceil (x2);
+ y2 = ceil (y2);
+
rect->x = x1;
rect->y = y1;
rect->width = x2 - x1;