Sprite.Property.03.Round.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. namespace Microsoft.Windows.Forms
  2. {
  3. public partial class Sprite
  4. {
  5. private CornerStyle m_RoundCornerStyle = CornerStyle.None;
  6. /// <summary>
  7. /// 圆角弯曲样式
  8. /// </summary>
  9. public CornerStyle RoundCornerStyle
  10. {
  11. get
  12. {
  13. return this.m_RoundCornerStyle;
  14. }
  15. set
  16. {
  17. if (value != this.m_RoundCornerStyle)
  18. {
  19. this.m_RoundCornerStyle = value;
  20. this.Feedback();
  21. }
  22. }
  23. }
  24. private RoundStyle m_RoundStyle = RoundStyle.None;
  25. /// <summary>
  26. /// 圆角样式
  27. /// </summary>
  28. public RoundStyle RoundStyle
  29. {
  30. get
  31. {
  32. return this.m_RoundStyle;
  33. }
  34. set
  35. {
  36. if (value != this.m_RoundStyle)
  37. {
  38. this.m_RoundStyle = value;
  39. this.Feedback();
  40. }
  41. }
  42. }
  43. private float m_RoundRadius = 0f;
  44. /// <summary>
  45. /// 圆角半径
  46. /// </summary>
  47. public float RoundRadius
  48. {
  49. get
  50. {
  51. return this.m_RoundRadius;
  52. }
  53. set
  54. {
  55. if (value != this.m_RoundRadius)
  56. {
  57. this.m_RoundRadius = value < 0f ? 0f : value;
  58. this.Feedback();
  59. }
  60. }
  61. }
  62. }
  63. }