Skip to content

Move PNG_* constants to constructor, clean up toBuffer API #934

Closed
@zbjornson

Description

@zbjornson

Proposal for a breaking change in 2.0: move all the PNG_* constants from the Canvas prototype to be static members of the Canvas constructor. That is, this doc example:

var buf2 = canvas.toBuffer(undefined, 3, canvas.PNG_FILTER_NONE);

would become

var buf2 = canvas.toBuffer(undefined, 3, Canvas.PNG_FILTER_NONE);

The constants were added in 14d9f58. @kkoopa you added these -- do they need to be on the prototype?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions