Line,Polyline(线)对象

 更新时间:2006年12月24日 00:00:00   作者:  
Line是做图中最常用的,它有两个特殊的属性 from 和 to ,就是起始点和终止点坐标。
    <v:line from="0,0" to="100,50" style="position:relative;"/>



  ●如果要改变线的样式,LineStyle (Stroke)属性可以做到:
    Single(默认),ThinThinThinThickThickBetweenThin
  ●如果要改变线的类型,可以用 DashStyle(Stroke)属性:

    <v:line style="position:relative" from="0,0" to="100,0" >
    <v:stroke dashstyle="Dot"/>
    </v:line>

    Solid(默认):见上图
    ShortDash:
    ShortDot:
    ShortDashDot:
    ShortDashDotDot:
    Dot:
    Dash:
    LongDash:
    DashDot:
    LongDashDot:
    LongDashDotDot:
  ●在画坐标的时候,需要箭头,VML已经定义好了箭头,在Stroke体现:EndArrow 和 StartArrow 属性,一个是线开始的时候有箭头,另一个是线结束的时候有箭头。箭头的样式也有不少:

    <v:line style="position:relative" from="0,0" to="100,0" >
    <v:stroke EndArrow="Classic"/>
    </v:line>

    EndArrow="Block":
    EndArrow="Classic": (这个看起来还比较舒服)
    EndArrow="Diamond":
    StartArrow="Oval":
    StartArrow="Open":


    PolyLine是 Line 的变形,是不规则的连续的线。它有个特殊的属性 Points ,用来设置每个点的坐标。例如:

    <v:PolyLine filled="false" Points="0,0 0,100 20,150 200,100" style="position:relative"/>

    一样可以设置它的线的样式和类型以及箭头 ( IE5.0中,PolyLine不支持 Arrow )

    <v:PolyLine filled="false" Points="0,0 0,100 20,150 200,100" style="position:relative"/>
    <v:stroke StartArrow="Oval" EndArrow="Classic" dashstyle="Dot" />
    </v:PolyLine>

相关文章

最新评论