O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scaling Shapes

You may also have noticed that you can set the size for shapes with the style attribute, as in this case, where I'm setting the size of the bounding rectangle of an oval:

<HTML xmlns:v="urn:schemas-microsoft-com:vml"> 

    <HEAD>
        <TITLE>
            Using Vector Markup Language
        </TITLE>

        <STYLE>
            v\:* {behavior: url(#default#VML);}
        </STYLE>
    </HEAD>
    <BODY>
        <CENTER>
            <H1>
                VML Ovals
            </H1>
            <v:oval style='width:200pt;height:100pt'
					fillcolor="blue" />
        </CENTER>
    </BODY>
</HTML>

To scale a shape, all you have to do is change the width and height as specified with the style attribute. For example, to double the oval's size in both dimensions, I could assign style a value of "width:400pt;height:200pt".

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required