RDKit: DrawShape.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
DrawShape.h
Go to the documentation of this file.
1//
2// Copyright (C) 2021-2022 David Cosgrove and other RDKit contributors
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10// Original author: David Cosgrove (CozChemIx Limited)
11//
12
13// A set of shapes used in 2D drawing.d Not part of the public API.
14
15#ifndef RDKIT_DRAWSHAPE_H
16#define RDKIT_DRAWSHAPE_H
17
18#include <vector>
19
20#include <Geometry/point.h>
21#include <GraphMol/MolDraw2D/MolDraw2DHelpers.h>
22
23namespace RDKit {
24
25class MolDraw2D;
26 const DashPattern noDash;
27 const DashPattern dots{2.0, 6.0};
28 const DashPattern dashes{6.0, 4.0};
29 const DashPattern shortDashes{2.0, 2.0};
30
31namespace MolDraw2D_detail {
32
33struct StringRect;
34
35 class DrawShape {
36 public:
37 DrawShape(const std::vector<Point2D> &points, double lineWidth = 2.0,
38 bool scaleLineWidth = false,
39 DrawColour lineColour = DrawColour(0, 0, 0), bool fill = false,
40 int atom1 = -1, int atom2 = -1, int bond = -1);
41 DrawShape(const DrawShape &) = delete;
42 DrawShape(DrawShape &&) = delete;
43 virtual ~DrawShape() = default;
44 DrawShape &operator=(const DrawShape &) = delete;
45 DrawShape &operator=(DrawShape &&) = delete;
46
47 void draw(MolDraw2D &drawer);
48 virtual void myDraw(MolDraw2D &drawer) const = 0;
49 virtual void findExtremes(double &xmin, double &xmax, double &ymin,
50 double &ymax) const;
51 virtual void scale(const Point2D &scale_factor);
52 virtual void move(const Point2D &trans);
53 virtual bool doesRectClash(const StringRect &rect, double padding) const;
54
55 std::vector<Point2D> points_;
56 double lineWidth_;
57 bool scaleLineWidth_;
58 DrawColour lineColour_;
59 bool fill_;
60 int atom1_, atom2_, bond_;
61};
62
63 class DrawShapeArrow : public DrawShape {
64 public:
65 DrawShapeArrow(const std::vector<Point2D> &points, double lineWidth = 2.0,
66 bool scaleLineWidth = false,
67 DrawColour lineColour = DrawColour(0, 0, 0), bool fill = false,
68 int atom1 = -1, int atom2 = -1, int bond = -1,
69 double frac = 0.2, double angle = M_PI / 6);
70 DrawShapeArrow(const DrawShapeArrow &) = delete;
71 DrawShapeArrow(DrawShapeArrow &&) = delete;
72 ~DrawShapeArrow() override = default;
73 DrawShapeArrow &operator=(const DrawShapeArrow &) = delete;
74 DrawShapeArrow &operator=(DrawShapeArrow &&) = delete;
75 void myDraw(MolDraw2D &drawer) const override;
76 void findExtremes(double &xmin, double &xmax, double &ymin,
77 double &ymax) const override;
78 void scale(const Point2D &scale_factor) override;
79 void move(const Point2D &trans) override;
80 bool doesRectClash(const StringRect &rect, double padding) const override;
81
82 double frac_;
83 double angle_;
84 Point2D origPts_[4]{{0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}, {0.0, 0.0}};
85};
86
87 class DrawShapeEllipse : public DrawShape {
88 public:
89 // Points should be size 2 - the first entry is the centre, the second
90 // gives the x and y radii of the ellipse.
91 DrawShapeEllipse(const std::vector<Point2D> &points, double lineWidth = 2,
92 bool scaleLineWidth = false,
93 DrawColour lineColour = DrawColour(0, 0, 0),
94 bool fill = false, int atom1 = -1);
95 DrawShapeEllipse(const DrawShapeEllipse &) = delete;
96 DrawShapeEllipse(DrawShapeEllipse &&) = delete;
97 ~DrawShapeEllipse() override = default;
98 DrawShapeEllipse &operator=(const DrawShapeEllipse &) = delete;
99 DrawShapeEllipse &operator=(DrawShapeEllipse &&) = delete;
100 void myDraw(MolDraw2D &drawer) const override;
101 void findExtremes(double &xmin, double &xmax, double &ymin,
102 double &ymax) const override;
103 void move(const Point2D &trans) override;
104 bool doesRectClash(const StringRect &rect, double padding) const override;
105};
106
107 class DrawShapeSimpleLine : public DrawShape {
108 public:
109 DrawShapeSimpleLine(const std::vector<Point2D> &points,
110 double lineWidth = 2.0, bool scaleLineWidth = false,
111 DrawColour lineColour = DrawColour(0, 0, 0),
112 int atom1 = -1, int atom2 = -1, int bond = -1,
113 DashPattern dashPattern = noDash);
114 DrawShapeSimpleLine(const DrawShapeSimpleLine &) = delete;
115 DrawShapeSimpleLine(DrawShapeSimpleLine &&) = delete;
116 ~DrawShapeSimpleLine() override = default;
117 DrawShapeSimpleLine &operator=(const DrawShapeSimpleLine &) = delete;
118 DrawShapeSimpleLine &operator=(DrawShapeSimpleLine &&) = delete;
119 void myDraw(MolDraw2D &drawer) const override;
120 bool doesRectClash(const StringRect &rect, double padding) const override;
121
122 DashPattern dashPattern_;
123};
124
125 class DrawShapePolyLine : public DrawShape {
126 public:
127 DrawShapePolyLine(const std::vector<Point2D> &points, double lineWidth = 2.0,
128 bool scaleLineWidth = false,
129 DrawColour lineColour = DrawColour(0, 0, 0),
130 bool fill = false, int atom1 = -1, int atom2 = -1,
131 int bond = -1, DashPattern dashPattern = noDash);
132 DrawShapePolyLine(const DrawShapePolyLine &) = delete;
133 DrawShapePolyLine(DrawShapePolyLine &&) = delete;
134 ~DrawShapePolyLine() override = default;
135 DrawShapePolyLine &operator=(const DrawShapePolyLine &) = delete;
136 DrawShapePolyLine &operator=(DrawShapePolyLine &&) = delete;
137 void myDraw(MolDraw2D &drawer) const override;
138 bool doesRectClash(const StringRect &rect, double padding) const override;
139
140 DashPattern dashPattern_;
141};
142
143 class DrawShapeSolidWedge : public DrawShape {
144 public:
145 DrawShapeSolidWedge(const std::vector<Point2D> points, const DrawColour &col1,
146 const DrawColour &col2, bool splitBonds,
147 std::vector<Point2D> &otherBondVecs,
148 double lineWidth = 1.0, int atom1 = -1, int atom2 = -1,
149 int bond = -1);
150 DrawShapeSolidWedge(const DrawShapeSolidWedge &) = delete;
151 DrawShapeSolidWedge(DrawShapeSolidWedge &&) = delete;
152 ~DrawShapeSolidWedge() override = default;
153 DrawShapeSolidWedge &operator=(const DrawShapeSolidWedge &) = delete;
154 DrawShapeSolidWedge &operator=(DrawShapeSolidWedge &&) = delete;
155 void buildTriangles();
156 void buildSingleColorTriangles();
157 void buildTwoColorTriangles();
158 void myDraw(MolDraw2D &drawer) const override;
159 bool doesRectClash(const StringRect &rect, double padding) const override;
160 // if otherBondVecs_.size() > 2, then we only want the two vecs with the
161 // widest angle between them.
162 void trimOtherBondVecs();
163 // if there are 2 otherBondVecs_ (assuming we've already trimmed down to 2 if
164 // necessary) make sure the first is on the points_[1] side, the second on
165 // the points_[2] side, so that the merging of the triangles to the bond
166 // lines is correct.
167 void orderOtherBondVecs();
168
169 DrawColour col2_;
170 bool splitBonds_;
171 std::vector<Point2D> otherBondVecs_;
172};
173
174 class DrawShapeDashedWedge : public DrawShape {
175 public:
176 // oneLessDash means that the last dash at the fat end of the wedge
177 // isn't drawn. The wedge will be as fat as it would have been with
178 // the extra dash. This is so that bonds coming out of the fat end
179 // of the wedge aren't directly incident on a dash.
180 DrawShapeDashedWedge(const std::vector<Point2D> points,
181 const DrawColour &col1, const DrawColour &col2,
182 bool oneLessDash = true, double lineWidth = 1.0,
183 int atom1 = -1, int atom2 = -1, int bond = -1);
184 DrawShapeDashedWedge(const DrawShapeDashedWedge &) = delete;
185 DrawShapeDashedWedge(DrawShapeDashedWedge &&) = delete;
186 ~DrawShapeDashedWedge() override = default;
187 DrawShapeDashedWedge &operator=(const DrawShapeDashedWedge &) = delete;
188 DrawShapeDashedWedge &operator=(DrawShapeDashedWedge &&) = delete;
189 void buildLines();
190 void myDraw(MolDraw2D &drawer) const override;
191 void scale(const Point2D &scale_factor) override;
192 void move(const Point2D &trans) override;
193 void findExtremes(double &xmin, double &xmax, double &ymin,
194 double &ymax) const override;
195 bool doesRectClash(const StringRect &rect, double padding) const override;
196
197 DrawColour col2_;
198 bool oneLessDash_;
199 std::vector<DrawColour> lineColours_;
200 // for when we re-create the lines, such as after scaling, this is
201 // the initial points[0-2] from the c'tor.
202 Point2D at1Cds_, end1Cds_, end2Cds_;
203};
204
205 class DrawShapeWavyLine : public DrawShape {
206 public:
207 DrawShapeWavyLine(const std::vector<Point2D> points, double lineWidth = 2.0,
208 bool scaleLineWidth = false,
209 const DrawColour &col1 = DrawColour(0, 0, 0),
210 const DrawColour &col2 = DrawColour(0, 0, 0),
211 double offset = 0.05, int atom1 = -1, int atom2 = -1,
212 int bond = -1);
213 DrawShapeWavyLine(const DrawShapeWavyLine &) = delete;
214 DrawShapeWavyLine(DrawShapeWavyLine &&) = delete;
215 ~DrawShapeWavyLine() override = default;
216 DrawShapeWavyLine &operator=(const DrawShapeWavyLine &) = delete;
217 DrawShapeWavyLine &operator=(DrawShapeWavyLine &&) = delete;
218 void myDraw(MolDraw2D &drawer) const override;
219 void scale(const Point2D &scaleFactor) override;
220 bool doesRectClash(const StringRect &rect, double padding) const override;
221
222 DrawColour col2_;
223 double offset_;
224};
225
226 class DrawShapeArc : public DrawShape {
227 public:
228 // draw the arc of an ellipse between ang1 and ang2. Note that 0 is
229 // at 3 o-clock and 90 at 12 o'clock as you'd expect from your maths.
230 // BUT because y increases down the screen, the angles go anticlockwise, such
231 // that 90 is actually at 6 o'clock on the screen.
232 // ang2 must be > ang1 - it won't draw backwards. Angles in degrees,
233 // between 0 and 360.0.
234 // Points should be size 2 - the first entry is the centre, the second
235 // gives the x and y radii of the ellipse.
236 DrawShapeArc(const std::vector<Point2D> points, double ang1, double ang2,
237 double lineWidth = 2.0, bool scaleLineWidth = false,
238 const DrawColour &col1 = DrawColour(0, 0, 0), bool fill = false,
239 int atom1 = -1);
240 DrawShapeArc(const DrawShapeArc &) = delete;
241 DrawShapeArc(DrawShapeArc &&) = delete;
242 ~DrawShapeArc() override = default;
243 DrawShapeArc &operator=(const DrawShapeArc &) = delete;
244 DrawShapeArc &operator=(DrawShapeArc &&) = delete;
245
246 void myDraw(MolDraw2D &drawer) const override;
247 void findExtremes(double &xmin, double &xmax, double &ymin,
248 double &ymax) const override;
249 void move(const Point2D &trans) override;
250 bool doesRectClash(const StringRect &rect, double padding) const override;
251
252 double ang1_, ang2_;
253};
254
255} // namespace MolDraw2D_detail
256} // namespace RDKit
257
258#endif // RDKIT_DRAWSHAPE_H
M_PI
#define M_PI
Definition MMFF/Params.h:25
MolDraw2DHelpers.h
RDGeom::Point2D
Definition point.h:284
RDKit::MolDraw2D_detail::DrawShapeArc::DrawShapeArc
DrawShapeArc(DrawShapeArc &&)=delete
RDKit::MolDraw2D_detail::DrawShapeArc::ang1_
double ang1_
Definition DrawShape.h:252
RDKit::MolDraw2D_detail::DrawShapeArc::~DrawShapeArc
~DrawShapeArc() override=default
RDKit::MolDraw2D_detail::DrawShapeArc::ang2_
double ang2_
Definition DrawShape.h:252
RDKit::MolDraw2D_detail::DrawShapeArc::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapeArc::operator=
DrawShapeArc & operator=(DrawShapeArc &&)=delete
RDKit::MolDraw2D_detail::DrawShapeArc::move
void move(const Point2D &trans) override
RDKit::MolDraw2D_detail::DrawShapeArc::operator=
DrawShapeArc & operator=(const DrawShapeArc &)=delete
RDKit::MolDraw2D_detail::DrawShapeArc::DrawShapeArc
DrawShapeArc(const DrawShapeArc &)=delete
RDKit::MolDraw2D_detail::DrawShapeArc::DrawShapeArc
DrawShapeArc(const std::vector< Point2D > points, double ang1, double ang2, double lineWidth=2.0, bool scaleLineWidth=false, const DrawColour &col1=DrawColour(0, 0, 0), bool fill=false, int atom1=-1)
RDKit::MolDraw2D_detail::DrawShapeArc::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapeArc::findExtremes
void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const override
RDKit::MolDraw2D_detail::DrawShapeArrow::scale
void scale(const Point2D &scale_factor) override
RDKit::MolDraw2D_detail::DrawShapeArrow::move
void move(const Point2D &trans) override
RDKit::MolDraw2D_detail::DrawShapeArrow::findExtremes
void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const override
RDKit::MolDraw2D_detail::DrawShapeArrow::~DrawShapeArrow
~DrawShapeArrow() override=default
RDKit::MolDraw2D_detail::DrawShapeArrow::origPts_
Point2D origPts_[4]
Definition DrawShape.h:84
RDKit::MolDraw2D_detail::DrawShapeArrow::frac_
double frac_
Definition DrawShape.h:82
RDKit::MolDraw2D_detail::DrawShapeArrow::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapeArrow::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapeArrow::DrawShapeArrow
DrawShapeArrow(const DrawShapeArrow &)=delete
RDKit::MolDraw2D_detail::DrawShapeArrow::DrawShapeArrow
DrawShapeArrow(const std::vector< Point2D > &points, double lineWidth=2.0, 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)
RDKit::MolDraw2D_detail::DrawShapeArrow::DrawShapeArrow
DrawShapeArrow(DrawShapeArrow &&)=delete
RDKit::MolDraw2D_detail::DrawShapeArrow::operator=
DrawShapeArrow & operator=(DrawShapeArrow &&)=delete
RDKit::MolDraw2D_detail::DrawShapeArrow::operator=
DrawShapeArrow & operator=(const DrawShapeArrow &)=delete
RDKit::MolDraw2D_detail::DrawShapeArrow::angle_
double angle_
Definition DrawShape.h:83
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::at1Cds_
Point2D at1Cds_
Definition DrawShape.h:202
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::end2Cds_
Point2D end2Cds_
Definition DrawShape.h:202
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::buildLines
void buildLines()
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::findExtremes
void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const override
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::end1Cds_
Point2D end1Cds_
Definition DrawShape.h:202
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::scale
void scale(const Point2D &scale_factor) override
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::col2_
DrawColour col2_
Definition DrawShape.h:197
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::move
void move(const Point2D &trans) override
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::operator=
DrawShapeDashedWedge & operator=(const DrawShapeDashedWedge &)=delete
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::lineColours_
std::vector< DrawColour > lineColours_
Definition DrawShape.h:199
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::operator=
DrawShapeDashedWedge & operator=(DrawShapeDashedWedge &&)=delete
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::DrawShapeDashedWedge
DrawShapeDashedWedge(const DrawShapeDashedWedge &)=delete
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::~DrawShapeDashedWedge
~DrawShapeDashedWedge() override=default
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::DrawShapeDashedWedge
DrawShapeDashedWedge(DrawShapeDashedWedge &&)=delete
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::oneLessDash_
bool oneLessDash_
Definition DrawShape.h:198
RDKit::MolDraw2D_detail::DrawShapeDashedWedge::DrawShapeDashedWedge
DrawShapeDashedWedge(const std::vector< Point2D > points, const DrawColour &col1, const DrawColour &col2, bool oneLessDash=true, double lineWidth=1.0, int atom1=-1, int atom2=-1, int bond=-1)
RDKit::MolDraw2D_detail::DrawShapeEllipse::DrawShapeEllipse
DrawShapeEllipse(const std::vector< Point2D > &points, double lineWidth=2, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), bool fill=false, int atom1=-1)
RDKit::MolDraw2D_detail::DrawShapeEllipse::DrawShapeEllipse
DrawShapeEllipse(DrawShapeEllipse &&)=delete
RDKit::MolDraw2D_detail::DrawShapeEllipse::move
void move(const Point2D &trans) override
RDKit::MolDraw2D_detail::DrawShapeEllipse::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapeEllipse::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapeEllipse::DrawShapeEllipse
DrawShapeEllipse(const DrawShapeEllipse &)=delete
RDKit::MolDraw2D_detail::DrawShapeEllipse::~DrawShapeEllipse
~DrawShapeEllipse() override=default
RDKit::MolDraw2D_detail::DrawShapeEllipse::operator=
DrawShapeEllipse & operator=(DrawShapeEllipse &&)=delete
RDKit::MolDraw2D_detail::DrawShapeEllipse::operator=
DrawShapeEllipse & operator=(const DrawShapeEllipse &)=delete
RDKit::MolDraw2D_detail::DrawShapeEllipse::findExtremes
void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const override
RDKit::MolDraw2D_detail::DrawShapePolyLine::DrawShapePolyLine
DrawShapePolyLine(const std::vector< Point2D > &points, double lineWidth=2.0, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), bool fill=false, int atom1=-1, int atom2=-1, int bond=-1, DashPattern dashPattern=noDash)
RDKit::MolDraw2D_detail::DrawShapePolyLine::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapePolyLine::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapePolyLine::~DrawShapePolyLine
~DrawShapePolyLine() override=default
RDKit::MolDraw2D_detail::DrawShapePolyLine::DrawShapePolyLine
DrawShapePolyLine(const DrawShapePolyLine &)=delete
RDKit::MolDraw2D_detail::DrawShapePolyLine::DrawShapePolyLine
DrawShapePolyLine(DrawShapePolyLine &&)=delete
RDKit::MolDraw2D_detail::DrawShapePolyLine::operator=
DrawShapePolyLine & operator=(DrawShapePolyLine &&)=delete
RDKit::MolDraw2D_detail::DrawShapePolyLine::operator=
DrawShapePolyLine & operator=(const DrawShapePolyLine &)=delete
RDKit::MolDraw2D_detail::DrawShapePolyLine::dashPattern_
DashPattern dashPattern_
Definition DrawShape.h:140
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::dashPattern_
DashPattern dashPattern_
Definition DrawShape.h:122
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::DrawShapeSimpleLine
DrawShapeSimpleLine(const std::vector< Point2D > &points, double lineWidth=2.0, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), int atom1=-1, int atom2=-1, int bond=-1, DashPattern dashPattern=noDash)
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::operator=
DrawShapeSimpleLine & operator=(DrawShapeSimpleLine &&)=delete
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::DrawShapeSimpleLine
DrawShapeSimpleLine(DrawShapeSimpleLine &&)=delete
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::~DrawShapeSimpleLine
~DrawShapeSimpleLine() override=default
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::DrawShapeSimpleLine
DrawShapeSimpleLine(const DrawShapeSimpleLine &)=delete
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapeSimpleLine::operator=
DrawShapeSimpleLine & operator=(const DrawShapeSimpleLine &)=delete
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::otherBondVecs_
std::vector< Point2D > otherBondVecs_
Definition DrawShape.h:171
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::buildTriangles
void buildTriangles()
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::DrawShapeSolidWedge
DrawShapeSolidWedge(const std::vector< Point2D > points, const DrawColour &col1, const DrawColour &col2, bool splitBonds, std::vector< Point2D > &otherBondVecs, double lineWidth=1.0, int atom1=-1, int atom2=-1, int bond=-1)
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::operator=
DrawShapeSolidWedge & operator=(DrawShapeSolidWedge &&)=delete
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::~DrawShapeSolidWedge
~DrawShapeSolidWedge() override=default
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::DrawShapeSolidWedge
DrawShapeSolidWedge(DrawShapeSolidWedge &&)=delete
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::orderOtherBondVecs
void orderOtherBondVecs()
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::buildSingleColorTriangles
void buildSingleColorTriangles()
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::trimOtherBondVecs
void trimOtherBondVecs()
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::splitBonds_
bool splitBonds_
Definition DrawShape.h:170
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::col2_
DrawColour col2_
Definition DrawShape.h:169
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::operator=
DrawShapeSolidWedge & operator=(const DrawShapeSolidWedge &)=delete
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::DrawShapeSolidWedge
DrawShapeSolidWedge(const DrawShapeSolidWedge &)=delete
RDKit::MolDraw2D_detail::DrawShapeSolidWedge::buildTwoColorTriangles
void buildTwoColorTriangles()
RDKit::MolDraw2D_detail::DrawShapeWavyLine::doesRectClash
bool doesRectClash(const StringRect &rect, double padding) const override
RDKit::MolDraw2D_detail::DrawShapeWavyLine::operator=
DrawShapeWavyLine & operator=(const DrawShapeWavyLine &)=delete
RDKit::MolDraw2D_detail::DrawShapeWavyLine::DrawShapeWavyLine
DrawShapeWavyLine(const DrawShapeWavyLine &)=delete
RDKit::MolDraw2D_detail::DrawShapeWavyLine::offset_
double offset_
Definition DrawShape.h:223
RDKit::MolDraw2D_detail::DrawShapeWavyLine::col2_
DrawColour col2_
Definition DrawShape.h:222
RDKit::MolDraw2D_detail::DrawShapeWavyLine::operator=
DrawShapeWavyLine & operator=(DrawShapeWavyLine &&)=delete
RDKit::MolDraw2D_detail::DrawShapeWavyLine::myDraw
void myDraw(MolDraw2D &drawer) const override
RDKit::MolDraw2D_detail::DrawShapeWavyLine::~DrawShapeWavyLine
~DrawShapeWavyLine() override=default
RDKit::MolDraw2D_detail::DrawShapeWavyLine::DrawShapeWavyLine
DrawShapeWavyLine(DrawShapeWavyLine &&)=delete
RDKit::MolDraw2D_detail::DrawShapeWavyLine::scale
void scale(const Point2D &scaleFactor) override
RDKit::MolDraw2D_detail::DrawShapeWavyLine::DrawShapeWavyLine
DrawShapeWavyLine(const std::vector< Point2D > points, double lineWidth=2.0, 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)
RDKit::MolDraw2D_detail::DrawShape::atom2_
int atom2_
Definition DrawShape.h:60
RDKit::MolDraw2D_detail::DrawShape::myDraw
virtual void myDraw(MolDraw2D &drawer) const =0
RDKit::MolDraw2D_detail::DrawShape::findExtremes
virtual void findExtremes(double &xmin, double &xmax, double &ymin, double &ymax) const
RDKit::MolDraw2D_detail::DrawShape::doesRectClash
virtual bool doesRectClash(const StringRect &rect, double padding) const
RDKit::MolDraw2D_detail::DrawShape::draw
void draw(MolDraw2D &drawer)
RDKit::MolDraw2D_detail::DrawShape::points_
std::vector< Point2D > points_
Definition DrawShape.h:55
RDKit::MolDraw2D_detail::DrawShape::scaleLineWidth_
bool scaleLineWidth_
Definition DrawShape.h:57
RDKit::MolDraw2D_detail::DrawShape::atom1_
int atom1_
Definition DrawShape.h:60
RDKit::MolDraw2D_detail::DrawShape::operator=
DrawShape & operator=(DrawShape &&)=delete
RDKit::MolDraw2D_detail::DrawShape::~DrawShape
virtual ~DrawShape()=default
RDKit::MolDraw2D_detail::DrawShape::operator=
DrawShape & operator=(const DrawShape &)=delete
RDKit::MolDraw2D_detail::DrawShape::DrawShape
DrawShape(const std::vector< Point2D > &points, double lineWidth=2.0, bool scaleLineWidth=false, DrawColour lineColour=DrawColour(0, 0, 0), bool fill=false, int atom1=-1, int atom2=-1, int bond=-1)
RDKit::MolDraw2D_detail::DrawShape::bond_
int bond_
Definition DrawShape.h:60
RDKit::MolDraw2D_detail::DrawShape::scale
virtual void scale(const Point2D &scale_factor)
RDKit::MolDraw2D_detail::DrawShape::move
virtual void move(const Point2D &trans)
RDKit::MolDraw2D_detail::DrawShape::DrawShape
DrawShape(const DrawShape &)=delete
RDKit::MolDraw2D_detail::DrawShape::fill_
bool fill_
Definition DrawShape.h:59
RDKit::MolDraw2D_detail::DrawShape::lineColour_
DrawColour lineColour_
Definition DrawShape.h:58
RDKit::MolDraw2D_detail::DrawShape::lineWidth_
double lineWidth_
Definition DrawShape.h:56
RDKit::MolDraw2D_detail::DrawShape::DrawShape
DrawShape(DrawShape &&)=delete
RDKit::MolDraw2D
MolDraw2D is the base class for doing 2D renderings of molecules.
Definition MolDraw2D.h:47
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::dots
const DashPattern dots
Definition DrawShape.h:27
RDKit::DashPattern
std::vector< double > DashPattern
Definition MolDraw2DHelpers.h:69
RDKit::dashes
const DashPattern dashes
Definition DrawShape.h:28
RDKit::noDash
const DashPattern noDash
Definition DrawShape.h:26
RDKit::shortDashes
const DashPattern shortDashes
Definition DrawShape.h:29
point.h
RDKit::DrawColour
Definition MolDraw2DHelpers.h:40
RDKit::MolDraw2D_detail::StringRect
Definition StringRect.h:24