TimelineExport.h header
#include <ew/app/TimelineExport.h>
Namespace ew::app
TimelineExportCanvas struct
struct ew::app::TimelineExportCanvas
The pixel size of a timeline export canvas (TL-64 / T7.6): a chosen story span rendered at a chosen resolution, so an author can put a wall-sized timeline on a wall.
Members
int ew::app::TimelineExportCanvas::width = 0
The canvas width in pixels.
int ew::app::TimelineExportCanvas::height = 0
The canvas height in pixels.
bool operator==(const TimelineExportCanvas &, const TimelineExportCanvas &)=default
Defaulted equality comparison.
Functions
TimelineExportCanvas ew::app::timelineExportCanvas(qint64 spanMinutes, double pixelsPerDay, int leftGutter, int topAxis, int laneCount, int laneHeight, int seriesHeight, int bottomMargin, int minPlot, int maxDimension)
Computes the export canvas for a story span at a chosen resolution, CLAMPED so a huge span or a fine resolution can never ask for an unrenderable (out-of-memory) image – "wall-sized" must not become "crash-sized".
spanMinutes is the span's length in (elided) layout minutes; pixelsPerDay the requested horizontal resolution. The plot width is spanDays * pixelsPerDay, clamped to [minPlot, maxDimension - leftGutter]; the total width adds the fixed leftGutter label column. The height is topAxis + laneCount * laneHeight + seriesHeight + bottomMargin, clamped to [1, maxDimension]. Every product and sum is done in 64-bit and clamped before the int cast, so no overflow; a non-positive or non-finite pixelsPerDay or spanMinutes falls back to minPlot. Pure – the widget is not needed to test it.