Draw fbox frames without a background

This commit is contained in:
gloamxun committed 2026-10-26 03:51:28 +08:00
1 parent 3d01fbe589
commit 994c360ec0
6 files changed
+50 -23

No files matched your search

+10 -3
View File
@@ -46,8 +46,15 @@ pub enum InlineSegment {
Script(ParagraphFont, i64, i64, String),
/// A run painted with an explicit RGB colour.
Color(ParagraphFont, i64, i64, [u8; 3], String),
/// A run painted over an RGB background, like `\\colorbox`.
ColorBox(ParagraphFont, i64, i64, [u8; 3], Option<[u8; 3]>, String),
/// A run painted over an optional RGB background, like `\\colorbox` or `\\fbox`.
ColorBox(
ParagraphFont,
i64,
i64,
Option<[u8; 3]>,
Option<[u8; 3]>,
String,
),
Math(crate::math::MathAtom),
Link {
font: ParagraphFont,
@@ -1816,7 +1823,7 @@ pub fn layout_paragraph_segments(segments: &[InlineSegment], style: &ParagraphSt
box_.font = Some(*font);
box_.size = Some(*size);
box_.raise = *raise;
box_.background = Some(*color);
box_.background = *color;
box_.frame = frame.map(|frame| (frame, 26_214));
}
}