@antv/g-plugin-canvas-renderer
TypeScript icon, indicating that this package has built-in type declarations

2.2.11 • Public • Published

@antv/g-plugin-canvas-renderer

使用 CanvasRenderingContext2D 绘制各类图形。

包含了两个插件:

  1. CanvasRendererPlugin 实现了以下 hook:

    1. beginFrame 保存上下文,如果开启了脏矩形渲染,创建脏矩形对应的 clip rect 并擦除
    2. renderFrame 绘制各个图形,如果开启了脏矩形渲染,仅在该区域内重绘
    3. endFrame 恢复上下文
  2. LoadImagePlugin 负责加载图片,实现了以下 hook:

    1. mounted Image 图形首次进入画布,异步加载包含的图片
    2. attributeChanged 如果 Image 图形的图片地址发生改变,重新加载图片

Readme

Keywords

Package Sidebar

Install

npm i @antv/g-plugin-canvas-renderer

Weekly Downloads

38,267

Version

2.2.11

License

MIT

Unpacked Size

665 kB

Total Files

31

Last publish

Collaborators

  • lvisei
  • freestyle21
  • soundquiet
  • elaine.q.10
  • sturuby
  • sakuya223
  • serializedowen
  • xdzhao
  • yangzhanmei
  • wjgogogo
  • leungwensen
  • dori
  • iaaron
  • yard
  • simaq
  • dxq613
  • intchous
  • susan_ann
  • jinke.li
  • lzxue
  • army8735
  • atool
  • baizn
  • dengfuping
  • neoddish
  • jeffy2012
  • zqlu
  • afc163
  • pomelo-nwu
  • kopiluwaky
  • ccnuzindex
  • panyuqi
  • bubkoo
  • zengyue
  • kasmine
  • boyu.zlj
  • l1ud0ngq1
  • newbyvector
  • winniexing
  • chenluli
  • kn9117
  • xdddst
  • semious2020
  • esora
  • nadia_liu
  • bbsqq
  • mxz96102
  • openwayne
  • pearmini
  • pddpd
  • yiqianyao
  • zhanba
  • cxxxxxn
  • laixingui.lxg
  • susiwen8
  • yanxiong
  • zeyuwang
  • rainy25ghz
  • zhangjunjie-loki
  • flash1
  • yisi.wang
  • dreammy23
  • biupiubiupiu
  • basketduck
  • xuying1027
  • banxuan