Introduction

Getting Started

Programming Guides

API Reference

Additional Resources

Text.h
1 // Copyright (c) Tech Soft 3D
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #pragma once
11 
12 #include "HIOUtilityHTML.h"
13 #include "sc_store.h"
14 #include "sc_store_utils.h"
15 #include "sc_store_utils_text.h"
16 
17 namespace hio_html_internal
18 {
19  enum class TextSizeUnits
20  {
21  Unsupported,
22  ObjectSpace,
23  WorldSpace
24  };
25 
27  {
28  public:
29  TextAttributes() {}
30 
32  KeyArray const & keyPath);
33 
34  public:
35  SC::Store::Utils::Text::TextAlignment alignment;
36  bool transformable;
37  float size;
38  TextSizeUnits sizeUnits;
39  std::string font;
40  Vector path;
41  bool bold;
42  bool italic;
43  };
44 
45  struct TextKey
46  {
47  TextKey(
48  HC_KEY key)
49  : key(key)
50  {}
51 
52  bool ShowAlignment(
53  SC::Store::Utils::Text::TextAlignment & alignment) const;
54 
55  bool ShowTransformable(
56  bool & transformable) const;
57 
58  bool ShowSize(
59  float & size,
60  TextSizeUnits & sizeUnits) const;
61 
62  bool ShowFont(
63  std::string & font) const;
64 
65  bool ShowBold(
66  bool & bold) const;
67 
68  bool ShowItalic(
69  bool & italic) const;
70 
71  bool ShowUTF8Text(
72  std::string & utf8Text) const;
73 
74  Point GetPosition() const;
75 
76  bool ShowModellingMatrix(
77  Matrix & matrix) const;
78 
79  bool ShowRegion(
80  PointArray & points,
81  bool & regionFitting,
82  bool & relativeCoordinates,
83  bool & windowSpace) const;
84 
85  bool ShowPath(
86  Vector & path) const;
87 
88  HC_KEY key;
89  };
90 
91  bool InsertText(
92  SC::Store::Utils::Text::TextAlignment alignment,
93  Point position,
94  Vector const & path,
95  SC::Store::Matrix3d const & sizeTransform,
96  char const * utf8_text,
97  char const * font_name,
98  SC::Store::Utils::Text::FontStyle::Bits font_style,
99  SC::Store::Utils::Text::Quality font_quality,
100  SC::Store::Utils::Text::TextRepresentation::Bits representation_bits,
101  PointArray const & region_points,
102  bool region_fitting,
103  HC_KEY scratch_seg,
104  PointArray & out_mesh_point_buffer,
105  SC::Store::Mesh & out_mesh);
106 }
Definition: HIOUtilityHTML.h:60
Definition: HDWFMisc.h:22
#define HC_KEY
Definition: Text.h:45