 |
Belle II Software
release-05-02-19
|
12 #include <tracking/trackFindingCDC/display/BoundingBox.h>
13 #include <tracking/trackFindingCDC/display/AttributeMap.h>
24 namespace TrackFindingCDC {
27 class PrimitivePlotter {
31 using AttributeMap = Belle2::TrackFindingCDC::AttributeMap;
53 virtual std::unique_ptr<PrimitivePlotter>
clone()
const;
144 virtual void drawCurve(
const std::vector<std::array<float, 2>>& points,
145 const std::vector<std::array<float, 2>>& tangents,
178 virtual const std::string
save(
const std::string& fileName);
185 virtual void clear();
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.
float getCanvasHeight()
Getter for the canvas height in pixels.
virtual void endGroup()
Indicates the end of a group of drawn elements.
static const float s_defaultCanvasWidth
The default width of the canvas to be plotted into.
static const float s_defaultCanvasHeight
The default height of the canvas to be plotted into.
virtual std::unique_ptr< PrimitivePlotter > clone() const
Returns a newly created plotter instance containing all information of this.
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.
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.
Belle2::TrackFindingCDC::AttributeMap AttributeMap
A map type for attributes names to values for additional drawing information.
const BoundingBox & getBoundingBox() const
Getter for the bounding box of all drawed objects.
void setCanvasHeight(float height)
Setter for the canvas height in pixels The canvas height denotes the size of the image being produced...
BoundingBox m_boundingBox
Bounding box of the currently drawn objects.
void setCanvasWidth(float width)
Setter for the canvas width in pixels.
virtual void drawArrow(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Adds an arrow to the plot.
PrimitivePlotter()
Default constructor for ROOT compatibility.
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.
Abstract base class for different kinds of events.
virtual void drawLine(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap())
Adds a line to the plot.
virtual ~PrimitivePlotter()
Make destructor virtual to handle polymorphic deconstruction.
void setBoundingBox(const BoundingBox &boundingBox)
Setter for the bounding box of all drawed objects.
A two dimensional rectangle that keeps track of the extend of a drawing.
float getCanvasWidth()
Getter for the canvas width in pixels.
void clearBoundingBox()
Clears the current bounding box. Only following draw calls contribute to the bounding box.
virtual const std::string save(const std::string &fileName)
Saves the current plot state to a file.
virtual void clear()
Clears all drawed elements from the plotter.