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