14#ifndef RDKIT_MOLDRAW2DHELPERS_H
15#define RDKIT_MOLDRAW2DHELPERS_H
41 double r = 0.0,
g = 0.0,
b = 0.0,
a = 1.0;
46 return r == other.
r &&
g == other.
g &&
b == other.
b &&
a == other.
a;
50 bool ignoreAlpha =
true)
const {
51 return fabs(
r - other.
r) <= tol && fabs(
g - other.
g) <= tol &&
52 fabs(
b - other.
b) <= tol &&
53 (ignoreAlpha || fabs(
a - other.
a) <= tol);
56 return {
r + other.
r,
g + other.
g,
b + other.
b,
a + other.
a};
59 return {
r - other.
r,
g - other.
g,
b - other.
b,
a - other.
a};
63 return {
r / v,
g / v,
b / v,
a / v};
82 palette[1] = palette[6] =
DrawColour(0.0, 0.0, 0.0);
100 palette[1] = palette[6] =
DrawColour(0.0, 0.0, 0.0);
122 palette[1] = palette[6] =
DrawColour(0.0, 0.0, 0.0);
127 palette[16] =
DrawColour(0.776, 0.776, 0.173);
128 palette[17] =
DrawColour(0.122, 0.498, 0.122);
129 palette[35] =
DrawColour(0.651, 0.161, 0.161);
140 palette[1] = palette[6] =
DrawColour(0.9, 0.9, 0.9);
168 ANNOTATIONS = 1 << 4,
#define BETTER_ENUM(Enum, Underlying,...)
#define PRECONDITION(expr, mess)
#define RDKIT_MOLDRAW2D_EXPORT
std::vector< double > DashPattern
static const double lineWidthScaleFactor
MultiColourHighlightStyle
void assignDefaultPalette(ColourPalette &palette)
use the RDKit's default palette r
void assignAvalonPalette(ColourPalette &palette)
use the color palette from the Avalon renderer
void assignDarkModePalette(ColourPalette &palette)
std::map< int, DrawColour > ColourPalette
void assignBWPalette(ColourPalette &palette)
void assignCDKPalette(ColourPalette &palette)
use (part of) the CDK color palette
bool feq(const DrawColour &other, double tol=0.001, bool ignoreAlpha=true) const
DrawColour operator+(const DrawColour &other) const
DrawColour operator/(double v) const
DrawColour operator*(double v) const
DrawColour(double r, double g, double b, double a=1.0)
bool operator!=(const DrawColour &other) const
DrawColour operator-(const DrawColour &other) const
bool operator==(const DrawColour &other) const
double multipleBondOffset
std::vector< std::vector< int > > atomRegions
bool prepareMolsBeforeDrawing
DrawColour bondNoteColour
bool dummiesAreAttachments
bool includeChiralFlagLabel
bool scaleHighlightBondWidth
DrawColour variableAttachmentColour
bool centreMoleculesBeforeDrawing
double annotationFontScale
std::uint32_t drawingExtentsInclude
DrawColour highlightColour
int flagCloseContactsDist
bool bracketsAroundAtomLists
bool atomLabelDeuteriumTritium
int variableBondWidthMultiplier
bool atomHighlightsAreCircles
bool simplifiedStereoGroupLabel
std::map< int, std::string > atomLabels
DrawColour atomNoteColour
ColourPalette atomColourPalette
double additionalAtomLabelPadding
double variableAtomRadius
DrawColour backgroundColour
MultiColourHighlightStyle multiColourHighlightStyle
DrawColour annotationColour
bool singleColourWedgeBonds
bool unspecifiedStereoIsUnknown
bool standardColoursForHighlightedAtoms
bool useComplexQueryAtomSymbols
int highlightBondWidthMultiplier
std::vector< DrawColour > highlightColourPalette