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

[Fix] Make gradient pack fn public for iced_graphics::Gradient #1871

Merged
merged 4 commits into from
May 29, 2023

Conversation

bungoboingo
Copy link
Contributor

Changes:

  • Moved pack_gradient to a pub method of iced_graphics::Gradient named pack. This allows users to pack gradient data when creating their own Primitive::GradientMesh with GradientVertex2D.

The pack_gradient fn for iced::core::Gradient is unchanged as it's internal.

graphics/src/gradient.rs Outdated Show resolved Hide resolved
@hecrj hecrj added the improvement An internal improvement label May 24, 2023
@hecrj hecrj added this to the 0.10.0 milestone May 24, 2023
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Cool! Just one more iteration!

graphics/src/gradient.rs Outdated Show resolved Hide resolved
... by only allowing direct conversion from our `Gradient` types
Copy link
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Looks great!

Just made a small change to completely make Packed opaque by only allowing conversion from either core::Gradient or graphics::Gradient.

Let's merge!

@hecrj hecrj enabled auto-merge May 29, 2023 19:00
@bungoboingo
Copy link
Contributor Author

Looks good! 👍

@hecrj hecrj merged commit 75110b9 into iced-rs:master May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An internal improvement rendering wgpu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants