Render: a shape with no fill and no line draws no glow round its box

A text box with a glow in its shape properties but no fill and no line got a
blurred ring round the whole box; PowerPoint shows only the text's own glow.
The glow of a frame with a line, and of a filled shape, is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Leonardo
2026-10-23 17:06:47 -03:00
co-authored by Claude Sonnet 5.5
parent c787f4f080
commit 8aa76142c9
3 changed files with 21 additions and 1 deletions
+1
View File
@@ -131,6 +131,7 @@ app's JSON control channel (`deckcraft --control PORT`).
| Date | What landed |
|---|---|
| 2026-10-23 | A shape with no fill and no line (a text box) no longer draws its shape-level glow as a halo round its box; the text's own glow is all PowerPoint shows |
| 2026-10-18 | Native chart sidecar bytes move from JSON arrays into referenced ZIP entries, with shared media byte/item limits and bounded reads; older inline sidecars still load. Synthetic format regressions cover large workbooks and malformed members |
| 2026-10-18 | Slide thumbnails and the Slide Sorter render only the slides in view: on a deck of more than 600 slides they used to evict their own thumbnails, so the pane flashed white and never finished (#969) |
| 2026-10-17 | Opening a file caps absurd effect sizes (glow, soft edges, shadows, reflections, on shapes, text and table text) at what Format Shape allows: a glow of 10^18 pt in a .pptx made rendering ask for 34 GB and abort |
+4 -1
View File
@@ -1437,7 +1437,10 @@ impl Renderer {
}
ctx.pop_layer();
}
if let Some(g) = &e.glow {
// A shape with no fill and no line (a text box) draws nothing to glow around: its text's
// own glow is all PowerPoint shows, not a halo round the box.
let glows = fill_alpha.is_some() || content.is_some() || outline.is_some();
if let Some(g) = e.glow.as_ref().filter(|_| glows) {
let c = rctx.color(&g.color, ph);
ctx.set_transform(Affine::IDENTITY);
// Measured on PowerPoint's export: a glow of radius r is half strength about half of r
+16
View File
@@ -431,6 +431,22 @@ fn glow_of_an_unfilled_shape_follows_its_line() {
assert!(img.pixel(300, 94)[0] < 240);
}
#[test]
fn glow_of_a_shape_with_no_fill_and_no_line_is_not_drawn() {
// A text box (no fill, no line) with a glow in its shape properties: PowerPoint shows no halo
// round the box (its text carries its own glow), so the box's edge and surroundings stay white.
let mut sh = Shape { id: ShapeId(611), xfrm: Some(Xfrm::new(100.0, 100.0, 400.0, 300.0)), fill: Some(Fill::None), ..Default::default() };
sh.effects = Some(deckcraft_model::Effects {
glow: Some(deckcraft_model::style::Glow { color: ColorRef::rgb(deckcraft_color::Rgba::rgb(255, 255, 0)), radius: 15.0 }),
..Default::default()
});
let img = render_slide(&deck_with(vec![sh]), 0, &RenderOpts { scale: 1.0, ..Default::default() });
for (x, y) in [(300, 250), (300, 100), (300, 95), (96, 250)] {
let px = img.pixel(x, y);
assert!(px[2] > 245, "({x}, {y}): {px:?}");
}
}
#[test]
fn placeholder_prompts_only_in_edit_view() {
let p = Presentation::default();