Rhino C++ API
8.10
|
#include <opennurbs_text.h>
Public Member Functions | |
ON_TextContent ()=default | |
ON_TextContent (const ON_TextContent &src) | |
~ON_TextContent () | |
void | ClearBoundingBox () override |
bool | ComposeText () |
bool | Create (const wchar_t *RtfString, ON::AnnotationType annotation_type, const ON_DimStyle *dimstyle) |
bool | Create (const wchar_t *RtfString, ON::AnnotationType annotation_type, const ON_DimStyle *dimstyle, bool bWrapped, double rect_width, double text_rotation_radians) |
Parses text string and makes runs. More... | |
*const ON_Font & | DefaultFont () const |
void SetCurrentDimStyle(const ON_DimStyle* dimstyle) const; More... | |
int | Dimension () const override |
ON_SHA1_Hash | DimStyleTextPositionPropertiesHash () const |
void | Dump (ON_TextLog &) const override |
virtual More... | |
bool | EqualTextPositionProperties (ON::AnnotationType annotation_type, const class ON_DimStyle *dimstyle) const |
unsigned int | EvaluationSerialNumber () const |
const ON_Font * | FirstCharFont () const |
double | FormattingRectangleWidth () const |
FormattingRectangleWidth is a width set by text wrapping. It's in model units. More... | |
bool | Get2dCorners (ON_2dPoint corners[4]) const |
ON_Mesh * | Get2dPickMesh () const |
bool | Get2dSize (bool raw, double &width, double &height) const |
Get the size of a 2d rectangle enclosing text. More... | |
bool | Get3dCorners (ON_3dPoint corners[4]) const |
bool | Get3dMaskCorners (double border, ON_3dPoint corners[4]) const |
ON_Mesh * | Get3dMaskPickMesh (double maskoffset) const |
ON_Mesh * | Get3dPickMesh () const |
bool | Get3dUnderline (ON_3dPoint ends[2], double scaled_gap) const |
Gets endpoints of a line under the text offset down by textgap. More... | |
void | GetAlignment (ON::TextHorizontalAlignment &horz, ON::TextVerticalAlignment &vert) const |
bool | GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override |
virtual ON_Geometry GetBBox override More... | |
bool | GetGlyphContours (const ON_Font *text_font, bool bSingleStrokeFont, const ON_Xform &text_xform, ON_ClassArray< ON_ClassArray< ON_SimpleArray< ON_Curve * > > > &text_contours) const |
bool | GetGlyphContours (const ON_Font *text_font, bool bSingleStrokeFont, double text_height, ON_ClassArray< ON_ClassArray< ON_SimpleArray< ON_Curve * > > > &text_contours) const |
void | GetGripPoints (ON_2dPoint &base, ON_2dPoint &width) const |
returns the base point and with grip using the current alignments More... | |
bool | GetRun3dCorners (const ON_TextRun *run, ON_3dPoint corners[4]) const |
bool | HasWrappedRuns () const |
True if text has wrapped runs, else false. More... | |
bool | IsValid (class ON_TextLog *text_log=nullptr) const override |
ON::object_type | ObjectType () const override |
ON_TextContent & | operator= (const ON_TextContent &src) |
const ON_wString | PlainText () const |
const ON_wString | PlainTextWithFields () const |
const ON_wString | PlainTextWithFields (ON_SimpleArray< ON_3dex > *runmap) const |
const ON_wString | PlatformRichTextFromRuns () const |
bool | Read (ON_BinaryArchive &) override |
void | RealignTextRuns (ON::TextHorizontalAlignment new_h_align) |
bool | RebuildRuns (ON::AnnotationType annotation_type, const ON_DimStyle *dimstyle) |
bool | ReplaceTextString (const wchar_t *RtfString, ON::AnnotationType annotation_type, const ON_DimStyle *dimstyle) |
const ON_wString | RichText () const |
const ON_wString | RichTextFromRuns (ON::RichTextStyle rich_text_style) const |
const wchar_t * | RtfText () const |
bool | RunReplaceString (const wchar_t *repl_str, int start_run_idx, int start_run_pos, int end_run_idx, int end_run_pos) |
ON::TextHorizontalAlignment | RuntimeHorizontalAlignment () const |
void | SetAlignment (ON::TextHorizontalAlignment horz, ON::TextVerticalAlignment vert) |
void | SetEvaluationSerialNumber (unsigned int sn) const |
void | SetFormattingRectangleWidth (double width) |
void | SetRuntimeHorizontalAlignment (ON::TextHorizontalAlignment halign) const |
void | SetTextIsWrapped (bool wrapped) |
void | SetTextRotationDegrees (double rotation) |
void | SetTextRotationRadians (double rotation) |
const ON_BoundingBox | TextContentBoundingBox () const |
ON_SHA1_Hash | TextContentHash () const |
ON_SHA1_Hash | TextContentHash (bool bApplyWrapping, bool bEvaluateFields) const |
bool | TextIsWrapped () const |
True if flag to wrap is set. More... | |
double | TextRotationDegrees () const |
Rotation in degrees around origin. More... | |
double | TextRotationRadians () const |
Rotation in radians around origin. More... | |
ON_TextRunArray * | TextRuns (bool bRaw) const |
bool | Transform (const ON_Xform &xform) override |
const ON_wString | WrappedPlainText () const |
const ON_wString | WrappedPlainTextWithFields () const |
bool | WrapText (double width) const |
Wrap text to a specified width in model space. More... | |
bool | Write (ON_BinaryArchive &) const override |
![]() | |
ON_Geometry ()=default | |
ON_Geometry (const ON_Geometry &)=default | |
~ON_Geometry ()=default | |
ON_BoundingBox | BoundingBox () const |
virtual class ON_Brep * | BrepForm (class ON_Brep *brep=nullptr) const |
virtual ON_COMPONENT_INDEX | ComponentIndex () const |
virtual bool | EvaluatePoint (const class ON_ObjRef &objref, ON_3dPoint &P) const |
bool | GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const |
bool | GetBoundingBox (ON_BoundingBox &bbox, bool bGrowBox=false) const |
virtual bool | GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const |
virtual bool | HasBrepForm () const |
virtual bool | IsDeformable () const |
virtual bool | IsMorphable () const |
virtual bool | MakeDeformable () |
virtual bool | Morph (const class ON_SpaceMorph &morph) |
ON_Geometry & | operator= (const ON_Geometry &)=default |
bool | Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center) |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center) |
bool | Scale (double scale_factor) |
virtual bool | SwapCoordinates (int i, int j) |
const ON_BoundingBox | TightBoundingBox () const |
bool | Translate (const ON_3dVector &translation_vector) |
![]() | |
ON_Object () ON_NOEXCEPT | |
ON_Object (const ON_Object &) | |
virtual | ~ON_Object () |
virtual ON_AggregateComponentStatus | AggregateComponentStatus () const |
bool | AttachUserData (class ON_UserData *pUserData) |
unsigned int | ClearAllComponentStates () const |
virtual unsigned int | ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const |
virtual unsigned int | ClearComponentStates (ON_ComponentStatus states_to_clear) const |
void | CopyUserData (const ON_Object &source_object) |
unsigned int | CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution) |
virtual ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
virtual bool | DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count) |
virtual void | DestroyRuntimeCache (bool bDelete=true) |
bool | DetachUserData (class ON_UserData *pUserData) |
void | EmergencyDestroy () |
class ON_UserData * | FirstUserData () const |
virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
class ON_UserData * | GetUserData (const ON_UUID &userdata_uuid) const |
bool | GetUserString (const wchar_t *key, ON_wString &string_value) const |
int | GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const |
int | GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const |
bool | IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const |
bool | IsKindOf (const ON_ClassId *pClassId) const |
virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
virtual void | MemoryRelocate () |
virtual ON_UUID | ModelObjectId () const |
void | MoveUserData (ON_Object &source_object) |
unsigned int | MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems) |
ON_Object & | operator= (const ON_Object &) |
void | PurgeUserData () |
virtual unsigned int | SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const |
virtual unsigned int | SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const |
bool | SetUserString (const wchar_t *key, const wchar_t *string_value) |
int | SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace) |
virtual unsigned int | SizeOf () const |
bool | ThisIsNullptr (bool bSilentError) const |
void | TransformUserData (const class ON_Xform &xform) |
virtual bool | UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map) |
int | UserStringCount () const |
Static Public Member Functions | |
static bool | CreateStackedText (ON_TextRun *run) |
static bool | CreateStackedText (ON_TextRun *run, int cpcount, const ON__UINT32 *cp, ON__UINT32 stack_delimiter=L'/') |
static bool | EvaluateField (ON_TextRun *run) |
static int | FindAndStackFractions (ON_TextRunArray *runs, int i, ON_wString wstr) |
static bool | FormatAngleMeasurement (double angle, const ON_DimStyle *dimstyle, const wchar_t *user_text, ON_wString &formatted_string) |
static bool | FormatAngleStringDecimal (double angle_radians, int resolution, double roundoff, ON_DimStyle::suppress_zero zero_suppression, wchar_t decimal_char, ON_wString &formatted_string) |
static bool | FormatAngleStringDMS (double angle_degrees, wchar_t decimal_char, int resolution, ON_wString &formatted_string) |
static bool | FormatAngleStringDMS (double angle_degrees, wchar_t decimal_char, ON_wString &formatted_string) |
static bool | FormatArea (double area, ON::LengthUnitSystem units_in, const ON_DimStyle *dimstyle, bool alternate, ON_wString &formatted_string) |
Area formatting. More... | |
static bool | FormatDistance (double distance, ON::LengthUnitSystem units_in, const ON_DimStyle *dimstyle, bool alternate, ON_wString &formatted_string) |
Dimension text formatting. More... | |
static bool | FormatDistanceAndTolerance (double distance, ON::LengthUnitSystem units_in, const ON_DimStyle *dimstyle, bool alternate, ON_wString &formatted_string) |
Output. More... | |
static bool | FormatDistanceMeasurement (double distance_in, ON::LengthUnitSystem units_in, const ON_DimStyle *dimstyle, const wchar_t *user_text, ON_wString &formatted_string) |
Output. More... | |
static bool | FormatLength (double distance, ON_DimStyle::LengthDisplay output_lengthdisplay, double round_off, int resolution, ON_DimStyle::suppress_zero zero_suppress, bool bracket_fractions, wchar_t decimal_char, ON_wString &output) |
static bool | FormatTolerance (double distance, ON::LengthUnitSystem units_in, const ON_DimStyle *dimstyle, bool alternate, ON_wString &formatted_string) |
Output. More... | |
static bool | FormatVolume (double volume, ON::LengthUnitSystem units_in, const ON_DimStyle *dimstyle, bool alternate, ON_wString &formatted_string) |
Volume formatting. More... | |
static double | GetLinefeedHeight (ON_TextRun &run) |
static bool | GetRichTextFontTable (const ON_wString rich_text, ON_ClassArray< ON_wString > &font_table) |
static bool | MeasureTextContent (ON_TextContent *text, bool raw, bool wrapped) |
static bool | MeasureTextRun (ON_TextRun *run) |
static bool | MeasureTextRunArray (ON_TextRunArray *runs, ON::TextVerticalAlignment v_align, ON::TextHorizontalAlignment h_align) |
Public Attributes | |
*bool IsCurrentDimStyle ON_DimStyle | const |
Static Public Attributes | |
static const ON_TextContent | Empty |
![]() | |
const static ON_Geometry | Unset |
Friends | |
class | ON_Text |
ON__INT_PTR m_reserved0 = (ON__INT_PTR)0;. More... | |
Additional Inherited Members | |
![]() | |
enum | UserDataConflictResolution : unsigned char { UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3, UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6 } |
|
default |
ON_TextContent::~ON_TextContent | ( | ) |
ON_TextContent::ON_TextContent | ( | const ON_TextContent & | src | ) |
|
overridevirtual |
Description: Some objects cache bounding box information. If you modify an object, then call ClearBoundingBox() to inform the object that any cached bounding boxes are invalid.
Remarks: Generally, ClearBoundingBox() overrides simply invalidate a cached bounding box and then wait for a call to GetBBox() before recomputing the bounding box.
The default implementation does nothing.
Reimplemented from ON_Geometry.
bool ON_TextContent::ComposeText | ( | ) |
With runs in place, compose the text in the runs and fill in the Text's string that is returned by RtfText
bool ON_TextContent::Create | ( | const wchar_t * | RtfString, |
ON::AnnotationType | annotation_type, | ||
const ON_DimStyle * | dimstyle | ||
) |
annotation_type | used to select type specific dimstyle properties like text alignment settings |
bool ON_TextContent::Create | ( | const wchar_t * | RtfString, |
ON::AnnotationType | annotation_type, | ||
const ON_DimStyle * | dimstyle, | ||
bool | bWrapped, | ||
double | rect_width, | ||
double | text_rotation_radians | ||
) |
Parses text string and makes runs.
annotation_type | used to select type specific dimstyle properties like text alignment settings |
|
static |
|
static |
void SetCurrentDimStyle(const ON_DimStyle* dimstyle) const;
Returns the default font for this text content. Typically, that would be the font from the dimstyle
|
overridevirtual |
Description: Dimension of the object. Returns: Dimension of the object. Remarks: The dimension is typically three. For parameter space trimming curves the dimension is two. In rare cases the dimension can be one or greater than three.
Reimplemented from ON_Geometry.
ON_SHA1_Hash ON_TextContent::DimStyleTextPositionPropertiesHash | ( | ) | const |
Returns: The value of ON_DimStyle.TextPositionPropertiesHash() of the ON_DimStyle passed to Create(), ReplaceTextString(), or RebuildRuns().
|
overridevirtual |
bool ON_TextContent::EqualTextPositionProperties | ( | ON::AnnotationType | annotation_type, |
const class ON_DimStyle * | dimstyle | ||
) | const |
Returns: True if this text position information used to create this text is identical to the text position parameters on dimstyle.
|
static |
Description: Evaluates the field instructions in the run and puts the results in run->m_display_string. Parameters: [in/out] ON_TextRun& run - Run to evaluate. Modified to store results Returns: true = Success false = Failure Remarks: The runs in the text are modified to store the string result of evaluating any fields in the run m_string or m_codepoints
unsigned int ON_TextContent::EvaluationSerialNumber | ( | ) | const |
|
static |
Replaces runs[i] with stacked runs if any "[[xx/xx]]" strings are found in wstr Returns the number of runs added to the array
|
static |
dimstyle | Angle format comes from dimstyle |
|
static |
|
static |
|
static |
|
static |
Area formatting.
Output
alternate | Primary or alternate |
|
static |
Dimension text formatting.
Output
alternate | Primary or alternate |
|
static |
Output.
alternate | Primary or alternate |
|
static |
Output.
user_text | Replace "<>" in user_text with formatted dimension |
|
static |
double ON_TextContent::FormattingRectangleWidth | ( | ) | const |
FormattingRectangleWidth is a width set by text wrapping. It's in model units.
|
static |
Output.
alternate | Primary or alternate |
|
static |
Volume formatting.
Output
alternate | Primary or alternate |
bool ON_TextContent::Get2dCorners | ( | ON_2dPoint | corners[4] | ) | const |
Get corners of the whole text object corners requires space for 4 points
ON_Mesh* ON_TextContent::Get2dPickMesh | ( | ) | const |
bool ON_TextContent::Get2dSize | ( | bool | raw, |
double & | width, | ||
double & | height | ||
) | const |
Get the size of a 2d rectangle enclosing text.
bool ON_TextContent::Get3dCorners | ( | ON_3dPoint | corners[4] | ) | const |
Get corners of the whole text object corners requires space for 4 points Basic size of text, not including annotation scaling or 2d rotation And rotated and translated in 3d to text's plane (not object's plane)
bool ON_TextContent::Get3dMaskCorners | ( | double | border, |
ON_3dPoint | corners[4] | ||
) | const |
Get corners of the whole text object inflated by the border distance for mask drawing corners requires space for 4 points
ON_Mesh* ON_TextContent::Get3dMaskPickMesh | ( | double | maskoffset | ) | const |
ON_Mesh* ON_TextContent::Get3dPickMesh | ( | ) | const |
bool ON_TextContent::Get3dUnderline | ( | ON_3dPoint | ends[2], |
double | scaled_gap | ||
) | const |
Gets endpoints of a line under the text offset down by textgap.
void ON_TextContent::GetAlignment | ( | ON::TextHorizontalAlignment & | horz, |
ON::TextVerticalAlignment & | vert | ||
) | const |
|
overridevirtual |
virtual ON_Geometry GetBBox override
Reimplemented from ON_Geometry.
bool ON_TextContent::GetGlyphContours | ( | const ON_Font * | text_font, |
bool | bSingleStrokeFont, | ||
const ON_Xform & | text_xform, | ||
ON_ClassArray< ON_ClassArray< ON_SimpleArray< ON_Curve * > > > & | text_contours | ||
) | const |
bool ON_TextContent::GetGlyphContours | ( | const ON_Font * | text_font, |
bool | bSingleStrokeFont, | ||
double | text_height, | ||
ON_ClassArray< ON_ClassArray< ON_SimpleArray< ON_Curve * > > > & | text_contours | ||
) | const |
void ON_TextContent::GetGripPoints | ( | ON_2dPoint & | base, |
ON_2dPoint & | width | ||
) | const |
returns the base point and with grip using the current alignments
|
static |
Description: Returns the height in model units of the run, including text height and inter-line spacing
|
static |
Get the exact strings in the RTF font table and add them to font_table[] Example Input rich_text = {\rtf1\deff0{\fonttbl{\f0 ArialMT;}{\f1 SegoeUI;}}\f0 \fs40{\f1 This is Segoe UI}} returns font_table[] = { "ArialMT", "SegoeUI"}
bool ON_TextContent::GetRun3dCorners | ( | const ON_TextRun * | run, |
ON_3dPoint | corners[4] | ||
) | const |
Get corners of individual runs corners requires space for 4 points
bool ON_TextContent::HasWrappedRuns | ( | ) | const |
True if text has wrapped runs, else false.
|
overridevirtual |
Description: Tests an object to see if its data members are correctly initialized. Parameters: text_log - [in] if the object is not valid and text_log is not nullptr, then a brief english description of the reason the object is not valid is appended to the log. The information appended to text_log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Returns: @untitled table true object is valid false object is invalid, uninitialized, etc.
Reimplemented from ON_Geometry.
|
static |
Description: Calculates the size, spacing and position of the runs in the ON_TextContent Parameters: [in/out] ON_TextContent& text - Text to measure. Modified to store results [in] bool raw - if true, measure m_runs [in] bool wrapped - if true, measure m_wrapped_runs Returns: true = Success false = Failure Remarks: The runs in the text are modified to store the location info for positioning within the text object
|
static |
Description: Calculates the size, spacing and position of the ON_TextRun within an ON_TextContent object Parameters: [in/out] ON_TextRun& run - Run to measure. Modified to store results Returns: true = Success false = Failure Remarks: The runs in the text are modified to store the location info for positioning within the text object
|
static |
Description: Calculates the size, spacing and position of the runs in the ON_TextRunArray Parameters: [in/out] ON_TextRunArray* runs - TextRuns to measure. Modified to store results [in] ON::TextVerticalAlignment v_align - how to align the text [in] ON::TextHorizontalAlignment h_align) Returns: true = Success false = Failure Remarks: The runs in the text are modified to store the location info for positioning within the text object
|
overridevirtual |
Description: Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
Returns: ON::object_type enum value.
Remarks: The default implementation of this virtual function returns ON::unknown_object_type
Reimplemented from ON_Object.
ON_TextContent& ON_TextContent::operator= | ( | const ON_TextContent & | src | ) |
const ON_wString ON_TextContent::PlainText | ( | ) | const |
Returns: Plain text information with any rich text formatting instructions removed. The result string from evaluating fields is included Field results may be cached from previous evaluation
const ON_wString ON_TextContent::PlainTextWithFields | ( | ) | const |
Returns: Plain text information with any rich text formatting instructions removed. Fields are not evaluated
const ON_wString ON_TextContent::PlainTextWithFields | ( | ON_SimpleArray< ON_3dex > * | runmap | ) | const |
Returns the same string as PlainTextWithFields() and fills in the runmap Each 3dex in the runmap array is i: run index, j: position in the string where text from run[i] starts, k: length of text from run[i]
const ON_wString ON_TextContent::PlatformRichTextFromRuns | ( | ) | const |
Returns: Rich text suitable for initializing SDK controls on the current platform (Windows or Apple OS X). The returned string is always rich text (never plain text). The returned rich text is always generated directly from the runs. This text is typically different from the Rhino clean rich text returned by the RichText() command.
|
overridevirtual |
Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.
The default implementation of this virtual function returns false and does nothing.
Reimplemented from ON_Object.
void ON_TextContent::RealignTextRuns | ( | ON::TextHorizontalAlignment | new_h_align | ) |
bool ON_TextContent::RebuildRuns | ( | ON::AnnotationType | annotation_type, |
const ON_DimStyle * | dimstyle | ||
) |
bool ON_TextContent::ReplaceTextString | ( | const wchar_t * | RtfString, |
ON::AnnotationType | annotation_type, | ||
const ON_DimStyle * | dimstyle | ||
) |
annotation_type | used to select type specific dimstyle properties like text alignment settings |
const ON_wString ON_TextContent::RichText | ( | ) | const |
Returns: Rhino clean rich text that is currently saved on this instance. The text can contain text formatting instructions. Fields are not evaluated.
const ON_wString ON_TextContent::RichTextFromRuns | ( | ON::RichTextStyle | rich_text_style | ) | const |
Parameters: rich_text_style - [in] Type of rich text to return. Returns: The returned string is always rich text (never plain text). The returned rich text is always generated directly from the runs. This text is typically different from the Rhino clean rich text returned by the RichText() command.
const wchar_t* ON_TextContent::RtfText | ( | ) | const |
bool ON_TextContent::RunReplaceString | ( | const wchar_t * | repl_str, |
int | start_run_idx, | ||
int | start_run_pos, | ||
int | end_run_idx, | ||
int | end_run_pos | ||
) |
ON::TextHorizontalAlignment ON_TextContent::RuntimeHorizontalAlignment | ( | ) | const |
void ON_TextContent::SetAlignment | ( | ON::TextHorizontalAlignment | horz, |
ON::TextVerticalAlignment | vert | ||
) |
void ON_TextContent::SetEvaluationSerialNumber | ( | unsigned int | sn | ) | const |
void ON_TextContent::SetFormattingRectangleWidth | ( | double | width | ) |
void ON_TextContent::SetRuntimeHorizontalAlignment | ( | ON::TextHorizontalAlignment | halign | ) | const |
void ON_TextContent::SetTextIsWrapped | ( | bool | wrapped | ) |
void ON_TextContent::SetTextRotationDegrees | ( | double | rotation | ) |
void ON_TextContent::SetTextRotationRadians | ( | double | rotation | ) |
const ON_BoundingBox ON_TextContent::TextContentBoundingBox | ( | ) | const |
ON_SHA1_Hash ON_TextContent::TextContentHash | ( | ) | const |
Returns: A hash of the information that determines the text content using wrapped text with evaluated fields.
ON_SHA1_Hash ON_TextContent::TextContentHash | ( | bool | bApplyWrapping, |
bool | bEvaluateFields | ||
) | const |
Parameters: bApplyWrapping - [in] true - hash wrapped text false - has unwrapped text bEvaluateFields - [in] true - hash text with fields evaluated false - hash text with fields unevaluated Returns: A hash of the information that determines the text content without evaluating the fields.
bool ON_TextContent::TextIsWrapped | ( | ) | const |
True if flag to wrap is set.
double ON_TextContent::TextRotationDegrees | ( | ) | const |
Rotation in degrees around origin.
double ON_TextContent::TextRotationRadians | ( | ) | const |
Rotation in radians around origin.
ON_TextRunArray* ON_TextContent::TextRuns | ( | bool | bRaw | ) | const |
Returns pointer to either m_runs, the basic parsed and evaluated text or m_wrapped_runs which is the runs after text wrapping m_wrapped_runs will be null unless the text has been wrapped If raw is false and m_wrapped_runs is not null, m_wrapped_runs will be returned If raw is true or m_wrapped_runs is null, m_runs will be returned
Description: Transforms the object.
Parameters: xform - [in] transformation to apply to object. If xform.IsSimilarity() is zero, then you may want to call MakeSquishy() before calling Transform.
Remarks: When overriding this function, be sure to include a call to ON_Object::TransformUserData() which takes care of transforming any ON_UserData that may be attached to the object.
See Also: ON_Geometry::IsDeformable();
Remarks: Classes derived from ON_Geometry should call ON_Geometry::Transform() to handle user data transformations and then transform their definition.
Reimplemented from ON_Geometry.
const ON_wString ON_TextContent::WrappedPlainText | ( | ) | const |
Same as PlainText() but separated wrapped run lines with '
' for soft return and '\r''
' for hard returns
const ON_wString ON_TextContent::WrappedPlainTextWithFields | ( | ) | const |
Same as PlainTextWithFields() but separated wrapped run lines with '
' for soft return and '\r''
' for hard returns
bool ON_TextContent::WrapText | ( | double | width | ) | const |
Wrap text to a specified width in model space.
|
overridevirtual |
Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.
The default implementation of this virtual function returns false and does nothing.
Reimplemented from ON_Object.
|
friend |
ON__INT_PTR m_reserved0 = (ON__INT_PTR)0;.
* bool IsCurrentDimStyle ON_DimStyle ON_TextContent::const |
|
static |