34 dc.DrawLine({ int(p1.
x), int(p1.
y) }, { int(p2.
x), int(p2.
y) });
42 dc.DrawLine({ int(p1.
x), int(p1.
y) }, { int(p2.
x), int(p2.
y) });
58 : dc(path.native(), size.x, size.y, dpi) {}
62 dc.DrawCircle(
int(p.
x),
int(p.
y), pointSize);
67 dc.DrawCircle(
int(p.
x),
int(p.
y), pointSize);
73 dc.DrawLine({ int(p1.
x), int(p1.
y) }, { int(p2.
x), int(p2.
y) });
77 return makeAuto<SvgPath>(dc, matrix);
uint32_t Size
Integral type used to index arrays (by default).
#define NAMESPACE_SPH_END
Object representing a path on a filesystem, similar to std::filesystem::path in c++17.
Drawing quantity values as functions of time or spatial coordinates.
PlotPoint transformPoint(const PlotPoint &p) const
Applies the affine transform on given point.
Wrapper of pointer that deletes the resource from destructor.
Abstraction of a drawing context.
Object representing a path on a filesystem.
virtual void drawErrorPoint(const ErrorPlotPoint &point) override
Adds a point with error bars to the plot.
SvgContext(const Path &path, const Pixel size, const double dpi=72)
virtual void setTransformMatrix(const AffineMatrix2 &newMatrix) override
Applies the given tranformation matrix on all primitives.
virtual void drawPoint(const PlotPoint &point) override
Adds a single point to the plot.
virtual void drawLine(const PlotPoint &from, const PlotPoint &to) override
Draws a line connecting two points.
virtual void setStyle(const Size UNUSED(index)) override
virtual AutoPtr< IDrawPath > drawPath() override
Draws a path connecting points.
virtual void closePath() override
Closes the path, connecting to the first point on the path.
SvgPath(wxSVGFileDC &dc, const AffineMatrix2 &matrix)
virtual void addPoint(const PlotPoint &point) override
Adds a next point on the path.
virtual void endPath() override
Finalizes the path. Does not connect the last point to anything.
Simple 2D vector with integer coordinates. Provides conversion from and to wxPoint.