• lufylegend库 LGraphics绘制图片


    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>
  • 相关阅读:
    1363:小球(drop)
    ifstream ofstream c++中读写文件
    线性筛
    Network of Schools POJ
    Beautiful numbers CodeForces
    ipone6界面设计标准
    目前的前端框架有哪些
    什么是react native
    nth-child() 选择器
    html{height:100%}的意义以及body背景色的解析推断
  • 原文地址:https://www.cnblogs.com/stono/p/4680003.html
Copyright © 2020-2023  润新知