File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change @@ -185,42 +185,6 @@ fn test_multi_layout() {
185
185
} ) ;
186
186
}
187
187
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
-
224
188
impl < ' a , T : Borrow < str > > MultiLineText < ' a , BackendCoord , T > {
225
189
/// Compute the line layout
226
190
pub fn compute_line_layout ( & self ) -> FontResult < Vec < LayoutBox > > {
You can’t perform that action at this time.
0 commit comments