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
2018-07-07 09:26:54 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3d88720a2b4635168269278506d9edd30739d30
b3d88720
1 parent
bc2703df
Fix Flutter beta2 warnings
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
lib/src/font.dart
lib/src/stream.dart
test/pdf_test.dart
lib/src/font.dart
View file @
b3d8872
...
...
@@ -58,7 +58,7 @@ class PDFFont extends PDFObject {
}
PDFRect
stringBounds
(
String
s
)
{
var
chars
=
LATIN
1
.
encode
(
s
);
var
chars
=
latin
1
.
encode
(
s
);
if
(
chars
.
length
==
0
)
return
const
PDFRect
(
0.0
,
0.0
,
0.0
,
0.0
);
...
...
@@ -82,7 +82,7 @@ class PDFFont extends PDFObject {
}
PDFPoint
stringSize
(
String
s
)
{
var
chars
=
LATIN
1
.
encode
(
s
);
var
chars
=
latin
1
.
encode
(
s
);
var
w
=
0.0
;
var
h
=
0.0
;
...
...
lib/src/stream.dart
View file @
b3d8872
...
...
@@ -76,7 +76,7 @@ class PDFStream {
.
replaceAll
(
'
\
f'
,
'
\\
f'
)
.
replaceAll
(
'
\r
'
,
'
\\
r'
);
putBytes
(
LATIN
1
.
encode
(
'('
+
s
+
')'
));
putBytes
(
latin
1
.
encode
(
'('
+
s
+
')'
));
}
static
PDFStream
text
(
String
s
)
=>
new
PDFStream
()..
putText
(
s
);
...
...
test/pdf_test.dart
View file @
b3d8872
...
...
@@ -51,7 +51,7 @@ void main() {
for
(
var
i
=
10.0
;
i
<
90.0
;
i
+=
5.0
)
{
g
.
saveContext
();
var
tm
=
new
Matrix4
.
identity
();
tm
.
rotateZ
(
i
*
PI
/
360.0
);
tm
.
rotateZ
(
i
*
pi
/
360.0
);
tm
.
translate
(
300.0
,
-
100.0
);
g
.
setTransform
(
tm
);
g
.
drawString
(
font1
,
12.0
,
"Hello
$i
"
,
20.0
,
100.0
);
...
...
Please
register
or
login
to post a comment