码迷,mamicode.com
首页 > 其他好文 > 详细

lufylegend库 LGraphics绘制图片

时间:2015-07-27 14:57:30      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:

lufylegend库 LGraphics绘制图片

<!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>

 

lufylegend库 LGraphics绘制图片

标签:

原文地址:http://www.cnblogs.com/stono/p/4680003.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!