RDKit
Open-source cheminformatics and machine learning.
DrawTextFTJS.h
Go to the documentation of this file.
1 //
2 // @@ All Rights Reserved @@
3 // This file is part of the RDKit.
4 // The contents are covered by the terms of the BSD license
5 // which is included in the file license.txt, found at the root
6 // of the RDKit source tree.
7 //
8 // Original author: Greg Landrum
9 //
10 
11 #ifndef RDKIT_DRAWTEXTFTJS_H
12 #define RDKIT_DRAWTEXTFTJS_H
13 
14 #include <iosfwd>
15 #include <emscripten.h>
16 #include <emscripten/val.h>
18 
19 namespace RDKit {
20 
21 // ****************************************************************************
22 class DrawTextFTJS : public DrawTextFT {
23  public:
24  DrawTextFTJS(double max_fnt_sz, double min_fnt_sz,
25  const std::string &font_file, emscripten::val &context);
26 
27  int MoveToFunctionImpl(const FT_Vector *to) override;
28  int LineToFunctionImpl(const FT_Vector *to) override;
29  int ConicToFunctionImpl(const FT_Vector *control,
30  const FT_Vector *to) override;
31  int CubicToFunctionImpl(const FT_Vector *controlOne,
32  const FT_Vector *controlTwo,
33  const FT_Vector *to) override;
34 
35  protected:
36  // adds x_trans_ and y_trans_ to coords returns x advance distance
37  virtual double extractOutline() override;
38 
39  private:
40  emscripten::val &context_;
41 };
42 
43 } // namespace RDKit
44 
45 #endif // RDKIT_DRAWTEXTFTSVG_H
int MoveToFunctionImpl(const FT_Vector *to) override
int CubicToFunctionImpl(const FT_Vector *controlOne, const FT_Vector *controlTwo, const FT_Vector *to) override
DrawTextFTJS(double max_fnt_sz, double min_fnt_sz, const std::string &font_file, emscripten::val &context)
int ConicToFunctionImpl(const FT_Vector *control, const FT_Vector *to) override
virtual double extractOutline() override
int LineToFunctionImpl(const FT_Vector *to) override
Std stuff.
Definition: Abbreviations.h:18