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  DrawTextFTQt(const DrawTextFTQt &rhs) = delete;
32  DrawTextFTQt(DrawTextFTQt &&rhs) = delete;
33  DrawTextFTQt &operator=(const DrawTextFTQt &rhs) = delete;
35 
36  int MoveToFunctionImpl(const FT_Vector *to) override;
37  int LineToFunctionImpl(const FT_Vector *to) override;
38  int ConicToFunctionImpl(const FT_Vector *control,
39  const FT_Vector *to) override;
40  int CubicToFunctionImpl(const FT_Vector *controlOne,
41  const FT_Vector *controlTwo,
42  const FT_Vector *to) override;
43 
44  // adds x_trans_ and y_trans_ to coords returns x advance distance
45  double extractOutline() override;
46 
47  private:
48  QPainter *d_qp;
49  std::unique_ptr<QPainterPath> dp_qpp;
50 };
51 
52 } // namespace MolDraw2D_detail
53 } // namespace RDKit
54 #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:281
Std stuff.
Definition: Abbreviations.h:18