RDKit: DrawTextFTQt.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
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>
16#include <GraphMol/MolDraw2D/DrawTextFT.h>
17#include "DrawTextQt.h"
18
19class QPainter;
20class QPainterPath;
21
22namespace RDKit {
23
24namespace MolDraw2D_detail {
25// ****************************************************************************
26
27 class RDKIT_MOLDRAW2DQT_EXPORT DrawTextFTQt : public DrawTextFT {
28 public:
29 DrawTextFTQt(double max_fnt_sz, double min_fnt_sz,
30 const std::string &font_file, QPainter *qp);
31
32 ~DrawTextFTQt();
33
34 DrawTextFTQt(const DrawTextFTQt &rhs) = delete;
35 DrawTextFTQt(DrawTextFTQt &&rhs) = delete;
36 DrawTextFTQt &operator=(const DrawTextFTQt &rhs) = delete;
37 DrawTextFTQt &operator=(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
DrawTextFT.h
DrawTextQt.h
RDKit::MolDraw2D_detail::DrawTextFTQt::MoveToFunctionImpl
int MoveToFunctionImpl(const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTQt::CubicToFunctionImpl
int CubicToFunctionImpl(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTQt::ConicToFunctionImpl
int ConicToFunctionImpl(const FT_Vector *control, const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTQt::DrawTextFTQt
DrawTextFTQt(double max_fnt_sz, double min_fnt_sz, const std::string &font_file, QPainter *qp)
RDKit::MolDraw2D_detail::DrawTextFTQt::extractOutline
double extractOutline() override
RDKit::MolDraw2D_detail::DrawTextFTQt::DrawTextFTQt
DrawTextFTQt(const DrawTextFTQt &rhs)=delete
RDKit::MolDraw2D_detail::DrawTextFTQt::~DrawTextFTQt
~DrawTextFTQt()
RDKit::MolDraw2D_detail::DrawTextFTQt::operator=
DrawTextFTQt & operator=(DrawTextFTQt &&rhs)=delete
RDKit::MolDraw2D_detail::DrawTextFTQt::operator=
DrawTextFTQt & operator=(const DrawTextFTQt &rhs)=delete
RDKit::MolDraw2D_detail::DrawTextFTQt::LineToFunctionImpl
int LineToFunctionImpl(const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTQt::DrawTextFTQt
DrawTextFTQt(DrawTextFTQt &&rhs)=delete
RDKit::MolDraw2D_detail::DrawTextFT::DrawTextFT
DrawTextFT(double max_fnt_sz, double min_fnt_sz, const std::string &font_file)
export.h
RDKIT_MOLDRAW2DQT_EXPORT
#define RDKIT_MOLDRAW2DQT_EXPORT
Definition export.h:321
RDKit::MolDraw2D_detail
Definition AtomSymbol.h:30
RDKit
Std stuff.
Definition Abbreviations.h:19