CustomLineCap.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // System.Drawing.Drawing2D.CustomLineCap.cs
  3. //
  4. // Authors:
  5. // Dennis Hayes ([email protected])
  6. // Andreas Nahr ([email protected])
  7. //
  8. // (C) 2002/3 Ximian, Inc
  9. //
  10. using System;
  11. namespace System.Drawing.Drawing2D {
  12. /// <summary>
  13. /// Summary description for CustomLineCap.
  14. /// </summary>
  15. public class CustomLineCap : MarshalByRefObject, ICloneable, IDisposable {
  16. private LineCap baseCap;
  17. private float baseInset;
  18. private LineJoin strokeJoin;
  19. private float widthScale;
  20. // Constructors
  21. // Constructor with no parameters is not part of spec. It was needed to get to compile. Bug in compiler?
  22. protected CustomLineCap() {
  23. }
  24. public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePath, LineCap baseCap, float baseInset) {
  25. this.baseInset = baseInset;
  26. }
  27. public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth, LineCap baseCap) {
  28. this.baseCap = baseCap;
  29. }
  30. public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth) {
  31. }
  32. public LineCap BaseCap{
  33. get {
  34. return baseCap;
  35. }
  36. set {
  37. baseCap = value;
  38. }
  39. }
  40. public LineJoin StrokeJoin{
  41. get {
  42. return strokeJoin;
  43. }
  44. set {
  45. strokeJoin = value;
  46. }
  47. }
  48. public float BaseInset{
  49. get {
  50. return baseInset;
  51. }
  52. set {
  53. baseInset = value;
  54. }
  55. }
  56. public float WidthScale{
  57. get {
  58. return widthScale;
  59. }
  60. set {
  61. widthScale = value;
  62. }
  63. }
  64. //Public Methods
  65. // Implment IConeable.Clone
  66. public object Clone(){
  67. //FIXME
  68. return new CustomLineCap();
  69. }
  70. public virtual void Dispose(){
  71. Dispose(true);
  72. }
  73. public virtual void Dispose(bool disposing){
  74. }
  75. public void GetStrokeCaps(out LineCap startCap, out LineCap endCap){
  76. startCap = baseCap;
  77. endCap = baseCap;
  78. }
  79. public void SetStrokeCaps(LineCap startCap, LineCap endCap){
  80. }
  81. }
  82. }