cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linc" <lincolnmitch...@iprimus.com.au>
Subject Re: SVG bug!!!
Date Thu, 19 Feb 2004 15:34:45 GMT
I think you will need to use Javascript to get the SVGdocument and then set the viewBox attribute,
I don't have an example at hand but I seem to remember some posts to the SVG usergroup about
this so you may want to try there.

http://groups.yahoo.com/group/svg-developers/

Linc

  ----- Original Message ----- 
  From: beyaNet Consultancy 
  To: users@cocoon.apache.org 
  Sent: Thursday, February 19, 2004 8:05 PM
  Subject: Re: SVG bug!!!


  Linc,
  I think I am coming closer to the answer. If I make a request for the image outside of the
iframe it is loaded into, (http://www.mysite.com/cocoon/beyarecords/artistImage/1/46.jpg),
then the image changes according to the sizes I give it. If i try and call the image so that
the document which it is called into sits within the iframe, then no matter what values you
give the height and width of the svg tag no change to the canvas size takes place. Any ideas?

  Andrew
  On 19 Feb 2004, at 11:54, Linc wrote:


    Try just creating the SVG on its own ie.
     
    <svg width="100" height="100" viewBox="0 0 50 50">
       <rect width="50" height="50"/>
    </svg>
     
    Let me know if this works for you!
     
    Linc
     
    ----- Original Message -----
    From: beyaNet Consultancy 
    To: users@cocoon.apache.org 
    Sent: Thursday, February 19, 2004 5:05 PM
    Subject: SVG bug!!!

    Hi,
    I have, for the last few days now, tried unsuccessfully to change the canvas size of generated
svg images. Is there a bug in SVG or is there something very simple I am failing to grasp
here?


    <svg:svg width="300" height="300" y="0" x="0" viewBox="0 35 200 200">
    <xsp:element name="image">
    <xsp:attribute name="x">0</xsp:attribute>
    <xsp:attribute name="y">0</xsp:attribute>
    <xsp:attribute name="width">300</xsp:attribute>
    <xsp:attribute name="height">300</xsp:attribute>
    <xsp:attribute name="xlink:href">data:image/jpeg;base64,<xsp:expr>Photo1</xsp:expr></xsp:attribute>
    <xsp:attribute name="id">artist1</xsp:attribute>
    </xsp:element>
    </svg:svg>


    many thanks in advance

Mime
View raw message