IMO QwtPolarMarker should be extended to offer to draw a line to the origin - but for the moment you have to use QwtPolarCurve ( with 2 points ) for this.
Alternatively you could overload QwtPolarMarker::draw like this:
void YourPolarMarker
::draw( QPainter *painter,
const QPointF &pole,
double radius,
const QRectF &canvasRect
) const {
const double r = radialMap.transform( position().radius() );
const double a = azimuthMap.transform( position().azimuth() );
const QPointF pos
= qwtPolar2Pos
( pole, r, a
);
painter->setPen( ... );
painter->drawLine( pole, pos );
QwtPolarMarker::draw( painter, ... );
}
void YourPolarMarker::draw( QPainter *painter,
const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap,
const QPointF &pole, double radius,
const QRectF &canvasRect ) const
{
const double r = radialMap.transform( position().radius() );
const double a = azimuthMap.transform( position().azimuth() );
const QPointF pos = qwtPolar2Pos( pole, r, a );
painter->setPen( ... );
painter->drawLine( pole, pos );
QwtPolarMarker::draw( painter, ... );
}
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks