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 
15 #include <RDGeneral/export.h>
17 #include "DrawTextQt.h"
18 
19 class QPainter;
20 class QPainterPath;
21 
22 namespace RDKit {
23 
24 namespace MolDraw2D_detail {
25 // ****************************************************************************
26 
28  public:
29  DrawTextFTQt(double max_fnt_sz, double min_fnt_sz,
30  const std::string &font_file, QPainter *qp);
31 
33 
34  DrawTextFTQt(const DrawTextFTQt &rhs) = delete;
35  DrawTextFTQt(DrawTextFTQt &&rhs) = delete;
36  DrawTextFTQt &operator=(const DrawTextFTQt &rhs) = delete;
38 
39  int MoveToFunctionImpl(const FT_Vector *to) override;
40  int LineToFunctionImpl(const FT_Vector *to) override;
41  int ConicToFunctionImpl(const FT_Vector *control,
42  const FT_Vector *to) override;
43  int CubicToFunctionImpl(const FT_Vector *controlOne,
44  const FT_Vector *controlTwo,
45  const FT_Vector *to) override;
46 
47  // adds x_trans_ and y_trans_ to coords returns x advance distance
48  double extractOutline() override;
49 
50  private:
51  QPainter *d_qp;
52  std::unique_ptr<QPainterPath> dp_qpp;
53 };
54 
55 } // namespace MolDraw2D_detail
56 } // namespace RDKit
57 #endif // RDKIT_DRAWTEXTFTQT_H
int MoveToFunctionImpl(const FT_Vector *to) override
int CubicToFunctionImpl(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to) override
int ConicToFunctionImpl(const FT_Vector *control, const FT_Vector *to) override
DrawTextFTQt(double max_fnt_sz, double min_fnt_sz, const std::string &font_file, QPainter *qp)
DrawTextFTQt(const DrawTextFTQt &rhs)=delete
DrawTextFTQt & operator=(DrawTextFTQt &&rhs)=delete
int LineToFunctionImpl(const FT_Vector *to) override
DrawTextFTQt(DrawTextFTQt &&rhs)=delete
DrawTextFTQt & operator=(const DrawTextFTQt &rhs)=delete
#define RDKIT_MOLDRAW2DQT_EXPORT
Definition: export.h:289
Std stuff.
Definition: Abbreviations.h:19