## lufylegend-HTML5游戏引擎学习笔记3:LGraphics绘图 原

WolfX

### 使用LGraphics绘制一个矩形

drawRect(thickness,lineColor,pointArray,isfill,color)

``````LInit(50,"my",500,500,main);
function main(){
var graphics = new LGraphics();
graphics.drawRect(1,"#000000",[50,50,100,100]);
graphics.drawRect(1,"#000000",[170,50,100,100],true,"#ccc");
}
``````

### 使用LGraphics绘制一个圆

drawArc(thickness,lineColor,pointArray,isfill,color)

``````LInit(50,"my",500,500,main);
function main(){
var graphics = new LGraphics();
graphics.drawArc(1,"#000000",[60,60,50,0,360*Math.PI/180]);
graphics.drawArc(1,"#000000",[180,60,50,0,360*Math.PI/180],true,"#ccc");
}
``````

### 使用LGraphics绘制一个多边形

drawVertices(thickness,lineColor,vertices,isfill,color)

``````LInit(50,"my",500,500,main);
function main(){
var graphics = new LGraphics();
graphics.drawVertices(1,"#000000",[[50,20],[80,20],[100,50],[80,80],[50,80],[30,50]]);
graphics.drawVertices(1,"#000000",[[150,20],[180,20],[200,50],[180,80],[150,80],[130,50]],true,"#ccc");
}
``````

### 使用LGraphics和LSprite绘制一个多边形

``````LInit(50,"my",500,500,main);
function main(){
var layer = new LSprite();
var graphics = new LGraphics();
layer.graphics.drawVertices(1,"#000000",[[50,20],[80,20],[100,50],[80,80],[50,80],[30,50]]);
layer.graphics.drawVertices(1,"#000000",[[150,20],[180,20],[200,50],[180,80],[150,80],[130,50]],true,"#ccc");
}
``````

### WolfX

lufylegend-HTML5游戏引擎学习笔记4:绘图进阶

WolfX
2016/03/07
161
0
25 个超棒的 HTML5 & JavaScript 游戏引擎开发库

oschina
2015/02/26
12.6K
44
20 款免费的 JavaScript 游戏引擎

oschina
2014/02/20
18.4K
13
2014 不能错过的 10+ 个 JavaScript 游戏引擎

oschina
2014/03/20
6.4K
13

2017/10/25
10.3K
19

springboot2.0 maven打包分离lib，resources

springboot将工程打包成jar包后，会出现获取classpath下的文件出现测试环境正常而生产环境文件找不到的问题，这是因为 1、在调试过程中，文件是真实存在于磁盘的某个目录。此时通过获取文件路...

6
0
BootStrap

wytao1995

10
0

8
0
《JAVA核心知识》学习笔记（6. Spring 原理）-5

Shingfi

8
0
Excel导入数据库数据+Excel导入网页数据【实时追踪】

1.Excel导入数据库数据：数据选项卡------>导入数据 2.Excel导入网页数据【实时追踪】：

11
1