Open IAmJSD opened 5 years ago
Please elaborate what you mean by that and why and when it would be useful.
Most API's (such as a lot of functionality in Electron) use the start point as the top-left corner. This is the "top" and "left" position. I believe it would be useful for this library.
Most API's (such as a lot of functionality in Electron) use the start point as the top-left corner.
This is not entirely correct. Electron might return top-left, but the standard on macOS is bottom-left (except for some Quartz APIs like CGWindowListCopyWindowInfo
).
But yes, we could add this as an optional flag. Maybe called isFlipped
or isFlippedCropRect
.
We just need to invert the vertical coordinate: https://stackoverflow.com/questions/852875/how-do-i-convert-cocoa-co-ords-from-top-left-origin-to-bottom-left-origin
@issuehunt has funded $80.00 to this issue.
See https://github.com/wulkano/Aperture/pull/66 for the previous effort.
HI! Sorry, I've been busy for ages and haven't really had a chance to check GitHub. I updated my repository so it works! @sindresorhus
Top/left support would be extremely useful in some situations.