OpenMS  2.8.0
Public Member Functions | Static Public Member Functions | List of all members
Painter1DBase Class Referenceabstract

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>

Inheritance diagram for Painter1DBase:
[legend]

Public Member Functions

virtual void paint (QPainter *, Plot1DCanvas *canvas, int layer_index)=0
 Paints items using the given painter onto the canvas. More...
 

Static Public Member Functions

static void drawDashedLine (const QPoint &from, const QPoint &to, QPainter *painter, QColor color)
 static method to draw a dashed line More...
 

Detailed Description

A base class for painting all items from a data layer (as supported by class derived from here) onto a 1D Canvas.

Member Function Documentation

◆ drawDashedLine()

static void drawDashedLine ( const QPoint &  from,
const QPoint &  to,
QPainter *  painter,
QColor  color 
)
static

static method to draw a dashed line

◆ paint()

virtual void paint ( QPainter *  ,
Plot1DCanvas canvas,
int  layer_index 
)
pure virtual

Paints items using the given painter onto the canvas.

Parameters
painterThe painter used for drawing
canvasThe canvas to paint onto (should expose all the details needed, like canvas size, draw mode, colors etc)
layer_indexWhich layer is currently painted (FIXME: remove when Canvas1D::DrawMode and PenStyle are factored out)

Implemented in Painter1DPeak.