RDKit
Open-source cheminformatics and machine learning.
DrawTextFTCairo.h
Go to the documentation of this file.
1 //
2 // @@ All Rights Reserved @@
3 // This file is part of the RDKit.
4 // The contents are covered by the terms of the BSD license
5 // which is included in the file license.txt, found at the root
6 // of the RDKit source tree.
7 //
8 // Original author: David Cosgrove (CozChemIx) on 08/05/2020.
9 //
10 
11 #ifndef RDKIT_DRAWTEXTFTCAIRO_H
12 #define RDKIT_DRAWTEXTFTCAIRO_H
13 
14 #include <cairo.h>
15 
17 
18 namespace RDKit {
19 
20 // ****************************************************************************
21 
22 class DrawTextFTCairo : public DrawTextFT {
23  public:
24  DrawTextFTCairo(double max_fnt_sz, double min_fnt_sz,
25  const std::string &font_file, cairo_t *dp_cr);
26 
27  int MoveToFunctionImpl(const FT_Vector *to) override;
28  int LineToFunctionImpl(const FT_Vector *to) override;
29  int ConicToFunctionImpl(const FT_Vector *control,
30  const FT_Vector *to) override;
31  int CubicToFunctionImpl(const FT_Vector *controlOne,
32  const FT_Vector *controlTwo,
33  const FT_Vector *to) override;
34 
35  protected:
36  // adds x_trans_ and y_trans_ to coords returns x advance distance
37  virtual double extractOutline() override;
38 
39  private:
40  cairo_t *dp_cr_;
41 };
42 
43 } // namespace RDKit
44 
45 #endif // RDKIT_DRAWTEXTFTCAIRO_H
int MoveToFunctionImpl(const FT_Vector *to) override
int ConicToFunctionImpl(const FT_Vector *control, const FT_Vector *to) override
virtual double extractOutline() override
int LineToFunctionImpl(const FT_Vector *to) override
DrawTextFTCairo(double max_fnt_sz, double min_fnt_sz, const std::string &font_file, cairo_t *dp_cr)
int CubicToFunctionImpl(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to) override
Std stuff.
Definition: Abbreviations.h:18