17 #ifndef OPENNURBS_ANNOTATION2_H_INC 18 #define OPENNURBS_ANNOTATION2_H_INC 20 #if defined(ON_OS_WINDOWS_GDI) 69 void SetText(
const char* s );
70 void SetText(
const wchar_t* s );
104 unsigned int SizeOf()
const;
113 ON_BOOL32 GetDescription(
ON_wString& description );
116 ON_BOOL32 Archive()
const;
119 void SetParentUUID(
ON_UUID parent_uuid);
121 bool DrawTextMask()
const;
122 void SetDrawTextMask(
bool bDraw);
124 int MaskColorSource()
const;
125 void SetMaskColorSource(
int source);
131 double MaskOffsetFactor()
const;
132 void SetMaskOffsetFactor(
double offset);
176 unsigned int SizeOf()
const;
185 ON_BOOL32 GetDescription(
ON_wString& description );
188 ON_BOOL32 Archive()
const;
191 void SetParentUUID(
ON_UUID parent_uuid);
196 int ArrowPosition()
const;
197 void SetArrowPosition(
int position);
203 double DistanceScale()
const;
204 void SetDistanceScale(
double s);
207 void SetModelSpaceBasePoint(
ON_3dPoint basepoint);
295 void EmergencyDestroy();
302 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
332 ON::object_type ObjectType()
const;
342 int Dimension()
const;
345 ON_BOOL32 Transform(
const ON_Xform& xform );
366 tjBottomLeft = tjBottom | tjLeft,
367 tjBottomCenter = tjBottom | tjCenter,
368 tjBottomRight = tjBottom | tjRight,
369 tjMiddleLeft = tjMiddle | tjLeft,
370 tjMiddleCenter = tjMiddle | tjCenter,
371 tjMiddleRight = tjMiddle | tjRight,
372 tjTopLeft = tjTop | tjLeft,
373 tjTopCenter = tjTop | tjCenter,
374 tjTopRight = tjTop | tjRight,
399 bool IsLeader()
const;
411 bool IsDimension()
const;
439 double NumericValue()
const;
451 void SetHeight(
double);
452 double Height()
const;
463 void SetType( ON::eAnnotationType);
464 ON::eAnnotationType Type()
const;
486 int PointCount()
const;
487 void SetPointCount(
int count);
530 ON_DEPRECATED
void SetUserText(
const wchar_t* text_value );
533 ON_DEPRECATED
const ON_wString& UserText()
const;
558 const wchar_t* TextValue()
const;
579 void SetTextValue(
const wchar_t* text_value );
599 const wchar_t* TextFormula()
const;
619 void SetTextFormula(
const wchar_t* s );
638 void SetUserPositionedText(
int bUserPositionedText );
639 bool UserPositionedText()
const;
652 void SetTextDisplayMode( ON::eTextDisplayMode);
653 ON::eTextDisplayMode TextDisplayMode()
const;
666 ON_BOOL32 GetECStoWCSXform(
ON_Xform&)
const;
678 ON_BOOL32 GetWCStoECSXform(
ON_Xform& xform)
const;
688 void ReservePoints(
int);
697 static const wchar_t* DefaultText();
727 void SetJustification(
unsigned int justification);
730 unsigned int Justification();
774 double dimstyle_textheight,
775 double dimstyle_textgap,
776 ON::eTextDisplayMode dimstyle_textalignment,
827 double dimstyle_textheight,
828 double dimstyle_textgap,
829 ON::eTextDisplayMode dimstyle_textalignment,
928 bool GetTextPoint(
ON_2dPoint& text_2d_point )
const;
1049 arrow0_pt_index = 1,
1051 arrow1_pt_index = 3,
1052 userpositionedtext_pt_index = 4,
1056 text_pivot_pt = 10000,
1067 ON_BOOL32 Transform(
const ON_Xform& xform );
1107 ON_BOOL32 IsValid(
ON_TextLog* text_log = 0 )
const;
1123 bool GetTightBoundingBox(
1125 int bGrowBox =
false,
1135 double NumericValue()
const;
1145 int StyleIndex()
const;
1146 void SetStyleIndex(
int);
1154 static const wchar_t* DefaultText();
1193 int GetDimensionLineSegments(
1195 int gdi_height_of_I,
1250 center_pt_index = 0,
1257 text_pivot_pt = 10000,
1267 ON_BOOL32 Transform(
const ON_Xform& xform );
1297 ON_BOOL32 IsValid(
ON_TextLog* text_log = 0 )
const;
1313 bool GetTightBoundingBox(
1315 int bGrowBox =
false,
1333 bool CreateFromPoints(
1338 double offset_distance
1348 double NumericValue()
const;
1358 int StyleIndex()
const;
1359 void SetStyleIndex(
int);
1367 static const wchar_t* DefaultDiameterText();
1368 static const wchar_t* DefaultRadiusText();
1379 bool GetArrowHeadDirection(
ON_2dVector& arrowhead_dir )
const;
1380 bool GetArrowHeadTip(
ON_2dPoint& arrowhead_tip )
const;
1433 userpositionedtext_pt_index = 0,
1440 text_pivot_pt = 10000,
1441 arcstart_pt = 10001,
1444 arccenter_pt = 10004,
1445 extension0_pt = 10005,
1446 extension1_pt = 10006
1456 ON_BOOL32 Transform(
const ON_Xform& xform );
1486 ON_BOOL32 IsValid(
ON_TextLog* text_log = 0 )
const;
1496 bool GetTightBoundingBox(
1498 int bGrowBox =
false,
1531 bool CreateFromPoints(
1559 bool GetArc(
ON_Arc& arc )
const;
1561 bool GetExtensionLines(
ON_Line extensions[2])
const;
1564 void SetAngle(
double angle);
1565 double Angle()
const;
1566 void SetRadius(
double radius);
1567 double Radius()
const;
1575 double NumericValue()
const;
1585 int StyleIndex()
const;
1586 void SetStyleIndex(
int);
1594 static const wchar_t* DefaultText();
1639 int GetDimensionArcSegments(
1641 int gdi_height_of_I,
1659 double DimpointOffset(
1669 void SetDimpointOffset(
1737 definition_pt_index = 0,
1738 leader_end_pt_index = 1,
1742 text_pivot_pt = 10000,
1743 offset_pt_0 = 10001,
1757 ON_BOOL32 Transform(
const ON_Xform& xform );
1772 double default_offset = 1.0
1788 double default_offset = 1.0
1792 ON_BOOL32 IsValid(
ON_TextLog* text_log = 0 )
const;
1798 ON_BOOL32 bGrowBox =
false 1802 bool GetTightBoundingBox(
1804 int bGrowBox =
false,
1826 double NumericValue()
const;
1836 int StyleIndex()
const;
1837 void SetStyleIndex(
int);
1849 int ImpliedDirection()
const;
1859 int Direction()
const;
1860 void SetDirection(
int direction);
1879 static const wchar_t* DefaultText();
1893 double KinkOffset(
int index)
const;
1894 void SetKinkOffset(
int index,
double offset);
1919 int direction,
double default_offset,
1939 ON_BOOL32 IsValid(
ON_TextLog* text_log = 0 )
const;
1948 ON_BOOL32 Transform(
const ON_Xform& xform );
1962 bool GetTightBoundingBox(
1964 int bGrowBox =
false,
1978 int FontIndex()
const;
1979 void SetFontIndex(
int);
1984 void SetJustification(
unsigned int justification);
1986 unsigned int Justification();
1989 bool DrawTextMask()
const;
1990 void SetDrawTextMask(
bool bDraw);
1995 int MaskColorSource()
const;
1996 void SetMaskColorSource(
int source);
2005 double MaskOffsetFactor()
const;
2006 void SetMaskOffsetFactor(
double offset);
2011 bool AnnotativeScaling()
const;
2012 void SetAnnotativeScaling(
bool b);
2058 text_pivot_pt = 10000,
2070 ON_BOOL32 Transform(
const ON_Xform& xform );
2099 ON_BOOL32 IsValid(
ON_TextLog* text_log = 0 )
const;
2115 bool GetTightBoundingBox(
2117 int bGrowBox =
false,
2133 bool RemovePoint(
int index = -1);
2149 bool GetTextDirection(
ON_2dVector& text_dir )
const;
2150 bool GetArrowHeadDirection(
ON_2dVector& arrowhead_dir )
const;
2151 bool GetArrowHeadTip(
ON_2dPoint& arrowhead_tip )
const;
2169 void EmergencyDestroy();
2193 ON_BOOL32 IsValid(
ON_TextLog* text_log = NULL )
const;
2223 ON::object_type ObjectType()
const;
2231 int Dimension()
const;
2248 ON_BOOL32 GetBBox(
double* box_min,
double* box_max, ON_BOOL32 grow_box =
false)
const;
2261 ON_BOOL32 Transform(
const ON_Xform& xform);
2264 bool IsDeformable()
const;
2267 bool MakeDeformable();
2273 void SetHeight(
int);
2275 const wchar_t* TextString()
const;
2276 void SetTextString(
const wchar_t*
string);
2278 const wchar_t* FontFace()
const;
2279 void SetFontFace(
const wchar_t* face);
2292 void SetAlwaysOnTop(
bool bTop);
2293 bool AlwaysOnTop()
const;
2305 void SetTransparent(
bool bTransparent);
2306 bool Transparent()
const;
2318 void SetBold(
bool bBold);
2331 void SetItalic(
bool bItalic);
2332 bool Italic()
const;
ON::eAnnotationType m_type
ON::eTextDisplayMode m_textdisplaymode
ON_Annotation2Text m_usertext
unsigned int m_justification
bool m_userpositionedtext