style: clear two build warnings
- image_model.rs: drop unnecessary parentheses around a map's array literal return. - text_support.rs: remove dead row_in_column / col_rows computation and its unused `li` binding (the only consumer). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
fc72827428
commit
0d4bd274b4
2 changed files with 1 additions and 21 deletions
|
|
@ -1285,18 +1285,6 @@ pub fn layout_mtext(opts: &MTextRenderOpts) -> MTextLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ── 3. Block geometry (line spacing, attachment, rotation) ───────────
|
// ── 3. Block geometry (line spacing, attachment, rotation) ───────────
|
||||||
// Row of each sub-line *within its own column* — the flat index only tracks
|
|
||||||
// depth down the page when there is one column. Columns sit side by side, so
|
|
||||||
// each restarts at the top and the block is as deep as its longest one.
|
|
||||||
let mut col_rows = vec![0usize; cols.count.max(1)];
|
|
||||||
let row_in_column: Vec<f32> = sub_lines
|
|
||||||
.iter()
|
|
||||||
.map(|s| {
|
|
||||||
let r = col_rows[s.column];
|
|
||||||
col_rows[s.column] = r + 1;
|
|
||||||
r as f32
|
|
||||||
})
|
|
||||||
.collect();
|
|
||||||
let ls_factor = if opts.line_spacing_factor > 0.0 {
|
let ls_factor = if opts.line_spacing_factor > 0.0 {
|
||||||
opts.line_spacing_factor
|
opts.line_spacing_factor
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1544,7 +1532,6 @@ pub fn layout_mtext(opts: &MTextRenderOpts) -> MTextLayout {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
for (i, sub) in sub_lines.iter().enumerate() {
|
for (i, sub) in sub_lines.iter().enumerate() {
|
||||||
let li = row_in_column[i];
|
|
||||||
// The block anchors on its full width; each column then sits at its own
|
// The block anchors on its full width; each column then sits at its own
|
||||||
// offset inside it and wraps to its own width, not the block's.
|
// offset inside it and wraps to its own width, not the block's.
|
||||||
let (box_left, rect_w) = if cols.active() {
|
let (box_left, rect_w) = if cols.active() {
|
||||||
|
|
|
||||||
|
|
@ -246,14 +246,7 @@ impl ImageModel {
|
||||||
let pts: Vec<[f64; 2]> = u
|
let pts: Vec<[f64; 2]> = u
|
||||||
.clip_boundary_vertices
|
.clip_boundary_vertices
|
||||||
.iter()
|
.iter()
|
||||||
.map(|p| {
|
.map(|p| [p.x * u.x_scale / w_du, p.y * u.y_scale / h_du])
|
||||||
(
|
|
||||||
[
|
|
||||||
p.x * u.x_scale / w_du,
|
|
||||||
p.y * u.y_scale / h_du,
|
|
||||||
]
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.collect();
|
.collect();
|
||||||
let mut tris = Vec::with_capacity((pts.len().saturating_sub(2)) * 3);
|
let mut tris = Vec::with_capacity((pts.len().saturating_sub(2)) * 3);
|
||||||
for i in 1..pts.len() - 1 {
|
for i in 1..pts.len() - 1 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue