File tree Expand file tree Collapse file tree
v3/src/gameobjects/graphics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,6 +195,23 @@ var Graphics = new Class({
195195 return this ;
196196 } ,
197197
198+ // POINT
199+
200+ fillPointShape : function ( point , size )
201+ {
202+ return this . fillPoint ( point . x , point . y , size ) ;
203+ } ,
204+
205+ fillPoint : function ( x , y , size )
206+ {
207+ this . commandBuffer . push (
208+ Commands . FILL_RECT ,
209+ x , y , size , size
210+ ) ;
211+
212+ return this ;
213+ } ,
214+
198215 // TRIANGLE
199216
200217 fillTriangleShape : function ( triangle )
@@ -236,6 +253,17 @@ var Graphics = new Class({
236253 return this . lineTo ( line . x2 , line . y2 ) ;
237254 } ,
238255
256+ lineBetween : function ( x1 , y1 , x2 , y2 )
257+ {
258+ this . beginPath ( ) ;
259+ this . moveTo ( x1 , y1 ) ;
260+ this . lineTo ( x2 , y2 ) ;
261+ this . strokePath ( ) ;
262+ this . closePath ( ) ;
263+
264+ return this ;
265+ } ,
266+
239267 lineTo : function ( x , y )
240268 {
241269 this . commandBuffer . push (
You can’t perform that action at this time.
0 commit comments