image-js / image-js-typescript

Temporary repository to work on the migration of image-js to TypeScript
https://image-js.github.io/image-js-typescript/
MIT License
5 stars 5 forks source link

`out` option of `drawPoints` should accept `Mask` #355

Closed opatiny closed 1 year ago

opatiny commented 1 year ago

Currently it is not possible to out to the input mask, which is a common use case. https://github.com/image-js/image-js-typescript/blob/d0e1936362efdc1a88c5212be4a1ed768363a879/src/draw/drawPoints.ts#L22-L25

opatiny commented 1 year ago

After discussion, we want to suppress functions that take Image | Mask and make separate functions. To avoid repeating the options, create a DrawPointsOptionsBase in the Image function and extend it with the out option.