Scaling Shapes

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" .



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net