RDKit::DrawTextFT Class Referenceabstract

`#include <DrawTextFT.h>`

Inheritance diagram for RDKit::DrawTextFT:

## Public Member Functions

| DrawTextFT (double max_fnt_sz, double min_fnt_sz, const std::string &font_file)
| ~DrawTextFT () override
void | drawChar (char c, const Point2D &cds) override
virtual int | MoveToFunctionImpl (const FT_Vector *to)=0
virtual int | LineToFunctionImpl (const FT_Vector *to)=0
virtual int | ConicToFunctionImpl (const FT_Vector *control, const FT_Vector *to)=0
virtual int | CubicToFunctionImpl (const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to)=0
std::string | getFontFile () const override
void | setFontFile (const std::string &font_file) override
Public Member Functions inherited from RDKit::DrawText
| DrawText (double max_fnt_sz, double min_fnt_sz)
virtual | ~DrawText ()
DrawColour const & | colour () const
void | setColour (const DrawColour &col)
double | fontSize () const
void | setFontSize (double new_size)
double | baseFontSize () const
void | setBaseFontSize (double new_size)
double | maxFontSize () const
void | setMaxFontSize (double new_max)
double | minFontSize () const
void | setMinFontSize (double new_max)
double | fontScale () const
void | setFontScale (double new_scale)
virtual void | getStringSize (const std::string &label, double &label_width, double &label_height) const
| using the current scale, work out the size of the label More...
void | getStringExtremes (const std::string &label, OrientType orient, double &x_min, double &y_min, double &x_max, double &y_max, bool dontSplit=false) const
void | getStringRects (const std::string &text, OrientType orient, std::vector< std::shared_ptr< StringRect >> &rects, std::vector< TextDrawType > &draw_modes, std::vector< char > &draw_chars, bool dontSplit=false) const
virtual void | drawString (const std::string &str, const Point2D &cds, TextAlignType align)
| drawString centres the string on cds. More...
void | drawString (const std::string &label, const Point2D &cds, OrientType orient)
void | adjustLineForString (const std::string &label, OrientType orient, const Point2D &end1, Point2D &end2) const
void | drawStringRects (const std::string &label, OrientType orient, const Point2D &cds, MolDraw2D &mol_draw) const
bool | doesRectIntersect (const std::string &label, OrientType orient, const Point2D &cds, const StringRect &rect) const
bool | doesRectIntersect (const std::vector< std::shared_ptr< StringRect >> &rects, const Point2D &cds, const StringRect &rect) const
bool | doesLineIntersect (const std::string &label, OrientType orient, const Point2D &cds, const Point2D &end1, const Point2D &end2, double padding) const
bool | doesLineIntersect (const std::vector< std::shared_ptr< StringRect >> &rects, const Point2D &cds, const Point2D &end1, const Point2D &end2, double padding) const
bool | doesStringIntersect (const std::vector< std::shared_ptr< StringRect >> &rects, const Point2D &cds1, const std::string &label2, OrientType orient2, const Point2D &cds2) const
bool | doesStringIntersect (const std::string &label1, OrientType orient1, const Point2D &cds1, const std::string &label2, OrientType orient2, const Point2D &cds2) const

## Protected Member Functions

double | fontCoordToDrawCoord (FT_Pos fc) const
void | fontPosToDrawPos (FT_Pos fx, FT_Pos fy, double &dx, double &dy) const
virtual double | extractOutline ()
Protected Member Functions inherited from RDKit::DrawText
virtual void | alignString (TextAlignType align, const std::vector< TextDrawType > &draw_modes, std::vector< std::shared_ptr< StringRect >> &rects) const
void | adjustStringRectsForSuperSubScript (const std::vector< TextDrawType > &draw_modes, std::vector< std::shared_ptr< StringRect >> &rects) const
double | selectScaleFactor (char c, TextDrawType draw_type) const

## Additional Inherited Members

Static Public Attributes inherited from RDKit::DrawText
static constexpr double | FONT_SIZE = 0.6
Static Protected Attributes inherited from RDKit::DrawText
constexpr static double | SUBS_SCALE = 0.66
constexpr static double | SUPER_SCALE = 0.66

## Detailed Description

Definition at line 32 of file DrawTextFT.h.

## Constructor & Destructor Documentation

## DrawTextFT()

RDKit::DrawTextFT::DrawTextFT | ( | double | max_fnt_sz,
|  | double | min_fnt_sz,
|  | const std::string & | font_file
| ) |  |

## ~DrawTextFT()

RDKit::DrawTextFT::~DrawTextFT | ( |  | ) |

override

## Member Function Documentation

## ConicToFunctionImpl()

virtual int RDKit::DrawTextFT::ConicToFunctionImpl | ( | const FT_Vector * | control,
|  | const FT_Vector * | to
| ) |  |

pure virtual

Implemented in RDKit::DrawTextFTQt, RDKit::DrawTextFTSVG, RDKit::DrawTextFTJS, and RDKit::DrawTextFTCairo.

## CubicToFunctionImpl()

virtual int RDKit::DrawTextFT::CubicToFunctionImpl | ( | const FT_Vector * | controlOne,
|  | const FT_Vector * | controlTwo,
|  | const FT_Vector * | to
| ) |  |

pure virtual

Implemented in RDKit::DrawTextFTQt, RDKit::DrawTextFTSVG, RDKit::DrawTextFTJS, and RDKit::DrawTextFTCairo.

## drawChar()

void RDKit::DrawTextFT::drawChar | ( | char | c,
|  | const Point2D & | cds
| ) |  |

override virtual

Implements RDKit::DrawText.

## extractOutline()

virtual double RDKit::DrawTextFT::extractOutline | ( |  | ) |

protected virtual

Reimplemented in RDKit::DrawTextFTQt, RDKit::DrawTextFTSVG, RDKit::DrawTextFTJS, and RDKit::DrawTextFTCairo.

## fontCoordToDrawCoord()

double RDKit::DrawTextFT::fontCoordToDrawCoord | ( | FT_Pos | fc | ) | const

protected

## fontPosToDrawPos()

void RDKit::DrawTextFT::fontPosToDrawPos | ( | FT_Pos | fx,
|  | FT_Pos | fy,
|  | double & | dx,
|  | double & | dy
| ) |  | const

protected

## getFontFile()

std::string RDKit::DrawTextFT::getFontFile | ( |  | ) | const

override virtual

Reimplemented from RDKit::DrawText.

## LineToFunctionImpl()

virtual int RDKit::DrawTextFT::LineToFunctionImpl | ( | const FT_Vector * | to | ) |

pure virtual

Implemented in RDKit::DrawTextFTQt, RDKit::DrawTextFTSVG, RDKit::DrawTextFTJS, and RDKit::DrawTextFTCairo.

## MoveToFunctionImpl()

virtual int RDKit::DrawTextFT::MoveToFunctionImpl | ( | const FT_Vector * | to | ) |

pure virtual

Implemented in RDKit::DrawTextFTQt, RDKit::DrawTextFTSVG, RDKit::DrawTextFTJS, and RDKit::DrawTextFTCairo.

## setFontFile()

void RDKit::DrawTextFT::setFontFile | ( | const std::string & | font_file | ) |

override virtual

Reimplemented from RDKit::DrawText.

The documentation for this class was generated from the following file:

- DrawTextFT.h