10#include <tracking/trackFindingCDC/display/PrimitivePlotter.h>
18 namespace TrackFindingCDC {
48 std::unique_ptr<PrimitivePlotter>
clone()
const override;
123 void drawCurve(
const std::vector<std::array<float, 2>>& points,
124 const std::vector<std::array<float, 2>>& tangents,
147 const std::string
save(
const std::string& fileName)
override;
152 void clear()
override;
182 const std::string& tagName,
197 const std::string& tagName,
215 const std::string& tagName,
235 const std::string& tagName);
A base class for plots of primitive objects.
Belle2::TrackFindingCDC::AttributeMap AttributeMap
A map type for attributes names to values for additional drawing information.
A concrete plotter that can draw primitive objects to standalone SVG files.
void startGroup(const AttributeMap &attributeMap=AttributeMap()) override
Indicates the start of a group of drawn elements.
std::unique_ptr< PrimitivePlotter > clone() const override
Returns a newly created plotter instance containing all information of this.
void indent()
Increases the current indentation by one.
void writeAttributes(std::ostream &outputStream, const AttributeMap &attributeMap)
Writes attribute specification that belongs between the <, > brackets after the tag name.
void drawCurve(const std::vector< std::array< float, 2 > > &points, const std::vector< std::array< float, 2 > > &tangents, const AttributeMap &attributeMap=AttributeMap()) override
Adds a smooth curve to the plot.
void writeStandAloneTag(std::ostream &outputStream, const std::string &tagName, const AttributeMap &geometryAttributeMap=AttributeMap(), const AttributeMap &styleAttributeMap=AttributeMap())
Writes a stand alone xml tag to the given output stream taking attributes from two sources.
std::ostringstream m_svgContentStream
Memory for the plotted elements. This contains only the fragment that is in-between the svg tags and ...
int m_nIndentationSpaces
Memory for the number of spaces that shall be prepended to each line.
void writeSVGDefs(std::ostream &outputStream)
Writes a preamble of definitions that define an arrow cap which can be referenced by lines.
static const int s_defaultNIndentationSpaces
Constant for the number of indentation space to be used within the svg block.
AttributeMap m_svgAttributes
Memory for additional attributes to the top-level svg element.
void drawCircleArc(float startX, float startY, float endX, float endY, float radius, bool longArc, bool sweepFlag, const AttributeMap &attributeMap=AttributeMap()) override
Adds a circle arc to the plot.
void drawCircle(float centerX, float centerY, float radius, const AttributeMap &attributeMap=AttributeMap()) override
Adds a circle to the plot.
SVGPrimitivePlotter()
Default constructor for ROOT compatibility.
void writeSVGHeader(std::ostream &outputStream)
Writes the xml header that indicates that this document will be a SVG document to the given output st...
void drawLine(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap()) override
Adds a line to the plot.
void drawArrow(float startX, float startY, float endX, float endY, const AttributeMap &attributeMap=AttributeMap()) override
Adds an arrow to the plot.
void writeOpeningTag(std::ostream &outputStream, const std::string &tagName, const AttributeMap &geometryAttributeMap=AttributeMap(), const AttributeMap &styleAttributeMap=AttributeMap())
Writes an opening xml tag to the given output stream taking attributes from two sources.
void dedent()
Decreases the current indentation by one.
void clear() override
Clears all drawn elements from the plotter.
static const int s_addtionalNIndentationSpaces
Constant for the additional number of space to be prepended with each open tag group.
const std::string save(const std::string &fileName) override
Saves the current plot state to a file.
void writeTagIntern(std::ostream &outputStream, const std::string &tagName, const AttributeMap &geometryAttributeMap=AttributeMap(), const AttributeMap &styleAttributeMap=AttributeMap())
Writes part that belongs between the <, > brackets.
void endGroup() override
Indicates the end of a group of drawn elements.
void writeClosingTag(std::ostream &outputStream, const std::string &tagName)
Writes a closing xml tag to the given output stream.
Abstract base class for different kinds of events.