W3C home > Mailing lists > Public > www-svg@w3.org > October 2000

Re: Determining UserAgent's client size.

From: <svge@taedium.com>
Date: Wed, 18 Oct 2000 19:56:06 -0700
To: www-svg@w3.org
Message-Id: <E13m5sE-0003nw-00@merricat>
Adam,

Looking at the SVG DOM, it looks like the viewport's coordinates
are put in SVGSVGElement.viewport (which is an SVGRect.)  So, using
javascript, something like

	var viewport_width = svg.viewport.width;
	var viewport_height = svg.viewport.height;

(where 'svg' is an svg element.)  I don't know about the IBM SVG viewer,
but the Adobe viewer currently doesn't support this.

Eric


>Message-ID: <00BB1956AE40D411B5B60050DA27311F121B65@mail1.bluezone.net>
>From: Adam Van Den Hoven <Adam.Hoven@bluezone.net>
>To: "SVG Mailing List (E-mail)" <www-svg@w3.org>
>Date: Wed, 18 Oct 2000 15:53:19 -0700
>Subject: Determining UserAgent's client size.
>
>Good afternoon,
>
>I have a question about SVG that I had hoped would be answered by IBM's XML
>to SVG tutorial but didn't.
>
>I want to convert an arbitrary set of data into an SVG image. Clearly this
>should be a simple task. However, I need to know something about the actual
>number of pixels to work with to decide how many tick marks and lables I
>want to display. For instance, if the SVG file is going to be displayed in a
>100X100 px area, I'm probably only going to want to display the maximum
>value lable and the axis. If I'm in a 1000X1000px space, I'll want to put
>tick marks every 30 units and lables every 90.
>
>I'm probably also going to want to use the same font size (assuming no mag
>or zoom) for both to make it easy to read.
>
>Any suggestions?
>>               Adam van den Hoven
>>               Internet Application Developer
>>               Blue Zone Entertainment Inc.
>>               tel. 604.685.4310
>>               fax. 604.685.4391
>>
>> Blue Zone makes news interactive. http://www.bluezone.net/
Received on Wednesday, 18 October 2000 22:58:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 5 November 2012 23:52:48 GMT