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 实现图片选择.图片剪裁 该库可以实现启动本地相册和照相机来采集图片,并且提供多选.图片裁剪等功能,支 ...
随机推荐
- 关于Google Chrome 浏览器的一些命令及用法
http://blog.csdn.net/zyz511919766/article/details/7356306 一些Chrome的地址栏命令(这些命令会不停的变动,所有不一定都是好用的) 在Chr ...
- PHP 将MySQL数据导出csv
1.查询数据 // 假设得到的数据格式如下 $result = array( array( "orderid" = "1110111", "shopi ...
- java多线程有几种实现方法,都是什么?同步有几种实现方法,都是什么?
多线程有两种实现方法,分别是继承Thread类与实现Runnable接口 同步的实现方面有两种,分别是synchronized,wait与notify 先看一下java线程运行时各个阶段的运行状态 j ...
- springMVC获取数据--注意post方法会出现中文乱码问题
1. 新建web project 2. 加入jar 3. 改写web.xml <?xml version="1.0" encoding="UTF-8"?& ...
- Struts拦截器使用
创建拦截器java程序 package cn.itcast.oa.util; import com.opensymphony.xwork2.ActionInvocation; import com.o ...
- python redis list操作
LPUSH list_name value [value ...] Prepend one or multiple values to a list 从左侧插入值,最早插入的值在最右边 LPUSHX ...
- 仿苹果短信(微信 ,qq)左划弹出菜单
难点: 1.功能的实现,左划.ListView的复用 2.单行显示,多行显示 3.ListView分割线.点击阴影,上下滑动左右滑动无阴影.多点触控改为单点触控 4.融球动画 http://blog. ...
- LPC1788的内部EEPROM使用
Lpc1788内置有eeprom 使用代码 #ifndef __E2PRONINCHIP_H_ #define __E2PROMINCHIP_H #include "common.h&quo ...
- css布局-多行文字垂直居中
方法一: 代码: <style> *{padding: ;margin:;font-size: 12px;} div{float: left;width: 200px;height:200 ...
- C# 计算文件的HASH
/// <summary> /// 提供用于计算指定文件哈希值的方法 /// <example>例如计算文件的MD5值: /// <code> /// String ...