RDKit: DrawTextFTJS.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
DrawTextFTJS.h
Go to the documentation of this file.
1//
2// Copyright (C) 2020-2022 Greg Landrum and other RDKit contributors
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10// Original author: Greg Landrum
11//
12
13#ifndef RDKIT_DRAWTEXTFTJS_H
14#define RDKIT_DRAWTEXTFTJS_H
15
16#include <iosfwd>
17#include <emscripten.h>
18#include <emscripten/val.h>
19#include <GraphMol/MolDraw2D/DrawTextFT.h>
20
21namespace RDKit {
22class MolDraw2DJS;
23namespace MolDraw2D_detail {
24// ****************************************************************************
25 class DrawTextFTJS : public DrawTextFT {
26 public:
27 ~DrawTextFTJS() override = default;
28
29 DrawTextFTJS(double max_fnt_sz, double min_fnt_sz,
30 const std::string &font_file, emscripten::val &context);
31 DrawTextFTJS(const DrawTextFTJS &) = delete;
32 DrawTextFTJS(DrawTextFTJS &&) = delete;
33 DrawTextFTJS &operator=(const DrawTextFTJS &) = delete;
34 DrawTextFTJS &operator=(DrawTextFTJS &&) = 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 emscripten::val &context_;
48};
49
50} // namespace MolDraw2D_detail
51} // namespace RDKit
52
53#endif // RDKIT_DRAWTEXTFTSVG_H
DrawTextFT.h
RDKit::MolDraw2DJS
Definition MolDraw2DJS.h:30
RDKit::MolDraw2D_detail::DrawTextFTJS::MoveToFunctionImpl
int MoveToFunctionImpl(const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTJS::CubicToFunctionImpl
int CubicToFunctionImpl(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTJS::DrawTextFTJS
DrawTextFTJS(double max_fnt_sz, double min_fnt_sz, const std::string &font_file, emscripten::val &context)
RDKit::MolDraw2D_detail::DrawTextFTJS::operator=
DrawTextFTJS & operator=(DrawTextFTJS &&)=delete
RDKit::MolDraw2D_detail::DrawTextFTJS::LineToFunctionImpl
int LineToFunctionImpl(const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTJS::operator=
DrawTextFTJS & operator=(const DrawTextFTJS &)=delete
RDKit::MolDraw2D_detail::DrawTextFTJS::context_
emscripten::val & context_
Definition DrawTextFTJS.h:47
RDKit::MolDraw2D_detail::DrawTextFTJS::ConicToFunctionImpl
int ConicToFunctionImpl(const FT_Vector *control, const FT_Vector *to) override
RDKit::MolDraw2D_detail::DrawTextFTJS::~DrawTextFTJS
~DrawTextFTJS() override=default
RDKit::MolDraw2D_detail::DrawTextFTJS::DrawTextFTJS
DrawTextFTJS(const DrawTextFTJS &)=delete
RDKit::MolDraw2D_detail::DrawTextFTJS::DrawTextFTJS
DrawTextFTJS(DrawTextFTJS &&)=delete
RDKit::MolDraw2D_detail::DrawTextFTJS::extractOutline
double extractOutline() override
RDKit::MolDraw2D_detail::DrawTextFT::DrawTextFT
DrawTextFT(double max_fnt_sz, double min_fnt_sz, const std::string &font_file)
RDKit::MolDraw2D_detail
Definition AtomSymbol.h:30
RDKit
Std stuff.
Definition Abbreviations.h:19