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

added an example showing how to use with_rect #17664

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

Conversation

fjkorf
Copy link

@fjkorf fjkorf commented Feb 3, 2025

Objective

Add an example demonstrating the use of ImageNode::rect
Fixes #16482

Solution

Modified the code in the original issue #16457

Testing

to test run

cargo run --example image_rect --release

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Copy link
Contributor

github-actions bot commented Feb 3, 2025

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Examples An addition or correction to our examples labels Feb 3, 2025
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

I like this, but IMO this sort of documentation on "how to use a specific API" is best suited to API docs. Examples are harder to discover and much more expensive to maintain.

Can you condense this and move it over to a doc test (and maybe some extra explanation there?).

@alice-i-cecile alice-i-cecile added the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Feb 3, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Nice stuff; this is clear and helpful. I have a few style / clarity nits.

@fjkorf
Copy link
Author

fjkorf commented Feb 5, 2025

Thanks!

@alice-i-cecile
Copy link
Member

@Carter0, I'd appreciate your review here if you have a minute :)

@alice-i-cecile alice-i-cecile added D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward C-Docs An addition or correction to our documentation and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged C-Examples An addition or correction to our examples labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Docs An addition or correction to our documentation D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Demonstrate how to use ImageNode::rect
2 participants