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 实现图片选择.图片剪裁 该库可以实现启动本地相册和照相机来采集图片,并且提供多选.图片裁剪等功能,支 ...
随机推荐
- UESTC 771 最大容积(前缀后缀和)
题目链接:http://acm.uestc.edu.cn/#/problem/show/771 最大容积 Time Limit: 3000/1000MS (Java/Others) Memor ...
- android里uri和url的区别
URI :是从虚拟根路径开始的 URI,是uniform resource identifier URL:是整个链接 URI,是uniform resource location uri:file: ...
- JavaScript(三)---- 控制流程语句
常用的控制流程语句有判断语句.分支语句.循环语句.基本用法都和java中的一致,switch有几点特殊. 1.判断语句 格式: if(判断条件){ 符合条件执行的代 ...
- Docker 新网络 overlay 网络
Overlay网络是指在不改变现有网络基础设施的前提下,通过某种约定通信协议,把二层报文封装在IP报文之上的新的数据格式. 这样不但能够充分利用成熟的IP路由协议进程数据分发,而且在Overlay技术 ...
- Mysql(集群)业务水平切割 垂直切割(Amoeba)
Amoeba原理戳这里:Amoeba详细介绍 需要根据企业 数据业务进行切割,垂直切割又称为纵向切割. 垂直切割通说的说就是有多个表,对表进行分离(用户数据.博客文章数据.照片数据.标签数据类型.群 ...
- [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist 160913 02:11:21 mysqld_safe mysqld from pid file /tmp/mysql.pid ended
-- :: [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 -- :: [Warning] InnoDB: New ...
- Keil C动态内存管理机制分析及改进(转)
源:Keil C动态内存管理机制分析及改进 Keil C是常用的嵌入式系统编程工具,它通过init_mempool.mallloe.free等函数,提供了动态存储管理等功能.本文通过对init_mem ...
- A/C模式 是什么意思啊汽车知识问题_PCauto快问
body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...
- Quick Cocos2dx 与 EnterFrame事件
利用EnterFrame做出行走的效果,效果图如下: 具体操作: 1 给self多加一个bg1用作与bg无限循环换位 2 在AnotherScene:onEnter方法里面新增onEnterFrame ...
- js动画(三)
咳咳咳咳,感冒了感冒了,鼻塞,蓝瘦啊!嘴巴也开裂,哎,心疼自己.想到这是第三只唇膏了!只怪,放荡不倔爱自由, 行驶在冷风路上么,北风那个吹啊吹啊吹啊,好了,发神经发完了,接下来进入正题,严肃脸.(字数 ...