Rect.
moveCenter( QPointF( 0,
0 ) );
arrow[ 0 ] = Rect.topLeft();
arrow
[ 1 ] = QPointF( Rect.
right(),
0 );
arrow[ 2 ] = Rect.bottomLeft();
painter->setBrush( Qt::black ); // fill with black on the arrow head
for ( int idx = 0; idx < dataSize; idx++ ) { // dataSize = 12,000
painter->save();
painter->translate( ... ) // translate to arrow location
painter->rotate( ... ) // rotate to angle degree depending on data
painter->drawLine( line );
painter->drawPolyon( arrow.translated( length, 0 ) );
painter->restore();
}
QRectF Rect( QPointF( 0, 0 ), QSizeF( 3, 3 ) );
Rect.moveCenter( QPointF( 0, 0 ) );
QPolygonF arrow( 3 );
arrow[ 0 ] = Rect.topLeft();
arrow[ 1 ] = QPointF( Rect.right(), 0 );
arrow[ 2 ] = Rect.bottomLeft();
painter->setBrush( Qt::black ); // fill with black on the arrow head
for ( int idx = 0; idx < dataSize; idx++ ) { // dataSize = 12,000
painter->save();
painter->translate( ... ) // translate to arrow location
painter->rotate( ... ) // rotate to angle degree depending on data
QLineF line( QPointF( 0, 0 ), QPointF( length, 0 ) ); // length is calculated from data
painter->drawLine( line );
painter->drawPolyon( arrow.translated( length, 0 ) );
painter->restore();
}
To copy to clipboard, switch view to plain text mode
Bookmarks