renderer does not render paragraphs crated during draw calls because it drops them first #2670
Open
4 tasks done
Labels
bug
Something isn't working
Is your issue REALLY a bug?
Is there an existing issue for this?
Is this issue related to iced?
What happened?
creating a custom text widget to render a paragraph of text using
renderer.fill_paragraph
. the text does not appear.it seems that the problem is that you're immediately dropping the paragraph of text before queueuing it to be rendered (at line 44 of tiny_skia/src/layer.rs). it seems this is a mistake? surely you would rather drop the text after it has been rendered?
a similar mistake was made on line 63 in Layer::draw_editor.
the relevant part of this SSCCE is the draw() method. the rest is boilerplate.
What is the expected behavior?
Text should appear.
Uncommenting the code that says "Uncomment me!" shows the text properly, by preventing the paragraph from being dropped, by causing a memory leak. This is not ideal.
Version
crates.io release
Operating System
Windows
Do you have any log output?
The text was updated successfully, but these errors were encountered: