22#include <emscripten.h>
23#include <emscripten/val.h>
35 int panelWidth = -1,
int panelHeight = -1,
36 bool noFreetype =
false)
37 :
MolDraw2D(width, height, panelWidth, panelHeight), d_context(context) {
42 initTextDrawer(noFreetype);
50 bool rawCoords =
false)
override;
52 bool rawCoords =
false)
override;
54 bool rawCoords =
false)
override;
58 unsigned int nSegments = 16,
double vertOffset = 0.05,
59 bool rawCoords =
false)
override;
62 emscripten::val &d_context;
63 void initDrawing()
override;
64 void initTextDrawer(
bool noFreetype)
override;
#define PRECONDITION(expr, mess)
void drawPolygon(const std::vector< Point2D > &cds, bool rawCoords=false) override
void drawWavyLine(const Point2D &cds1, const Point2D &cds2, const DrawColour &col1, const DrawColour &col2, unsigned int nSegments=16, double vertOffset=0.05, bool rawCoords=false) override
draw a wavy line like that used to indicate unknown stereochemistry
MolDraw2DJS(int width, int height, emscripten::val &context, int panelWidth=-1, int panelHeight=-1, bool noFreetype=false)
void drawEllipse(const Point2D &cds1, const Point2D &cds2, bool rawCoords=false) override
draw an ellipse
void drawLine(const Point2D &cds1, const Point2D &cds2, bool rawCoords=false) override
MolDraw2DJS(const MolDraw2DJS &)=delete
MolDraw2DJS & operator=(const MolDraw2DJS &)=delete
MolDraw2DJS & operator=(MolDraw2DJS &&)=delete
MolDraw2DJS(MolDraw2DJS &&)=delete
void clearDrawing() override
clears the contents of the drawing
MolDraw2D is the base class for doing 2D renderings of molecules.
#define RDKIT_MOLDRAW2D_EXPORT