AcDbGeoPositionMarker.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #pragma once
  11. #include "acdbport.h"
  12. #include "dbmain.h"
  13. #include "rxboiler.h"
  14. #include "gepnt3d.h"
  15. #include "gevec3d.h"
  16. #include "AcString.h"
  17. #pragma pack (push, 8)
  18. class AcDbMText;
  19. /// <summary>
  20. /// the AcDbGeoPositionMarker class represents a Geographical location aware marker object with label
  21. /// </summary>
  22. ///
  23. class ACDB_PORT AcDbGeoPositionMarker : public AcDbEntity
  24. {
  25. public:
  26. enum TextAlignmentType {
  27. /// <summary>
  28. /// Left-justifies text in the MText.
  29. /// </summary>
  30. ///
  31. /// <value>
  32. /// 0
  33. /// </value>
  34. kLeftAlignment = 0,
  35. /// <summary>
  36. /// Centers text in MText.
  37. /// </summary>
  38. ///
  39. /// <value>
  40. /// 1
  41. /// </value>
  42. kCenterAlignment = 1,
  43. /// <summary>
  44. /// Right-justifies text in MText.
  45. /// </summary>
  46. ///
  47. /// <value>
  48. /// 2
  49. /// </value>
  50. kRightAlignment = 2
  51. };
  52. ACRX_DECLARE_MEMBERS(AcDbGeoPositionMarker);
  53. AcDbGeoPositionMarker();
  54. AcDbGeoPositionMarker(const AcGePoint3d &position, double radius, double landingGap);
  55. /// <summary> Get/Set Insertion point of the position marker. </summary>
  56. ///
  57. AcGePoint3d position() const;
  58. Acad::ErrorStatus setPosition(const AcGePoint3d &position);
  59. /// <summary> Get/Set radius of the position marker. </summary>
  60. ///
  61. double radius() const;
  62. Acad::ErrorStatus setRadius(double radius);
  63. /// <summary> Get/Set position marker text label. </summary>
  64. ///
  65. AcString text() const;
  66. Acad::ErrorStatus setText(const AcString& text);
  67. /// <summary> Get/Set position marker MText label. </summary>
  68. ///
  69. AcDbMText* mtext() const;
  70. Acad::ErrorStatus setMText(const AcDbMText* pMText);
  71. /// <summary> Get/Set the visibility of the MText label. </summary>
  72. ///
  73. bool mtextVisible() const;
  74. Acad::ErrorStatus setMTextVisible(bool visible);
  75. /// <summary> Get/Set landing gap of the position marker. </summary>
  76. ///
  77. double landingGap () const;
  78. Acad::ErrorStatus setLandingGap(double landingGap);
  79. /// <summary> Get/Set label text frame enabling. </summary>
  80. ///
  81. bool enableFrameText() const;
  82. Acad::ErrorStatus setEnableFrameText(bool enableFrameText);
  83. /// <summary> Get/Set label text alignment type. </summary>
  84. ///
  85. TextAlignmentType textAlignmentType() const;
  86. Acad::ErrorStatus setTextAlignmentType(TextAlignmentType textAlignmentType);
  87. /// <summary> Get/Set the notes. </summary>
  88. ///
  89. AcString notes() const;
  90. Acad::ErrorStatus setNotes(const AcString& notes);
  91. /// <summary> Get/Set the Geographical location of the position marker. </summary>
  92. ///
  93. AcGePoint3d geoPosition() const;
  94. Acad::ErrorStatus setGeoPosition(const AcGePoint3d &position);
  95. Acad::ErrorStatus latLonAlt(double &lat, double &lon, double &alt) const;
  96. Acad::ErrorStatus setLatLonAlt(double lat, double lon, double alt);
  97. /// <summary> The normal of the position marker. </summary>
  98. ///
  99. AcGeVector3d normal() const;
  100. /// <summary> The text style Object ID of the position marker text. </summary>
  101. ///
  102. AcDbObjectId textStyle() const;
  103. protected:
  104. virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
  105. };
  106. #pragma pack (pop)