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

Add method to specify tip_size of plot arrows #3138

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

nagua
Copy link
Contributor

@nagua nagua commented Jul 7, 2023

Hello everyone,

For my application I want the plot arrows to always have the same size and currently the tip size
depends on the length of the arrow. So this patch adds a method to explicitly set the arrow tip size.

If this needs more discussion, I can additionally open an issue.

Have a nice day everyone!

@emilk emilk added the egui_plot Related to egui_plot label Aug 9, 2023
Comment on lines 1024 to 1026
/// Set the size of the arrow tips
pub fn tip_size(mut self, tip_size: f32) -> Self {
self.tip_size = Some(tip_size);
Copy link
Owner

Choose a reason for hiding this comment

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

"size" is not very clear. Is it with width or the length of the tip? Calling it tip_length would make more sense imho

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'm fine with "length". I already changed the name.

Normally the tip_size will be dependent on the arrow length.
This patch adds a new method to explicitly set the arrow tip size.
@emilk emilk added the egui label Aug 9, 2023
@emilk emilk merged commit cbdf748 into emilk:master Aug 9, 2023
18 of 19 checks passed
@nagua nagua deleted the add_plot_arrow_tip_size branch August 9, 2023 15:35
@emilk emilk changed the title egui: Plot Arrows add method to specify tip_size Add method to specify tip_size of plot arrows Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui_plot Related to egui_plot egui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants