Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-plugin-canvas-renderer

Package Overview
Dependencies
Maintainers
64
Versions
260
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-plugin-canvas-renderer

A G plugin of renderer implementation with Canvas2D API

  • 1.10.0-next.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
decreased by-22.32%
Maintainers
64
Weekly downloads
 
Created
Source

@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 图形的图片地址发生改变,重新加载图片

Keywords

FAQs

Package last updated on 16 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc