author | leseb <leseb> | 2002-06-23 17:47:47 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-06-23 17:47:47 (UTC) |
commit | 6fd46f6d23538ec6e0f48209f6c0f0d939a2effe (patch) (side-by-side diff) | |
tree | 2a5d407155f72dc5496d3a7d412922cc6be97e61 /noncore/graphics/drawpad/filledellipsetool.cpp | |
parent | 3251c55f854ecbd4ece8bf169177ffac28081aaa (diff) | |
download | opie-6fd46f6d23538ec6e0f48209f6c0f0d939a2effe.zip opie-6fd46f6d23538ec6e0f48209f6c0f0d939a2effe.tar.gz opie-6fd46f6d23538ec6e0f48209f6c0f0d939a2effe.tar.bz2 |
Anti-aliasing as an option
Diffstat (limited to 'noncore/graphics/drawpad/filledellipsetool.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/filledellipsetool.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/graphics/drawpad/filledellipsetool.cpp b/noncore/graphics/drawpad/filledellipsetool.cpp index 2f7ec8f..6b5bbc6 100644 --- a/noncore/graphics/drawpad/filledellipsetool.cpp +++ b/noncore/graphics/drawpad/filledellipsetool.cpp @@ -32,7 +32,9 @@ void FilledEllipseTool::drawFinalShape(QPainter& p) { p.setRasterOp(Qt::NotROP); p.drawRect(QRect(m_polyline[2], m_polyline[0])); + p.setRasterOp(Qt::CopyROP); + if (m_pDrawPad->antiAliasing()) { QRect r = m_polyline.boundingRect(); r = r.normalize(); r.setLeft(r.left() - m_pDrawPad->pen().width()); @@ -65,8 +67,12 @@ void FilledEllipseTool::drawFinalShape(QPainter& p) areaImage = bigAreaImage.smoothScale(bigAreaImage.width() / 3, bigAreaImage.height() / 3); areaPixmap.convertFromImage(areaImage); - p.setRasterOp(Qt::CopyROP); p.drawPixmap(r.x(), r.y(), areaPixmap); + } else { + p.setPen(m_pDrawPad->pen()); + p.setBrush(m_pDrawPad->brush()); + p.drawEllipse(QRect(m_polyline[2], m_polyline[0])); + } } void FilledEllipseTool::drawTemporaryShape(QPainter& p) |