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