mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-28 12:36:56 -06:00
Format: Pattern fill shows a gallery of every preset with Foreground and Background colors
Format Shape's Pattern fill set 25 % in accent 1 on background 1 and offered no way to change it, and Format Background listed 10 of the 54 presets by their XML names. Both panes now show the same editor: a gallery of the 54 DrawingML presets drawn in the fill's own colors, each named in words, and Foreground and Background color menus. With a pattern fill, Format Shape no longer shows the solid-fill Color button, which replaced the pattern with a solid fill, or the Transparency slider, which did not change a pattern. The renderer exports the preset list and tiles for the gallery to draw.
This commit is contained in:
@@ -71,6 +71,11 @@ const TILES: &[(&str, [u8; 8])] = &[
|
||||
("zigZag", [0x81, 0x42, 0x24, 0x18, 0x81, 0x42, 0x24, 0x18]),
|
||||
];
|
||||
|
||||
/// Every preset name, in the order of the tiles.
|
||||
pub fn presets() -> impl Iterator<Item = &'static str> {
|
||||
TILES.iter().map(|(n, _)| *n)
|
||||
}
|
||||
|
||||
/// The 8×8 tile of preset `name` (`pct50` for an unknown name).
|
||||
pub fn tile(name: &str) -> [u8; 8] {
|
||||
TILES
|
||||
|
||||
Reference in New Issue
Block a user