This example shows how to use a TSwipeTransitionEffect transition and a TPathAnimation to simulate the turning of a book page.

1. To build and test this example, create a HD FireMonkey Application - Delphi, then add the next objects to the form:
2. Load a bitmap to the TImage and select the Target and Back bitmaps for the TSwipeTransitionEffect.
3. Add the following code to the OnClick event handlers of the image:

Code

procedure TForm1.Image1Click(Sender: TObject);
begin
PathAnimation1.Enabled := False;
SelectionPoint1.Position.Point := PointF(0,0);
SelectionPoint1.Opacity := 0;
PathAnimation1.Parent := SelectionPoint1;
PathAnimation1.Path.Clear;
// begin Path for mouse pointer
PathAnimation1.Path.MoveTo(PointF(0,0));
PathAnimation1.Path.LineTo(PointF(Form1.Width/2,Form1.Height/2));
PathAnimation1.Path.LineTo(PointF(Form1.Width*2,0));
// end
PathAnimation1.Duration := 2;
PathAnimation1.Start;
end;
4. Add the following code to the OnFinish and OnProcess event handlers of the TPathAnimation:

Code

procedure TForm1.PathAnimation1Finish(Sender: TObject);
var
BitMap : TBitmap;
begin
BitMap := TBitmap.Create(0,0);
BitMap.Assign(SwipeTransitionEffect1.Target);
SwipeTransitionEffect1.Target := Image1.Bitmap;
Image1.Bitmap.Assign(BitMap);
SwipeTransitionEffect1.MousePoint := PointF(0,0);
end;
 
procedure TForm1.PathAnimation1Process(Sender: TObject);
begin
SwipeTransitionEffect1.MousePoint:=SelectionPoint1.Position.Point;
end;

The image will swipe its bitmap on every mouse click. The next image shows the resulting animation:

http://docwiki.embarcadero.com/CodeExamples/XE6/en/FMX.TSwipeTransitionEffect_Animation

翻书的效果:FMX.TSwipeTransitionEffect Animation的更多相关文章

  1. [知了堂学习笔记]_css3特效第一篇--旋转的背景&翻书效果

    一.html遮盖层与css3的旋转动画 >效果图(加载可能会慢一点儿,请稍等...): >实现思路:在一个大的div中装入一个底层img和顶层的div(里面的内容按照以上图片呈现的样式布局 ...

  2. css3特效第一篇--旋转的背景&翻书效果

    一.html遮盖层与css3的旋转动画 >效果图(加载可能会慢一点儿,请稍等...): >实现思路:在一个大的div中装入一个底层img和顶层的div(里面的内容按照以上图片呈现的样式布局 ...

  3. Andorid 翻书效果

    本文内容 项目结构 环境 演示 参考资料 翻书效果,主要采用绘制贝塞尔曲线的方法.本文有三个演示: 简单翻书效果.翻下一页后,当前页不会消失. 翻书时的贝塞尔曲线.演示翻书时,贝塞尔曲线的路径和要素. ...

  4. CSS3、jQuery实现3D翻书动画

    使用CSS3 ,jQuery实现点击翻书动画效果,完整效果可在firefox中查看 HTML <div class="desktop"> <div class=& ...

  5. PPT中翻书动画的制作

    一.新建一个空白的PowerPoint文档.   二.制作两个页面:   1.点击“自选图形”右边的小三角,选择“基本图形”下的“折角形”图形,在PowerPoint中画出一个书页样的图形,宽度最好小 ...

  6. 基于CSS3新属性Animation及transform实现类似翻书效果

    注:本实例JS部分均以原生JS编写,不善用原生JS的,可用jQuery等对三方框架改写 先上效果图:(样式有点丑,可以忽略一下下,效果出来了就好,后期加到其他项目中方便更改0.0) 类似翻书效果,原本 ...

  7. 纯css实现翻书效果

    前言 最近研究了一下css3的3D效果,写了几个demo,写篇博客总结一下实现的经过.PS:如果对transform-origin/perspective/transform-style这些概念还不了 ...

  8. turn.js实现翻书效果

    JS插件网 http://www.ijquery.cn/?p=173 描述:Turn.js 是一个轻量级的 (15kb) jQuery/html5 插件用来创建类似书本和杂志翻页效果,支持触摸屏设备. ...

  9. Unity3d:megaFierstext(翻书效果插件)

    附件中是一款翻书效果插件,由于附件上传大小限制,在下载完后,需要在megaFierstext_BHYF\Assets\Resources\Textures下添加图片精灵并修改属性为Texture,即可 ...

随机推荐

  1. jquery 实现简单拖拽

    $.fn.drag = function(obj) { var dragging = false; var oDrag = $(obj); oDrag.mousedown(function(e) { ...

  2. JAVA编程思想——类型信息(反射)

    一.反射与RTTI RTTI:这个类型必须在编译的时候已知或者存在,如果不知道对象的确切类型,RTTI可以告诉你. 反射(个人认为就是能够利用Class获取或者调用.class这个文件中的数据):当我 ...

  3. Razor学习(二)@Html标签

    原文链接:http://blog.csdn.net/pasic/article/details/7093802 只是因为原文作者说的东西,还有很多作为基础知识的东西,我都没有掌握,所以总结在这里,蓝字 ...

  4. python 数据类型之数值型

    1.在python在数值的类型大概包括int float complex decimal 1.int 在3.x中它不在有最大值的限制. 2.float它更加连近于C语言中的double 3.compl ...

  5. MYSQL 中的变量

    1.用户自己定义变量 2.系统变量(全局变量,会话变量) ----------------------------------------------------------------------- ...

  6. 点击页面其它地方隐藏该div的两种思路

    思路一 第一种思路分两步 第一步:对document的click事件绑定事件处理程序,使其隐藏该div 第二步:对div的click事件绑定事件处理程序,阻止事件冒泡,防止其冒泡到document,而 ...

  7. Inno Setup技巧[界面]添加和自定义左下角标签

    原文 http://blog.sina.com.cn/s/blog_5e3cc2f30100cc49.html 本文介绍添加和自定义“左下角标签”的方法. 界面预览: Setup技巧[界面]添加和自定 ...

  8. html5本地存储 local storage

    HTML5 web storage, a better local storage than cookies. With HTML5, web pages can store data locally ...

  9. 走出MFC子类化的迷宫

    走出MFC子类化的迷宫 KEY WORDS:子类化 SUBCLASSWINDOW  MFC消息机制 许多Windows程序员都是跳过SDK直接进行RAD开发工具[或VC,我想VC应不属于RAD]的学习 ...

  10. Make a travel blog by Blogabond the theme of wordpress

    We can record our place which we have ever went.If you want to know any more you can visit :http://w ...