summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_x11.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-03-27 07:45:09 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-03-27 14:27:01 (GMT)
commit95d189ee0df74497d70449f3967a38c67f5860ae (patch)
tree18d4ed4bed300cc727a7883eecf3ee1b79a3d90a /src/gui/painting/qpaintengine_x11.cpp
parent4833b02f80bc5bcd7b0946453f3e6c7bc09b01f6 (diff)
downloadQt-95d189ee0df74497d70449f3967a38c67f5860ae.zip
Qt-95d189ee0df74497d70449f3967a38c67f5860ae.tar.gz
Qt-95d189ee0df74497d70449f3967a38c67f5860ae.tar.bz2
Fix mismatch between stroke and fill of ellipses on X11.
When drawing ellipse without stroke we need to use the same width/height for the fill as we would use for the stroke for the stroke and fill to match. Filling first and then stroking should produce the same result as filling and stroking in one go. Task-number: 249490 Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qpaintengine_x11.cpp')
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index e9f1bb3..32cb63d 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -1479,14 +1479,10 @@ void QX11PaintEngine::drawEllipse(const QRect &rect)
return;
}
d->setupAdaptedOrigin(rect.topLeft());
- if (d->has_brush) { // draw filled ellipse
- if (!d->has_pen) {
- XFillArc(d->dpy, d->hd, d->gc_brush, x, y, w-1, h-1, 0, 360*64);
+ if (d->has_brush) { // draw filled ellipse
+ XFillArc(d->dpy, d->hd, d->gc_brush, x, y, w, h, 0, 360*64);
+ if (!d->has_pen) // make smoother outline
XDrawArc(d->dpy, d->hd, d->gc_brush, x, y, w-1, h-1, 0, 360*64);
- return;
- } else{
- XFillArc(d->dpy, d->hd, d->gc_brush, x, y, w, h, 0, 360*64);
- }
}
if (d->has_pen) // draw outline
XDrawArc(d->dpy, d->hd, d->gc, x, y, w, h, 0, 360*64);