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

Rework documentation for Surface::set_buffer #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

i509VCB
Copy link
Contributor

@i509VCB i509VCB commented Jan 1, 2023

This includes a more clear description of the pixel format expected.

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
/// G: Green channel
/// B: Blue channel
/// ```
/// fn pixel(red: u8, green: u8, blue: u8) -> u32 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent addition to have this pre-made example function. I'm not sure if this is the right place for it. Perhaps it should be in an example instead, or just callable as a pub fn in softbuffer. I think that this is ultimately the best place for it, but I'm not certain so I wanted to call attention to this choice.

Copy link
Contributor Author

@i509VCB i509VCB Mar 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The utility of this function being publicly accessible is probably quite low as it is extremely generic. Plus this may change eventually if other pixel formats are supported.

This includes a more clear description of the pixel format expected.
raw-window-handle 0.5.1 requires 1.64, so we have no real choice here.
@i509VCB i509VCB requested review from john01dav and ids1024 and removed request for john01dav and ids1024 March 14, 2023 03:35
@i509VCB
Copy link
Contributor Author

i509VCB commented Mar 14, 2023

Wait what, why does github only allow me to request one reviewer but not multiple...

@i509VCB i509VCB changed the title Rework documentation for GraphicsContext::set_buffer Rework documentation for Surface::set_buffer Mar 14, 2023
@notgull
Copy link
Member

notgull commented May 19, 2024

@i509VCB I will accept this PR if it is rebased and rewritten to apply to the Buffer struct instead.

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

Successfully merging this pull request may close these issues.

5 participants