MPImageBasicEditor.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. using System;
  2. using UnityEngine;
  3. using UnityEditor;
  4. using UnityEngine.UI;
  5. using UnityEditor.UI;
  6. namespace MPUIKIT.Editor {
  7. [CustomEditor(typeof(MPImageBasic))]
  8. public class MPImageBasicEditor : ImageEditor {
  9. private SerializedProperty spSprite;
  10. private SerializedProperty spCircleRadius, spCircleFitToRect;
  11. private SerializedProperty spTriangleCornerRadius, spTriangleUniformCornerRadius;
  12. private SerializedProperty spRectangleCornerRadius, spRectangleUniformCornerRadius;
  13. private SerializedProperty spNStarPolygonSideCount, spNStarPolygonInset, spNStarPolygonCornerRadius;
  14. private SerializedProperty spPreserveAspect;
  15. private SerializedProperty spFillMethod, spFillOrigin, spFillAmount, spFillClockwise;
  16. private SerializedProperty spShape;
  17. private SerializedProperty spStrokeWidth, spOutlineWidth, spOutlineColor, spFalloffDistance;
  18. private SerializedProperty spConstrainRotation, spShapeRotation, spFlipHorizontal, spFlipVertical;
  19. private SerializedProperty spImageType;
  20. protected override void OnEnable() {
  21. base.OnEnable();
  22. spSprite = serializedObject.FindProperty("m_Sprite");
  23. spShape = serializedObject.FindProperty("m_DrawShape");
  24. spStrokeWidth = serializedObject.FindProperty("m_StrokeWidth");
  25. spOutlineWidth = serializedObject.FindProperty("m_OutlineWidth");
  26. spOutlineColor = serializedObject.FindProperty("m_OutlineColor");
  27. spFalloffDistance = serializedObject.FindProperty("m_FalloffDistance");
  28. spImageType = serializedObject.FindProperty("m_ImageType");
  29. spFillMethod = serializedObject.FindProperty("m_FillMethod");
  30. spFillOrigin = serializedObject.FindProperty("m_FillOrigin");
  31. spFillAmount = serializedObject.FindProperty("m_FillAmount");
  32. spFillClockwise = serializedObject.FindProperty("m_FillClockwise");
  33. spConstrainRotation = serializedObject.FindProperty("m_ConstrainRotation");
  34. spShapeRotation = serializedObject.FindProperty("m_ShapeRotation");
  35. spFlipHorizontal = serializedObject.FindProperty("m_FlipHorizontal");
  36. spFlipVertical = serializedObject.FindProperty("m_FlipVertical");
  37. spCircleRadius = serializedObject.FindProperty("m_CircleRadius");
  38. spCircleFitToRect = serializedObject.FindProperty("m_CircleFitToRect");
  39. spTriangleCornerRadius = serializedObject.FindProperty("m_TriangleCornerRadius");
  40. spTriangleUniformCornerRadius = serializedObject.FindProperty("m_TriangleUniformCornerRadius");
  41. spRectangleCornerRadius = serializedObject.FindProperty("m_RectangleCornerRadius");
  42. spRectangleUniformCornerRadius = serializedObject.FindProperty("m_TriangleUniformCornerRadius");
  43. spNStarPolygonSideCount = serializedObject.FindProperty("m_NStarPolygonSideCount");
  44. spNStarPolygonInset = serializedObject.FindProperty("m_NStarPolygonInset");
  45. spNStarPolygonCornerRadius = serializedObject.FindProperty("m_NStarPolygonCornerRadius");
  46. spPreserveAspect = serializedObject.FindProperty("m_PreserveAspect");
  47. }
  48. public override void OnInspectorGUI() {
  49. serializedObject.Update();
  50. RaycastControlsGUI();
  51. EditorGUILayout.PropertyField(m_Color);
  52. EditorGUILayout.Space();
  53. Rect shapePopupRect = EditorGUILayout.GetControlRect();
  54. DrawShapeBasic selectedIndex = (DrawShapeBasic) spShape.enumValueIndex;
  55. if (selectedIndex == (DrawShapeBasic) DrawShape.Pentagon || selectedIndex == (DrawShapeBasic) DrawShape.Hexagon)
  56. {
  57. selectedIndex = (DrawShapeBasic) DrawShape.None;
  58. spShape.enumValueIndex = (int) selectedIndex;
  59. }
  60. EditorGUI.BeginChangeCheck();
  61. {
  62. EditorGUI.showMixedValue = spShape.hasMultipleDifferentValues;
  63. selectedIndex = (DrawShapeBasic) EditorGUI.EnumPopup(shapePopupRect, "Draw Shape", selectedIndex);
  64. EditorGUI.showMixedValue = false;
  65. }
  66. if (EditorGUI.EndChangeCheck())
  67. {
  68. spShape.enumValueIndex = (int) selectedIndex;
  69. }
  70. if (spShape.enumValueIndex != (int) DrawShape.None && !spShape.hasMultipleDifferentValues) {
  71. EditorGUILayout.BeginVertical("Box");
  72. if (!spShape.hasMultipleDifferentValues) {
  73. switch ((DrawShape) spShape.enumValueIndex) {
  74. case DrawShape.Circle:
  75. CircleGUI();
  76. break;
  77. case DrawShape.Rectangle:
  78. RectangleGUI();
  79. break;
  80. case DrawShape.Triangle:
  81. TriangleGUI();
  82. break;
  83. case DrawShape.NStarPolygon:
  84. NStarPolygonGUI();
  85. break;
  86. default:
  87. throw new ArgumentOutOfRangeException();
  88. }
  89. }
  90. EditorGUILayout.Space();
  91. if (spShape.enumValueIndex != (int) DrawShape.None) {
  92. AdditionalShapeDataGUI();
  93. }
  94. EditorGUILayout.EndVertical();
  95. }
  96. EditorGUILayout.Space();
  97. ImageTypeGUI();
  98. SpriteGUI();
  99. if (!spSprite.hasMultipleDifferentValues && spSprite.objectReferenceValue != null) {
  100. EditorGUILayout.PropertyField(spPreserveAspect);
  101. }
  102. SetShowNativeSize(spSprite.objectReferenceValue != null, true);
  103. NativeSizeButtonGUI();
  104. EditorGUILayout.Space();
  105. serializedObject.ApplyModifiedProperties();
  106. }
  107. private void NStarPolygonGUI() {
  108. spNStarPolygonSideCount.intValue =
  109. EditorGUILayout.IntSlider("Side Count", spNStarPolygonSideCount.intValue, 3, 10);
  110. spNStarPolygonInset.floatValue =
  111. EditorGUILayout.Slider("Inset", spNStarPolygonInset.floatValue, 2f,
  112. spNStarPolygonSideCount.intValue - 0.1f);
  113. spNStarPolygonCornerRadius.floatValue =
  114. EditorGUILayout.FloatField("Corner Radius", spNStarPolygonCornerRadius.floatValue);
  115. }
  116. private void CircleGUI() {
  117. EditorGUI.BeginDisabledGroup(spCircleFitToRect.boolValue);
  118. EditorGUILayout.PropertyField(spCircleRadius, new GUIContent("Radius"));
  119. EditorGUI.EndDisabledGroup();
  120. Rect rect = EditorGUILayout.GetControlRect();
  121. MPEditorUtility.CornerRadiusModeGUI(rect, ref spCircleFitToRect, new[] {"Free", "Fit"}, String.Empty);
  122. }
  123. private void RectangleGUI() {
  124. Rect rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
  125. MPEditorUtility.CornerRadiusModeGUI(rect, ref spRectangleUniformCornerRadius, new[] {"Free", "Uniform"});
  126. Vector4 vectorValue = spRectangleCornerRadius.vector4Value;
  127. float floatVal = vectorValue.x;
  128. float[] zw = new[] {vectorValue.w, vectorValue.z};
  129. float[] xy = new[] {vectorValue.x, vectorValue.y};
  130. EditorGUI.BeginChangeCheck();
  131. {
  132. EditorGUI.showMixedValue = spRectangleCornerRadius.hasMultipleDifferentValues;
  133. if (spRectangleUniformCornerRadius.boolValue) {
  134. floatVal = EditorGUILayout.FloatField("Uniform Radius", floatVal);
  135. }
  136. else {
  137. rect = EditorGUILayout.GetControlRect(true,
  138. EditorGUIUtility.standardVerticalSpacing + EditorGUIUtility.singleLineHeight * 2);
  139. Rect RadiusVectorRect = new Rect(rect.x, rect.y,
  140. rect.width, EditorGUIUtility.singleLineHeight);
  141. EditorGUI.MultiFloatField(RadiusVectorRect, new[] {
  142. new GUIContent("W"), new GUIContent("Z")
  143. }, zw);
  144. RadiusVectorRect.y +=
  145. EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
  146. EditorGUI.MultiFloatField(RadiusVectorRect, new[] {
  147. new GUIContent("X "), new GUIContent("Y")
  148. }, xy);
  149. }
  150. EditorGUI.showMixedValue = false;
  151. }
  152. if (EditorGUI.EndChangeCheck()) {
  153. spRectangleCornerRadius.vector4Value = spRectangleUniformCornerRadius.boolValue
  154. ? new Vector4(floatVal, floatVal, floatVal, floatVal)
  155. : new Vector4(xy[0], xy[1], zw[1], zw[0]);
  156. }
  157. }
  158. private void TriangleGUI() {
  159. Rect rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight);
  160. MPEditorUtility.CornerRadiusModeGUI(rect, ref spTriangleUniformCornerRadius, new[] {"Free", "Uniform"});
  161. Vector3 vectorValue = spTriangleCornerRadius.vector3Value;
  162. float floatVal = vectorValue.x;
  163. EditorGUI.BeginChangeCheck();
  164. {
  165. EditorGUI.showMixedValue = spTriangleCornerRadius.hasMultipleDifferentValues;
  166. if (spTriangleUniformCornerRadius.boolValue) {
  167. floatVal = EditorGUILayout.FloatField("Uniform Radius", floatVal);
  168. }
  169. else {
  170. vectorValue = EditorGUILayout.Vector3Field("", vectorValue);
  171. }
  172. EditorGUI.showMixedValue = false;
  173. }
  174. if (EditorGUI.EndChangeCheck()) {
  175. spTriangleCornerRadius.vector3Value = spTriangleUniformCornerRadius.boolValue
  176. ? new Vector3(floatVal, floatVal, floatVal)
  177. : vectorValue;
  178. }
  179. }
  180. private void AdditionalShapeDataGUI() {
  181. EditorGUILayout.Space();
  182. float strokeWidth = spStrokeWidth.floatValue;
  183. float outlineWidth = spOutlineWidth.floatValue;
  184. float falloff = spFalloffDistance.floatValue;
  185. Color outlineColor = spOutlineColor.colorValue;
  186. Rect r = EditorGUILayout.GetControlRect(true,
  187. EditorGUIUtility.singleLineHeight * 2 + EditorGUIUtility.standardVerticalSpacing);
  188. Rect line = r;
  189. line.height = EditorGUIUtility.singleLineHeight;
  190. float x = (line.width - 10f) / 2;
  191. float fieldWidth = x / 2 - 10f;
  192. float labelWidth = x - fieldWidth;
  193. line.width = labelWidth;
  194. EditorGUI.LabelField(line, "Stroke");
  195. Rect dragZone = line;
  196. line.x += labelWidth;
  197. line.width = fieldWidth;
  198. EditorGUI.BeginChangeCheck();
  199. {
  200. EditorGUI.showMixedValue = spStrokeWidth.hasMultipleDifferentValues;
  201. strokeWidth =
  202. EditorGUILayoutExtended.FloatFieldExtended(line, spStrokeWidth.floatValue, dragZone);
  203. EditorGUI.showMixedValue = false;
  204. }
  205. if (EditorGUI.EndChangeCheck()) {
  206. spStrokeWidth.floatValue = strokeWidth;
  207. }
  208. line.x += fieldWidth + 10;
  209. line.width = labelWidth;
  210. EditorGUI.LabelField(line, "Falloff");
  211. dragZone = line;
  212. line.x += labelWidth;
  213. line.width = fieldWidth;
  214. EditorGUI.BeginChangeCheck();
  215. {
  216. EditorGUI.showMixedValue = spFalloffDistance.hasMultipleDifferentValues;
  217. falloff =
  218. EditorGUILayoutExtended.FloatFieldExtended(line, spFalloffDistance.floatValue, dragZone);
  219. EditorGUI.showMixedValue = false;
  220. }
  221. if (EditorGUI.EndChangeCheck()) {
  222. spFalloffDistance.floatValue = falloff;
  223. }
  224. line.y += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing;
  225. line.x = r.x;
  226. line.width = labelWidth;
  227. EditorGUI.LabelField(line, "Outline Width");
  228. dragZone = line;
  229. line.x += labelWidth;
  230. line.width = fieldWidth;
  231. EditorGUI.BeginChangeCheck();
  232. {
  233. EditorGUI.showMixedValue = spOutlineWidth.hasMultipleDifferentValues;
  234. outlineWidth =
  235. EditorGUILayoutExtended.FloatFieldExtended(line, spOutlineWidth.floatValue, dragZone);
  236. EditorGUI.showMixedValue = false;
  237. }
  238. if (EditorGUI.EndChangeCheck()) {
  239. spOutlineWidth.floatValue = outlineWidth;
  240. }
  241. line.x += fieldWidth + 10;
  242. line.width = labelWidth;
  243. EditorGUI.LabelField(line, "Outline Color");
  244. dragZone = line;
  245. line.width = fieldWidth;
  246. line.x += labelWidth;
  247. EditorGUI.BeginChangeCheck();
  248. {
  249. EditorGUI.showMixedValue = spOutlineColor.hasMultipleDifferentValues;
  250. outlineColor = EditorGUI.ColorField(line, spOutlineColor.colorValue);
  251. EditorGUI.showMixedValue = false;
  252. }
  253. if (EditorGUI.EndChangeCheck()) {
  254. spOutlineColor.colorValue = outlineColor;
  255. }
  256. EditorGUILayout.Space();
  257. RotationGUI();
  258. }
  259. private void RotationGUI() {
  260. Rect r = EditorGUILayout.GetControlRect(true,
  261. EditorGUIUtility.singleLineHeight + 24 + EditorGUIUtility.standardVerticalSpacing);
  262. Rect line = r;
  263. line.height = EditorGUIUtility.singleLineHeight;
  264. float x = (line.width - 10f) / 2;
  265. float fieldWidth = x / 2 - 10f;
  266. float labelWidth = x - fieldWidth;
  267. line.width = labelWidth;
  268. EditorGUI.LabelField(line, "Rotation");
  269. line.x += labelWidth;
  270. line.width = r.width - labelWidth - 78;
  271. string[] options = spConstrainRotation.hasMultipleDifferentValues
  272. ? new[] {"---", "---"}
  273. : new[] {"Free", "Constrained"};
  274. bool boolVal = spConstrainRotation.boolValue;
  275. EditorGUI.BeginChangeCheck();
  276. {
  277. boolVal = GUI.Toolbar(line, boolVal ? 1 : 0, options) == 1;
  278. }
  279. if (EditorGUI.EndChangeCheck()) {
  280. spConstrainRotation.boolValue = boolVal;
  281. GUI.FocusControl(null);
  282. }
  283. line.x += line.width + 14;
  284. line.width = 64;
  285. EditorGUI.LabelField(line, "Flip");
  286. line.y += EditorGUIUtility.standardVerticalSpacing + EditorGUIUtility.singleLineHeight;
  287. line.x = r.x + 10;
  288. line.height = EditorGUIUtility.singleLineHeight;
  289. line.width = labelWidth - 10;
  290. EditorGUI.BeginDisabledGroup(spConstrainRotation.boolValue);
  291. {
  292. Rect dragZone = line;
  293. EditorGUI.LabelField(line, "Angle");
  294. line.x = r.x + labelWidth;
  295. line.width = r.width - labelWidth - 148;
  296. float rotationValue = spShapeRotation.floatValue;
  297. EditorGUI.BeginChangeCheck();
  298. {
  299. EditorGUI.showMixedValue = spShapeRotation.hasMultipleDifferentValues;
  300. rotationValue =
  301. EditorGUILayoutExtended.FloatFieldExtended(line, spShapeRotation.floatValue, dragZone);
  302. EditorGUI.showMixedValue = false;
  303. }
  304. if (EditorGUI.EndChangeCheck()) {
  305. spShapeRotation.floatValue = rotationValue;
  306. }
  307. }
  308. EditorGUI.EndDisabledGroup();
  309. EditorGUI.BeginDisabledGroup(!spConstrainRotation.boolValue);
  310. {
  311. line.x += line.width + 4;
  312. line.width = 30;
  313. line.height = 24;
  314. if (GUI.Button(line, MPEditorContents.RotateLeftNormal)) {
  315. float rotation = spShapeRotation.floatValue;
  316. float remainder = rotation % 90;
  317. if (Mathf.Abs(remainder) <= 0) {
  318. rotation += 90;
  319. }
  320. else {
  321. rotation = rotation - remainder + 90;
  322. }
  323. if (Math.Abs(rotation) >= 360) rotation = 0;
  324. spShapeRotation.floatValue = rotation;
  325. }
  326. line.x += 34;
  327. if (GUI.Button(line, MPEditorContents.RotateRightNormal)) {
  328. float rotation = spShapeRotation.floatValue;
  329. float remainder = rotation % 90;
  330. if (Mathf.Abs(remainder) <= 0) {
  331. rotation -= 90;
  332. }
  333. else {
  334. rotation -= remainder;
  335. }
  336. if (Math.Abs(rotation) >= 360) rotation = 0;
  337. spShapeRotation.floatValue = rotation;
  338. }
  339. }
  340. EditorGUI.EndDisabledGroup();
  341. line.x += 46;
  342. bool flipH = spFlipHorizontal.boolValue;
  343. bool flipV = spFlipVertical.boolValue;
  344. EditorGUI.BeginChangeCheck();
  345. {
  346. EditorGUI.BeginDisabledGroup(spFlipHorizontal.hasMultipleDifferentValues ||
  347. spFlipVertical.hasMultipleDifferentValues);
  348. flipH = GUI.Toggle(line, spFlipHorizontal.boolValue,
  349. spFlipHorizontal.boolValue
  350. ? MPEditorContents.FlipHorizontalActive
  351. : MPEditorContents.FlipHorizontalNormal, "button");
  352. line.x += 34;
  353. flipV = GUI.Toggle(line, spFlipVertical.boolValue,
  354. spFlipVertical.boolValue
  355. ? MPEditorContents.FlipVerticalActive
  356. : MPEditorContents.FlipVerticalNormal, "button");
  357. EditorGUI.EndDisabledGroup();
  358. }
  359. if (EditorGUI.EndChangeCheck()) {
  360. spFlipHorizontal.boolValue = flipH;
  361. spFlipVertical.boolValue = flipV;
  362. }
  363. }
  364. private new void SpriteGUI() {
  365. Sprite spriteRef = spSprite.objectReferenceValue as Sprite;
  366. Sprite sprite = MPEditorUtility.EmptySprite.Equals(spriteRef) ? null : spriteRef;
  367. EditorGUI.BeginChangeCheck();
  368. {
  369. EditorGUI.showMixedValue = spSprite.hasMultipleDifferentValues;
  370. sprite = EditorGUILayout.ObjectField("Sprite", sprite, typeof(Sprite), false, GUILayout.Height(EditorGUIUtility.singleLineHeight)) as Sprite;
  371. EditorGUI.showMixedValue = false;
  372. }
  373. if (EditorGUI.EndChangeCheck()) {
  374. Sprite newSprite = sprite == null? MPEditorUtility.EmptySprite : sprite;
  375. if (newSprite != null) {
  376. Image.Type oldType = (Image.Type) spImageType.enumValueIndex;
  377. if (newSprite.border.SqrMagnitude() > 0) {
  378. spImageType.enumValueIndex = (int) Image.Type.Sliced;
  379. }
  380. else if (oldType == Image.Type.Sliced) {
  381. spImageType.enumValueIndex = (int) Image.Type.Simple;
  382. }
  383. }
  384. spSprite.objectReferenceValue = newSprite;
  385. (serializedObject.targetObject as Image)?.DisableSpriteOptimizations();
  386. }
  387. EditorGUI.EndDisabledGroup();
  388. }
  389. private void ImageTypeGUI() {
  390. int selectedIndex = spImageType.enumValueIndex == (int) Image.Type.Simple ? 0 : 1;
  391. Rect imageTypeRect = EditorGUILayout.GetControlRect();
  392. EditorGUI.BeginChangeCheck();
  393. {
  394. EditorGUI.LabelField(
  395. new Rect(imageTypeRect.x, imageTypeRect.y, EditorGUIUtility.labelWidth, imageTypeRect.height),
  396. "Type");
  397. imageTypeRect.x += EditorGUIUtility.labelWidth + 2;
  398. imageTypeRect.width -= EditorGUIUtility.labelWidth + 2;
  399. selectedIndex = EditorGUI.Popup(imageTypeRect, selectedIndex, new[] {"Simple", "Filled"});
  400. }
  401. if (EditorGUI.EndChangeCheck()) {
  402. spImageType.enumValueIndex = (int) (selectedIndex == 0 ? Image.Type.Simple : Image.Type.Filled);
  403. }
  404. if (!spImageType.hasMultipleDifferentValues && spImageType.enumValueIndex == (int) Image.Type.Filled) {
  405. ++EditorGUI.indentLevel;
  406. EditorGUI.BeginChangeCheck();
  407. EditorGUILayout.PropertyField(spFillMethod);
  408. if (EditorGUI.EndChangeCheck()) {
  409. spFillOrigin.intValue = 0;
  410. }
  411. switch ((Image.FillMethod) spFillMethod.enumValueIndex) {
  412. case Image.FillMethod.Horizontal:
  413. spFillOrigin.intValue = (int) (Image.OriginHorizontal) EditorGUILayout.EnumPopup("Fill Origin",
  414. (Image.OriginHorizontal) spFillOrigin.intValue);
  415. break;
  416. case Image.FillMethod.Vertical:
  417. spFillOrigin.intValue = (int) (Image.OriginVertical) EditorGUILayout.EnumPopup("Fill Origin",
  418. (Image.OriginVertical) spFillOrigin.intValue);
  419. break;
  420. case Image.FillMethod.Radial90:
  421. spFillOrigin.intValue =
  422. (int) (Image.Origin90) EditorGUILayout.EnumPopup("Fill Origin",
  423. (Image.Origin90) spFillOrigin.intValue);
  424. break;
  425. case Image.FillMethod.Radial180:
  426. spFillOrigin.intValue =
  427. (int) (Image.Origin180) EditorGUILayout.EnumPopup("Fill Origin",
  428. (Image.Origin180) spFillOrigin.intValue);
  429. break;
  430. case Image.FillMethod.Radial360:
  431. spFillOrigin.intValue =
  432. (int) (Image.Origin360) EditorGUILayout.EnumPopup("Fill Origin",
  433. (Image.Origin360) spFillOrigin.intValue);
  434. break;
  435. }
  436. EditorGUILayout.PropertyField(spFillAmount);
  437. if ((Image.FillMethod) spFillMethod.enumValueIndex > Image.FillMethod.Vertical) {
  438. EditorGUILayout.PropertyField(spFillClockwise, new GUIContent("Clockwise"));
  439. }
  440. --EditorGUI.indentLevel;
  441. }
  442. }
  443. private enum DrawShapeBasic
  444. {
  445. None = 0,
  446. Circle = 1,
  447. Triangle = 2,
  448. Rectangle = 3,
  449. NStarPolygon = 6
  450. }
  451. }
  452. }