Since VML is a vector, zooming in and out becomes very easy. Let's look at an example to see how far VML can go. Or a UFO in front as an example. It is a graph which is pieced together with lines, circles, arcs and so on. I added mobile events, and when magnified too much, you can drag pictures to view them.
--> arrowok= "T" >
|
Magnified 1 time Times Magnified twice times Magnified 3 times times Magnified 4 times times Magnified 5 times times Magnified 6 times times Magnified 7 times times Magnified 8 times times Magnified 9 times times Magnified 10 times times
|
Do you feel it, zoom in and zoom out on the VML quality unchanged? Because VML is a vector. Dynamically changing its coordsize value, note that the reduced value equals magnification, and the increment is equal to narrowing. You can refer to the following script:
var xx=6000;
var yy=6000;
function Zoom (h)
{
group1.coordsize= xx/h+ "," +yy/h;
}
The xx,yy above refers to the Coordsize value in the default state. When calling this function, use zoom (n) where n is the multiplier to enlarge.
When VML contains text, the graphics zoom in, but the text does not automatically enlarge. This is very asymmetric, there is a technique, that is, the text is wrapped in a tag, the amplification function needs to be improved:
var xx=6000;
var yy=6000;
var fs=9;
function Zoom (h)
{
group1.coordsize= xx/h+ "," +yy/h;
For (Var i=0;i<document.all.tags ("DIV"). length;i++)
Document.all.tags ("DIV"). Item (i). style.fontsize= fs*h+ "PT";
}
FS is the text size in default state. Document.all.tags ("div") returns all the DIV elements on the page, and then the size of their text becomes larger. Practice has proved that the proportion of the enlarged and VML is unchanged.