A base class for painting all items from a data layer (as supported by class derived from here) onto a 1D Canvas.
More...
#include <OpenMS/VISUAL/Painter1DBase.h>
|
| static void | drawDashedLine (const QPoint &from, const QPoint &to, QPainter *painter, const QColor color) |
| | static method to draw a dashed line More...
|
| |
| static void | drawCross (const QPoint &position, QPainter *painter, const int size=8) |
| | draw a cross at position, using a certain size (= width = height) of the cross More...
|
| |
| static void | drawCaret (const QPoint &position, QPainter *painter, const int size=8) |
| | draw a caret '^' at position, using a certain size (= width) of the caret More...
|
| |
| static QPainterPath | getOpenArrow (int arrow_width) |
| |
| static QPainterPath | getClosedArrow (int arrow_width) |
| |
| static QRectF | drawLineWithArrows (QPainter *painter, const QPen &pen, const QPoint &start, const QPoint &end, const QPainterPath &arrow_start=QPainterPath(), const QPainterPath &arrow_end=QPainterPath()) |
| |
A base class for painting all items from a data layer (as supported by class derived from here) onto a 1D Canvas.
◆ ~Painter1DBase()
◆ drawAnnotations_()
◆ drawCaret()
| static void drawCaret |
( |
const QPoint & |
position, |
|
|
QPainter * |
painter, |
|
|
const int |
size = 8 |
|
) |
| |
|
static |
◆ drawCross()
| static void drawCross |
( |
const QPoint & |
position, |
|
|
QPainter * |
painter, |
|
|
const int |
size = 8 |
|
) |
| |
|
static |
draw a cross at position, using a certain size (= width = height) of the cross
◆ drawDashedLine()
| static void drawDashedLine |
( |
const QPoint & |
from, |
|
|
const QPoint & |
to, |
|
|
QPainter * |
painter, |
|
|
const QColor |
color |
|
) |
| |
|
static |
static method to draw a dashed line
◆ drawLineWithArrows()
| static QRectF drawLineWithArrows |
( |
QPainter * |
painter, |
|
|
const QPen & |
pen, |
|
|
const QPoint & |
start, |
|
|
const QPoint & |
end, |
|
|
const QPainterPath & |
arrow_start = QPainterPath(), |
|
|
const QPainterPath & |
arrow_end = QPainterPath() |
|
) |
| |
|
static |
- Parameters
-
| painter | The painter to paint with |
| pen | For setting line width and color |
| start | Start position of the line |
| end | End position of the line |
| arrow_start | An (optional) arrow head. Use 'getOpenArrow' or 'getClosedArrow' for predefined arrows |
| arrow_end | An (optional) arrow tail. Use 'getOpenArrow' or 'getClosedArrow' for predefined arrows |
- Returns
- The bounding rectangle of the line and arrows (if any)
◆ getClosedArrow()
| static QPainterPath getClosedArrow |
( |
int |
arrow_width | ) |
|
|
inlinestatic |
◆ getOpenArrow()
| static QPainterPath getOpenArrow |
( |
int |
arrow_width | ) |
|
|
inlinestatic |
◆ paint()
| virtual void paint |
( |
QPainter * |
painter, |
|
|
Plot1DCanvas * |
canvas, |
|
|
int |
layer_index |
|
) |
| |
|
pure virtual |
Paints items using the given painter onto the canvas.
- Parameters
-
| painter | The painter used for drawing |
| canvas | The canvas to paint onto (should expose all the details needed, like canvas size, draw mode, colors etc) |
| layer_index | Which layer is currently painted (FIXME: remove when Canvas1D::DrawMode and PenStyle are factored out) |
Implemented in Painter1DIonMobility, Painter1DChrom, and Painter1DPeak.