您现在的位置是:网站首页> 编程资料编程资料

Line,Polyline(线)对象_VML相关_

2023-05-25 276人已围观

简介 Line,Polyline(线)对象_VML相关_

Line是做图中最常用的,它有两个特殊的属性 from 和 to ,就是起始点和终止点坐标。
    



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

    
    dashstyle="Dot"/>
    


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

    
    EndArrow="Classic"/>
    


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


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

    Points="0,0 0,100 20,150 200,100" style="position:relative"/>

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

    Points="0,0 0,100 20,150 200,100" style="position:relative"/>
    
    

-六神源码网