mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-27 11:48:32 +00:00
Per-statement marks for the print marks; exception entries for the vec2 allows; slice number inset allow
This commit is contained in:
@@ -183,6 +183,7 @@ fn paint_slices(painter: &ContentPainterCx<'_>, view: CanvasTransform, picture:
|
||||
let number = slice.number.to_string();
|
||||
painter.with_draw(|draw| {
|
||||
let run = TextRun::new(number.as_str()).role(TypeRole::Caption);
|
||||
// design: allow[literal-size/vec2](the slice number sits a fixed 2 points inside the slice outline over the image preview)
|
||||
let corner = rect.left_top() + Vec2::splat(2.0);
|
||||
let layout = draw.layout(&run, f32::INFINITY);
|
||||
draw.galley(corner, &layout);
|
||||
|
||||
Reference in New Issue
Block a user