Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contex.getTransform() is missing #1642

Closed
Pomax opened this issue Aug 5, 2020 · 1 comment
Closed

contex.getTransform() is missing #1642

Pomax opened this issue Aug 5, 2020 · 1 comment

Comments

@Pomax
Copy link
Contributor

Pomax commented Aug 5, 2020

Issue or Feature

It looks like the getTransform function is missing from the CanvasRenderingContext2d.

Steps to Reproduce

const canvas = CanvasBuilder.createCanvas(200, 200);
const ctx = canvas.getContext('2d');
console.log(ctx.beginPath);
console.log(ctx.moveTo);
console.log(ctx.arc);
console.log(ctx.getTransform);
console.log(ctx.setTransform);

results in:

[Function: beginPath]
[Function: moveTo]
[Function: arc]
undefined
[Function: setTransform]

Your Environment

  • Version of node-canvas: 2.6.1
  • Environment: node 14.7 on Win10 x64

Workaround

I tried shimming this using ctx.getTransform = () => ctx.currentTransform; which seems to work?

@Tirondzo
Copy link
Contributor

@zbjornson, Looks like this issue can be closed now.

@zbjornson zbjornson added this to the v2.8.0 milestone Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants