Showing
3 changed files
with
0 additions
and
54 deletions
| @@ -58,7 +58,6 @@ part 'src/page.dart'; | @@ -58,7 +58,6 @@ part 'src/page.dart'; | ||
| 58 | part 'src/page_format.dart'; | 58 | part 'src/page_format.dart'; |
| 59 | part 'src/page_list.dart'; | 59 | part 'src/page_list.dart'; |
| 60 | part 'src/point.dart'; | 60 | part 'src/point.dart'; |
| 61 | -part 'src/polygon.dart'; | ||
| 62 | part 'src/rect.dart'; | 61 | part 'src/rect.dart'; |
| 63 | part 'src/signature.dart'; | 62 | part 'src/signature.dart'; |
| 64 | part 'src/stream.dart'; | 63 | part 'src/stream.dart'; |
| @@ -180,15 +180,6 @@ class PdfGraphics { | @@ -180,15 +180,6 @@ class PdfGraphics { | ||
| 180 | lineTo(x2, y2); | 180 | lineTo(x2, y2); |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | - /// Draws a polygon, linking the first and last coordinates. | ||
| 184 | - /// | ||
| 185 | - /// @param xp Array of x coordinates | ||
| 186 | - /// @param yp Array of y coordinates | ||
| 187 | - /// @param np number of points in polygon | ||
| 188 | - void drawPolygon(PdfPolygon p) { | ||
| 189 | - _polygon(p.points); | ||
| 190 | - } | ||
| 191 | - | ||
| 192 | void drawEllipse(double x, double y, double r1, double r2) { | 183 | void drawEllipse(double x, double y, double r1, double r2) { |
| 193 | moveTo(x, y - r2); | 184 | moveTo(x, y - r2); |
| 194 | curveTo(x + _m4 * r1, y - r2, x + r1, y - _m4 * r2, x + r1, y); | 185 | curveTo(x + _m4 * r1, y - r2, x + r1, y - _m4 * r2, x + r1, y); |
| @@ -685,22 +676,6 @@ class PdfGraphics { | @@ -685,22 +676,6 @@ class PdfGraphics { | ||
| 685 | } | 676 | } |
| 686 | } | 677 | } |
| 687 | 678 | ||
| 688 | - /// This is used to add a polygon to the current path. | ||
| 689 | - /// Used by drawPolygon() | ||
| 690 | - /// | ||
| 691 | - /// @param p Array of coordinates | ||
| 692 | - /// @see #drawPolygon | ||
| 693 | - /// @see #drawPolyline | ||
| 694 | - /// @see #fillPolygon | ||
| 695 | - void _polygon(List<PdfPoint> p) { | ||
| 696 | - // newPath() not needed here as moveto does it ;-) | ||
| 697 | - moveTo(p[0].x, p[0].y); | ||
| 698 | - | ||
| 699 | - for (int i = 1; i < p.length; i++) { | ||
| 700 | - lineTo(p[i].x, p[i].y); | ||
| 701 | - } | ||
| 702 | - } | ||
| 703 | - | ||
| 704 | void setLineCap(PdfLineCap cap) { | 679 | void setLineCap(PdfLineCap cap) { |
| 705 | buf.putString('${cap.index} J\n'); | 680 | buf.putString('${cap.index} J\n'); |
| 706 | } | 681 | } |
pdf/lib/src/polygon.dart
deleted
100644 → 0
| 1 | -/* | ||
| 2 | - * Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com> | ||
| 3 | - * | ||
| 4 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | - * you may not use this file except in compliance with the License. | ||
| 6 | - * You may obtain a copy of the License at | ||
| 7 | - * | ||
| 8 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | - * | ||
| 10 | - * Unless required by applicable law or agreed to in writing, software | ||
| 11 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | - * See the License for the specific language governing permissions and | ||
| 14 | - * limitations under the License. | ||
| 15 | - */ | ||
| 16 | - | ||
| 17 | -part of pdf; | ||
| 18 | - | ||
| 19 | -class PdfPolygon { | ||
| 20 | - PdfPolygon(this.points); | ||
| 21 | - | ||
| 22 | - List<PdfPoint> points; | ||
| 23 | - | ||
| 24 | - PdfRect getBounds() { | ||
| 25 | - // TODO(me): Implement properly | ||
| 26 | - return const PdfRect(0, 0, 0, 0); | ||
| 27 | - } | ||
| 28 | -} |
-
Please register or login to post a comment