Re: Determining UserAgent's client size.


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.


>Message-ID: <>
>From: Adam Van Den Hoven <>
>To: "SVG Mailing List (E-mail)" <>
>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.

Received on Wednesday, 18 October 2000 22:58:19 UTC