David PHAM-VAN

Fix some comments

@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 part of pdf; 17 part of pdf;
18 18
19 class PdfFont extends PdfObject { 19 class PdfFont extends PdfObject {
20 - /// Thedf type of the font, usually /Type1 20 + /// The df type of the font, usually /Type1
21 final String subtype; 21 final String subtype;
22 22
23 /// Constructs a [PdfFont]. This will attempt to map the font from a known 23 /// Constructs a [PdfFont]. This will attempt to map the font from a known
@@ -173,7 +173,7 @@ class PdfGraphics { @@ -173,7 +173,7 @@ class PdfGraphics {
173 /// 173 ///
174 /// @param x coordinate 174 /// @param x coordinate
175 /// @param y coordinate 175 /// @param y coordinate
176 - /// @oaran s String to draw 176 + /// @param s String to draw
177 void drawString(PdfFont font, double size, String s, double x, double y) { 177 void drawString(PdfFont font, double size, String s, double x, double y) {
178 if (!page.fonts.containsKey(font.name)) { 178 if (!page.fonts.containsKey(font.name)) {
179 page.fonts[font.name] = font; 179 page.fonts[font.name] = font;
@@ -558,7 +558,7 @@ class PdfGraphics { @@ -558,7 +558,7 @@ class PdfGraphics {
558 } 558 }
559 559
560 /// This is used to add a polygon to the current path. 560 /// This is used to add a polygon to the current path.
561 - /// Used by drawPolygon(), drawPolyline() and fillPolygon() etal 561 + /// Used by drawPolygon()
562 /// 562 ///
563 /// @param p Array of coordinates 563 /// @param p Array of coordinates
564 /// @see #drawPolygon 564 /// @see #drawPolygon
@@ -39,7 +39,7 @@ class PdfImage extends PdfXObject { @@ -39,7 +39,7 @@ class PdfImage extends PdfXObject {
39 39
40 /// Creates a new [PdfImage] instance. 40 /// Creates a new [PdfImage] instance.
41 /// 41 ///
42 - /// @param imgage an [Uint8List] value 42 + /// @param image an [Uint8List] value
43 /// @param width 43 /// @param width
44 /// @param height 44 /// @param height
45 /// @param alpha if the image is transparent 45 /// @param alpha if the image is transparent
@@ -42,7 +42,7 @@ class PdfObject { @@ -42,7 +42,7 @@ class PdfObject {
42 } 42 }
43 43
44 /// Writes the object to the output stream. 44 /// Writes the object to the output stream.
45 - /// This method must be overidden. 45 + /// This method must be overridden.
46 /// 46 ///
47 /// Note: It should not write any other objects, even if they are 47 /// Note: It should not write any other objects, even if they are
48 /// it's Kids, as they will be written by the calling routine. 48 /// it's Kids, as they will be written by the calling routine.
@@ -55,7 +55,7 @@ class PdfOutline extends PdfObject { @@ -55,7 +55,7 @@ class PdfOutline extends PdfObject {
55 /// This method creates an outline, and attaches it to this one. 55 /// This method creates an outline, and attaches it to this one.
56 /// When the outline is selected, the supplied region is displayed. 56 /// When the outline is selected, the supplied region is displayed.
57 /// 57 ///
58 - /// Note: the coordiates are in User space. They are converted to User 58 + /// Note: the coordinates are in User space. They are converted to User
59 /// space. 59 /// space.
60 /// 60 ///
61 /// This allows you to have an outline for say a Chapter, 61 /// This allows you to have an outline for say a Chapter,
@@ -98,7 +98,7 @@ class PdfOutline extends PdfObject { @@ -98,7 +98,7 @@ class PdfOutline extends PdfObject {
98 params["/Parent"] = parent.ref(); 98 params["/Parent"] = parent.ref();
99 params["/Dest"] = PdfStream.array(dests); 99 params["/Dest"] = PdfStream.array(dests);
100 100
101 - // were a decendent, so by default we are closed. Find out how many 101 + // were a descendent, so by default we are closed. Find out how many
102 // entries are below us 102 // entries are below us
103 int c = descendants(); 103 int c = descendants();
104 if (c > 0) { 104 if (c > 0) {
@@ -39,7 +39,7 @@ class PdfOutput { @@ -39,7 +39,7 @@ class PdfOutput {
39 39
40 /// This method writes a [PdfObject] to the stream. 40 /// This method writes a [PdfObject] to the stream.
41 /// 41 ///
42 - /// @param ob [PdfObject] Obeject to write 42 + /// @param ob [PdfObject] Object to write
43 void write(PdfObject ob) { 43 void write(PdfObject ob) {
44 // Check the object to see if it's one that is needed in the trailer 44 // Check the object to see if it's one that is needed in the trailer
45 // object 45 // object
@@ -52,10 +52,6 @@ class PdfOutput { @@ -52,10 +52,6 @@ class PdfOutput {
52 52
53 /// This closes the Stream, writing the xref table 53 /// This closes the Stream, writing the xref table
54 void close() { 54 void close() {
55 - // we use baos to speed things up a little.  
56 - // Also, offset is preserved, and marks the begining of this block.  
57 - // This is required by Pdf at the end of the Pdf file.  
58 -  
59 int xref = os.offset; 55 int xref = os.offset;
60 56
61 os.putString("xref\n"); 57 os.putString("xref\n");
@@ -26,7 +26,7 @@ class PdfXref { @@ -26,7 +26,7 @@ class PdfXref {
26 /// The generation of the object, usually 0 26 /// The generation of the object, usually 0
27 int generation = 0; 27 int generation = 0;
28 28
29 - /// Creates a crossreference for a Pdf Object 29 + /// Creates a cross-reference for a Pdf Object
30 /// @param id The object's ID 30 /// @param id The object's ID
31 /// @param offset The object's position in the file 31 /// @param offset The object's position in the file
32 /// @param generation The object's generation, usually 0 32 /// @param generation The object's generation, usually 0