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);
var vertices = [];
vertices.push(0,0);
vertices.push(0,120);
vertices.push(0,240);
vertices.push(120,0);
vertices.push(120,120);
vertices.push(120,240);
vertices.push(240,0);
vertices.push(240,120);
vertices.push(240,240);
var indices = [];
indices.push(0,3,1);
indices.push(3,1,4);
indices.push(1,4,2);
indices.push(4,2,5);
indices.push(3,6,4);
indices.push(6,4,7);
indices.push(4,7,5);
indices.push(7,5,8);
var uvtData = [];
uvtData.push(0,0);
uvtData.push(0,0.5);
uvtData.push(0,1);
uvtData.push(0.5,0);
uvtData.push(0.5,0.5);
uvtData.push(0.5,1);
uvtData.push(1,0);
uvtData.push(1,0.5);
uvtData.push(1,1);
backLayer.graphics.beginBitmapFill(bitmapdata);
backLayer.graphics.drawTriangles(vertices,indices,uvtData,2,'#fff');
}
</script>
</body> </html>2,

lufylegend库 LGraphics扭曲图片的更多相关文章

  1. lufylegend库 LGraphics绘制图片

    lufylegend库 LGraphics绘制图片 <!DOCTYPE html> <html lang="en"> <head> <me ...

  2. lufylegend库 LGraphics

    lufylegend库 LGraphics <!DOCTYPE html> <html lang="en"> <head> <meta c ...

  3. lufylegend库 LButton

    lufylegend库 LButton <!DOCTYPE html> <html lang="en"> <head> <meta cha ...

  4. lufylegend库 鼠标事件 循环事件 键盘事件

    lufylegend库 鼠标事件 循环事件 键盘事件 <!DOCTYPE html> <html lang="en"> <head> <m ...

  5. lufylegend库 LTextField

    lufylegend库 LTextField <!DOCTYPE html> <html lang="en"> <head> <meta ...

  6. lufylegend库 LBitmapData LBitmap LSprite

    lufylegend库 LBitmapData LBitmap LSprite <!DOCTYPE html> <html lang="en"> <h ...

  7. 编译skia静态库时,图片解码库无法注册的问题

    转载:http://www.cnblogs.com/imlucky/archive/2012/08/01/2617851.html 今天编译skia库,增加图片解码库时总是无效.按照此博客的方法修改后 ...

  8. python 利用PIL库进行更改图片大小的操作

    python 是可以利用PIL库进行更改图片大小的操作的,当然一般情况下是不需要的,但是在一些特殊的利用场合,是需要改变图片的灰度或是大小等的操作的,其实用python更改图片的大小还是蛮简单的,只需 ...

  9. [RN] React Native 使用开源库 react-native-image-crop-picker 实现图片选择、图片剪裁

    React Native 使用开源库 react-native-image-crop-picker 实现图片选择.图片剪裁 该库可以实现启动本地相册和照相机来采集图片,并且提供多选.图片裁剪等功能,支 ...

随机推荐

  1. python之路:进阶 二

        c = collections.Counter(  Counter({ b = collections.Counter(  b.update(c)   Counter({ Counter({  ...

  2. Init.rc分析(刘举奎)

    http://www.360doc.com/content/14/0926/20/13253385_412582822.shtml

  3. [算法] trie树实现

    小写字母的字典树 #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXN 1 ...

  4. Laravel 数据插入

    Laravel 的数据库操作基于 Eloquent ORM,在插入数据时有以下几种方式,返回结果也不会不同: 1.insert 插入后会返回 true or false: 2.create 插入成功后 ...

  5. Android高斯模糊技术,实现毛玻璃效果(转)

    本博客转自郭霖公众号:http://mp.weixin.qq.com/s?__biz=MzA5MzI3NjE2MA==&mid=2650235930&idx=1&sn=e328 ...

  6. iOS开发——二级列表

    原理很简单,一级菜单放在viewForHeaderInSection里面,加一个点击事件,然后判断它的二级菜单(cell)显不显示. 直接上代码吧! // //  HeheTableViewContr ...

  7. jQuery修改css属性

    jQuery CSS 操作jQuery 拥有三种用于 CSS 操作的重要函数:$(selector).css(name,value)$(selector).css({properties})$(sel ...

  8. GCJ 2008 APAC local onsites C Millionaire

    时间复杂度很大.dp[i][j]表示第i轮 j这种状态的概率. #include<cstdio> #include<cstring> #include<cmath> ...

  9. 《SpringMVC数据绑定入门》笔记

    基本类型 最好使用封装类型 简单多数据&多层级对象 简单多数据 单个对象,直接使用属性名=值即可 多层级对象 属性.属性=值即可 同属性多对象 WebDataBinder只在当前类中生效,不是 ...

  10. CSS排序工具csscomb

    一. css写久了以后感觉需要按照某种规则或者说顺序来,便于开发和维护.O(∩_∩)O哈哈~ 找到一个 http://csscomb.com/ CSS排序总结: 1. 对css样式排序; 2. 按样式 ...