Automattic / Automattic/node-canvas

Drawing into existing cairo context

Open
#2,204 3 comments 0 reactions 0 assignees View on GitHub
Feature
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

Hello,

Is it possible for 'canvas' to support drawing into existing cairo context, for example `DrawingArea` in `node-gtk` library that supplies its own cairo context on the draw callback.

I poked a little bit and managed to make a hack to pass the context into the `CanvasRenderingContext2d` instance and get a simple clock example working. (see https://github.com/charobnjak32/node-canvas/commit/fe13e23057bec9323e930d5a2b8c4bdd45a77eaf)
However I have no knowledge in the cairo/gtk/nan libraries to understand whether there are some cases when this would break or whether this is a good idea or not.

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.