Aperture icon indicating copy to clipboard operation
Aperture copied to clipboard

Support for top/left positions for capture

Open IAmJSD opened this issue 6 years ago • 7 comments
trafficstars

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.

IAmJSD avatar Mar 17 '19 15:03 IAmJSD

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

sindresorhus avatar Mar 17 '19 16:03 sindresorhus

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.

IAmJSD avatar Mar 17 '19 16:03 IAmJSD

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 avatar Mar 17 '19 17:03 sindresorhus

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

sindresorhus avatar Mar 17 '19 17:03 sindresorhus

@issuehunt has funded $80.00 to this issue.


IssueHuntBot avatar May 02 '19 02:05 IssueHuntBot

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

sindresorhus avatar Sep 23 '19 17:09 sindresorhus

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

IAmJSD avatar Sep 23 '19 17:09 IAmJSD