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;
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;
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);
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,
1125 int bGrowBox =
false,
1145 int StyleIndex()
const;
1146 void SetStyleIndex(
int);
1193 int GetDimensionLineSegments(
1195 int gdi_height_of_I,
1250 center_pt_index = 0,
1257 text_pivot_pt = 10000,
1315 int bGrowBox =
false,
1333 bool CreateFromPoints(
1338 double offset_distance
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
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;
1585 int StyleIndex()
const;
1586 void SetStyleIndex(
int);
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,
1772 double default_offset = 1.0
1788 double default_offset = 1.0
1798 ON_BOOL32 bGrowBox =
false
1804 int bGrowBox =
false,
1836 int StyleIndex()
const;
1837 void SetStyleIndex(
int);
1849 int ImpliedDirection()
const;
1859 int Direction()
const;
1860 void SetDirection(
int direction);
1893 double KinkOffset(
int index)
const;
1894 void SetKinkOffset(
int index,
double offset);
1919 int direction,
double default_offset,
1964 int bGrowBox =
false,
1978 int FontIndex()
const;
1979 void SetFontIndex(
int);
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,
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;
2248 ON_BOOL32
GetBBox(
double* box_min,
double* box_max, ON_BOOL32 grow_box =
false)
const;
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;
virtual ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const =0
virtual ON_BOOL32 Archive() const
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
virtual ON_BOOL32 GetDescription(ON_wString &description)
virtual ON_BOOL32 Transform(const ON_Xform &xform)
virtual bool GetTightBoundingBox(ON_BoundingBox &tight_bbox, int bGrowBox=false, const ON_Xform *xform=0) const
virtual bool MakeDeformable()
ON_BOOL32 Read(ON_BinaryArchive &)
virtual void SetJustification(unsigned int justification)
ON::eAnnotationType m_type
virtual ON::object_type ObjectType() const
ON::eTextDisplayMode m_textdisplaymode
virtual bool IsDeformable() const
virtual unsigned int Justification()
ON_Annotation2Text m_usertext
virtual int Dimension() const =0
unsigned int m_justification
virtual ON_BOOL32 Read(ON_BinaryArchive &binary_archive)
ON_Geometry & operator=(const ON_Geometry &)
virtual ON_BOOL32 Write(ON_BinaryArchive &binary_archive) const
ON_BOOL32 Write(ON_BinaryArchive &) const
const ON_wString & operator=(const ON_wString &)
virtual void ConvertBack(ON_Annotation &target)
unsigned int SizeOf() const
ON_BOOL32 Transform(const ON_Xform &xform)
static const wchar_t * DefaultText()
virtual ON_BOOL32 GetBBox(double *boxmin, double *boxmax, int bGrowBox=false) const =0
bool m_userpositionedtext
virtual void Dump(ON_TextLog &) const
virtual bool EvaluatePoint(const class ON_ObjRef &objref, ON_3dPoint &P) const
void Dump(ON_TextLog &text_log) const
virtual double NumericValue() const