David PHAM-VAN

Add Bézier Curve primitive

@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 * Mark some internal functions as protected 4 * Mark some internal functions as protected
5 * Fix annotations 5 * Fix annotations
6 * Implement default fonts bounding box 6 * Implement default fonts bounding box
  7 +* Add Bézier Curve primitive
7 8
8 # 1.0.8 9 # 1.0.8
9 * Fix monospace TTF font loading 10 * Fix monospace TTF font loading
@@ -199,6 +199,12 @@ class PdfGraphics { @@ -199,6 +199,12 @@ class PdfGraphics {
199 buf.putString("$x $y m\n"); 199 buf.putString("$x $y m\n");
200 } 200 }
201 201
  202 + /// Draw a bézier curve
  203 + void curveTo(
  204 + double x1, double y1, double x2, double y2, double x3, double y3) {
  205 + buf.putString("$x1 $y1 $x2 $y2 $x3 $y3 c\n");
  206 + }
  207 +
202 void drawShape(String d) { 208 void drawShape(String d) {
203 var sb = StringBuffer(); 209 var sb = StringBuffer();
204 210