Shape object related to VML coordinate system _VML

Source: Internet
Author: User
Shape is the most basic object of VML and can be used to draw all the graphics you want. In VML, the coordinates used are not the coordinates of the document, it has its own coordinate system, so that the dynamic change its coordinates, you can achieve amplification, reduction, rotation and other functions. The Coordsize property of shape is used to define coordinates, it has two parameters, , where the 2800,2800 is the horizontal ordinate is divided into 2,800 points, not the HTML inside the default pixels. If you do not set a dot, VML defaults to 0,0 (upper-left corner), and you can, of course, set the dot coordinates of VML using the Coordorig property.



Note:The coordinates defined are only relative, and the actual size of the graph needs to be style= "width:500;height:500" to define it!

After the above definition, your available coordinates are X (-1400 to 1400) Y (-1400 to 1400), such coordinates are like the coordinates in mathematics, and the picture 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 added two auxiliary coordinates, on IE display is a side by side two squares.
The main attribute in shape is path, which is a powerful brush with simple syntax and consists of several letters, which are described in detail below:
M X,y:moveto Move the brush to (x, y);
L X,y:lineto draw a line from the current point to (x, y), and a continuous number of points can be given, and the VML will draw continuously until the X command is encountered.
X:close end a line;
E:end End Drawing
other common properties of shape:
FillColor: Fill color, using the color specified in the HTML; for example: fillcolor=red
Filled: If the graphic is to be filled, the shape will be filled automatically if it is not closed. When filled= "true" (default), FillColor has effect;
Strokecolor: The color of the line;
Strokeweight: The width of the line;
Title: When the mouse moves to the graphic, the text displayed, and the HTML inside the same alt, Tilte;
Type: Specifies that the shape belongs to the Shapetype,shapetype. You can make a template for VML, which will be described later;
The preceding properties, FillColor, filled, can be Strokecolor, Strokeweight can be used in the Used in the. You can also use it in shape or in an object that inherits shape.
In the following sections, you will detail some of the specific objects that Shape extends, such as Rect, RoundRect, Oval, line, and so on.
  • 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.