mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 19:28:12 +00:00
♻️ Rename get_children to children (Paragraph)
This commit is contained in:
parent
d40b68c004
commit
1cf0de395c
@ -80,7 +80,7 @@ impl TextContent {
|
||||
self.paragraphs.push(paragraph);
|
||||
}
|
||||
|
||||
pub fn paragraphs(&self) -> &Vec<Paragraph> {
|
||||
pub fn paragraphs(&self) -> &[Paragraph] {
|
||||
&self.paragraphs
|
||||
}
|
||||
|
||||
@ -194,8 +194,7 @@ impl Paragraph {
|
||||
self.children = children;
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn get_children(&self) -> &Vec<TextLeaf> {
|
||||
pub fn children(&self) -> &[TextLeaf] {
|
||||
&self.children
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ pub fn paragraph_builders_from_text(
|
||||
for paragraph in text_content.paragraphs() {
|
||||
let paragraph_style = paragraph.paragraph_to_style();
|
||||
let mut builder = ParagraphBuilder::new(¶graph_style, fonts);
|
||||
for leaf in paragraph.get_children() {
|
||||
for leaf in paragraph.children() {
|
||||
let text_style = leaf.to_style(
|
||||
&text_content.bounds(),
|
||||
fallback_fonts,
|
||||
@ -99,7 +99,7 @@ pub fn stroke_paragraph_builders_from_text(
|
||||
let mut stroke_paragraphs_map: std::collections::HashMap<usize, ParagraphBuilder> =
|
||||
std::collections::HashMap::new();
|
||||
|
||||
for leaf in paragraph.get_children().iter() {
|
||||
for leaf in paragraph.children().iter() {
|
||||
let mut text_paint = merge_fills(leaf.fills(), *bounds);
|
||||
if let Some(blur_mask) = blur_mask {
|
||||
text_paint.set_mask_filter(blur_mask.clone());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user