18 #ifndef OPENNURBS_TEXTRUN_H_INCLUDED 19 #define OPENNURBS_TEXTRUN_H_INCLUDED 43 kHorizontalToScreen = 1,
48 unsigned int stack_style_as_unsigned
95 static bool ReturnManagedTextRun(
105 bool IsManagedTextRun()
const;
113 bool IsActiveManagedTextRun()
const;
125 enum class RunType : unsigned char
142 unsigned int run_type_as_unsigned
145 enum class Stacked : unsigned char
154 unsigned int stacked_as_unsigned
164 unsigned int run_direction_as_unsigned
176 const class ON_Font* managed_font,
184 bool deletedisplay =
true);
187 bool IsNewline()
const;
188 bool IsColumn()
const;
189 bool IsValid()
const;
196 void SetStacked(
Stacked stacked);
197 void SetStackedOff();
201 double TextHeight()
const;
203 void SetTextHeight(
double h);
208 void SetFont(
const ON_Font* font);
225 double HeightScale(
const ON_Font* font)
const;
227 void SetStackFractionHeight(
double stackscale);
228 double StackHeightFraction()
const;
229 static double DefaultStackFractionHeight();
238 void Get2dCorners(
ON_2dPoint corners[4])
const;
242 void SetUnicodeString(ON__UINT32*& dest,
size_t count,
const ON__UINT32* cp);
245 void SetUnicodeString(
size_t count,
const ON__UINT32* cp);
246 static size_t CodepointCount(
const ON__UINT32* cp);
249 void SetDisplayString(
const wchar_t* str);
252 const wchar_t* DisplayString()
const;
256 const wchar_t* TextString()
const;
258 const ON__UINT32* UnicodeString()
const;
260 bool GetGlyphContours(
262 bool bSingleStrokeFont,
272 int start_char_offset,
275 double& currentwidth,
278 const ON_Font* m_managed_font =
nullptr;
285 ON__UINT32* m_codepoints =
nullptr;
307 void Internal_ContentChanged()
const;
321 const unsigned char m_managed_status = 0;
322 unsigned char m_active_status = 0;
325 double m_run_text_height = 1.0;
336 double m_height_scale = -1.0;
337 double m_stackscale = 0.7;
341 double m_indent = 0.0;
342 double m_left_margin = 0.0;
343 double m_right_margin = 0.0;
345 int m_line_index = -1;
348 ON__UINT_PTR m_reserved=0;
361 void Internal_Destroy();
362 void Internal_CopyFrom(
const ON_TextRun& src);
411 void RemoveRun(
int i);
417 bool Get2dCorners(
ON_2dPoint corners[4])
const;
422 unsigned int UnsignedCount()
const;
434 void SetTextHeight(
double height);
437 void Internal_Destroy();
static const ON_StackedText Empty
Definition: opennurbs_textrun.h:24
static const ON_BoundingBox EmptyBoundingBox
Definition: opennurbs_bounding_box.h:28
static const wchar_t Slash
Definition: opennurbs_string.h:2036
A range of text with all the same attributes.
Definition: opennurbs_textrun.h:66
Definition: opennurbs_sha1.h:19
Definition: opennurbs_textrun.h:363
Definition: opennurbs_string.h:2020
Stacked
Definition: opennurbs_textrun.h:142
static const ON_Color UnsetColor
Definition: opennurbs_color.h:32
Definition: opennurbs_color.h:24
Definition: opennurbs_point.h:277
Definition: opennurbs_bounding_box.h:25
RunDirection
Definition: opennurbs_textrun.h:154
An ON_Font is a face in a font family. It corresponds to a Windows LOGFONT, a .NET System...
Definition: opennurbs_font.h:225
StackStyle
Definition: opennurbs_textrun.h:40
RunType
Definition: opennurbs_textrun.h:122
Definition: opennurbs_textiterator.h:96
Definition: opennurbs_array.h:409
static const ON_wString EmptyString
Definition: opennurbs_string.h:2026
static const ON_TextRun Empty
Definition: opennurbs_textrun.h:69
static const ON_2dVector ZeroVector
Definition: opennurbs_point.h:852
static const ON_SHA1_Hash ZeroDigest
Definition: opennurbs_sha1.h:22
Definition: opennurbs_point.h:839
Definition: opennurbs_textrun.h:21