Skip to content

Commit a22f7b9

Browse files
committed
Removed commented original function
1 parent 5a85541 commit a22f7b9

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

plotters/src/element/text.rs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -185,42 +185,6 @@ fn test_multi_layout() {
185185
});
186186
}
187187

188-
// fn layout_multiline_text<'a, F: FnMut(&'a str)>(
189-
// text: &'a str,
190-
// max_width: u32,
191-
// font: FontDesc<'a>,
192-
// mut func: F,
193-
// ) {
194-
// for line in text.lines() {
195-
// if max_width == 0 || line.is_empty() {
196-
// func(line);
197-
// } else {
198-
// let mut remaining = &line[0..];
199-
200-
// while !remaining.is_empty() {
201-
// let mut left = 0;
202-
// while left < remaining.len() {
203-
// let width = font.box_size(&remaining[0..=left]).unwrap_or((0, 0)).0 as i32;
204-
205-
// if width > max_width as i32 {
206-
// break;
207-
// }
208-
// left += 1;
209-
// }
210-
211-
// if left == 0 {
212-
// left += 1;
213-
// }
214-
215-
// let cur_line = &remaining[..left];
216-
// remaining = &remaining[left..];
217-
218-
// func(cur_line);
219-
// }
220-
// }
221-
// }
222-
// }
223-
224188
impl<'a, T: Borrow<str>> MultiLineText<'a, BackendCoord, T> {
225189
/// Compute the line layout
226190
pub fn compute_line_layout(&self) -> FontResult<Vec<LayoutBox>> {

0 commit comments

Comments
 (0)