Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
David PHAM-VAN
2020-03-07 20:56:17 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
97573fc5e8c6a97608e31e3f8c92ec047502ea72
97573fc5
1 parent
8a4a99a6
Remove unused Polygon class
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
54 deletions
pdf/lib/pdf.dart
pdf/lib/src/graphics.dart
pdf/lib/src/polygon.dart
pdf/lib/pdf.dart
View file @
97573fc
...
...
@@ -58,7 +58,6 @@ part 'src/page.dart';
part
'src/page_format.dart'
;
part
'src/page_list.dart'
;
part
'src/point.dart'
;
part
'src/polygon.dart'
;
part
'src/rect.dart'
;
part
'src/signature.dart'
;
part
'src/stream.dart'
;
...
...
pdf/lib/src/graphics.dart
View file @
97573fc
...
...
@@ -180,15 +180,6 @@ class PdfGraphics {
lineTo
(
x2
,
y2
);
}
/// Draws a polygon, linking the first and last coordinates.
///
/// @param xp Array of x coordinates
/// @param yp Array of y coordinates
/// @param np number of points in polygon
void
drawPolygon
(
PdfPolygon
p
)
{
_polygon
(
p
.
points
);
}
void
drawEllipse
(
double
x
,
double
y
,
double
r1
,
double
r2
)
{
moveTo
(
x
,
y
-
r2
);
curveTo
(
x
+
_m4
*
r1
,
y
-
r2
,
x
+
r1
,
y
-
_m4
*
r2
,
x
+
r1
,
y
);
...
...
@@ -685,22 +676,6 @@ class PdfGraphics {
}
}
/// This is used to add a polygon to the current path.
/// Used by drawPolygon()
///
/// @param p Array of coordinates
/// @see #drawPolygon
/// @see #drawPolyline
/// @see #fillPolygon
void
_polygon
(
List
<
PdfPoint
>
p
)
{
// newPath() not needed here as moveto does it ;-)
moveTo
(
p
[
0
].
x
,
p
[
0
].
y
);
for
(
int
i
=
1
;
i
<
p
.
length
;
i
++)
{
lineTo
(
p
[
i
].
x
,
p
[
i
].
y
);
}
}
void
setLineCap
(
PdfLineCap
cap
)
{
buf
.
putString
(
'
${cap.index}
J
\n
'
);
}
...
...
pdf/lib/src/polygon.dart
deleted
100644 → 0
View file @
8a4a99a
/*
* Copyright (C) 2017, David PHAM-VAN <dev.nfet.net@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
part of
pdf
;
class
PdfPolygon
{
PdfPolygon
(
this
.
points
);
List
<
PdfPoint
>
points
;
PdfRect
getBounds
()
{
// TODO(me): Implement properly
return
const
PdfRect
(
0
,
0
,
0
,
0
);
}
}
Please
register
or
login
to post a comment