Showing
3 changed files
with
4 additions
and
4 deletions
@@ -58,7 +58,7 @@ class PDFFont extends PDFObject { | @@ -58,7 +58,7 @@ class PDFFont extends PDFObject { | ||
58 | } | 58 | } |
59 | 59 | ||
60 | PDFRect stringBounds(String s) { | 60 | PDFRect stringBounds(String s) { |
61 | - var chars = LATIN1.encode(s); | 61 | + var chars = latin1.encode(s); |
62 | 62 | ||
63 | if (chars.length == 0) return const PDFRect(0.0, 0.0, 0.0, 0.0); | 63 | if (chars.length == 0) return const PDFRect(0.0, 0.0, 0.0, 0.0); |
64 | 64 | ||
@@ -82,7 +82,7 @@ class PDFFont extends PDFObject { | @@ -82,7 +82,7 @@ class PDFFont extends PDFObject { | ||
82 | } | 82 | } |
83 | 83 | ||
84 | PDFPoint stringSize(String s) { | 84 | PDFPoint stringSize(String s) { |
85 | - var chars = LATIN1.encode(s); | 85 | + var chars = latin1.encode(s); |
86 | 86 | ||
87 | var w = 0.0; | 87 | var w = 0.0; |
88 | var h = 0.0; | 88 | var h = 0.0; |
@@ -76,7 +76,7 @@ class PDFStream { | @@ -76,7 +76,7 @@ class PDFStream { | ||
76 | .replaceAll('\f', '\\f') | 76 | .replaceAll('\f', '\\f') |
77 | .replaceAll('\r', '\\r'); | 77 | .replaceAll('\r', '\\r'); |
78 | 78 | ||
79 | - putBytes(LATIN1.encode('(' + s + ')')); | 79 | + putBytes(latin1.encode('(' + s + ')')); |
80 | } | 80 | } |
81 | 81 | ||
82 | static PDFStream text(String s) => new PDFStream()..putText(s); | 82 | static PDFStream text(String s) => new PDFStream()..putText(s); |
@@ -51,7 +51,7 @@ void main() { | @@ -51,7 +51,7 @@ void main() { | ||
51 | for (var i = 10.0; i < 90.0; i += 5.0) { | 51 | for (var i = 10.0; i < 90.0; i += 5.0) { |
52 | g.saveContext(); | 52 | g.saveContext(); |
53 | var tm = new Matrix4.identity(); | 53 | var tm = new Matrix4.identity(); |
54 | - tm.rotateZ(i * PI / 360.0); | 54 | + tm.rotateZ(i * pi / 360.0); |
55 | tm.translate(300.0, -100.0); | 55 | tm.translate(300.0, -100.0); |
56 | g.setTransform(tm); | 56 | g.setTransform(tm); |
57 | g.drawString(font1, 12.0, "Hello $i", 20.0, 100.0); | 57 | g.drawString(font1, 12.0, "Hello $i", 20.0, 100.0); |
-
Please register or login to post a comment