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 Copy on Fill and Stroke #2475

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

vladh
Copy link
Contributor

@vladh vladh commented Jun 21, 2024

In general, would it not be better to have functions such as fill_rectangle take &Fill to prevent unnecessary copies, especially when drawing the same item over and over?

@hecrj hecrj added this to the 0.13 milestone Jun 21, 2024
@hecrj hecrj added feature New feature or request canvas addition labels Jun 21, 2024
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.

Premature optimization. Compilers are smart and dereferencing could potentially be slower.

In any case, the cost of a copy is negligible when compared to the actual tessellation. So, why bother with these questions?

@hecrj hecrj merged commit 7344a31 into iced-rs:master Jun 21, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition canvas feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants