17 #ifndef OPENNURBS_INTERNAL_V5_ANNOTATION_H_INC 18 #define OPENNURBS_INTERNAL_V5_ANNOTATION_H_INC 20 #if defined(ON_COMPILING_OPENNURBS) 24 #if defined(ON_OS_WINDOWS_GDI) 25 #define ON_OBSOLETE_V5_RECT RECT 27 typedef struct tagON_RECT
33 } ON_OBSOLETE_V5_RECT;
36 class ON_OBSOLETE_V5_AnnotationText :
public ON_wString 39 ON_OBSOLETE_V5_AnnotationText();
40 ~ON_OBSOLETE_V5_AnnotationText();
43 ON_OBSOLETE_V5_AnnotationText& operator=(
const char*);
44 ON_OBSOLETE_V5_AnnotationText& operator=(
const wchar_t*);
46 void SetText(
const char* s );
47 void SetText(
const wchar_t* s );
58 ON_OBSOLETE_V5_RECT m_rect;
64 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_TextExtra);
67 ON_OBSOLETE_V5_TextExtra();
68 ~ON_OBSOLETE_V5_TextExtra();
71 ON_OBSOLETE_V5_TextExtra* TextExtension(
class ON_OBSOLETE_V5_TextObject* pDim,
bool bCreate);
73 ON_OBSOLETE_V5_TextExtra* TextExtension(
const class ON_OBSOLETE_V5_TextObject* pDim,
bool bCreate);
78 void Dump(
ON_TextLog& text_log )
const override;
81 unsigned int SizeOf()
const override;
90 bool GetDescription(
ON_wString& description )
override;
93 bool Archive()
const override;
96 void SetParentUUID(
ON_UUID parent_uuid);
98 bool DrawTextMask()
const;
99 void SetDrawTextMask(
bool bDraw);
101 int MaskColorSource()
const;
102 void SetMaskColorSource(
int source);
108 double MaskOffsetFactor()
const;
109 void SetMaskOffsetFactor(
double offset);
120 double m_border_offset;
128 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_DimExtra);
131 ON_OBSOLETE_V5_DimExtra();
132 ~ON_OBSOLETE_V5_DimExtra();
135 ON_OBSOLETE_V5_DimExtra* DimensionExtension(
class ON_OBSOLETE_V5_DimLinear* pDim,
bool bCreate);
137 ON_OBSOLETE_V5_DimExtra* DimensionExtension(
const class ON_OBSOLETE_V5_DimLinear* pDim,
bool bCreate);
139 ON_OBSOLETE_V5_DimExtra* DimensionExtension(
class ON_OBSOLETE_V5_DimRadial* pDim,
bool bCreate);
141 ON_OBSOLETE_V5_DimExtra* DimensionExtension(
const class ON_OBSOLETE_V5_DimRadial* pDim,
bool bCreate);
143 ON_OBSOLETE_V5_DimExtra* DimensionExtension(
class ON_OBSOLETE_V5_DimOrdinate* pDim,
bool bCreate);
145 ON_OBSOLETE_V5_DimExtra* DimensionExtension(
const class ON_OBSOLETE_V5_DimOrdinate* pDim,
bool bCreate);
150 void Dump(
ON_TextLog& text_log )
const override;
153 unsigned int SizeOf()
const override;
162 bool GetDescription(
ON_wString& description )
override;
165 bool Archive()
const override;
168 void SetParentUUID(
ON_UUID parent_uuid);
173 int ArrowPosition()
const;
174 void SetArrowPosition(
int position);
180 double DistanceScale()
const;
181 void SetDistanceScale(
double s);
184 void SetModelSpaceBasePoint(
ON_3dPoint basepoint);
189 ON_UUID DetailMeasured()
const;
190 void SetDetailMeasured(
ON_UUID detail_id);
219 int m_arrow_position;
232 ON_OBSOLETE_V5_RECT* m_text_rects;
234 double m_distance_scale;
252 class ON_OBSOLETE_V5_Annotation :
public ON_Geometry 254 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_Annotation);
257 ON_OBSOLETE_V5_Annotation();
258 ON_OBSOLETE_V5_Annotation(
const ON_OBSOLETE_V5_Annotation&) =
default;
259 ON_OBSOLETE_V5_Annotation& operator=(
const ON_OBSOLETE_V5_Annotation&) =
default;
262 virtual ~ON_OBSOLETE_V5_Annotation();
265 void Internal_InitializeFromV2Annotation(
266 const class ON_OBSOLETE_V2_Annotation& V2_annotation,
271 static ON_OBSOLETE_V5_Annotation* CreateFromV2Annotation(
272 const class ON_OBSOLETE_V2_Annotation& V2_annotation,
277 static ON_OBSOLETE_V5_Annotation* CreateFromV6Annotation(
296 void EmergencyDestroy();
303 bool IsValid(
class ON_TextLog* text_log =
nullptr )
const override;
333 ON::object_type ObjectType()
const override;
343 int Dimension()
const override;
346 bool Transform(
const ON_Xform& xform )
override;
358 enum eTextJustification
367 tjBottomLeft = tjBottom | tjLeft,
368 tjBottomCenter = tjBottom | tjCenter,
369 tjBottomRight = tjBottom | tjRight,
370 tjMiddleLeft = tjMiddle | tjLeft,
371 tjMiddleCenter = tjMiddle | tjCenter,
372 tjMiddleRight = tjMiddle | tjRight,
373 tjTopLeft = tjTop | tjLeft,
374 tjTopCenter = tjTop | tjCenter,
375 tjTopRight = tjTop | tjRight,
400 bool IsLeader()
const;
412 bool IsDimension()
const;
415 int V5_3dmArchiveDimStyleIndex()
const;
421 void SetV5_3dmArchiveDimStyleIndex(
422 int V5_dim_style_index
461 double NumericValue()
const;
473 void SetHeight(
double);
474 double Height()
const;
485 void SetType( ON_INTERNAL_OBSOLETE::V5_eAnnotationType);
486 ON_INTERNAL_OBSOLETE::V5_eAnnotationType Type()
const;
508 int PointCount()
const;
509 void SetPointCount(
int count);
551 ON_DEPRECATED_MSG(
"use SetTextValue function")
552 void SetUserText( const
wchar_t* text_value );
554 ON_DEPRECATED_MSG("use TextValue function")
580 const
wchar_t* TextValue() const;
601 void SetTextValue( const
wchar_t* text_value );
621 const
wchar_t* TextFormula() const;
641 void SetTextFormula( const
wchar_t* s );
660 void SetUserPositionedText(
int bUserPositionedText );
661 bool UserPositionedText() const;
674 void SetTextDisplayMode( ON_INTERNAL_OBSOLETE::V5_TextDisplayMode);
675 ON_INTERNAL_OBSOLETE::V5_TextDisplayMode TextDisplayMode() const;
688 bool GetECStoWCSXform(
ON_Xform&) const;
700 bool GetWCStoECSXform(
ON_Xform& xform) const;
710 void ReservePoints(
int);
719 static const
wchar_t* DefaultText();
735 void SetJustification(
unsigned int justification);
737 virtual
unsigned int Justification() const;
779 ON_OBSOLETE_V5_RECT gdi_text_rect,
781 double dimstyle_textheight,
782 double dimstyle_textgap,
783 ON_INTERNAL_OBSOLETE::V5_TextDisplayMode dimstyle_textalignment,
832 ON_OBSOLETE_V5_RECT gdi_text_rect,
834 double dimstyle_textheight,
835 double dimstyle_textgap,
836 ON_INTERNAL_OBSOLETE::V5_TextDisplayMode dimstyle_textalignment,
869 const ON_OBSOLETE_V5_RECT gdi_text_rect,
891 bool GetTextPoint(
ON_2dPoint& text_2d_point ) const;
894 ON_INTERNAL_OBSOLETE::V5_eAnnotationType m_type;
901 ON_INTERNAL_OBSOLETE::V5_TextDisplayMode m_textdisplaymode;
936 ON_OBSOLETE_V5_AnnotationText m_usertext;
940 bool m_userpositionedtext;
948 bool m_annotative_scale;
967 int m_v5_3dm_archive_dimstyle_index = ON_UNSET_INT_INDEX;
977 unsigned int m_justification;
982 class ON_OBSOLETE_V5_DimLinear : public ON_OBSOLETE_V5_Annotation
984 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_DimLinear);
1024 arrow0_pt_index = 1,
1026 arrow1_pt_index = 3,
1027 userpositionedtext_pt_index = 4,
1031 text_pivot_pt = 10000,
1036 ON_OBSOLETE_V5_DimLinear();
1037 ~ON_OBSOLETE_V5_DimLinear();
1038 ON_OBSOLETE_V5_DimLinear(
const ON_OBSOLETE_V5_DimLinear& ) =
default;
1039 ON_OBSOLETE_V5_DimLinear& operator=(
const ON_OBSOLETE_V5_DimLinear&) =
default;
1054 static ON_OBSOLETE_V5_DimLinear* CreateFromV6DimLinear(
1057 ON_OBSOLETE_V5_DimLinear* destination
1060 static ON_OBSOLETE_V5_DimLinear* CreateFromV2LinearDimension(
1061 const class ON_OBSOLETE_V2_DimLinear& V2_linear_dimension,
1063 ON_OBSOLETE_V5_DimLinear* destination
1067 bool Transform(
const ON_Xform& xform )
override;
1107 bool IsValid(
ON_TextLog* text_log =
nullptr )
const override;
1116 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
1119 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
1127 double NumericValue()
const override;
1137 int StyleIndex()
const;
1138 void SetStyleIndex(
int);
1146 static const wchar_t* DefaultText();
1176 int GetDimensionLineSegments(
1177 ON_OBSOLETE_V5_RECT gdi_text_rect,
1178 int gdi_height_of_I,
1190 ON_OBSOLETE_V5_DimExtra* DimensionExtension();
1191 const ON_OBSOLETE_V5_DimExtra* DimensionExtension()
const;
1196 class ON_OBSOLETE_V5_DimRadial :
public ON_OBSOLETE_V5_Annotation
1198 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_DimRadial);
1229 center_pt_index = 0,
1236 text_pivot_pt = 10000,
1239 ON_OBSOLETE_V5_DimRadial();
1240 ~ON_OBSOLETE_V5_DimRadial() =
default;
1241 ON_OBSOLETE_V5_DimRadial(
const ON_OBSOLETE_V5_DimRadial&) =
default;
1242 ON_OBSOLETE_V5_DimRadial& operator=(
const ON_OBSOLETE_V5_DimRadial&) =
default;
1245 static ON_OBSOLETE_V5_DimRadial* CreateFromV6DimRadial(
1248 ON_OBSOLETE_V5_DimRadial* destination
1251 static ON_OBSOLETE_V5_DimRadial* CreateFromV2RadialDimension(
1252 const class ON_OBSOLETE_V2_DimRadial& V2_radial_dimension,
1254 ON_OBSOLETE_V5_DimRadial* destination
1258 bool Transform(
const ON_Xform& xform )
override;
1288 bool IsValid(
ON_TextLog* text_log =
nullptr )
const override;
1297 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
1300 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
1316 bool CreateFromPoints(
1321 double offset_distance
1331 double NumericValue()
const override;
1341 int StyleIndex()
const;
1342 void SetStyleIndex(
int);
1350 static const wchar_t* DefaultDiameterText();
1351 static const wchar_t* DefaultRadiusText();
1354 const class ON_OBSOLETE_V2_Annotation& v2_ann,
1359 bool GetArrowHeadDirection(
ON_2dVector& arrowhead_dir )
const;
1360 bool GetArrowHeadTip(
ON_2dPoint& arrowhead_tip )
const;
1366 class ON_OBSOLETE_V5_DimAngular :
public ON_OBSOLETE_V5_Annotation
1368 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_DimAngular);
1413 userpositionedtext_pt_index = 0,
1420 text_pivot_pt = 10000,
1421 arcstart_pt = 10001,
1424 arccenter_pt = 10004,
1425 extension0_pt = 10005,
1426 extension1_pt = 10006
1430 ON_OBSOLETE_V5_DimAngular();
1431 ~ON_OBSOLETE_V5_DimAngular() =
default;
1432 ON_OBSOLETE_V5_DimAngular(
const ON_OBSOLETE_V5_DimAngular&) =
default;
1433 ON_OBSOLETE_V5_DimAngular& operator=(
const ON_OBSOLETE_V5_DimAngular&) =
default;
1435 static ON_OBSOLETE_V5_DimAngular* CreateFromV6DimAngular(
1438 ON_OBSOLETE_V5_DimAngular* destination
1441 static ON_OBSOLETE_V5_DimAngular* CreateFromV2AngularDimension(
1442 const class ON_OBSOLETE_V2_DimAngular& V2_angular_dimension,
1444 ON_OBSOLETE_V5_DimAngular* destination
1449 bool Transform(
const ON_Xform& xform )
override;
1479 bool IsValid(
ON_TextLog* text_log =
nullptr )
const override;
1482 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
1485 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
1516 bool CreateFromPoints(
1538 bool GetArc(
ON_Arc& arc )
const;
1540 bool GetExtensionLines(
ON_Line extensions[2])
const;
1543 void SetAngle(
double angle);
1544 double Angle()
const;
1545 void SetRadius(
double radius);
1546 double Radius()
const;
1554 double NumericValue()
const override;
1564 int StyleIndex()
const;
1565 void SetStyleIndex(
int);
1573 static const wchar_t* DefaultText();
1575 double m_angle = 0.0;
1576 double m_radius = 1.0;
1601 int GetDimensionArcSegments(
1602 ON_OBSOLETE_V5_RECT gdi_text_rect,
1603 int gdi_height_of_I,
1621 double DimpointOffset(
1631 void SetDimpointOffset(
1643 class ON_OBSOLETE_V5_DimOrdinate :
public ON_OBSOLETE_V5_Annotation
1645 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_DimOrdinate);
1698 definition_pt_index = 0,
1699 leader_end_pt_index = 1,
1703 text_pivot_pt = 10000,
1704 offset_pt_0 = 10001,
1714 ON_OBSOLETE_V5_DimOrdinate();
1715 ~ON_OBSOLETE_V5_DimOrdinate();
1717 static ON_OBSOLETE_V5_DimOrdinate* CreateFromV6DimOrdinate(
1720 ON_OBSOLETE_V5_DimOrdinate* destination
1725 bool Transform(
const ON_Xform& xform )
override;
1740 double default_offset = 1.0
1756 double default_offset = 1.0
1760 bool IsValid(
ON_TextLog* text_log =
nullptr )
const override;
1763 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
1766 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
1786 double NumericValue()
const override;
1796 int StyleIndex()
const;
1797 void SetStyleIndex(
int);
1809 int ImpliedDirection()
const;
1819 int Direction()
const;
1820 void SetDirection(
int direction);
1839 static const wchar_t* DefaultText();
1853 double KinkOffset(
int index)
const;
1854 void SetKinkOffset(
int index,
double offset);
1862 double m_kink_offset_0;
1863 double m_kink_offset_1;
1879 int direction,
double default_offset,
1887 class ON_OBSOLETE_V5_TextObject :
public ON_OBSOLETE_V5_Annotation
1889 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_TextObject);
1892 ON_OBSOLETE_V5_TextObject();
1893 ~ON_OBSOLETE_V5_TextObject();
1908 static ON_OBSOLETE_V5_TextObject* CreateFromV6TextObject(
1909 const class ON_Text& V6_text_object,
1911 ON_OBSOLETE_V5_TextObject* destination
1914 static ON_OBSOLETE_V5_TextObject* CreateFromV2TextObject(
1915 const class ON_OBSOLETE_V2_TextObject& V2_text_object,
1917 ON_OBSOLETE_V5_TextObject* destination
1923 bool IsValid(
ON_TextLog* text_log =
nullptr )
const override;
1932 bool Transform(
const ON_Xform& xform )
override;
1935 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
1938 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
1940 void SetJustification(
unsigned int justification)
override;
1942 unsigned int Justification()
const override;
1945 bool DrawTextMask()
const;
1946 void SetDrawTextMask(
bool bDraw);
1951 int MaskColorSource()
const;
1952 void SetMaskColorSource(
int source);
1961 double MaskOffsetFactor()
const;
1962 void SetMaskOffsetFactor(
double offset);
1967 bool AnnotativeScaling()
const;
1968 void SetAnnotativeScaling(
bool b);
1973 class ON_OBSOLETE_V5_Leader :
public ON_OBSOLETE_V5_Annotation
1975 ON_OBJECT_DECLARE(ON_OBSOLETE_V5_Leader);
2014 text_pivot_pt = 10000,
2019 ON_OBSOLETE_V5_Leader();
2020 ~ON_OBSOLETE_V5_Leader();
2038 static ON_OBSOLETE_V5_Leader* CreateFromV6Leader(
2041 ON_OBSOLETE_V5_Leader* destination
2045 static ON_OBSOLETE_V5_Leader* CreateFromV2Leader(
2046 const class ON_OBSOLETE_V2_Leader& V2_leader,
2048 ON_OBSOLETE_V5_Leader* destination
2052 bool Transform(
const ON_Xform& xform )
override;
2081 bool IsValid(
ON_TextLog* text_log =
nullptr )
const override;
2090 bool GetBBox(
double* boxmin,
double* boxmax,
bool bGrowBox =
false )
const override;
2093 bool GetTightBoundingBox(
class ON_BoundingBox& tight_bbox,
bool bGrowBox =
false,
const class ON_Xform* xform =
nullptr )
const override;
2107 bool RemovePoint(
int index = -1);
2110 bool GetTextDirection(
ON_2dVector& text_dir )
const;
2111 bool GetArrowHeadDirection(
ON_2dVector& arrowhead_dir )
const;
2112 bool GetArrowHeadTip(
ON_2dPoint& arrowhead_tip )
const;
Definition: opennurbs_annotationbase.h:23
ON_UUID is a 16 byte universally unique identifier.
Definition: opennurbs_uuid.h:32
Definition: opennurbs_dimension.h:401
An ON_Arc is a subcurve of 3d circle.
Definition: opennurbs_arc.h:33
ON_Leader class.
Definition: opennurbs_leader.h:23
Definition: opennurbs_dimension.h:202
Definition: opennurbs_string.h:2020
Definition: opennurbs_dimensionstyle.h:218
Context for an annotation object. This context is required when converting current annotation objects...
Definition: opennurbs_archive.h:1592
Base class for all geometry classes that must provide runtime class id. Provides interface for common...
Definition: opennurbs_geometry.h:37
Definition: opennurbs_color.h:24
Definition: opennurbs_point.h:277
Definition: opennurbs_3dm_settings.h:110
Definition: opennurbs_dimension.h:665
Definition: opennurbs_bounding_box.h:25
An ON_Font is a face in a font family. It corresponds to a Windows LOGFONT, a .NET System...
Definition: opennurbs_font.h:225
Definition: opennurbs_dimension.h:818
Definition: opennurbs_line.h:20
Definition: opennurbs_textlog.h:20
Definition: opennurbs_archive.h:1783
Definition: opennurbs_viewport.h:31
Definition: opennurbs_userdata.h:20
Definition: opennurbs_objref.h:163
Definition: opennurbs_point.h:460
Definition: opennurbs_plane.h:20
Definition: opennurbs_textobject.h:18
Definition: opennurbs_point.h:839
Definition: opennurbs_point.h:1152
Definition: opennurbs_point.h:1973