Commit Graph
208 Commits
Author SHA1 Message Date
Brandon Thomas e3a654d446 Merge PR #459 from MarekSpodBiedry: Slide: leading tabs in a new slide's body set the outline level (#370) 2026-10-14 12:53:33 -04:00
Brandon Thomas f4ae239725 Merge PR #458 from MarekSpodBiedry: AV1: reject tile groups that repeat, skip or reorder tiles (#395) 2026-10-14 12:53:33 -04:00
Brandon Thomas 1d8f460fc5 Merge PR #457 from MarekSpodBiedry: Matroska: stop following chapter and tag nesting past 32 levels (#396) 2026-10-14 12:53:33 -04:00
Brandon Thomas 838cef2fec Merge PR #456 from MarekSpodBiedry: Bitstream: reject bad NAL length widths, check NAL endpoints and signed Exp-Golomb limits (#397) 2026-10-14 12:53:33 -04:00
Brandon Thomas d184eb7927 Merge PR #455 from MarekSpodBiedry: Table: split and cell fill stay inside the table (#400) 2026-10-14 12:53:33 -04:00
Brandon Thomas 3046d49e56 Merge PR #454 from MarekSpodBiedry: Engine: a command that fails after editing puts the presentation back (#405) 2026-10-14 12:53:33 -04:00
Brandon Thomas 2b20fc3a45 Merge PR #453 from MarekSpodBiedry: MCP: do not resend a command whose reply was lost (#409) 2026-10-14 12:53:33 -04:00
Brandon Thomas ac88cad50b Merge PR #451 from MarekSpodBiedry: Pptx: keep the math namespace equations inherit from the slide root or a wrapper (#412) 2026-10-14 12:53:33 -04:00
Brandon Thomas f1b30485b2 Merge PR #448 from MarekSpodBiedry: Format scientific number formats (0.00E+00) in chart labels (#419) 2026-10-14 12:53:32 -04:00
Brandon Thomas 9b94481481 Merge PR #446 from MarekSpodBiedry: Engine: moving the selection to another text body settles the composition (#421) 2026-10-14 12:53:32 -04:00
Brandon Thomas ab2befffa0 Merge PR #445 from MarekSpodBiedry: Info: keep a property draft when another field or the side menu is clicked (#422) 2026-10-14 12:53:32 -04:00
Brandon Thomas ea480ad141 Merge PR #443 from MarekSpodBiedry: xtask: assets audit no longer panics on Unicode names and reads real paths from git (#424) 2026-10-14 12:53:32 -04:00
Brandon Thomas a7ed1767b5 Merge PR #442 from MarekSpodBiedry: Opus: validate the header in Decoder::from_head (#425) 2026-10-14 12:53:32 -04:00
Brandon Thomas 44df1ebcb0 Merge PR #436 from Silvertree2010: Colour menus: an Eyedropper that takes a colour from the slide (#367) 2026-10-14 12:53:32 -04:00
Brandon ThomasandClaude Opus 5.5 d78e657e4c Release 0.7.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.7.0
2026-10-14 09:33:03 -04:00
MarekSpodBiedry 007741718e Slide: leading tabs in a new slide's body set the outline level (#370) 2026-10-13 17:52:00 +02:00
MarekSpodBiedry 09b72e4b70 Pptx: keep the math namespace equations inherit from the slide root or a wrapper (#412) 2026-10-13 17:41:28 +02:00
MarekSpodBiedry d4cf50dd3d MCP: do not resend a command whose reply was lost (#409) 2026-10-13 17:38:28 +02:00
MarekSpodBiedry 33ade63687 Table: split and cell fill stay inside the table (#400) 2026-10-13 17:38:20 +02:00
MarekSpodBiedry 45b8dce220 Info: keep a property draft when another field or the side menu is clicked (#422) 2026-10-13 17:38:13 +02:00
MarekSpodBiedry 27d73db0d9 Engine: a command that fails after editing puts the presentation back (#405) 2026-10-13 17:38:10 +02:00
MarekSpodBiedry 863f7cbd87 Engine: moving the selection to another text body settles the composition (#421) 2026-10-13 17:37:44 +02:00
MarekSpodBiedry a4a7ebe658 Bitstream: reject bad NAL length widths, check NAL endpoints and signed Exp-Golomb limits (#397) 2026-10-13 17:37:25 +02:00
MarekSpodBiedry 9aebc8ba51 AV1: reject tile groups that repeat, skip or reorder tiles (#395) 2026-10-13 17:37:24 +02:00
MarekSpodBiedry efb2127e4e Format scientific number formats (0.00E+00) in chart labels (#419) 2026-10-13 17:36:03 +02:00
MarekSpodBiedry c623b4f555 Matroska: stop following chapter and tag nesting past 32 levels (#396) 2026-10-13 17:35:58 +02:00
MarekSpodBiedry 34372569e7 xtask: assets audit no longer panics on Unicode names and reads real paths from git (#424) 2026-10-13 17:34:03 +02:00
MarekSpodBiedry 3ed12de918 Opus: validate the header in Decoder::from_head (#425) 2026-10-13 17:33:29 +02:00
NetterSilver 12dd392705 Docs: update the progress docs for this change 2026-10-13 16:41:57 +02:00
NetterSilver 7887a13868 Colour menus: an Eyedropper that takes a colour from the slide (#367)
Every colour menu ends with Eyedropper. Choosing it closes the menu; the pointer is a
crosshair over the slide with the colour under it and its hex beside it, a click takes
the colour (slide.colorAt) and Esc, a right click or a click off the slide cancels.
The colour comes back through the menu that asked, which opens for a frame and returns
it as if its swatch had been clicked, so Shape Fill, Shape Outline, Font Color, the
Format pane and the other callers all apply it their own way without changes.
2026-10-13 16:41:57 +02:00
NetterSilver 35312529e1 slide.colorAt: the colour the slide is drawn with at a point (#367)
A read-only command, {slide?, x, y (slide units), scale?}: the slide is rendered and
the pixel at the point is returned as {color: "RRGGBB", alpha, x, y}. This is what the
Eyedropper takes, and what scripts and MCP use to read a colour off a slide. A point
outside the slide, a missing or non-numeric coordinate or an unknown slide is an error.
2026-10-13 16:41:57 +02:00
Brandon Thomas 457406a7a5 Docs: keep the progress table in one piece 2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 e614f0d6d6 Docs: record the wild shape rendering fixes and partial 3-D rendering
Progress log entry for the wild-case rendering fixes; "Bevel and 3-D
rotation" moves from missing to partial (approximate bevels, cameras and
face lighting; no extrusion, rigs or 3-D pane); gap estimate narrowed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 8ee082f257 Render: 3-D shapes' faces are lit even without a bevel
A shape with scene3d and sp3d but no bevelT was drawn in its flat fill
colour. PowerPoint lights the front face from the light rig whether or
not there is a bevel, so a plain 3-D rotated rectangle is lighter than
its fill. Model the face with the same threePt approximation as the
bevel (no rim), for solid fills.

Wild 3-D slides: s8 6.35 -> 4.26, s9 19.74 -> 17.68. Corpus unchanged
except lo tdf114848 s4 2.13 -> 1.94.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 238157d98e Render: 3-D cameras turn shapes (affine approximation)
A shape seen through a 3-D camera preset (isometric, perspective...) or
turned with a:camera/a:rot drew flat and front-on. PowerPoint turns the
shape's plane in space and projects it. Fitted black-box to its exports
(a picture with coloured corner markers under every preset and several
rotations; every fit within half a point on a 100 x 75 pt shape): points
about the centre are turned Rz(-rev) Rx(lat) Ry(lon), perspective cameras
then dividing by D / (D - z) with D about 5-16 shape sizes; a:rot turns
the other way about the horizontal and vertical axes. DeckCraft now draws
the shape under the affine transform that best fits its turned corners:
exact for orthographic cameras, within 2% of the size for perspective
ones (an affine map can't foreshorten). Oblique cameras leave a flat
shape as it is; depth (extrusion) is not drawn.

Wild synthetic set: camera presets 15.02 -> 6.35, 3-D picture styles
16.00 -> 7.72, extruded cameras 21.41 -> 19.74.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 4e2cbaed79 Geom: moon, magnetic disk and drum by the standard
- The magnetic disk's and drum's end ellipses were half the size of
  PowerPoint's: ECMA-376 makes them h/6 high (disk) and w/6 across
  (drum); measured on PowerPoint's outlines.
- The moon's inner edge was a half ellipse of the box's height; the
  standard's is an arc of a larger ellipse through the right corners and
  (adj * w, middle) whose centre lies right of that point (radius g18w
  across, dy1 down), and so it is fuller. Text rectangle from the standard
  too.

Wild synthetic set: preset galleries 3.76 -> 3.47, 3.45 -> 3.21,
4.31 -> 4.00 and others slightly.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 ee71879f80 Render: pictures reflect their pixels
A reflection on a picture (PowerPoint's "reflected" picture styles) drew
nothing: the reflection painted the shape's fill, and a picture has none.
It now mirrors the picture itself, clipped to its outline, under the same
fade.

Wild synthetic set: picture effects slide 16.77 -> 16.00 (the rest is
3-D camera rotation, not modelled).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 7cb62d5197 Pptx/Render: picture fills with rotWithShape=0 stay upright
A shape's picture fill marked not to rotate with the shape turned and
flipped with it (rotWithShape was neither kept nor written: always 1).
PowerPoint keeps such a picture upright, stretched (or tiled) over the
box the rotated shape covers on the slide and clipped to the shape. Now
read, written (PictureFill::upright) and drawn so.

Wild synthetic set: picture fills on rotated/flipped shapes 12.89 ->
3.87.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 c0dcfc1db5 Geom: stars stretched by the standard's hf/vf factors
Five-, six-, seven- and ten-pointed stars used their own normalisation
and came out narrower or shifted against PowerPoint's. ECMA-376 places a
star's points on an ellipse around (hc, vc * vf) with radii half the box
times hf / vf (star5 1.05146 / 1.10557, star6 1.15470, star7 1.02572 /
1.05210, star10 1.05146), so the points touch the box's edges; now done
for all stars (checked exactly against PowerPoint's outlines at three
sizes and inner-radius adjusts).

Wild synthetic set: star galleries 4.08 -> 3.76, 3.77 -> 3.45,
4.62 -> 4.31 and the adjust galleries slightly.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 9238a915a2 Render: presets PowerPoint mitres by default get sharp corners; miter limit 8
An outline naming no join was always rounded. PowerPoint rounds most
presets but mitres some by default: classified per preset by comparing
its export (8 pt outline, no join) with round- and miter-joined renders:
the plus, right/up/down block arrows (not the left one), chevrons, stars
from five points up, the equation shapes, curved ribbons and the action
buttons. Miter joins also take PowerPoint's default limit of 8 widths
(kurbo's default was 4), so sharp star points no longer bevel off.

Wild synthetic set: joins slide 0.43 -> 0.21, outline-on-pattern slide
3.95 -> 3.76, preset galleries slightly better.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 2e68e54eec Render: gradients with rotWithShape=0 keep to the slide's axes
A gradient fill marked not to rotate with its shape turned and flipped
with it anyway. PowerPoint lays such a gradient out upright, over the box
the rotated or flipped shape covers on the slide (a 90 degree gradient on
a quarter-turned triangle still runs top to bottom). Linear and radial
gradients now do; rect and outline path gradients still follow the shape.

Wild synthetic set: gradients on rotated/flipped shapes 5.48 -> 1.34,
gradient angles slide 6.75 -> 1.95.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 239e41bdf6 Render: a picture's shadow covers the whole picture
The shadow of a picture is the picture recoloured to the shadow colour,
but drawing the picture left its pixel-space transform set, so the
recolouring rectangle (sized in points) covered only part of a picture
whose bitmap is bigger than it is shown: a 400 px photo at 240 pt cast a
shadow of its top-left corner only. The shape's transform is restored
before recolouring.

Wild synthetic set: framed pictures with shadows 7.67 -> 5.95, rotated
picture with a shadow 10.67 -> 10.07.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 cef6e1a8c8 Render: table borders draw their dashes, compound bands and diagonals
Explicit cell borders were stroked as plain solid lines (no dash, compound
or cap), and diagonal borders (lnTlToBr, lnBlToTr) were read but never
drawn. Both now go through the shape line stroker; diagonals are drawn
under the cell edges.

Wild synthetic set: border styles slide 5.67 -> 2.26, thick merged-cell
borders 1.20 -> 0.69.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 9d4541b8b4 Render: bevelled shapes lit like PowerPoint's default 3-D light (approximation)
A shape with a top bevel seen through a 3-D scene drew flat. Fitted to
PowerPoint's export of the bevel presets on a solid fill with the default
three-point light rig and matte material, DeckCraft now lights the face
and a band as wide as the bevel inside the outline as surfaces: Lambert
light from the upper left (azimuth 240, 45 degrees up), c * (0.453 +
0.731 * n.L) + 14.7 per channel, the band's normal tilting outwards by
the profile's slope (quarter circle by default, straight for angle).
Within about 15 grey levels RMS of PowerPoint on the circle bevel; other
profiles use the circle's, pictures get light and dark veils, and other
light rigs and materials (and anything without a scene) stay flat.

Wild synthetic set: bevel presets slide 5.20 -> 2.48, materials/rigs
13.25 -> 12.73.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 46dfb23dc5 Render: outline (shape) path gradients from an off-shape focus or a focus box
A "shape" path gradient with its focus off the shape (fillToRect on a
corner of an ellipse's box) filled solid with its last colour: the
position came from the nearest crossing of the ray from the focus with
the outline, and rays from outside cross it twice or miss. The contours
are the outline scaled about the focus, which a point first reaches at
the ray's farthest crossing; that is now used. A focus rectangle (rather
than a point) is the first colour throughout, with the colour running from
its edge to the outline, as PowerPoint draws it.

Wild synthetic set: shape path gradients 18.95 -> 3.54.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 675d20417e Pictures: black and white, inverted alpha, and PowerPoint's grey weights
- a:biLevel (Color > Black and White) was ignored. It is now read, written
  and drawn: white where the luminance reaches the threshold, else black
  (observed thresholds at 30/50/70% on colour swatches).
- a:alphaInv was ignored; an opaque picture with it is invisible in
  PowerPoint. Now read, written and drawn.
- Grayscale, duotone and saturation weighed channels 0.299/0.587/0.114;
  PowerPoint's export greys pure red to 54 and green to 182: Rec. 709
  weights (0.2126/0.7152/0.0722).

Wild synthetic set: recolour slide 7.60 -> 1.15, picture corrections
13.36 -> 7.36.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 754841aaa4 Pptx: a table naming no style reads as the table grid style
A table whose tblPr names no tableStyleId drew without any lines.
PowerPoint draws such a table with thin dark grid lines (as its "No Style,
Table Grid"); observed on a synthetic deck with and without the explicit
"No Style, No Grid" GUID. Such tables now read as the grid style.

Wild synthetic set: tables with cell margins/fills/styles 4.80 -> 2.82,
11.28 -> 10.15, 6.86 -> 3.16.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 bf877411fb Render: picture brightness with contrast as PowerPoint combines them
Brightness was added after the contrast stretch. Measured on PowerPoint's
export of grey ramps (5 x 5 grid of -80..80% brightness and contrast):
contrast scales about mid-grey (x(1+c) below zero, /(1-c) above) and
brightness adds b * 255 scaled by (1 + cf) / 2, half before the stretch
and half after; +40% brightness with +40% contrast maps black to 54, not
17. DeckCraft now matches the 25 ramps within 5 grey levels.

Wild synthetic set: brightness/contrast grid 15.93 -> 13.36, recolour
slide 8.74 -> 7.60.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 3b04dd14be Render: pictures with opposite corrections no longer share decoded pixels
The decoded-picture cache keyed adjustments with an xor-multiply mix in
which brightness b, contrast c and -b, -c collide (the sign bits cancel),
so of two copies of a picture, one +40% bright and contrast and one -40%,
both showed whichever was decoded first. The key is now a real hash.

Wild synthetic set: brightness/contrast grid 27.86 -> 15.93.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00
Brandon ThomasandClaude Opus 5.5 772abb2154 Render: pattern fills blend neighbouring cells between whole-pixel sizes
Pattern tiles were sampled nearest-cell, exact when a pattern cell
(0.75 pt) is a whole number of output pixels (a 960-wide export of a
720 pt slide) but harsh otherwise: at 960 px for a 960 pt slide (0.75 px
per cell) PowerPoint shows greys where a pixel straddles two cells, and
DeckCraft showed only the two colours, in different places. The tile is
now sampled bilinearly. Fitted against PowerPoint's export of all 54
presets at 0.75 px per cell: mean error 0.067 (bilinear) against 0.082
(nearest) and 0.095 (area average); still not exact (narVert reads
255/128/0 in PowerPoint, 213/128/42 here). Unchanged at whole-pixel sizes.

Wild synthetic set: patterned backgrounds 21.15 -> 11.31 and
18.00 -> 9.75, pattern galleries 22.50 -> 19.44 and 13.96 -> 11.64.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 08:16:41 -04:00