Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for top/left positions for capture #65

Open
IAmJSD opened this issue Mar 17, 2019 · 7 comments
Open

Support for top/left positions for capture #65

IAmJSD opened this issue Mar 17, 2019 · 7 comments
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted

Comments

@IAmJSD
Copy link

IAmJSD commented Mar 17, 2019

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 IAmJSD changed the title Support for top/left Support for top/left positions for capture Mar 17, 2019
@sindresorhus
Copy link
Contributor

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

@IAmJSD
Copy link
Author

IAmJSD commented Mar 17, 2019

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
Copy link
Contributor

sindresorhus commented Mar 17, 2019

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
Copy link
Contributor

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
Copy link

@IssueHunt has funded $80.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label May 10, 2019
@sindresorhus
Copy link
Contributor

See #66 for the previous effort.

@IAmJSD
Copy link
Author

IAmJSD commented Sep 23, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants