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

Implement the ImagePixelGetter trait #35

Open
rfuest opened this issue Sep 29, 2022 · 4 comments
Open

Implement the ImagePixelGetter trait #35

rfuest opened this issue Sep 29, 2022 · 4 comments

Comments

@rfuest
Copy link
Member

rfuest commented Sep 29, 2022

PR #34 did add a pixel getter method to Bmp and RawBmp, but didn't yet implement the e-g ImagePixelGetter trait. The Bmp::pixel method should be moved to a ImagePixelGetter trait impl when a new e-g version with this trait is released.

@Nerixyz
Copy link

Nerixyz commented Sep 30, 2022

I'd like to add this. Though I think it should be named something like GetPixel which is more Rust-like (when comparing to something like FromStr, AddAssign, IntoFuture).

@rfuest
Copy link
Member Author

rfuest commented Oct 1, 2022

The trait already exists in the embedded-graphics master version, but not in a released version. GetPixel might be a better name. If you would like to change it please open an issue or PR in the embedded-graphics repo.

@Nerixyz
Copy link

Nerixyz commented Oct 1, 2022

Oh my bad, I didn't see that on the docs since it's not released yet. But I suppose it's a bit too late to change the name now. I was just thinking if the trait is new then one could still decide on the name.

@rfuest
Copy link
Member Author

rfuest commented Oct 1, 2022

IMO it's not too late to change the name until there has been a release on crates.io.

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

No branches or pull requests

2 participants