Vml: Chapter 7 of the leopard series (Group container)

Source: Internet
Author: User
Group container
The use of Group is simple, but the function is very powerful. It allows a series of VML objects to use a common coordinate system. It is commonly used. Basically, if more than one VML object is used, the page uses Group. Another advantage of using Group is that you can dynamically change the CoordSize value to enlarge or reduce the VML in the entire Group.

<v:group ID="group1" style="position:relative;WIDTH:200px;HEIGHT:200px;" coordsize = "2000,2000">
<v:rect style="WIDTH:2000px;HEIGHT:2000px" fillcolor="#99cccc">
    <v:shadow on="t" type="single" color="silver" offset="5pt,5pt">
</v:rect>
<v:oval style="position:relative;top:100;left:100;width:1000;height:1000;z-index:7;" fillcolor="red" strokeColor="red"/>
<v:rect style="position:relative;top:500;left:300;width:1000;height:1000;z-index:8;" fillcolor="blue" strokeColor="blue"/>
<v:line from="200,200" to="1000,1700" style="z-index:9" fillcolor="yellow" strokeColor="yellow" strokeWeight=2pt/>
</v:group>

I believe that if you understand the above Code, you must understand the Group. A Rect of the same size as the Group is used as the border of the Group, and shadow rendering is added. Let's look at the important usage of Group with an interesting example from MSDN: (change the value of the scroll bar and the image on the right will rotate accordingly)

In this example, the image is completely drawn using VML, and the object Rotation in the entire Group can be realized by dynamically changing the Rotation attribute of the Group.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.