15#ifndef RDKIT_DRAWSHAPE_H
16#define RDKIT_DRAWSHAPE_H
31namespace MolDraw2D_detail {
37 DrawShape(
const std::vector<Point2D> &points,
int lineWidth = 2,
38 bool scaleLineWidth =
false,
40 int atom1 = -1,
int atom2 = -1,
int bond = -1);
49 virtual void findExtremes(
double &xmin,
double &xmax,
double &ymin,
66 bool scaleLineWidth =
false,
68 int atom1 = -1,
int atom2 = -1,
int bond = -1,
69 double frac = 0.2,
double angle =
M_PI / 6);
86 bool scaleLineWidth =
false,
88 bool fill =
false,
int atom1 = -1);
96 double &ymax)
const override;
103 bool scaleLineWidth =
false,
105 int atom1 = -1,
int atom2 = -1,
int bond = -1,
121 bool scaleLineWidth =
false,
123 bool fill =
false,
int atom1 = -1,
int atom2 = -1,
139 const DrawColour &col2,
bool splitBonds,
int atom1 = -1,
140 int atom2 = -1,
int bond = -1);
158 int atom1 = -1,
int atom2 = -1,
int bond = -1);
180 bool scaleLineWidth =
false,
183 double offset = 0.05,
int atom1 = -1,
int atom2 = -1,
206 DrawShapeArc(
const std::vector<Point2D> points,
double ang1,
double ang2,
207 int lineWidth = 2,
bool scaleLineWidth =
false,
218 double &ymax)
const override;
DrawShapeArc(DrawShapeArc &&)=delete
DrawShapeArc(const std::vector< Point2D > points, double ang1, double ang2, int lineWidth=2, bool scaleLineWidth=false, const DrawColour &col1=DrawColour(0, 0, 0), bool fill=false, int atom1=-1)
bool doesRectClash(const StringRect &rect, double padding) const override
DrawShapeArc & operator=(DrawShapeArc &&)=delete
void move(const Point2D &trans) override
DrawShapeArc & operator=(const DrawShapeArc &)=delete
DrawShapeArc(const DrawShapeArc &)=delete
void myDraw(MolDraw2D &drawer) const override
void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const override
DrawShapeArrow(const std::vector< Point2D > &points, int lineWidth=2, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), bool fill=false, int atom1=-1, int atom2=-1, int bond=-1, double frac=0.2, double angle=M_PI/6)
~DrawShapeArrow()=default
bool doesRectClash(const StringRect &rect, double padding) const override
void myDraw(MolDraw2D &drawer) const override
DrawShapeArrow(const DrawShapeArrow &)=delete
DrawShapeArrow(DrawShapeArrow &&)=delete
DrawShapeArrow & operator=(DrawShapeArrow &&)=delete
DrawShapeArrow & operator=(const DrawShapeArrow &)=delete
void myDraw(MolDraw2D &drawer) const override
void scale(const Point2D &scale_factor) override
void move(const Point2D &trans) override
DrawShapeDashedWedge & operator=(const DrawShapeDashedWedge &)=delete
bool doesRectClash(const StringRect &rect, double padding) const override
DrawShapeDashedWedge(const std::vector< Point2D > points, const DrawColour &col1, const DrawColour &col2, int atom1=-1, int atom2=-1, int bond=-1)
std::vector< DrawColour > lineColours_
DrawShapeDashedWedge & operator=(DrawShapeDashedWedge &&)=delete
DrawShapeDashedWedge(const DrawShapeDashedWedge &)=delete
DrawShapeDashedWedge(DrawShapeDashedWedge &&)=delete
~DrawShapeDashedWedge()=default
DrawShapeEllipse(DrawShapeEllipse &&)=delete
bool doesRectClash(const StringRect &rect, double padding) const override
void myDraw(MolDraw2D &drawer) const override
DrawShapeEllipse(const DrawShapeEllipse &)=delete
DrawShapeEllipse & operator=(DrawShapeEllipse &&)=delete
DrawShapeEllipse(const std::vector< Point2D > &points, int lineWidth=2, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), bool fill=false, int atom1=-1)
~DrawShapeEllipse()=default
DrawShapeEllipse & operator=(const DrawShapeEllipse &)=delete
void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const override
bool doesRectClash(const StringRect &rect, double padding) const override
void myDraw(MolDraw2D &drawer) const override
~DrawShapePolyLine()=default
DrawShapePolyLine(const DrawShapePolyLine &)=delete
DrawShapePolyLine(DrawShapePolyLine &&)=delete
DrawShapePolyLine(const std::vector< Point2D > &points, int lineWidth=2, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), bool fill=false, int atom1=-1, int atom2=-1, int bond=-1, DashPattern dashPattern=noDash)
DrawShapePolyLine & operator=(DrawShapePolyLine &&)=delete
DrawShapePolyLine & operator=(const DrawShapePolyLine &)=delete
bool doesRectClash(const StringRect &rect, double padding) const override
DrawShapeSimpleLine & operator=(DrawShapeSimpleLine &&)=delete
DrawShapeSimpleLine(DrawShapeSimpleLine &&)=delete
DrawShapeSimpleLine(const std::vector< Point2D > &points, int lineWidth=2, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), int atom1=-1, int atom2=-1, int bond=-1, DashPattern dashPattern=noDash)
DrawShapeSimpleLine(const DrawShapeSimpleLine &)=delete
void myDraw(MolDraw2D &drawer) const override
DrawShapeSimpleLine & operator=(const DrawShapeSimpleLine &)=delete
~DrawShapeSimpleLine()=default
bool doesRectClash(const StringRect &rect, double padding) const override
void myDraw(MolDraw2D &drawer) const override
DrawShapeSolidWedge & operator=(DrawShapeSolidWedge &&)=delete
DrawShapeSolidWedge(DrawShapeSolidWedge &&)=delete
~DrawShapeSolidWedge()=default
DrawShapeSolidWedge(const std::vector< Point2D > points, const DrawColour &col1, const DrawColour &col2, bool splitBonds, int atom1=-1, int atom2=-1, int bond=-1)
DrawShapeSolidWedge & operator=(const DrawShapeSolidWedge &)=delete
DrawShapeSolidWedge(const DrawShapeSolidWedge &)=delete
bool doesRectClash(const StringRect &rect, double padding) const override
DrawShapeWavyLine & operator=(const DrawShapeWavyLine &)=delete
DrawShapeWavyLine(const DrawShapeWavyLine &)=delete
DrawShapeWavyLine & operator=(DrawShapeWavyLine &&)=delete
void myDraw(MolDraw2D &drawer) const override
DrawShapeWavyLine(DrawShapeWavyLine &&)=delete
void scale(const Point2D &scaleFactor) override
DrawShapeWavyLine(const std::vector< Point2D > points, int lineWidth=2, bool scaleLineWidth=false, const DrawColour &col1=DrawColour(0, 0, 0), const DrawColour &col2=DrawColour(0, 0, 0), double offset=0.05, int atom1=-1, int atom2=-1, int bond=-1)
~DrawShapeWavyLine()=default
virtual void myDraw(MolDraw2D &drawer) const =0
DrawShape(const std::vector< Point2D > &points, int lineWidth=2, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), bool fill=false, int atom1=-1, int atom2=-1, int bond=-1)
virtual void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const
virtual bool doesRectClash(const StringRect &rect, double padding) const
void draw(MolDraw2D &drawer)
std::vector< Point2D > points_
DrawShape & operator=(DrawShape &&)=delete
virtual ~DrawShape()=default
DrawShape & operator=(const DrawShape &)=delete
virtual void scale(const Point2D &scale_factor)
virtual void move(const Point2D &trans)
DrawShape(const DrawShape &)=delete
DrawShape(DrawShape &&)=delete
MolDraw2D is the base class for doing 2D renderings of molecules.
std::vector< double > DashPattern
const DashPattern shortDashes