api/internal/canvas/campaign_canvas_scale library

Constants

maxCampaignCanvasUpscale → const double

Functions

campaignCanvasDesignScale({required double viewportWidth, required double designWidth, bool fullWidth = false}) double
Converts authored logical pixels into runtime pixels for any campaign surface. Full-width surfaces may grow with the viewport; floating surfaces have a modest upscale cap so they do not become disproportionately large.
campaignCanvasFitScale({required double authoredWidth, required double authoredHeight, required double designScale, required double availableWidth, required double availableHeight}) double
Applies uniform emergency scaling when an authored canvas does not fit the runtime bounds. Positioning remains the responsibility of the surface host.