I want to be able to draw free-form lines where the end of the line is not
connected to the beginning of the line. I found there was a simple fix to
allow this, a minor change to the PDF.end() method. I added a parameter,
with a default value that mimics the old behavior, so people upgrading to
use the new API will not need to change anything, but can use it if they
want.
diff --git a/AlivePDF/AlivePDFBeta/src/org/alivepdf/pdf/PDF.as
b/AlivePDF/AlivePDFBeta/src/org/alivepdf/pdf/PDF.as
index 9e48e04..75ee939 100755
--- a/AlivePDF/AlivePDFBeta/src/org/alivepdf/pdf/PDF.as
+++ b/AlivePDF/AlivePDFBeta/src/org/alivepdf/pdf/PDF.as
@@ -1299,10 +1299,14 @@ package org.alivepdf.pdf
* </pre>
* </div>
*/
- public function end ():void
+ public function end (closePath:Boolean=true):void
{
- if ( !filled )
- write ("s");
+ if ( !filled ) {
+ if(closePath)
+ write("s");
+ else
+ write("S");
+ }
else if ( !stroking )
write (windingRule == WindingRule.NON_ZERO
? "f" : "f*");
else write (windingRule == WindingRule.NON_ZERO ?
"b" : "b*");
Original issue reported on code.google.com by dro...@gmail.com on 12 May 2010 at 1:43
Original issue reported on code.google.com by
dro...@gmail.com
on 12 May 2010 at 1:43