|
| 1 | +using Synercoding.Primitives; |
| 2 | + |
| 3 | +namespace Synercoding.FileFormats.Pdf |
| 4 | +{ |
| 5 | + /// <summary> |
| 6 | + /// Interface representing a path in the content stream of a page |
| 7 | + /// </summary> |
| 8 | + public interface IPath |
| 9 | + { |
| 10 | + /// <summary> |
| 11 | + /// Begin a new subpath by moving the current point to the coordinates (<paramref name="x"/>, <paramref name="y"/>), |
| 12 | + /// ommitting any connecting line segment. Appends an (m) operator to the content stream |
| 13 | + /// </summary> |
| 14 | + /// <param name="x">The X coordinate of the move</param> |
| 15 | + /// <param name="y">The Y coordinate of the move</param> |
| 16 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 17 | + IPath Move(double x, double y); |
| 18 | + |
| 19 | + /// <summary> |
| 20 | + /// Begin a new subpath by moving the current point to the coordinates (<paramref name="point"/>), |
| 21 | + /// ommitting any connecting line segment. Appends an (m) operator to the content stream |
| 22 | + /// </summary> |
| 23 | + /// <param name="point">The point to where to move</param> |
| 24 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 25 | + IPath Move(Point point); |
| 26 | + |
| 27 | + /// <summary> |
| 28 | + /// Add a line (l) operator to the content stream |
| 29 | + /// </summary> |
| 30 | + /// <param name="x">The X coordinate of the line end point</param> |
| 31 | + /// <param name="y">The Y coordinate of the line end point</param> |
| 32 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 33 | + IPath LineTo(double x, double y); |
| 34 | + |
| 35 | + /// <summary> |
| 36 | + /// Add a line (l) operator to the content stream |
| 37 | + /// </summary> |
| 38 | + /// <param name="point">The point to where to line to</param> |
| 39 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 40 | + IPath LineTo(Point point); |
| 41 | + |
| 42 | + /// <summary> |
| 43 | + /// Add a rectangle (re) operator to the content stream |
| 44 | + /// </summary> |
| 45 | + /// <param name="x">The X coordinate of the rectangle</param> |
| 46 | + /// <param name="y">The Y coordinate of the rectangle</param> |
| 47 | + /// <param name="width">The width of the rectangle</param> |
| 48 | + /// <param name="height">The height of the rectangle</param> |
| 49 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 50 | + IPath Rectangle(double x, double y, double width, double height); |
| 51 | + |
| 52 | + /// <summary> |
| 53 | + /// Add a rectangle (re) operator to the content stream |
| 54 | + /// </summary> |
| 55 | + /// <param name="rectangle">The rectangle to add to the content stream</param> |
| 56 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 57 | + IPath Rectangle(Rectangle rectangle); |
| 58 | + |
| 59 | + /// <summary> |
| 60 | + /// Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (<paramref name="finalX"/>, <paramref name="finalY"/>), |
| 61 | + /// using (<paramref name="cpX1"/>, <paramref name="cpY1"/>) and (<paramref name="cpX2"/>, <paramref name="cpY2"/>) as the Bézier control points. |
| 62 | + /// Adds a Cubic Bézier Curve (c) operator to the content stream. |
| 63 | + /// </summary> |
| 64 | + /// <param name="cpX1">The X coordinate of the first control point</param> |
| 65 | + /// <param name="cpY1">The Y coordinate of the first control point</param> |
| 66 | + /// <param name="cpX2">The X coordinate of the second control point</param> |
| 67 | + /// <param name="cpY2">The Y coordinate of the second control point</param> |
| 68 | + /// <param name="finalX">The X coordinate of the endpoint of the curve</param> |
| 69 | + /// <param name="finalY">The Y coordinate of the endpoint of the curve</param> |
| 70 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 71 | + IPath CurveTo(double cpX1, double cpY1, double cpX2, double cpY2, double finalX, double finalY); |
| 72 | + |
| 73 | + /// <summary> |
| 74 | + /// Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (<paramref name="final"/>), |
| 75 | + /// using (<paramref name="cp1"/>) and (<paramref name="cp2"/>) as the Bézier control points. |
| 76 | + /// Adds a Cubic Bézier Curve (c) operator to the content stream. |
| 77 | + /// </summary> |
| 78 | + /// <param name="cp1">The first control point</param> |
| 79 | + /// <param name="cp2">The second control point</param> |
| 80 | + /// <param name="final">The endpoint of the curve</param> |
| 81 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 82 | + IPath CurveTo(Point cp1, Point cp2, Point final); |
| 83 | + |
| 84 | + /// <summary> |
| 85 | + /// Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (<paramref name="finalX"/>, <paramref name="finalY"/>), |
| 86 | + /// using the current point and (<paramref name="cpX2"/>, <paramref name="cpY2"/>) as the Bézier control points. |
| 87 | + /// Adds a Cubic Bézier Curve (v) operator to the content stream. |
| 88 | + /// </summary> |
| 89 | + /// <param name="cpX2">The X coordinate of the second control point</param> |
| 90 | + /// <param name="cpY2">The Y coordinate of the second control point</param> |
| 91 | + /// <param name="finalX">The X coordinate of the endpoint of the curve</param> |
| 92 | + /// <param name="finalY">The Y coordinate of the endpoint of the curve</param> |
| 93 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 94 | + IPath CurveToWithStartAnker(double cpX2, double cpY2, double finalX, double finalY); |
| 95 | + |
| 96 | + /// <summary> |
| 97 | + /// Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (<paramref name="final"/>), |
| 98 | + /// using the current point and (<paramref name="cp2"/>) as the Bézier control points. |
| 99 | + /// Adds a Cubic Bézier Curve (v) operator to the content stream. |
| 100 | + /// </summary> |
| 101 | + /// <param name="cp2">The second control point</param> |
| 102 | + /// <param name="final">The endpoint of the curve</param> |
| 103 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 104 | + IPath CurveToWithStartAnker(Point cp2, Point final); |
| 105 | + |
| 106 | + /// <summary> |
| 107 | + /// Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (<paramref name="finalX"/>, <paramref name="finalY"/>), |
| 108 | + /// using (<paramref name="cpX1"/>, <paramref name="cpY1"/>) and (<paramref name="finalX"/>, <paramref name="finalY"/>) as the Bézier control points. |
| 109 | + /// Adds a Cubic Bézier Curve (y) operator to the content stream. |
| 110 | + /// </summary> |
| 111 | + /// <param name="cpX1">The X coordinate of the first control point</param> |
| 112 | + /// <param name="cpY1">The Y coordinate of the first control point</param> |
| 113 | + /// <param name="finalX">The X coordinate of the endpoint of the curve</param> |
| 114 | + /// <param name="finalY">The Y coordinate of the endpoint of the curve</param> |
| 115 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 116 | + IPath CurveToWithEndAnker(double cpX1, double cpY1, double finalX, double finalY); |
| 117 | + |
| 118 | + /// <summary> |
| 119 | + /// Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (<paramref name="final"/>), |
| 120 | + /// using (<paramref name="cp1"/>) and (<paramref name="final"/>) as the Bézier control points. |
| 121 | + /// Adds a Cubic Bézier Curve (y) operator to the content stream. |
| 122 | + /// </summary> |
| 123 | + /// <param name="cp1">The first control point</param> |
| 124 | + /// <param name="final">The endpoint of the curve</param> |
| 125 | + /// <returns>The calling <see cref="IPath"/> to support chaining operations.</returns> |
| 126 | + IPath CurveToWithEndAnker(Point cp1, Point final); |
| 127 | + |
| 128 | + /// <summary> |
| 129 | + /// Close the <see cref="IPath"/> |
| 130 | + /// </summary> |
| 131 | + void Close(); |
| 132 | + } |
| 133 | +} |
0 commit comments