<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>lufylegend</title> <script type="text/javascript" src="lufylegend-1.7.6.js"></script> </head> <body> <div id="mylegend">loading...</div> <script type="text/javascript"> var loader; init(50, ‘mylegend‘, 500, 350, main); function main() { loader = new LLoader(); loader.addEventListener(LEvent.COMPLETE, loadBitmapdata); loader.load(‘face.jpg‘, ‘bitmapData‘); } function loadBitmapdata(event) { var bitmapdata = new LBitmapData(loader.content); var backLayer = new LSprite(); addChild(backLayer); backLayer.graphics.beginBitmapFill(bitmapdata); backLayer.graphics.drawArc(1, ‘#000‘, [110, 80, 50, 0, 2 * Math.PI]); backLayer.graphics.beginBitmapFill(bitmapdata); backLayer.graphics.drawRect(1, ‘#000‘, [180, 50, 70, 100]); backLayer.graphics.beginBitmapFill(bitmapdata); backLayer.graphics.drawVertices(1,‘#000‘,[[120,50],[100,200],[200,150]]); } </script> </body> </html>
时间: 2024-10-05 10:33:33