iced-rs/iced

Calculating canvas text size

Open

#478 opened on Aug 11, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Rust (30,491 stars) (1,572 forks)batch import
featuregood first issuetext

Description

Hello,

I'm trying to display canvas::Text next to a chart drawn on a canvas. To get the spacing/padding around the text right, I need to know the amount of space the text will take up on the canvas.

I tried to read the source code and follow the program execution to see how the text gets drawn on the canvas in an attempt to implement this myself but didn't get anywhere. I am thankful for any help on this subject.

Contributor guide