The Shape object is related to the VML coordinate system _VML

Source: Internet
Author: User
Shape is the most basic object of VML, using it to draw all the graphics you want. In VML, the use of coordinates is not the document's coordinates, it has its own coordinate system, so, dynamically changing its coordinates, you can zoom in, shrink, rotate and other functions. The Coordsize property of shape is used to define coordinates, it has two parameters, <v:shape coordsize= "2800,2800"/&gt, where the 2800,2800 is the horizontal ordinate is divided into 2,800 points, is not the default pixel inside HTML. If you do not set a dot, VML defaults to 0,0 (upper-left corner), but you can also use the Coordorig property to set the dot coordinates of VML.

<v:shape coordorig= " -1400,-1400" coordsize= "2800,2800"style= "width:500;height:500"/>

Note:The defined coordinates are only relative, and the actual graphics size needs to be defined by style= "width:500;height:500".

After the above definition, the coordinates you can use are X (-1400 to 1400) Y (-1400 to 1400), so the coordinates are like the coordinates in mathematics, and the picture plate is divided into four blocks.

-->

In solving the actual problem, I found that IE will automatically put the visible VML image in the relative (0,0) position, meaning that the above two graphs if not add two auxiliary coordinates, on IE display is a parallel two squares.
The main property in shape is path, which is a powerful brush with a simple syntax that consists of several letters, which are described in detail below:
m X,y: MoveTo to move the brush to (x,y);
L X,y: LineTo from the current point to (X,y) draw a line, can give a number of consecutive points, VML will continue to draw until you encounter the x command.
x: Close closes a line;
e: End Paint
other common properties of shape:
FillColor: Fill color, using the color specified in HTML; for example: fillcolor=red
filled: Whether you want to fill the graphic, or if the graphic is not closed, automatically closes the shape for filling. When filled= "true" (default), FillColor is effective;
Strokecolor: The color of the line;
Strokeweight: The width of the line;
Title: When the mouse moved to the graphic, the text displayed, and the HTML inside the ALT, tilte like;
Type: Specifies that the graphic belongs to the Shapetype,shapetype can be modeled for VML and will be described later;
The previous properties, FillColor, filled can be used in <v:fill/>, Strokecolor, strokeweight can be used in <v:stroke/>. It can also be used in shape or in objects that inherit shape.
In the following sections, specific objects such as Rect, RoundRect, Oval, and line are described in detail.

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.