Skip to content

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

Merged
hecrj merged 4 commits into
iced-rs:masterfrom
bungoboingo:fix/bg-gradient
May 29, 2023
Merged

[Fix] Make gradient pack fn public for iced_graphics::Gradient#1871
hecrj merged 4 commits into
iced-rs:masterfrom
bungoboingo:fix/bg-gradient

Conversation

@bungoboingo

Copy link
Copy Markdown
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.

Comment thread graphics/src/gradient.rs Outdated
@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

@hecrj hecrj left a comment

Copy link
Copy Markdown
Member

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!

Comment thread graphics/src/gradient.rs Outdated
... by only allowing direct conversion from our `Gradient` types

@hecrj hecrj left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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