 |
Belle II Software
release-05-02-19
|
10 #include <tracking/trackFindingCDC/display/PrimitivePlotter.h>
13 using namespace TrackFindingCDC;
20 m_canvasWidth(s_defaultCanvasWidth),
21 m_canvasHeight(s_defaultCanvasHeight)
29 return std::make_unique<PrimitivePlotter>(*
this);
38 const AttributeMap& attributeMap __attribute__((unused)))
48 const AttributeMap& attributeMap __attribute__((unused)))
57 const AttributeMap& attributeMap __attribute__((unused)))
59 const float left = centerX - radius;
60 const float bottom = centerY - radius;
61 const float right = centerX + radius;
62 const float top = centerY + radius;
72 float radius __attribute__((unused)),
73 bool longArc __attribute__((unused)),
74 bool sweepFlag __attribute__((unused)),
75 const AttributeMap& attributeMap __attribute__((unused)))
83 const std::vector<std::array<float, 2> >& tangents __attribute__((unused)),
86 for (
size_t i = 0; i < points.size() - 1; ++i) {
87 float startX = points[i][0];
88 float startY = points[i][1];
89 float endX = points[i + 1][0];
90 float endY = points[i + 1][1];
virtual void drawCircle(float centerX, float centerY, float radius, const AttributeMap &attributeMap=AttributeMap())
Adds a circle to the plot.
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.
BoundingBox m_boundingBox
Bounding box of the currently drawn objects.
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.
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 clear()
Clears all bounds to NAN.
A two dimensional rectangle that keeps track of the extend of a drawing.
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.