Packagelaya.webgl.display
Classpublic class GraphicsGL
InheritanceGraphicsGL Inheritance Graphics Inheritance Object



Public Properties
 PropertyDefined By
 Inheritedcmds : Array
Graphics
Public Methods
 MethodDefined By
  
GraphicsGL
 Inherited
alpha(value:Number):void
设置透明度。
Graphics
 Inherited
clear(recoverCmds:Boolean = false):void
清空绘制命令。
Graphics
 Inherited
clipRect(x:Number, y:Number, width:Number, height:Number):void
设置剪裁区域,超出剪裁区域的坐标不显示。
Graphics
 Inherited
destroy():void
销毁此对象。
Graphics
 Inherited
drawCircle(x:Number, y:Number, radius:Number, fillColor:*, lineColor:* = null, lineWidth:Number = 1):void
绘制圆形。
Graphics
 Inherited
drawCurves(x:Number, y:Number, points:Array, lineColor:*, lineWidth:Number = 1):void
绘制一系列曲线。
Graphics
 Inherited
drawLine(fromX:Number, fromY:Number, toX:Number, toY:Number, lineColor:String, lineWidth:Number = 1):void
绘制一条线。
Graphics
 Inherited
drawLines(x:Number, y:Number, points:Array, lineColor:*, lineWidth:Number = 1):void
绘制一系列线段。
Graphics
  
drawParticle(x:Number, y:Number, ps:*):void
GraphicsGL
 Inherited
drawPath(x:Number, y:Number, paths:Array, brush:Object = null, pen:Object = null):void
绘制路径。
Graphics
 Inherited
drawPie(x:Number, y:Number, radius:Number, startAngle:Number, endAngle:Number, fillColor:*, lineColor:* = null, lineWidth:Number = 1):void
绘制扇形。
Graphics
 Inherited
drawPoly(x:Number, y:Number, points:Array, fillColor:*, lineColor:* = null, lineWidth:Number = 1):void
绘制多边形。
Graphics
 Inherited
drawRect(x:Number, y:Number, width:Number, height:Number, fillColor:*, lineColor:* = null, lineWidth:Number = 1):void
绘制矩形。
Graphics
 Inherited
drawTexture(tex:Texture, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, m:Matrix = null, alpha:Number = 1):Array
绘制纹理。
Graphics
 Inherited
drawTextures(tex:Texture, pos:Array):void
批量绘制同样纹理。
Graphics
 Inherited
fillBorderText(text:*, x:Number, y:Number, font:String, fillColor:String, borderColor:String, lineWidth:Number, textAlign:String):void
在画布上绘制“被填充且镶边的”文本。
Graphics
 Inherited
fillText(text:String, x:Number, y:Number, font:String, color:String, textAlign:String, underLine:int = 0):void
在画布上绘制文本。
Graphics
 Inherited
fillTexture(tex:Texture, x:Number, y:Number, width:Number = 0, height:Number = 0, type:String = repeat, offset:Point = null):void
用texture填充。
Graphics
 Inherited
getBounds(realSize:Boolean = false):Rectangle
获取位置及宽高信息矩阵(比较耗CPU,频繁使用会造成卡顿,尽量少用)。
Graphics
 Inherited
loadImage(url:String, x:Number = 0, y:Number = 0, width:Number = 0, height:Number = 0, complete:Function = null):void
加载并显示一个图片。
Graphics
 Inherited
restore():void
返回之前保存过的路径状态和属性。
Graphics
 Inherited
rotate(angle:Number, pivotX:Number = 0, pivotY:Number = 0):void
旋转当前绘图。(推荐使用transform,性能更高)
Graphics
 Inherited
save():void
保存当前环境的状态。
Graphics
 Inherited
scale(scaleX:Number, scaleY:Number, pivotX:Number = 0, pivotY:Number = 0):void
缩放当前绘图至更大或更小。(推荐使用transform,性能更高)
Graphics
 Inherited
setAlpha(value:Number):void
设置当前透明度。
Graphics
 Inherited
setFilters(fs:Array):void
Graphics
  
setIBVB(x:Number, y:Number, ib:Buffer2D, vb:Buffer2D, numElement:int, shader:Shader):void
GraphicsGL
  
setShader(shader:Shader):void
GraphicsGL
 Inherited
strokeText(text:*, x:Number, y:Number, font:String, color:String, lineWidth:Number, textAlign:String):void
在画布上绘制文本(没有填色)。文本的默认颜色是黑色。
Graphics
 Inherited
transform(matrix:Matrix, pivotX:Number = 0, pivotY:Number = 0):void
替换绘图的当前转换矩阵。
Graphics
 Inherited
translate(x:Number, y:Number):void
重新映射画布上的 (0,0) 位置。
Graphics
Constructor Detail
GraphicsGL()Constructor
public function GraphicsGL()



Method Detail
drawParticle()method
public function drawParticle(x:Number, y:Number, ps:*):void

Parameters

x:Number
 
y:Number
 
ps:*

setIBVB()method 
public function setIBVB(x:Number, y:Number, ib:Buffer2D, vb:Buffer2D, numElement:int, shader:Shader):void

Parameters

x:Number
 
y:Number
 
ib:Buffer2D
 
vb:Buffer2D
 
numElement:int
 
shader:Shader

setShader()method 
public function setShader(shader:Shader):void

Parameters

shader:Shader