On Saturday, September 1, 2007, 3:13:10 AM, Haakon wrote:
HME> So, how to proceed? According to the SVG specification over at the World HME> Wide Web Consortium, www.w3.org/TR/SVG/, the "svg" element itself cannot HME> have a "fill" attribute, but we can use a rectangle - the "rect"element HME> - as our background.
HME> The "rect" element's upper left corner is determined from the x and y HME> attribute, and the lower right corner from the width and height HME> attributes. We probably want x and y set to zero, which will start in HME> the upper left corner of our browser's main viewport. Set width and HME> height to 100% in both the svg element and the rectangle element, and we HME> have our coloured background. By using percentages in stead of pixels we HME> make sure our background fills the main viewport regardless of the HME> current window size
Yes, you can do that.
In SVG 1.2 there is a viewport-fill property to do pretty much what pagecolor seems to be doing. http://www.w3.org/TR/SVGMobile12/painting.html#viewport-fill-property
Notice (Example: 11_03.svg) the difference between that and a 100% rect, when the aspect ratio of the viewBox and the aspect ratio of the canvas are different.
The usual hack to cover that in SVG 1.1 is to have your background rect be something like
<rect x="-200%" y="-200%" width="500%" height="500%" />
which covers a modest amount of zooming out as well.