Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Clase 6:
VML son las siglas para Vector Markup Language VML se escribe
usando la sintaxis de XML (Extensible Markup Language). El VML se
utiliza para producir gráficos orientados a objetos (vectores) junto con la
información de como se han de mostrar y como editar esta información.
<html xmlns:v="urn:schemas-microsoft-com:vml">
Y en el <HEAD>:
<style>
v\:* { behavior: url(#default#VML); }
</style>
Formas predefinidas
Ejemplo 1:
<HTML xmlns:v="urn:schemas-microsoft-com:vml">
<HEAD>
<TITLE>Primer Ejemplo VML</TITLE>
<style>
v\:* { behavior: url(#default#VML); }
</style>
</HEAD>
<BODY>
<v:rect
style="width:100;height:100"
fillcolor="red"
strokecolor="blue"/>
</BODY>
</HTML>
1
PROGRAMACION WEB 2008
FUNDACIÓN RED MILENIUM
<HTML xmlns:v="urn:schemas-microsoft-com:vml">
<HEAD>
<TITLE>Predefined shapes - Example 3</TITLE>
<style>
v\:* { behavior: url(#default#VML); }
</style>
</HEAD>
<BODY>
<v:roundrect style="width:100;height:100"
arcsize="0.3" fillcolor="blue" strokecolor="red"/>
<br>
<v:line style="width:100;height:100"
from="0,0" to="100,100"
strokecolor="red" strokeweight="4pt"/>
<br>
<v:polyline style="width:100;height:100"
points="0,60,50,90,60,10,100,100"
strokecolor="blue" strokeweight="1pt"/>
<br>
<v:curve style="width:100;height:100"
from="0,0" control1="30,200" control2="80,10"
to="100,0" strokecolor="red" strokeweight="3pt"/>
<br>
<v:arc style="width:100;height:100"
startangle="0" endangle="120"
strokecolor="blue" strokeweight="2pt"/>
<br>
<v:oval style="width:100;height:50"
fillcolor="blue" strokecolor="red" strokeweight="3pt"/>
</BODY>
</HTML>
2
PROGRAMACION WEB 2008
FUNDACIÓN RED MILENIUM
<HTML xmlns:v="urn:schemas-microsoft-com:vml">
<HEAD>
<TITLE>Stroke - Example 4</TITLE>
<style>
v\:* { behavior: url(#default#VML); }
</style>
</HEAD>
<BODY>
<v:line style="width:100;height:100"
from="0,0" to="100,100"
strokecolor="black" strokeweight="2pt">
<v:stroke dashstyle="solid"/>
</v:line>
<v:line style="width:100;height:100"
from="0,0" to="100,100"
strokecolor="blue" strokeweight="2pt">
<v:stroke dashstyle="dot"/>
</v:line>
<v:line style="width:100;height:100"
from="0,0" to="100,100"
strokecolor="red" strokeweight="2pt">
<v:stroke dashstyle="dash"/>
</v:line>
<v:line style="width:100;height:100"
from="0,0" to="100,100"
strokecolor="green" strokeweight="2pt">
<v:stroke dashstyle="dashdot"/>
</v:line>
<v:line style="width:100;height:100"
from="0,0" to="100,100"
strokecolor="grey" strokeweight="2pt">
<v:stroke dashstyle="longdash"/>
</v:line>
<v:line style="width:100;height:100"
from="0,0" to="100,100"
strokecolor="black" strokeweight="2pt">
<v:stroke dashstyle="longdashdot"/>
</v:line>
</BODY>
</HTML>
3
PROGRAMACION WEB 2008
FUNDACIÓN RED MILENIUM
Fondo Degradado
<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>Request for Information</title>
<style>
v\:* {behavior:url(#default#VML);}
</style>
<script language="JavaScript">
function rotateGradient() {
}
</script>
</head>
4
PROGRAMACION WEB 2008
FUNDACIÓN RED MILENIUM
Textos
<HTML xmlns:v="urn:schemas-microsoft-com:vml">
<HEAD>
<TITLE>VML Example - 2 (shape)</TITLE>
<style>
v\:* { behavior: url(#default#VML); }
</style>
</HEAD>
<BODY>
<v:shape coordsize="200,200" style="width: 300px; height: 400px;
float: left" path="m 0,50 c 25,0 75,0 100,50 c 125,0 175,0 200,50 e m
0,75 c 25,137 75,137 100,200 c 125,137 175,137 200,75 e"
fillcolor="red">
<v:path textpathok="true" />
<v:textpath on="true" fitshape="true" fitpath="true"
string="PROGRAMACIÓN" style="font-family: 'Arial Black';" />
<v:extrusion on="true" type="parallel" color="black"/>
</v:shape>
Formas
<HTML xmlns:v="urn:schemas-microsoft-com:vml">
5
PROGRAMACION WEB 2008
FUNDACIÓN RED MILENIUM
<HEAD>
<TITLE>VML Example - 2 (shape)</TITLE>
<style>
v\:* { behavior: url(#default#VML); }
</style>
</HEAD>
<BODY>
<v:shape style="width: 250px; height: 250px"
stroke="true" strokecolor="red" strokeweight="3px"
fill="true" fillcolor="blue"
coordorigin="0 0" coordsize="175 175">
<v:path v="m 10,70
l 85,10,160,70,160,160,10,160
x e"/>
</v:shape>
</BODY>
</HTML>