wulkano / Aperture

Record the screen on macOS
MIT License
1.23k stars 111 forks source link

Support for top/left positions for capture #65

Open IAmJSD opened 5 years ago

IAmJSD commented 5 years ago

Issuehunt badges

Top/left support would be extremely useful in some situations.

There is a $80.00 open bounty on this issue. Add more on Issuehunt.

sindresorhus commented 5 years ago

Please elaborate what you mean by that and why and when it would be useful.

IAmJSD commented 5 years ago

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.

sindresorhus commented 5 years ago

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).

sindresorhus commented 5 years ago

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

IssueHuntBot commented 5 years ago

@issuehunt has funded $80.00 to this issue.


sindresorhus commented 4 years ago

See https://github.com/wulkano/Aperture/pull/66 for the previous effort.

IAmJSD commented 4 years ago

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