Danny Browne wrote:

Still having problems with this.

I tried subclassing the canvas and overiding the setMySize method but the problem remained the same. the canvas is packing the image but it is centering the image and leaving whitespace on either side, thus throwing x & y coords off.

Does this shed any more light?

Hi Danny,


   Well yes and no :)  It isn't clear to me why you can't have
'pack' truely pack the canvas.  Right now the size of the canvas
is being constrained so the document is positioned according to the
width/height and perserveAspectRatio attributes on the outermost
SVG element. In particular the default preserveAspectRatio
setting is "xMinYMid meet" - it sounds like you want "xMinYMin meet".

is it something to do with the userAgent and the viewport?

In essence yes. I think the method you need to override is calculateViewingTransform. Unfortunately, it will probably be tricky to get everything to behave correctly in all cases. Hopefully you don't really care about all cases and can do something simple.

   If you look at the default implementation you will see it
delegates all the work the the ViewBox class - this has many
little utility methods that you may be able to make use of.

i dont REALLY know what the userAgent is so this is just a guess.

as usual any help is much appreciated...



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to