Matteo Monti
unread,Mar 20, 2009, 5:00:05 AM3/20/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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);