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 
16 #include "DrawTextQt.h"
17 
18 class QPainter;
19 class QPainterPath;
20 
21 namespace RDKit {
22 
23 // ****************************************************************************
24 
25 class DrawTextFTQt : public DrawTextFT {
26  public:
27  DrawTextFTQt(double max_fnt_sz, double min_fnt_sz,
28  const std::string &font_file, QPainter *qp);
29 
30  int MoveToFunctionImpl(const FT_Vector *to) override;
31  int LineToFunctionImpl(const FT_Vector *to) override;
32  int ConicToFunctionImpl(const FT_Vector *control,
33  const FT_Vector *to) override;
34  int CubicToFunctionImpl(const FT_Vector *controlOne,
35  const FT_Vector *controlTwo,
36  const FT_Vector *to) override;
37 
38  protected:
39  // adds x_trans_ and y_trans_ to coords returns x advance distance
40  virtual double extractOutline() override;
41 
42  private:
43  QPainter *d_qp;
44  std::unique_ptr<QPainterPath> dp_qpp;
45 };
46 
47 } // namespace RDKit
48 
49 #endif // RDKIT_DRAWTEXTFTQT_H
virtual double extractOutline() override
int LineToFunctionImpl(const FT_Vector *to) override
DrawTextFTQt(double max_fnt_sz, double min_fnt_sz, const std::string &font_file, QPainter *qp)
int ConicToFunctionImpl(const FT_Vector *control, const FT_Vector *to) override
int MoveToFunctionImpl(const FT_Vector *to) override
int CubicToFunctionImpl(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to) override
Std stuff.
Definition: Abbreviations.h:18