Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit bb3013c3 authored by Thorsten Zachmann's avatar Thorsten Zachmann

o Make KoShape::applyConversion public so that also other objects can

  use it 

svn path=/trunk/koffice/; revision=598788
parent d85b1ca7
......@@ -53,14 +53,11 @@ bool KoLineBorder::hasTransparency() {
}
void KoLineBorder::paintBorder(KoShape *shape, QPainter &painter, const KoViewConverter &converter) {
double zoomX, zoomY;
converter.zoom(&zoomX, &zoomY);
painter.scale(zoomX, zoomY);
KoShape::applyConversion( painter, converter );
QPen pen;
pen.setColor(m_color);
pen.setWidthF(qMax(0.0, m_lineSize));
pen.setJoinStyle(Qt::MiterJoin);
painter.setPen(pen);
painter.drawPath(shape->outline());
painter.strokePath( shape->outline(), pen );
}
......@@ -461,9 +461,7 @@ void KoPathTool::ActivePointHandle::paint( QPainter &painter, KoViewConverter &c
{
painter.save();
painter.setMatrix( m_activePoint->parent()->transformationMatrix(&converter) * painter.matrix() );
double zoomX, zoomY;
converter.zoom(&zoomX, &zoomY);
painter.scale(zoomX, zoomY);
KoShape::applyConversion( painter, converter );
QRectF handle = converter.viewToDocument( m_tool->handleRect( QPoint(0,0) ) );
m_activePoint->paint( painter, handle.size(), m_tool->m_pointSelection.contains( m_activePoint ) );
......@@ -564,9 +562,7 @@ void KoPathTool::KoPathPointSelection::paint( QPainter &painter, KoViewConverter
painter.save();
painter.setMatrix( it.key()->transformationMatrix(&converter) * painter.matrix() );
double zoomX, zoomY;
converter.zoom(&zoomX, &zoomY);
painter.scale(zoomX, zoomY);
KoShape::applyConversion( painter, converter );
QRectF handle = converter.viewToDocument( m_tool->handleRect( QPoint(0,0) ) );
......
......@@ -473,11 +473,6 @@ public:
*/
virtual void copySettings(const KoShape *shape);
protected:
QMatrix m_invMatrix; ///< The inverted matrix; for convenience
QBrush m_backgroundBrush; ///< Stands for the background color / fill etc.
KoShapeBorderModel *m_border; ///< points to a border, or 0 if there is no border
/**
* Convenience method that allows people implementing paint() to use the shape
* internal coordinate system directly to paint itself instead of considering the
......@@ -487,6 +482,11 @@ protected:
*/
static void applyConversion(QPainter &painter, const KoViewConverter &converter);
protected:
QMatrix m_invMatrix; ///< The inverted matrix; for convenience
QBrush m_backgroundBrush; ///< Stands for the background color / fill etc.
KoShapeBorderModel *m_border; ///< points to a border, or 0 if there is no border
/**
* Update the position of the shape in the tree of the KoShapeManager.
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment