Besides the material we've seen in this chapter, there's plenty more in VML. Like many graphics languages, VML has a lot of depth. Here's a last example, adapted from the examples in the Microsoft VML reference, which displays text along a VML text path , specified using VML formulas: Listing ch19_23.html<HTML xmlns:v="urn:schemas-microsoft-com:vml"> <HEAD> <TITLE> Using Vector Markup Language </TITLE> <STYLE> v\:* {behavior: url(#default#VML);} </STYLE> </HEAD> <BODY> <CENTER> <H1> VML Text Paths </H1> <v:shapetype id="MyShape" coordsize="21600,21600" adj="9931" path="m0@0c7200@2,14400@1,21600, 0m0@5c7200@6,14400@6,21600@5e"> <v:formulas> <v:f eqn="val #0"/> <v:f eqn="prod #0 3 4"/> <v:f eqn="prod #0 5 4"/> <v:f eqn="prod #0 3 8"/> <v:f eqn="prod #0 1 8"/> <v:f eqn="sum 21600 0 @3"/> <v:f eqn="sum @4 21600 0"/> <v:f eqn="prod #0 1 2"/> <v:f eqn="prod @5 1 2"/> <v:f eqn="sum @7 @8 0"/> <v:f eqn="prod #0 7 8"/> <v:f eqn="prod @5 1 3"/> <v:f eqn="sum @1 @2 0"/> <v:f eqn="sum @12 @0 0"/> <v:f eqn="prod @13 1 4"/> <v:f eqn="sum @11 14400 @14"/> </v:formulas> <v:path textpathok="t" /> <v:textpath on="t" fitshape="t" xscale="t"/> </v:shapetype> <v:shape type="#MyShape" style='position:absolute; top:60pt; left:60pt; width:207pt;height:63pt;' adj="8717" fillcolor="blue" strokeweight="1pt"> <v:fill method="linear sigma" focus="100%" type="gradient"/> <v:shadow on="t" offset="3pt"/> <v:textpath style='font-family:"Times New Roman"; v-text-kern:t'trim="t" fitpath="t" xscale="f" string="VML"/> </v:shape> </CENTER> </BODY> </HTML> You can see the result of this VML in Figure 19-22. You may have seen text graphics like this in Microsoft Office products such as Word and PowerPoint, and now you know how it's done. For more information on VML, take a look at the Microsoft VML site. VML is a powerful language, but it's limited to Internet Explorer. One day, browsers will implement a W3C language such as SVG, and I'll be able to rewrite this chapter. It's time to take a look at using Perl and XML on the server side, as well as Wireless Markup Language (WML). I'm going to do that in the next chapter. |