Skip to content

Format Shape: picture or texture fill options - #506

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:format-shape-picfill
Oct 14, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
NikitkaRa:format-shape-picfill

Conversation

@NikitkaRa

Copy link
Copy Markdown
Contributor

Summary

  • shape.fill takes pictureProps to change a picture fill:
    • tile: tile the picture, or stretch it
    • offsetX / offsetY (pt) and scaleX / scaleY: where the tiles sit and how big they are
    • align and mirror: tile alignment and mirror type
    • stretch: offsets for a stretched picture, as [l, t, r, b] fractions
    • rotateWithShape
  • transparency now also sets how opaque a picture fill is.
  • Out-of-range values are clamped. Unknown keywords and non-finite numbers are ignored. If the shape has no picture fill, the options do nothing.
  • Format Shape pane ▸ Fill has a new Picture or texture fill choice. It shows an Insert… button for the picture, a tile checkbox, the offset and scale fields, alignment and mirror lists for tiles, and Rotate with shape.
  • The model, the renderer and the PPTX reader and writer already handled these fields (a:tile, a:stretch/a:fillRect, alphaModFix, rotWithShape), so this PR adds no model or file-format changes. The new test checks that a PPTX save and reopen keeps them.
  • docs/ui-parity.md: updated the Format Shape row.
  • Built on main. It doesn't depend on Format Shape: line compound, cap, join, arrows and sizes; lock aspect ratio #500 or Format Shape: shadow, glow and reflection detail controls #503. The only overlap is the same ui-parity row in Format Shape: shadow, glow and reflection detail controls #503, which may need a one-line conflict fix.

Test plan

  • New engine test shape_picture_fill_options_tile_offset_and_round_trip: stretch offsets, tile options, clamping, transparency, PPTX round trip
  • cargo xtask ci (fmt, clippy, test, assets, layers, wasm) passes

shape.fill gains pictureProps for a picture fill: tile on/off, tile
offset X/Y (pt), scale X/Y, alignment and mirror type, stretch offsets
(left/top/right/bottom), and rotate with shape. `transparency` now also
sets a picture fill's opacity. Values are clamped and unknown keywords or
non-finite numbers ignored. The Fill page of the Format Shape pane gets a
"Picture or texture fill" option with a picture source button and these
controls. The model, renderer and PPTX reader/writer already carry the
fields; a new engine test checks they survive a PPTX save and reopen.

Co-authored-by: Cursor <cursoragent@cursor.com>
@echelon

echelon commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you for this contribution, @NikitkaRa! It has landed on main and will ship in the next DeckCraft release.

If you haven't already, please come join us on Discord: https://discord.gg/artcraft

h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 14, 2026
 #630 #637 #536 #559 #519 #506 #549 #556 #525)

# Conflicts:
#	crates/engine/src/cmd/review.rs
#	crates/engine/src/tests.rs
#	crates/ui-egui/src/dialogs.rs
#	crates/ui-egui/src/panes.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants