Package | laya.webgl.canvas |
Class | public class WebGLContext2D |
Inheritance | WebGLContext2D laya.resource.Context |
Property | Defined By | ||
---|---|---|---|
asBitmap : Boolean [write-only] | WebGLContext2D | ||
_clipRect : Rectangle | WebGLContext2D | ||
_COUNT : int = 0 [static] | WebGLContext2D | ||
_curMat : Matrix | WebGLContext2D | ||
_curSubmit : * = null | WebGLContext2D | ||
fillStyle : * | WebGLContext2D | ||
font : String [override] [write-only] | WebGLContext2D | ||
globalAlpha : Number [override] | WebGLContext2D | ||
globalCompositeOperation : String [override] | WebGLContext2D | ||
_ib : IndexBuffer2D = null | WebGLContext2D | ||
_id : int | WebGLContext2D | ||
lineWidth : Number | WebGLContext2D | ||
_nBlendType : int = 0 | WebGLContext2D | ||
_renderKey : Number | WebGLContext2D | ||
_save : * | WebGLContext2D | ||
_saveMark : SaveMark = null | WebGLContext2D | ||
_shader2D : Shader2D = null | WebGLContext2D | ||
sprite : Sprite 所cacheAs精灵 | WebGLContext2D | ||
strokeStyle : * | WebGLContext2D | ||
_submits : * = null | WebGLContext2D | ||
_targets : RenderTargetMAX | WebGLContext2D | ||
textAlign : String | WebGLContext2D | ||
textBaseline : String | WebGLContext2D | ||
_tmpMatrix : Matrix [static] | WebGLContext2D | ||
_vb : VertexBuffer2D = null | WebGLContext2D | ||
_x : Number = 0 | WebGLContext2D | ||
_y : Number = 0 | WebGLContext2D |
Method | Defined By | ||
---|---|---|---|
WebGLContext2D | |||
__init__():void [static] | WebGLContext2D | ||
WebGLContext2D | |||
_getSubmits():Array | WebGLContext2D | ||
WebGLContext2D | |||
addRenderObject(o:ISubmit):void | WebGLContext2D | ||
addTextureVb(invb:Array, x:Number, y:Number):void | WebGLContext2D | ||
arc(cx:Number, cy:Number, r:Number, startAngle:Number, endAngle:Number, counterclockwise:Boolean = false, b:Boolean = true):void | WebGLContext2D | ||
arcTo(x1:Number, y1:Number, x2:Number, y2:Number, r:Number):void [override] | WebGLContext2D | ||
beginPath():void [override] | WebGLContext2D | ||
clear():void [override] | WebGLContext2D | ||
clearBG(r:Number, g:Number, b:Number, a:Number):void | WebGLContext2D | ||
clip():void [override] | WebGLContext2D | ||
clipRect(x:Number, y:Number, width:Number, height:Number):void [override] | WebGLContext2D | ||
closePath():void | WebGLContext2D | ||
destroy():void [override] | WebGLContext2D | ||
drawCanvas(canvas:HTMLCanvas, x:Number, y:Number, width:Number, height:Number):void [override] | WebGLContext2D | ||
drawCurves(x:Number, y:Number, args:Array):void [override] | WebGLContext2D | ||
drawParticle(x:Number, y:Number, pt:*):void nd矢量绘制 | WebGLContext2D | ||
drawPoly(x:Number, y:Number, points:Array, color:uint, lineWidth:Number, boderColor:uint, isConvexPolygon:Boolean = false):void
画多边形(用)
| WebGLContext2D | ||
drawTarget(scope:*, x:Number, y:Number, width:Number, height:Number, m:Matrix, proName:String, shaderValue:Value2D, uv:Array = null, blend:int = -1):void | WebGLContext2D | ||
drawTexture(tex:Texture, x:Number, y:Number, width:Number, height:Number, tx:Number, ty:Number):void [override] | WebGLContext2D | ||
drawTexture2(x:Number, y:Number, pivotX:Number, pivotY:Number, transform:Matrix, alpha:Number, blendMode:String, args:Array):void [override] | WebGLContext2D | ||
drawTextures(tex:Texture, pos:Array, tx:Number, ty:Number):void [override] | WebGLContext2D | ||
drawTextureWithTransform(tex:Texture, x:Number, y:Number, width:Number, height:Number, transform:Matrix, tx:Number, ty:Number, alpha:Number):void [override] | WebGLContext2D | ||
fill(isConvexPolygon:Boolean = false):void | WebGLContext2D | ||
fillBorderText(txt:*, x:Number, y:Number, fontStr:String, fillColor:String, borderColor:String, lineWidth:int, textAlign:String):void [override] | WebGLContext2D | ||
fillBorderWords(words:Vector.<HTMLChar>, x:Number, y:Number, font:String, color:String, borderColor:String, lineWidth:int):void [override] | WebGLContext2D | ||
WebGLContext2D | |||
fillRect(x:Number, y:Number, width:Number, height:Number, fillStyle:*):void [override] | WebGLContext2D | ||
fillText(txt:*, x:Number, y:Number, fontStr:String, color:String, textAlign:String):void [override] | WebGLContext2D | ||
fillTexture(texture:Texture, x:Number, y:Number, width:Number, height:Number, type:String, offset:Point, other:*):void [override] | WebGLContext2D | ||
WebGLContext2D | |||
fillWords(words:Vector.<HTMLChar>, x:Number, y:Number, fontStr:String, color:String, underLine:int):void [override] | WebGLContext2D | ||
finish():void | WebGLContext2D | ||
flush():int [override] | WebGLContext2D | ||
WebGLContext2D | |||
lineTo(x:Number, y:Number, b:Boolean = true):void | WebGLContext2D | ||
movePath(x:Number, y:Number):void | WebGLContext2D | ||
moveTo(x:Number, y:Number, b:Boolean = true):void | WebGLContext2D | ||
quadraticCurveTo(cpx:Number, cpy:Number, x:Number, y:Number):void [override] | WebGLContext2D | ||
rect(x:Number, y:Number, width:Number, height:Number):void [override] | WebGLContext2D | ||
restore():void [override] | WebGLContext2D | ||
rotate(angle:Number):void | WebGLContext2D | ||
save():void [override] | WebGLContext2D | ||
scale(scaleX:Number, scaleY:Number):void [override] | WebGLContext2D | ||
setFilters(value:Array):void | WebGLContext2D | ||
setIBVB(x:Number, y:Number, ib:IndexBuffer2D, vb:VertexBuffer2D, numElement:int, mat:Matrix, shader:Shader, shaderValues:Value2D, startIndex:int = 0, offset:int = 0, type:int = 0):void | WebGLContext2D | ||
setIsMainContext():void [override] | WebGLContext2D | ||
setPathId(id:int):void | WebGLContext2D | ||
WebGLContext2D | |||
setTransformByMatrix(value:Matrix):void [override] | WebGLContext2D | ||
size(w:Number, h:Number):void | WebGLContext2D | ||
stroke():void [override] | WebGLContext2D | ||
strokeRect(x:Number, y:Number, width:Number, height:Number, parameterLineWidth:Number):void | WebGLContext2D | ||
strokeText(txt:*, x:Number, y:Number, fontStr:String, color:String, lineWidth:Number, textAlign:String):void [override] | WebGLContext2D | ||
submitElement(start:int, end:int):void | WebGLContext2D | ||
transform(a:Number, b:Number, c:Number, d:Number, tx:Number, ty:Number):void [override] | WebGLContext2D | ||
transformByMatrix(value:Matrix):void [override] | WebGLContext2D | ||
translate(x:Number, y:Number):void [override] | WebGLContext2D | ||
willDrawTexture(tex:Texture, alpha:Number):Number | WebGLContext2D |
Constant | Defined By | ||
---|---|---|---|
MAXCLIPRECT : Rectangle [static] | WebGLContext2D | ||
_MAXSIZE : int = 99999999 [static] | WebGLContext2D | ||
_RECTVBSIZE : int = 16 [static] | WebGLContext2D | ||
_SUBMITVBSIZE : int = 32000 [static] | WebGLContext2D | ||
_tempPoint : Point [static] | WebGLContext2D |
_clipRect | property |
public var _clipRect:Rectangle
_COUNT | property |
public static var _COUNT:int = 0
_curMat | property |
public var _curMat:Matrix
_curSubmit | property |
public var _curSubmit:* = null
_ib | property |
public var _ib:IndexBuffer2D = null
_id | property |
public var _id:int
_nBlendType | property |
public var _nBlendType:int = 0
_renderKey | property |
public var _renderKey:Number
_save | property |
public var _save:*
_saveMark | property |
public var _saveMark:SaveMark = null
_shader2D | property |
public var _shader2D:Shader2D = null
_submits | property |
public var _submits:* = null
_targets | property |
public var _targets:RenderTargetMAX
_tmpMatrix | property |
public static var _tmpMatrix:Matrix
_vb | property |
public var _vb:VertexBuffer2D = null
_x | property |
public var _x:Number = 0
_y | property |
public var _y:Number = 0
asBitmap | property |
asBitmap:Boolean
[write-only] public function set asBitmap(value:Boolean):void
fillStyle | property |
fillStyle:*
public function get fillStyle():*
public function set fillStyle(value:any):void
font | property |
font:String
[write-only] [override] public function set font(value:String):void
globalAlpha | property |
globalAlpha:Number
[override] public function get globalAlpha():Number
public function set globalAlpha(value:Number):void
globalCompositeOperation | property |
globalCompositeOperation:String
[override] public function get globalCompositeOperation():String
public function set globalCompositeOperation(value:String):void
lineWidth | property |
lineWidth:Number
public function get lineWidth():Number
public function set lineWidth(value:Number):void
sprite | property |
public var sprite:Sprite
所cacheAs精灵
strokeStyle | property |
strokeStyle:*
public function get strokeStyle():*
public function set strokeStyle(value:any):void
textAlign | property |
textAlign:String
public function get textAlign():String
public function set textAlign(value:String):void
textBaseline | property |
textBaseline:String
public function get textBaseline():String
public function set textBaseline(value:String):void
WebGLContext2D | () | Constructor |
__init__ | () | method |
public static function __init__():void
_drawText | () | method |
public function _drawText(tex:Texture, x:Number, y:Number, width:Number, height:Number, m:Matrix, tx:Number, ty:Number, dx:Number, dy:Number):void
Parameters
tex:Texture | |
x:Number | |
y:Number | |
width:Number | |
height:Number | |
m:Matrix | |
tx:Number | |
ty:Number | |
dx:Number | |
dy:Number |
_getSubmits | () | method |
public function _getSubmits():Array
ReturnsArray |
_getTransformMatrix | () | method |
addRenderObject | () | method |
addTextureVb | () | method |
public function addTextureVb(invb:Array, x:Number, y:Number):void
Parameters
invb:Array | |
x:Number | |
y:Number |
arc | () | method |
public function arc(cx:Number, cy:Number, r:Number, startAngle:Number, endAngle:Number, counterclockwise:Boolean = false, b:Boolean = true):void
Parameters
cx:Number | |
cy:Number | |
r:Number | |
startAngle:Number | |
endAngle:Number | |
counterclockwise:Boolean (default = false )
| |
b:Boolean (default = true )
|
arcTo | () | method |
override public function arcTo(x1:Number, y1:Number, x2:Number, y2:Number, r:Number):void
Parameters
x1:Number | |
y1:Number | |
x2:Number | |
y2:Number | |
r:Number |
beginPath | () | method |
override public function beginPath():void
clear | () | method |
override public function clear():void
clearBG | () | method |
public function clearBG(r:Number, g:Number, b:Number, a:Number):void
Parameters
r:Number | |
g:Number | |
b:Number | |
a:Number |
clip | () | method |
override public function clip():void
clipRect | () | method |
override public function clipRect(x:Number, y:Number, width:Number, height:Number):void
Parameters
x:Number | |
y:Number | |
width:Number | |
height:Number |
closePath | () | method |
public function closePath():void
destroy | () | method |
override public function destroy():void
drawCanvas | () | method |
override public function drawCanvas(canvas:HTMLCanvas, x:Number, y:Number, width:Number, height:Number):void
Parameters
canvas:HTMLCanvas | |
x:Number | |
y:Number | |
width:Number | |
height:Number |
drawCurves | () | method |
override public function drawCurves(x:Number, y:Number, args:Array):void
Parameters
x:Number | |
y:Number | |
args:Array |
drawParticle | () | method |
public function drawParticle(x:Number, y:Number, pt:*):void
nd矢量绘制
Parameters
x:Number | |
y:Number | |
pt:* |
drawPoly | () | method |
public function drawPoly(x:Number, y:Number, points:Array, color:uint, lineWidth:Number, boderColor:uint, isConvexPolygon:Boolean = false):void
画多边形(用)
Parameters
x:Number | |
y:Number | |
points:Array | |
color:uint | |
lineWidth:Number | |
boderColor:uint | |
isConvexPolygon:Boolean (default = false )
|
drawTarget | () | method |
public function drawTarget(scope:*, x:Number, y:Number, width:Number, height:Number, m:Matrix, proName:String, shaderValue:Value2D, uv:Array = null, blend:int = -1):void
Parameters
scope:* | |
x:Number | |
y:Number | |
width:Number | |
height:Number | |
m:Matrix | |
proName:String | |
shaderValue:Value2D | |
uv:Array (default = null )
| |
blend:int (default = -1 )
|
drawTexture | () | method |
override public function drawTexture(tex:Texture, x:Number, y:Number, width:Number, height:Number, tx:Number, ty:Number):void
Parameters
tex:Texture | |
x:Number | |
y:Number | |
width:Number | |
height:Number | |
tx:Number | |
ty:Number |
drawTexture2 | () | method |
override public function drawTexture2(x:Number, y:Number, pivotX:Number, pivotY:Number, transform:Matrix, alpha:Number, blendMode:String, args:Array):void
Parameters
x:Number | |
y:Number | |
pivotX:Number | |
pivotY:Number | |
transform:Matrix | |
alpha:Number | |
blendMode:String | |
args:Array |
drawTextures | () | method |
override public function drawTextures(tex:Texture, pos:Array, tx:Number, ty:Number):void
Parameters
tex:Texture | |
pos:Array | |
tx:Number | |
ty:Number |
drawTextureWithTransform | () | method |
override public function drawTextureWithTransform(tex:Texture, x:Number, y:Number, width:Number, height:Number, transform:Matrix, tx:Number, ty:Number, alpha:Number):void
Parameters
tex:Texture | |
x:Number | |
y:Number | |
width:Number | |
height:Number | |
transform:Matrix | |
tx:Number | |
ty:Number | |
alpha:Number |
fill | () | method |
public function fill(isConvexPolygon:Boolean = false):void
Parameters
isConvexPolygon:Boolean (default = false )
|
fillBorderText | () | method |
override public function fillBorderText(txt:*, x:Number, y:Number, fontStr:String, fillColor:String, borderColor:String, lineWidth:int, textAlign:String):void
Parameters
txt:* | |
x:Number | |
y:Number | |
fontStr:String | |
fillColor:String | |
borderColor:String | |
lineWidth:int | |
textAlign:String |
fillBorderWords | () | method |
override public function fillBorderWords(words:Vector.<HTMLChar>, x:Number, y:Number, font:String, color:String, borderColor:String, lineWidth:int):void
Parameters
words:Vector.<HTMLChar> | |
x:Number | |
y:Number | |
font:String | |
color:String | |
borderColor:String | |
lineWidth:int |
fillQuadrangle | () | method |
public function fillQuadrangle(tex:Texture, x:Number, y:Number, point4:Array, m:Matrix):void
Parameters
tex:Texture | |
x:Number | |
y:Number | |
point4:Array | |
m:Matrix |
fillRect | () | method |
override public function fillRect(x:Number, y:Number, width:Number, height:Number, fillStyle:*):void
Parameters
x:Number | |
y:Number | |
width:Number | |
height:Number | |
fillStyle:* |
fillText | () | method |
override public function fillText(txt:*, x:Number, y:Number, fontStr:String, color:String, textAlign:String):void
Parameters
txt:* | |
x:Number | |
y:Number | |
fontStr:String | |
color:String | |
textAlign:String |
fillTexture | () | method |
override public function fillTexture(texture:Texture, x:Number, y:Number, width:Number, height:Number, type:String, offset:Point, other:*):void
Parameters
texture:Texture | |
x:Number | |
y:Number | |
width:Number | |
height:Number | |
type:String | |
offset:Point | |
other:* |
fillTrangles | () | method |
public function fillTrangles(tex:Texture, x:Number, y:Number, points:Array, m:Matrix):void
Parameters
tex:Texture | |
x:Number | |
y:Number | |
points:Array | |
m:Matrix |
fillWords | () | method |
override public function fillWords(words:Vector.<HTMLChar>, x:Number, y:Number, fontStr:String, color:String, underLine:int):void
Parameters
words:Vector.<HTMLChar> | |
x:Number | |
y:Number | |
fontStr:String | |
color:String | |
underLine:int |
finish | () | method |
public function finish():void
flush | () | method |
override public function flush():int
Returnsint |
line | () | method |
public function line(fromX:Number, fromY:Number, toX:Number, toY:Number, lineWidth:Number, mat:Matrix):void
Parameters
fromX:Number | |
fromY:Number | |
toX:Number | |
toY:Number | |
lineWidth:Number | |
mat:Matrix |
lineTo | () | method |
public function lineTo(x:Number, y:Number, b:Boolean = true):void
Parameters
x:Number | |
y:Number | |
b:Boolean (default = true )
|
movePath | () | method |
public function movePath(x:Number, y:Number):void
Parameters
x:Number | |
y:Number |
moveTo | () | method |
public function moveTo(x:Number, y:Number, b:Boolean = true):void
Parameters
x:Number | |
y:Number | |
b:Boolean (default = true )
|
quadraticCurveTo | () | method |
override public function quadraticCurveTo(cpx:Number, cpy:Number, x:Number, y:Number):void
Parameters
cpx:Number | |
cpy:Number | |
x:Number | |
y:Number |
rect | () | method |
override public function rect(x:Number, y:Number, width:Number, height:Number):void
Parameters
x:Number | |
y:Number | |
width:Number | |
height:Number |
restore | () | method |
override public function restore():void
rotate | () | method |
public function rotate(angle:Number):void
Parameters
angle:Number |
save | () | method |
override public function save():void
scale | () | method |
override public function scale(scaleX:Number, scaleY:Number):void
Parameters
scaleX:Number | |
scaleY:Number |
setFilters | () | method |
public function setFilters(value:Array):void
Parameters
value:Array |
setIBVB | () | method |
public function setIBVB(x:Number, y:Number, ib:IndexBuffer2D, vb:VertexBuffer2D, numElement:int, mat:Matrix, shader:Shader, shaderValues:Value2D, startIndex:int = 0, offset:int = 0, type:int = 0):void
Parameters
x:Number | |
y:Number | |
ib:IndexBuffer2D | |
vb:VertexBuffer2D | |
numElement:int | |
mat:Matrix | |
shader:Shader | |
shaderValues:Value2D | |
startIndex:int (default = 0 )
| |
offset:int (default = 0 )
| |
type:int (default = 0 )
|
setIsMainContext | () | method |
override public function setIsMainContext():void
setPathId | () | method |
public function setPathId(id:int):void
Parameters
id:int |
setShader | () | method |
setTransformByMatrix | () | method |
size | () | method |
public function size(w:Number, h:Number):void
Parameters
w:Number | |
h:Number |
stroke | () | method |
override public function stroke():void
strokeRect | () | method |
public function strokeRect(x:Number, y:Number, width:Number, height:Number, parameterLineWidth:Number):void
Parameters
x:Number | |
y:Number | |
width:Number | |
height:Number | |
parameterLineWidth:Number |
strokeText | () | method |
override public function strokeText(txt:*, x:Number, y:Number, fontStr:String, color:String, lineWidth:Number, textAlign:String):void
Parameters
txt:* | |
x:Number | |
y:Number | |
fontStr:String | |
color:String | |
lineWidth:Number | |
textAlign:String |
submitElement | () | method |
public function submitElement(start:int, end:int):void
Parameters
start:int | |
end:int |
transform | () | method |
override public function transform(a:Number, b:Number, c:Number, d:Number, tx:Number, ty:Number):void
Parameters
a:Number | |
b:Number | |
c:Number | |
d:Number | |
tx:Number | |
ty:Number |
transformByMatrix | () | method |
translate | () | method |
override public function translate(x:Number, y:Number):void
Parameters
x:Number | |
y:Number |
willDrawTexture | () | method |
public function willDrawTexture(tex:Texture, alpha:Number):Number
Parameters
tex:Texture | |
alpha:Number |
Number |
_MAXSIZE | Constant |
public static const _MAXSIZE:int = 99999999
_RECTVBSIZE | Constant |
public static const _RECTVBSIZE:int = 16
_SUBMITVBSIZE | Constant |
public static const _SUBMITVBSIZE:int = 32000
_tempPoint | Constant |
public static const _tempPoint:Point
MAXCLIPRECT | Constant |
public static const MAXCLIPRECT:Rectangle