Shape objects are related to VML coordinate system _ VML

Source: Internet
Author: User
Shape object and VML coordinate system Shape are the most basic objects in VML. You can use it to draw all the images you want. In VML, the coordinates used are not the coordinates of the Document. It has its own coordinate system. In this way, the coordinates of the Document can be dynamically changed to zoom in, zoom out, rotate, and other functions. The CoordSize attribute of shape is used to define coordinates. It has two parameters, The 2800 and 2800 coordinates are divided into vertices, not the default pixels in HTML. If no dot is set, the default value of VML is 0, 0 (upper left corner). You can also use the CoordOrig attribute to set the dot coordinates of VML.



Note:The Defined coordinates are relative. The actual displayed image size also needs to be defined by style = "width: 500; height: 500!

After the definition above, the available coordinates are x (-1400 to 1400) y (-1400 to 1400). These coordinates are like coordinates in mathematics, the picture is divided into four parts.



When solving the actual problem, I found that IE will automatically place the visible VML image in the relative (0, 0) position, which means, if no secondary coordinates are added to the preceding two images, the two squares are listed in parallel on IE.
The most important attribute in a shape is Path, which is a powerful brush. The syntax is very simple and consists of several letters. the following details:
M x, y: MoveTo move the paint brush to (x, y );
L x, y: LineTo draw a line from the current point to (x, y). Several consecutive points can be drawn from VML until the x command is run.
X: Close ends a line;
E: End
Other common attributes of shape:
FillColor: fill color. Use the specified color in HTML. For example, fillcolor = red.
Filled: whether to fill the image. If the image is not closed, the image is automatically closed for filling. Fillcolor is effective only when Filled = "true" (default;
StrokeColor: The color of the line;
StrokeWeight: the width of the line;
Title: The text displayed when you move the cursor over the image is the same as the alt and tilte characters in HTML;
Type: Specifies the ShapeType Type of the image. The ShapeType Type can be used to create a template for VML and will be described later;
For the preceding attributes, FillColor and Filled can be And StrokeColor and StrokeWeight can be used in . You can also use it in a Shape or an object that inherits a Shape.
In the following sections, We will detail some specific objects extended by Shape, such as Rect, RoundRect, Oval, and Line.

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.