twaver.network
Class ArrowInfo

java.lang.Object
  extended by twaver.network.ArrowInfo

public class ArrowInfo
extends java.lang.Object

箭头图形数据,可用于Link和ShapeNode


Field Summary
 float[] dashPattern
          边线虚线样式
 int fillColor
          填充色
 IShader fillShader
          填充着色器,比如渐变
 float height
          高度,准确地说是y方向缩放比例
 boolean isFrom
          是否为起始端
 Path path
          箭头图形
 twaver.core.util.GraphicsUtils.PositionInfo position
          箭头位置
 java.lang.String shape
          箭头类型 Consts#SHAPE_***
 Cap strokeCap
          端点样式
 int strokeColor
          边线颜色
 Join strokeJoin
          拐点样式
 float strokeWidth
          边线宽度
 float width
          宽度,准确地说是x方向缩放比例
 float xoffset
          x偏移量,沿线方向
 float yoffset
          y方向偏移量,垂直线方向
 
Constructor Summary
ArrowInfo()
           
ArrowInfo(IPathUI linkOrShapeNodeUI, boolean isFrom)
          箭头图形数据
 
Method Summary
 void drawArrow(Canvas canvas, Paint paint)
          绘制箭头
 boolean validate(IPathUI shapeUI, boolean isFrom)
          生效箭头相关信息,默认会取网元的箭头相关样式
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isFrom

public boolean isFrom
是否为起始端


path

public Path path
箭头图形


position

public twaver.core.util.GraphicsUtils.PositionInfo position
箭头位置


fillColor

public int fillColor
填充色


fillShader

public IShader fillShader
填充着色器,比如渐变


shape

public java.lang.String shape
箭头类型 Consts#SHAPE_***

See Also:
Consts

xoffset

public float xoffset
x偏移量,沿线方向


yoffset

public float yoffset
y方向偏移量,垂直线方向


width

public float width
宽度,准确地说是x方向缩放比例


height

public float height
高度,准确地说是y方向缩放比例


strokeWidth

public float strokeWidth
边线宽度


dashPattern

public float[] dashPattern
边线虚线样式


strokeColor

public int strokeColor
边线颜色


strokeJoin

public Join strokeJoin
拐点样式


strokeCap

public Cap strokeCap
端点样式

Constructor Detail

ArrowInfo

public ArrowInfo()

ArrowInfo

public ArrowInfo(IPathUI linkOrShapeNodeUI,
                 boolean isFrom)
箭头图形数据

Parameters:
linkOrShapeNodeUI -
isFrom - 位于起始端还是尾端
Method Detail

validate

public boolean validate(IPathUI shapeUI,
                        boolean isFrom)
生效箭头相关信息,默认会取网元的箭头相关样式

Parameters:
shapeUI -
isFrom -
Returns:

drawArrow

public void drawArrow(Canvas canvas,
                      Paint paint)
绘制箭头

Parameters:
canvas -
paint -