TextRectangleF.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*******************************************************************************
  2. * Copyright(c) 2012 dongke All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:TextRectangleF.cs
  5. * 2.功能描述:绘制文字的范围
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 欧阳涛 2012/09/14 1.00 新建
  9. *******************************************************************************/
  10. using System.Drawing;
  11. namespace Dongke.WinForm.Controls.InvoiceLayout
  12. {
  13. internal class TextRectangleF
  14. {
  15. #region 成员变量
  16. private string _text = string.Empty; // 文字
  17. private RectangleF _rectangle = RectangleF.Empty; // 范围
  18. #endregion 成员变量
  19. #region Layout
  20. /// <summary>
  21. /// 文字
  22. /// </summary>
  23. public string Text
  24. {
  25. get
  26. {
  27. return _text;
  28. }
  29. set
  30. {
  31. _text = value;
  32. }
  33. }
  34. /// <summary>
  35. /// 范围
  36. /// </summary>
  37. public RectangleF RectangleF
  38. {
  39. get
  40. {
  41. return _rectangle;
  42. }
  43. set
  44. {
  45. _rectangle = value;
  46. }
  47. }
  48. /// <summary>
  49. /// 范围X
  50. /// </summary>
  51. public float RectangleX
  52. {
  53. get
  54. {
  55. return _rectangle.X;
  56. }
  57. set
  58. {
  59. _rectangle.X = value;
  60. }
  61. }
  62. /// <summary>
  63. /// 范围Y
  64. /// </summary>
  65. public float RectangleY
  66. {
  67. get
  68. {
  69. return _rectangle.Y;
  70. }
  71. set
  72. {
  73. _rectangle.Y = value;
  74. }
  75. }
  76. #endregion Layout
  77. #region 构造函数
  78. /// <summary>
  79. /// 构造函数
  80. /// </summary>
  81. /// <param name="text">文字</param>
  82. /// <param name="rf">范围</param>
  83. public TextRectangleF(string text, RectangleF rectangle)
  84. {
  85. _text = text;
  86. _rectangle = rectangle;
  87. }
  88. /// <summary>
  89. /// 构造函数
  90. /// </summary>
  91. public TextRectangleF()
  92. {
  93. }
  94. #endregion 构造函数
  95. }
  96. }