Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified resources/images/rasterx-function-categories.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions resources/images/rasterx-function-categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
# resources/images/rasterx-function-categories.svg (portrait, 2-col)
# resources/images/rasterx-function-categories_landscape.svg (landscape, 3-col)

Rasterize portrait PNG (used by docs/packages/rasterx.mdx):
Rasterize portrait PNG (used by docs/packages/rasterx.mdx + docs/api/raster-functions.mdx).
The height MUST match the "portrait canvas" the script prints — it grows as functions
are added, and a too-short window clips the bottom cards (e.g. Vector-Raster Bridge):
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \\
--headless --disable-gpu --hide-scrollbars \\
--force-device-scale-factor=2 --window-size=1416,1100 \\
--force-device-scale-factor=2 --window-size=1416,<portrait_height> \\
--screenshot=resources/images/rasterx-function-categories.png \\
resources/images/rasterx-function-categories.svg

Expand Down Expand Up @@ -539,6 +541,9 @@ def render_landscape():
with open(out_portrait, "w") as f:
f.write(render())
print(f"wrote {out_portrait}")
portrait_h = PAD + TITLE_BLOCK_H + max(column_height(CARDS_LEFT), column_height(CARDS_RIGHT)) + PAD
print(f"portrait canvas: {CANVAS_W} x {portrait_h} "
f"(use --window-size={CANVAS_W},{portrait_h} for Chrome — it grows as functions are added)")

# Landscape (always next to portrait)
landscape_svg, landscape_h = render_landscape()
Expand Down
Loading