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

feat(CGDisplay): add displays_with_point and displays_with_rect #657

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mattjbray
Copy link

Add CGDisplay::displays_with_point and CGDisplay::displays_with_rect.

Uses the pattern from CGDisplay::active_displays to first get the count of matching displays, then intialize the result Vec with vec![0; count as usize].

@mattjbray mattjbray force-pushed the cgdisplay-get-displays-with-point branch from 76a5f7b to 1a031c4 Compare March 13, 2024 14:06
@jrmuizel
Copy link
Collaborator

Can you add some tests?

@mattjbray
Copy link
Author

Can you add some tests?

Added some simple tests. I'm not sure how to test anything more specific without mocking the displays somehow - any pointers on how to do that would be appreciated.

@mattjbray
Copy link
Author

I've also added #[inline] attributes to match all the other fns in this module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants