Sprite.Property.12.Line.cs 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. using System.Drawing;
  2. using System.Drawing.Drawing2D;
  3. namespace Microsoft.Windows.Forms
  4. {
  5. partial class Sprite
  6. {
  7. private int m_LineWidth = 1;
  8. /// <summary>
  9. /// 直线
  10. /// </summary>
  11. public int LineWidth
  12. {
  13. get
  14. {
  15. return this.m_LineWidth;
  16. }
  17. set
  18. {
  19. if (value != this.m_LineWidth)
  20. {
  21. this.m_LineWidth = value;
  22. this.Feedback();
  23. }
  24. }
  25. }
  26. private BlendStyle m_LineBlendStyle = BlendStyle.Solid;
  27. /// <summary>
  28. /// 直线混合样式
  29. /// </summary>
  30. public BlendStyle LineBlendStyle
  31. {
  32. get
  33. {
  34. return this.m_LineBlendStyle;
  35. }
  36. set
  37. {
  38. if (value != this.m_LineBlendStyle)
  39. {
  40. this.m_LineBlendStyle = value;
  41. this.Feedback();
  42. }
  43. }
  44. }
  45. private DashStyle m_LineDashStyle = DashStyle.Solid;
  46. /// <summary>
  47. /// 直线绘制虚线样式
  48. /// </summary>
  49. public DashStyle LineDashStyle
  50. {
  51. get
  52. {
  53. return this.m_LineDashStyle;
  54. }
  55. set
  56. {
  57. if (value != this.m_LineDashStyle)
  58. {
  59. this.m_LineDashStyle = value;
  60. this.Feedback();
  61. }
  62. }
  63. }
  64. private float[] m_LineDashPattern = null;
  65. /// <summary>
  66. /// 直线自定义的短划线和空白区域的数组
  67. /// </summary>
  68. public float[] LineDashPattern
  69. {
  70. get
  71. {
  72. return this.m_LineDashPattern;
  73. }
  74. set
  75. {
  76. if (value != this.m_LineDashPattern)
  77. {
  78. this.m_LineDashPattern = value;
  79. this.Feedback();
  80. }
  81. }
  82. }
  83. private DashCap m_LineDashCap = DashCap.Flat;
  84. /// <summary>
  85. /// 直线虚线断弦断终点的线帽样式
  86. /// </summary>
  87. public DashCap LineDashCap
  88. {
  89. get
  90. {
  91. return this.m_LineDashCap;
  92. }
  93. set
  94. {
  95. if (value != this.m_LineDashCap)
  96. {
  97. this.m_LineDashCap = value;
  98. this.Feedback();
  99. }
  100. }
  101. }
  102. private float m_LineDashOffset = 0f;
  103. /// <summary>
  104. /// 直线直线的起点到短划线图案起始处的距离
  105. /// </summary>
  106. public float LineDashOffset
  107. {
  108. get
  109. {
  110. return this.m_LineDashOffset;
  111. }
  112. set
  113. {
  114. if (value != this.m_LineDashOffset)
  115. {
  116. this.m_LineDashOffset = value;
  117. this.Feedback();
  118. }
  119. }
  120. }
  121. private Color m_LineColor = DefaultTheme.BorderColor;
  122. /// <summary>
  123. /// 直线颜色
  124. /// </summary>
  125. public Color LineColor
  126. {
  127. get
  128. {
  129. return this.m_LineColor;
  130. }
  131. set
  132. {
  133. if (value != this.m_LineColor)
  134. {
  135. this.m_LineColor = value;
  136. this.Feedback();
  137. }
  138. }
  139. }
  140. private Color m_LineColorHovered = DefaultTheme.BorderColor + DefaultTheme.BorderColorHoveredVector;
  141. /// <summary>
  142. /// 直线色鼠标移上向量
  143. /// </summary>
  144. public Color LineColorHovered
  145. {
  146. get
  147. {
  148. return this.m_LineColorHovered;
  149. }
  150. set
  151. {
  152. if (value != this.m_LineColorHovered)
  153. {
  154. this.m_LineColorHovered = value;
  155. this.Feedback();
  156. }
  157. }
  158. }
  159. private Color m_LineColorPressed = DefaultTheme.BorderColor + DefaultTheme.BorderColorPressedVector;
  160. /// <summary>
  161. /// 直线色鼠标按下向量
  162. /// </summary>
  163. public Color LineColorPressed
  164. {
  165. get
  166. {
  167. return this.m_LineColorPressed;
  168. }
  169. set
  170. {
  171. if (value != this.m_LineColorPressed)
  172. {
  173. this.m_LineColorPressed = value;
  174. this.Feedback();
  175. }
  176. }
  177. }
  178. private Color m_LineColorFocused = DefaultTheme.BorderColor + DefaultTheme.BorderColorFocusedVector;
  179. /// <summary>
  180. /// 直线色获取焦点向量
  181. /// </summary>
  182. public Color LineColorFocused
  183. {
  184. get
  185. {
  186. return this.m_LineColorFocused;
  187. }
  188. set
  189. {
  190. if (value != this.m_LineColorFocused)
  191. {
  192. this.m_LineColorFocused = value;
  193. this.Feedback();
  194. }
  195. }
  196. }
  197. private Color m_LineColorDisabled = DefaultTheme.BorderColor + DefaultTheme.BorderColorDisabledVector;
  198. /// <summary>
  199. /// 直线色状态禁用向量
  200. /// </summary>
  201. public Color LineColorDisabled
  202. {
  203. get
  204. {
  205. return this.m_LineColorDisabled;
  206. }
  207. set
  208. {
  209. if (value != this.m_LineColorDisabled)
  210. {
  211. this.m_LineColorDisabled = value;
  212. this.Feedback();
  213. }
  214. }
  215. }
  216. private Color m_LineColorHighlight = DefaultTheme.BorderColor + DefaultTheme.BorderColorHighlightVector;
  217. /// <summary>
  218. /// 直线色高亮向量
  219. /// </summary>
  220. public Color LineColorHighlight
  221. {
  222. get
  223. {
  224. return this.m_LineColorHighlight;
  225. }
  226. set
  227. {
  228. if (value != this.m_LineColorHighlight)
  229. {
  230. this.m_LineColorHighlight = value;
  231. this.Feedback();
  232. }
  233. }
  234. }
  235. private float m_LineColorPos1 = 0.45f;
  236. /// <summary>
  237. /// 直线颜色位置1
  238. /// </summary>
  239. public float LineColorPos1
  240. {
  241. get
  242. {
  243. return this.m_LineColorPos1;
  244. }
  245. set
  246. {
  247. if (value != this.m_LineColorPos1)
  248. {
  249. this.m_LineColorPos1 = value;
  250. this.Feedback();
  251. }
  252. }
  253. }
  254. private float m_LineColorPos2 = 0.5f;
  255. /// <summary>
  256. /// 直线颜色位置2
  257. /// </summary>
  258. public float LineColorPos2
  259. {
  260. get
  261. {
  262. return this.m_LineColorPos2;
  263. }
  264. set
  265. {
  266. if (value != this.m_LineColorPos2)
  267. {
  268. this.m_LineColorPos2 = value;
  269. this.Feedback();
  270. }
  271. }
  272. }
  273. }
  274. }