Draw cancel and bcancel math marks
This commit is contained in:
1 parent
9690dbdbed
commit
b8a135d2b6
2 files changed
+83
No files matched your search
@@ -680,6 +680,32 @@ impl Page {
|
||||
height: 26_214,
|
||||
});
|
||||
}
|
||||
MathAtom::Cancel {
|
||||
base,
|
||||
forward,
|
||||
backward,
|
||||
} => {
|
||||
let base_box = math::layout_math(base, font);
|
||||
Self::paint_math(base, font, x, baseline, size, list);
|
||||
if *forward {
|
||||
list.push(DisplayItem::Line {
|
||||
x1: x,
|
||||
y1: baseline + base_box.depth,
|
||||
x2: x + base_box.width,
|
||||
y2: baseline - base_box.height,
|
||||
width: 26_214,
|
||||
});
|
||||
}
|
||||
if *backward {
|
||||
list.push(DisplayItem::Line {
|
||||
x1: x,
|
||||
y1: baseline - base_box.height,
|
||||
x2: x + base_box.width,
|
||||
y2: baseline + base_box.depth,
|
||||
width: 26_214,
|
||||
});
|
||||
}
|
||||
}
|
||||
MathAtom::Negated { base } => {
|
||||
let base_box = math::layout_math(base, font);
|
||||
Self::paint_math(base, font, x, baseline, size, list);
|
||||
|
||||
Reference in new issue
Block a user