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);
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扭曲图片的更多相关文章
- lufylegend库 LGraphics绘制图片
lufylegend库 LGraphics绘制图片 <!DOCTYPE html> <html lang="en"> <head> <me ...
- lufylegend库 LGraphics
lufylegend库 LGraphics <!DOCTYPE html> <html lang="en"> <head> <meta c ...
- lufylegend库 LButton
lufylegend库 LButton <!DOCTYPE html> <html lang="en"> <head> <meta cha ...
- lufylegend库 鼠标事件 循环事件 键盘事件
lufylegend库 鼠标事件 循环事件 键盘事件 <!DOCTYPE html> <html lang="en"> <head> <m ...
- lufylegend库 LTextField
lufylegend库 LTextField <!DOCTYPE html> <html lang="en"> <head> <meta ...
- lufylegend库 LBitmapData LBitmap LSprite
lufylegend库 LBitmapData LBitmap LSprite <!DOCTYPE html> <html lang="en"> <h ...
- 编译skia静态库时,图片解码库无法注册的问题
转载:http://www.cnblogs.com/imlucky/archive/2012/08/01/2617851.html 今天编译skia库,增加图片解码库时总是无效.按照此博客的方法修改后 ...
- python 利用PIL库进行更改图片大小的操作
python 是可以利用PIL库进行更改图片大小的操作的,当然一般情况下是不需要的,但是在一些特殊的利用场合,是需要改变图片的灰度或是大小等的操作的,其实用python更改图片的大小还是蛮简单的,只需 ...
- [RN] React Native 使用开源库 react-native-image-crop-picker 实现图片选择、图片剪裁
React Native 使用开源库 react-native-image-crop-picker 实现图片选择.图片剪裁 该库可以实现启动本地相册和照相机来采集图片,并且提供多选.图片裁剪等功能,支 ...
随机推荐
- POJ 1185炮兵阵地 (状压DP)
题目链接 POJ 1185 今天艾教留了一大堆线段树,表示做不动了,就补补前面的题.QAQ 这个题,我第一次写还是像前面HDU 2167那样写,发现这次影响第 i 行的还用i-2行那样,那以前的方法就 ...
- L2-006. 树的遍历
题目链接:L2-006. 树的遍历 今天一神给我手敲二叉树模板,瞬间就领悟了,感觉自己萌萌哒! 看上去很直观! #include <iostream> #include <cstdi ...
- Milk Pails
Milk Pails 题目描述 Farmer John has received an order for exactly M units of milk (1≤M≤200) that he need ...
- C#代码发送邮件
本次测试的邮箱为163邮箱 1.首相对邮箱进行一些设置(详见下图):打开设置选取客户端授权密码项,开启设置:以后在客户端登录时将使用刚刚设置的密码! 2.上干货 public static void ...
- Ubuntu iptables 设置
在ubuntu中由于不存在 /etc/init.d/iptales文件,所以无法使用service等命令来启动iptables,需要用modprobe命令. 启动iptables modprobe i ...
- Ibatis collect select用法详解
问题:之前接触过Ibatis的使用,在做一对多的时候,一般都是手动去填充,非自动让ibatis去填充数据. 下面就用ibatis的自动填充功能来实现. 关键使用到collection 标签下的sele ...
- macbook pro 突破校园网inode客户端限制分享网络
[原创] 环境: 1. macbook pro (retina) 2. mac os x 10.9 3. H3C inode for mac 7.0 分享方法: 1.打开inode联网. 2.打开设置 ...
- jsoncpp第二篇------API
更多API参考jsoncpp头文件 1 jsoncpp的api简要说明 1,解析(json字符串转为对象) std::string strDataJson; Json::Reader JReader ...
- hellocharts-android开源图表库(效果非常好)
泡在网上的日子 发表于 2014-11-07 12:28 第 33156 次阅读 chart 2 编辑推荐:稀土掘金,这是一个高质量的技术干货分享社区,web前端.Android.iOS.设计资源和产 ...
- db2 odbc连接设置
参考:http://www.withdata.com/blog/tips/how-to-install-and-configure-db2-odbc-driver.html 驱动下载地址:https: ...