Pdf Support

18 views
Skip to first unread message

Matteo Monti

unread,
Mar 20, 2009, 5:00:05 AM3/20/09
to AS3 SVG Renderer
Hi,

firstly thank you for sharing your development, second i'd like to
suggest a feature

I'm actually using your lib to render complex svg graphics in a flex
application for my clients.
and happens that i have to render the design (scaled) to pdf with the
Alive pdf library.

Making slight modification to your code i achieved a very good result.
of course some inconsistencies occur especially for the gradient fill
not implemented in alivePDF.

Some inconsitencies between flash.display.Graphics and pdf.PDF
drawing methods..

In order to achieve my goal it i created:

IGraphics: an interface reflecting the method signatures of
flash.display.Graphics plus some utility methods for relativization of
points.

PDFPen: an IGraphics innterface implementation wrapping the PDF class

I hope you like to include it, this really compliments the alive pdf
project and will open oportunities for different exporting formats.


Some code follows

regards

Mateo



And made very slight changes changes in your classes:

SVGRenderer

public function SVGRenderer
(svg:Object,inPen:IGraphics=null,inPoint:Point=null){

}


PathRenderer


============== INVOCATION EXAMPLE =====================

var point:Point = new Point(300,300);
var pen:Igraphics = new PDFPen();
var shape:SVGRenderer = new SVGRenderer(svg,pen,inPoint);

Reply all
Reply to author
Forward
0 new messages