dbmstyle.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. //
  11. #ifndef AD_DBMLINESTYLE_H
  12. #define AD_DBMLINESTYLE_H
  13. #include "dbmain.h"
  14. #include "AdAChar.h"
  15. #pragma pack (push, 8)
  16. #define MSTYLE_NAME_LENGTH 32
  17. #define MSTYLE_DESCRIPTION_LENGTH 256
  18. #define LTYPE_LENGTH 32
  19. #define MLINE_MAX_ELEMENTS 16
  20. // 10 degrees
  21. //
  22. #define MIN_ANGLE (10.0 * PI / 180.0)
  23. // 170 degrees
  24. //
  25. #define MAX_ANGLE (170.0 * PI / 180.0)
  26. #define MSTYLE_DXF_FILL_ON (0x1)
  27. #define MSTYLE_DXF_SHOW_MITERS (0x2)
  28. #define MSTYLE_DXF_START_SQUARE_CAP (0x10)
  29. #define MSTYLE_DXF_START_INNER_ARCS (0x20)
  30. #define MSTYLE_DXF_START_ROUND_CAP (0x40)
  31. #define MSTYLE_DXF_END_SQUARE_CAP (0x100)
  32. #define MSTYLE_DXF_END_INNER_ARCS (0x200)
  33. #define MSTYLE_DXF_END_ROUND_CAP (0x400)
  34. #define MSTYLE_DXF_JUST_TOP (0x1000)
  35. #define MSTYLE_DXF_JUST_ZERO (0x2000)
  36. #define MSTYLE_DXF_JUST_BOT (0x4000)
  37. class AcDbMlineStyle: public AcDbObject
  38. {
  39. public:
  40. ACDB_DECLARE_MEMBERS(AcDbMlineStyle);
  41. AcDbMlineStyle();
  42. virtual ~AcDbMlineStyle();
  43. void initMlineStyle();
  44. void set(const AcDbMlineStyle & src,
  45. bool checkIfReferenced = true);
  46. Acad::ErrorStatus setDescription(const ACHAR * description);
  47. const ACHAR* description() const;
  48. Acad::ErrorStatus setName(const ACHAR * name);
  49. const ACHAR* name() const;
  50. void setShowMiters(bool showThem);
  51. bool showMiters() const;
  52. void setStartSquareCap(bool showIt);
  53. bool startSquareCap() const;
  54. void setStartRoundCap(bool showIt);
  55. bool startRoundCap() const;
  56. void setStartInnerArcs(bool showThem);
  57. bool startInnerArcs() const;
  58. void setEndSquareCap(bool showIt);
  59. bool endSquareCap() const;
  60. void setEndRoundCap(bool showIt);
  61. bool endRoundCap() const;
  62. void setEndInnerArcs(bool showThem);
  63. bool endInnerArcs() const;
  64. Acad::ErrorStatus setFillColor(const AcCmColor& color);
  65. const AcCmColor& fillColor() const;
  66. void setFilled(bool onOff);
  67. bool filled() const;
  68. Acad::ErrorStatus setStartAngle(double ang);
  69. double startAngle() const;
  70. Acad::ErrorStatus setEndAngle(double ang);
  71. double endAngle() const;
  72. Acad::ErrorStatus addElement(int& index, double offset,
  73. const AcCmColor &color,
  74. AcDbObjectId linetypeId,
  75. bool checkIfReferenced = true);
  76. Acad::ErrorStatus removeElementAt(int elem);
  77. int numElements() const;
  78. Acad::ErrorStatus setElement(int & elem, double offset,
  79. const AcCmColor &color,
  80. AcDbObjectId linetypeId);
  81. Acad::ErrorStatus getElementAt(int elem, double& offset,
  82. AcCmColor & color,
  83. AcDbObjectId & linetypeId) const;
  84. // --- AcDbObject Protocol
  85. //
  86. virtual Acad::ErrorStatus subErase (Adesk::Boolean pErasing = true);
  87. virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler* filer);
  88. virtual Acad::ErrorStatus dwgOutFields (AcDbDwgFiler* filer) const;
  89. virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler* filer);
  90. virtual Acad::ErrorStatus dxfOutFields (AcDbDxfFiler* filer) const;
  91. // --- AcRxObject Protocol
  92. //
  93. virtual Acad::ErrorStatus copyFrom (const AcRxObject* other);
  94. };
  95. #pragma pack (pop)
  96. #endif