10#include <tracking/trackFindingCDC/display/BoundingBox.h>
11#include <tracking/trackFindingCDC/display/AttributeMap.h>
22 namespace TrackFindingCDC {
51 virtual std::unique_ptr<PrimitivePlotter>
clone()
const;
142 virtual void drawCurve(
const std::vector<std::array<float, 2>>& points,
143 const std::vector<std::array<float, 2>>& tangents,
176 virtual const std::string
save(
const std::string& fileName);
183 virtual void clear();
A two dimensional rectangle that keeps track of the extend of a drawing.
A base class for plots of primitive objects.
BoundingBox m_boundingBox
Bounding box of the currently drawn objects.
void setCanvasHeight(float height)
Setter for the canvas height in pixels The canvas height denotes the size of the image being produced...
void setBoundingBox(const BoundingBox &boundingBox)
Setter for the bounding box of all drawn objects.
virtual ~PrimitivePlotter()
Make destructor virtual to handle polymorphic deconstruction.
float getCanvasWidth()
Getter for the canvas width in pixels.
virtual void drawCurve(const std::vector< std::array< float, 2 > > &points, const std::vector< std::array< float, 2 > > &tangents, const AttributeMap &attributeMap=AttributeMap())
Adds a smooth curve to the plot.
const BoundingBox & getBoundingBox() const
Getter for the bounding box of all drawn objects.
float m_canvasHeight
Memory for the height of the SVG drawing in pixels.
virtual void startGroup(const AttributeMap &attributeMap=AttributeMap())
Indicates the start of a group of drawn elements.
PrimitivePlotter()
Default constructor for ROOT compatibility.
void setCanvasWidth(float width)
Setter for the canvas width in pixels.
virtual void drawCircleArc(float startX, float startY, float endX, float endY, float radius, bool longArc, bool sweepFlag, const AttributeMap &attributeMap=AttributeMap())
Adds a circle arc to the plot.
void clearBoundingBox()
Clears the current bounding box. Only following draw calls contribute to the bounding box.
virtual void drawArrow(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Adds an arrow to the plot.
virtual const std::string save(const std::string &fileName)
Saves the current plot state to a file.
Belle2::TrackFindingCDC::AttributeMap AttributeMap
A map type for attributes names to values for additional drawing information.
float getCanvasHeight()
Getter for the canvas height in pixels.
virtual std::unique_ptr< PrimitivePlotter > clone() const
Returns a newly created plotter instance containing all information of this.
static const float s_defaultCanvasHeight
The default height of the canvas to be plotted into.
virtual void clear()
Clears all drawn elements from the plotter.
virtual void drawLine(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Adds a line to the plot.
static const float s_defaultCanvasWidth
The default width of the canvas to be plotted into.
virtual void drawCircle(float centerX, float centerY, float radius, const AttributeMap &attributeMap=AttributeMap())
Adds a circle to the plot.
float m_canvasWidth
Memory for the width of the SVG drawing in pixels.
virtual void endGroup()
Indicates the end of a group of drawn elements.
Abstract base class for different kinds of events.