(a) Draw a picture on a lsprite, and another sprite to make the mask effect of the image, the effect is as follows:
<! DOCTYPE html>
(ii) Comparison of two attribute effects of DrawRect
<! DOCTYPE html>
The effect is as follows:
(iii) Drawing of lines
Init ("Mylegend", 500,350,main), function main () {
(d) Draw circles, triangles, and quads to fill the plot area with bitmap images.
Linit ("Legend", +, 480, main), function main () {var loader = new Lloader (); Loader.addeventlistener (Levent.complete, Loadbitmapdata); Loader.load ("Face.jpg", "BitmapData");} function Loadbitmapdata (event) {var bitmapdata = new Lbitmapdata (event.target); var backlayer;backlayer = new Lsprite (); AddChild (Backlayer); BackLayer.graphics.beginBitmapFill (BitmapData); BACKLAYER.GRAPHICS.DRAWARC (1, "#000000", [150,50,50,0,math.pi*2]); backlayer = new Lsprite (); AddChild (Backlayer); BackLayer.graphics.beginBitmapFill (BitmapData); BackLayer.graphics.drawRect (1, "#000000", [10,100,70,100]); Backlayer = new Lsprite (); AddChild (Backlayer); BackLayer.graphics.beginBitmapFill (BitmapData); BackLayer.graphics.drawVertices (1, "#000000", [[120,100],[100,200],[200,150]]);}
DrawVertices plots the coordinate values of the three ∠ points, respectively, The drawrect draws the coordinate values of the upper-left corner and assigns the value of the width to the high value respectively BACKLAYER.GRAPHICS.DRAWARC (1, "#000000", [150,100,50,0,math.pi*2]); 150,100 is the circle point coordinates, 50 is the radius, 0, is the starting angle, the math.pi*2 is the end angle |
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Lufylenged Engine Learning--lgraphics