[reportlab-users] SVG Part II

Paul McNett p at ulmcnett.com
Sat Jun 17 16:38:52 EDT 2006


Andy Robinson wrote:
> Tim Roberts wrote:
>> Imagine my surprise at learning that renderSVG.SVGCanvas.drawString
>> wants ( text, x, y ), when all of my instincts from
>> pdfgen.Canvas.drawString wants to send it ( x, y, text ).  That makes it
>> awfully difficult to write code that can send to either one.
>>
> Thanks Tim,
> 
> renderSVG was from a different author who had not been sufficiently 
> indoctrinated in the One True Way of ordering arguments in London SW19 
> circa 2000-2005.
> 
> Is anyone else using this in production since 2.0 or can we "fix" it?
> Silence will be deemed agreement ;-)

My 2 cents:

It can be ugly, but check for a string argument in the 1st position, and 
if there, assume the old way and give a DeprecationWarning. Otherwise, 
assume the new way.

-- 
Paul McNett
http://paulmcnett.com
http://dabodev.com



More information about the reportlab-users mailing list