VML Introduction _VML Related

Source: Internet
Author: User
VML (Vector Markup Language)
is an XML thesaurus that was originally developed by Microsoft and is now supported by only IE5.0 versions of VML. Using VML can draw vector graphics in IE, so some people think that VML is the function of the brush in IE. The advantages of VML are described below:
Based on XML standards
XML is a kind of next-generation network markup Language, which is recognized to have infinite vitality, and VML has the innate superiority, its presentation method is simple, easy to expand and so on.
Supports high-quality vector graphics display
VML supports a wide range of vector graphics features that describe paths based on lines and curves that are connected. Two basic elements are used in VML: Shape and group. These two elements define the entire structure of the VML, and shape describes a vector graphic element that the group uses to combine so that they can be processed as a whole.
The VML specification includes a large number of elements that support many different vector graphics features. The following are predefined graphic elements for VML:
L Shape
L Path
L Line
L Polyline
L Curve
L Rect
L RoundRect
L Oval
L ARC
L Group
Images composed of text and can be integrated into HTML
Because VML uses simple text to represent an image, it can use very few bytes to represent more complex images. VML is compatible with HTML by declaring a VML namespace in HTML and declaring a handler, which can be used as a VML element in the same way as other HTML elements to display the image in the client browser. The VML tag can define most of the DHTML properties and events, such as ID, name, title, onmouseover, and so on.
Interactive and animated support
But the function of VML is not just drawing, he can also embed text in the graph, can realize the hyperlink, also can realize certain animation function through scripting language.

VML is the abbreviation for the Vector Markup language.


Reference website
MSDN:http://msdn.microsoft.com/workshop/author/vml/shape/introduction.asp

Http://www.w3.org/TR/NOTE-VML :

First, you need to add the following reference to the label

xmlns:v= "URN:SCHEMAS-MICROSOFT-COM:VML" xmlns:o= "Urn:schemas-microsoft-com:office:office" >
...

You can ignore the second schema if you don't have extended functionality for office.
Also, you need to register the VML and Microsoft Office Extensions in the STYLE element

V\:* {behavior:url (#default #vml);}
O\:* {behavior:url (#default #vml);}


You can ignore the definition of the second style if you don't have extended functionality for office.

Let's talk about some of the usual elements.

1.Shape Elements
Usage:

Its common properties are:
FillColor: Image fill Color.
Tag syntax:

Scripting Syntax:
element.fillcolor= "Expression"
Expression=element.fillcolor

Path: Specify the path of the drawing
Script usage:

Fillcolor= "Red" strokecolor= "red"
coordorigin= "0 0" coordsize= "200 200"
Style= "Position:relative;top:1;left:1;width:20;height:20"
Path= "M 1,200 L, 200,200, 200,1 x E" >

Description: Use the letter m (moveto command) to define the coordinates of the initial point of the image, as in the example
Start the line with the letter L (lowercase L-letter, LineTo command), first draw (1,200), then draw to (200,200), then Draw (200,1)
Close the line with the letter x (Close command)
End With the letter e (end command)
Note: Each of the two numbers consists of a coordinate

Title: Tip text When mouse moves to image
Style: Pattern of images
Filled: Determines whether a fill is required in a closed path (true/false)
Strokecolor: Color of Image path

2.Shape Element Valid sub-element

TextBox: Define a text box in the image
Usage:

VML

Textpath: Set the text path, to use this property, the Textpathok of the Path property must be true, and the on property of the Textpath is true

Details of the text block please refer to the website!!!

A simple example:

xmlns:o= "Urn:schemas-microsoft-com:office:office" >


VML Sample



Fillcolor= "Green"
Style= "position:relative;top:1;left:1;width:200;height:200"
Path = "M 1,250 l, 250,500, 500,500, 500,250, 1 x E"
title= "Test"
Strokecolor= "Yellow" >

VML


  • Related Article

    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.