GithubHelp home page GithubHelp logo

画布问题 about flutter_novel HOT 1 CLOSED

lwlizhe avatar lwlizhe commented on May 10, 2024
画布问题

from flutter_novel.

Comments (1)

lwlizhe avatar lwlizhe commented on May 10, 2024

时间有点久,不过记得总体流程是这样的,感觉你需要先了解下这块的基本流程:

1、异步分页计算处理
2、根据分页计算处理的结果,开个isolate,将分页计算的内容绘制,并保存为一个bitmap,当作缓存处理
3、当预加载部分的那一部分缓存完成之后,就开始绘制,也就是再canvas上将页码对应的bitmap绘制上去而已

根据上面的总体流程,canvas从始至终也就一个(其实对于其他任何一个应用来说,canvas也就一个,而且必须是flutter这种平台底层提供的canvas;多个canvas并没有意义甚至是不合法的,除非你当作缓存之类的最后绘制到主canvas上这种操作),整个过程无非就是对bitmap、layer这些东西的分割、叠加、处理操作;

from flutter_novel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.