♻️ Refactor and rename ParagraphBuilder instantiating from TextContent

This commit is contained in:
Belén Albeza
2025-09-02 15:22:05 +02:00
parent 50b9e8c6e6
commit d40b68c004
6 changed files with 332 additions and 301 deletions

View File

@@ -1,4 +1,4 @@
use crate::shapes::text::TextContent;
use crate::{shapes::text::TextContent, textlayout::paragraph_builders_from_text};
use skia_safe::{
self as skia, textlayout::Paragraph as SkiaParagraph, FontMetrics, Point, Rect, TextBlob,
};
@@ -20,7 +20,7 @@ impl TextPaths {
let mut paths = Vec::new();
let mut offset_y = self.bounds.y();
let mut paragraphs = self.to_paragraphs(None, None, None);
let mut paragraphs = paragraph_builders_from_text(&self.0, None, None, None);
for paragraphs in paragraphs.iter_mut() {
for paragraph_builder in paragraphs.iter_mut() {