RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
DrawTextQt.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
10#ifndef RDKIT_DRAWTEXTQT_H
11#define RDKIT_DRAWTEXTQT_H
12
13#include <RDGeneral/export.h>
15
16class QPainter;
17
18namespace RDKit {
19
20namespace MolDraw2D_detail {
21
22// ****************************************************************************
24 public:
25 DrawTextQt(double max_fnt_sz, double min_fnt_sz, QPainter *qp);
26 DrawTextQt(const DrawTextQt &rhs) = delete;
27 DrawTextQt(DrawTextQt &&rhs) = delete;
28 DrawTextQt &operator=(const DrawTextQt &rhs) = delete;
30
31 void drawChar(char c, const Point2D &cds) override;
32
33 private:
34 QPainter *d_qp;
35
36 // return a vector of StringRects, one for each char in text, with
37 // super- and subscripts taken into account. Sizes in pixel coords,
38 // i.e. scaled by fontScale().
39 void getStringRects(const std::string &text,
40 std::vector<std::shared_ptr<StringRect>> &rects,
41 std::vector<TextDrawType> &draw_modes,
42 std::vector<char> &draw_chars) const override;
43};
44
45} // namespace MolDraw2D_detail
46} // namespace RDKit
47#endif // RDKIT_DRAWTEXTQT_H
void drawChar(char c, const Point2D &cds) override
DrawTextQt & operator=(DrawTextQt &&rhs)=delete
DrawTextQt & operator=(const DrawTextQt &rhs)=delete
DrawTextQt(double max_fnt_sz, double min_fnt_sz, QPainter *qp)
DrawTextQt(const DrawTextQt &rhs)=delete
DrawTextQt(DrawTextQt &&rhs)=delete
#define RDKIT_MOLDRAW2DQT_EXPORT
Definition export.h:305
Std stuff.