Expand description
Render endpoints: start a render job, persist it to the library, and
return its id. The same UUID is used for the in-memory JobStore and the
saved_renders row, so the existing /api/render/{id}/* endpoints
(live SSE / in-memory image) and the new /api/renders/{id}/* endpoints
(persisted) address the same render.
Structs§
- GlwPreview
Request - Body of
POST /api/render/glw-preview(JSON). - GlwRender
Options - Per-render GLW configuration accepted by both render endpoints.
- GlwStyle
Overrides - Optional per-element style overrides for the GLW overlay. All
hex-colour strings are validated server-side via
parse_color. Absent fields fall back tosl_glw::GlwStyle::default. - Grid
Rectangle Request - Body of
POST /api/render/grid-rectangle(JSON). - Group
Dto - The combined free rectangle for one user-defined slot group (two or more slots joined together), so the client can draw and fit-check it.
- Logo
Placement - A logo image to composite into one of the nine placement slots, drawn at its native pixel size (optionally integer-doubled) and aligned within the slot’s free rectangle like a text label.
- Notecard
Summary - Minimal notecard descriptor included in
StartedResponseso the UI can update its notecard dropdown in place when the backend copied the source notecard into a new scope. - Pixel
Rect Dto - An axis-aligned rectangle in image pixel coordinates (origin top-left).
- Placement
Slots Response - Response shape for the
placement-slotsendpoints. - Region
Overlay Preview Request - Body of
POST /api/render/region-overlay-preview(JSON). - Route
Preview Request - Body of
POST /api/render/route-preview(JSON). - Route
Preview Waypoint - One already-resolved route waypoint in a
RoutePreviewRequest. The region has already been resolved to grid coordinates by the client’s/api/notecard/derive-rectanglecall, so the preview endpoint needs no region lookup (no DB / network). Mirrors the fields ofcrate::routes::notecards’sResolvedWaypoint;zis irrelevant to the pixel mapping and is omitted. - Saved
Grid Rectangle Settings - Persisted form fields for a grid-rectangle render.
- Saved
UsbNotecard Settings - Persisted form fields for a USB-notecard render.
- SlotDto
- One of the nine candidate placement slots and how much free space it has.
- Started
Response - Response shape for both render endpoints.
- Text
Label - A free-floating text label to draw in one of the nine placement slots. Independent of the GLW overlay (labels can be added to any render).
Enums§
- GlwSource
- Where a render’s GLW overlay should come from.
- Output
Format - Output format for the rendered image.
- Saved
Render Settings - Settings JSON stored in
saved_renders.settings_json. Designed to be fed back into the form for “Regenerate”.
Functions§
- free_
placement_ slots_ grid_ rectangle POST /api/render/placement-slots/grid-rectangle— report the free placement slots for an explicit-corner render (optional GLW overlay), with no route. Read-only: nothing is persisted.- free_
placement_ slots_ usb_ notecard POST /api/render/placement-slots/usb-notecard— report the free placement slots for a notecard render (route + optional GLW overlay). Read-only: the notecard is parsed/loaded but never copied or persisted, and no GLW row is inserted.- glw_
legend_ preview POST /api/render/glw-legend-preview— rasterise just the GLW base legend onto a transparent image the size of the final render, so the client-side preview can drop it into the final-image bounds rectangle and show the legend exactly where — and at the size — the final render will place it.- glw_
preview POST /api/render/glw-preview— rasterise just the GLW overlay onto a transparent image matching the final-image bounds, so the client-side preview can composite it over the map tiles. Read-only: nothing is persisted (nosaved_glw_datarow is inserted).- grid_
rectangle POST /api/render/grid-rectangle— start a render from explicit corners.- placement_
preview_ grid_ rectangle POST /api/render/placement-preview/grid-rectangle— rasterise the text labels and logos of an explicit-corner render onto a transparent PNG at the final-image resolution, so the client preview can composite them into the bounds rectangle exactly where the final render will place them. Free space is measured on an overlay-only map (GLW shapes; no route on this path), as the real render does. Read-only: nothing is persisted.- placement_
preview_ usb_ notecard POST /api/render/placement-preview/usb-notecard— same asplacement_preview_grid_rectanglebut for a notecard render: free space is measured on an overlay-only map carrying the route plus the GLW shapes. Read-only: the notecard is parsed/loaded but never copied or persisted.- region_
overlay_ preview POST /api/render/region-overlay-preview— rasterise the optional per-region annotation overlay (rectangles, names, grid coordinates) onto a transparent image at the final-image resolution, so the client-side preview can composite it into the bounds rectangle exactly where — and gated exactly as — the final render draws it. Read-only: nothing is persisted (region names are resolved through the shared cache only).- route_
preview POST /api/render/route-preview— rasterise just the route onto a transparent image at the final-image resolution, so the client-side preview can composite it over the map tiles exactly as the real render draws it. Read-only: nothing is persisted.- usb_
notecard POST /api/render/usb-notecard— start a render from a notecard.