#include <ArrowRenderer.h>
Inheritance diagram for ArrowRenderer:
Public Member Functions | |
ArrowRenderer (const Data &aData) | |
virtual void | render (QPixmap *pixmap) |
Render data into a provided pixmap. | |
void | setArrowDistance (float dist) |
Sets the distance between two arrows. | |
void | setArrowSize (float size) |
Sets the size of an arrow in world coordinates. | |
void | setScaleArrowIndex (int newIndex) |
Scale arrows according to a specific data piece. | |
void | setScaleArrows (bool scaleArrows) |
void | setScaleMax (float max) |
Sets the maximum data value. | |
void | setScaleMin (float min) |
Sets the minimum data value. | |
void | setArrowBrush (QBrush brush) |
Sets the brush for arrow drawing. | |
Static Public Member Functions | |
static void | drawArrow (QPainter &painter, const QBrush &brush, float arrowSize) |
Draws an arrow of specified size in the specified painter. | |
Private Member Functions | |
void | drawArrow (QPainter &painter, float x, float y) const |
Private Attributes | |
float | mArrowDistance |
float | mArrowSize |
float | mScaleMax |
float | mScaleMin |
int | mScaleArrowIndex |
bool | mScaleArrows |
QBrush | mArrowBrush |
It can optionally scale the arrows according to a specific data piece.
|
|
|
|
|
Draws an arrow of specified size in the specified painter.
|
|
Render data into a provided pixmap. The size of the pixmap must be getImageSize(). Implements ARender. |
|
Sets the brush for arrow drawing. Defaults to solid black. |
|
Sets the distance between two arrows. The distance is specified in world coordinates. This does not affect the size of an arrow, use setArrowSize() for that. |
|
Sets the size of an arrow in world coordinates. See also setArrowDistance(). |
|
Scale arrows according to a specific data piece. Scaling must be enabled via setScaleArrows(). |
|
|
|
Sets the maximum data value. Values larger than the one specified here will not show an arrow. Between this value and the min value, arrow sizes will be linearly interpolated. |
|
Sets the minimum data value. Values smaller than the one specified here will not show an arrow. Between this value and the max value, arrow sizes will be linearly interpolated. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|