Comments (1)
时间有点久,不过记得总体流程是这样的,感觉你需要先了解下这块的基本流程:
1、异步分页计算处理
2、根据分页计算处理的结果,开个isolate,将分页计算的内容绘制,并保存为一个bitmap,当作缓存处理
3、当预加载部分的那一部分缓存完成之后,就开始绘制,也就是再canvas上将页码对应的bitmap绘制上去而已
根据上面的总体流程,canvas从始至终也就一个(其实对于其他任何一个应用来说,canvas也就一个,而且必须是flutter这种平台底层提供的canvas;多个canvas并没有意义甚至是不合法的,除非你当作缓存之类的最后绘制到主canvas上这种操作),整个过程无非就是对bitmap、layer这些东西的分割、叠加、处理操作;
from flutter_novel.
Related Issues (20)
- Support content with image HOT 1
- Could we able select text to highlight or copy HOT 1
- 阅读页面的思路能不能出个文档 特别是仿真翻页 HOT 5
- 支持大佬重写 HOT 45
- 你这个说法实现了吗 在哪里可以看看 HOT 4
- 二年不维护了? HOT 1
- 旋转球:在点击不小心拖动时,球会消失。2、仿真分页:向左滑动时,滑动到最后像气泡一样消失不见 HOT 1
- 关于快速滑动的问题 HOT 5
- 整体感觉很好,就是翻页滑动速度不能太快 !感谢付出! HOT 3
- 新版的仿真和原来Custompaint的仿真翻页,性能差距大吗 HOT 3
- 重构的代码里 单击翻页准备怎么实现。 HOT 12
- dev2.0中往回翻页的时候存在一个BUG HOT 13
- 如果用户是从第100章开始阅读的话,要怎么做。。 HOT 7
- 仿真翻页不跟手 HOT 9
- 大佬您好,来挖人了,万一挖动了呢 HOT 1
- getPageConfig这个方法计算的内容有些页面显示不全 HOT 27
- 膜拜大佬,大佬人也很好,看了iss,每个都耐心的回复。国人真好 HOT 2
- switch case 可以不写 break 吧…… 应该 HOT 1
- 阅读页整合问题..求帮助
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_novel.