Skip to main content

CorePlotting::TimeAxisParams

CorePlotting::TimeAxisParams

Parameters for time axis coordinate conversions. More…

#include <TimeAxisCoordinates.hpp>

Public Functions

Name
TimeAxisParams() =default
Default constructor.
TimeAxisParams(ClockTicks start, ClockTicks end, int width)
Construct from explicit clock-tick endpoints.
int64_t getTimeSpan() const
Get the time span of the visible range in clock ticks.

Public Attributes

Name
ClockTicks time_start
Start of visible time range (absolute clock ticks).
ClockTicks time_end
End of visible time range (absolute clock ticks).
int viewport_width_px
Canvas width in pixels.

Detailed Description

struct CorePlotting::TimeAxisParams;

Parameters for time axis coordinate conversions.

Bundles information for converting between canvas pixel coordinates and physical time (clock ticks). Endpoints are absolute [ClockTicks](/api_generated/Classes/classClockTicks.md) in the master clock — the same scalar space as [TimeFrame::getTimeAtIndex](/api_generated/Classes/classTimeFrame.md#function-gettimeatindex).

Construct via explicit tick endpoints, or makeTimeAxisParams when the visible window is expressed as master [TimeFrameIndex](/api_generated/Classes/structTimeFrameIndex.md) values.

Public Functions Documentation

function TimeAxisParams

TimeAxisParams() =default

Default constructor.

function TimeAxisParams

inline TimeAxisParams(
    ClockTicks start,
    ClockTicks end,
    int width
)

Construct from explicit clock-tick endpoints.

Parameters:

  • start Start time in absolute clock ticks
  • end End time in absolute clock ticks
  • width Viewport width in pixels

function getTimeSpan

inline int64_t getTimeSpan() const

Get the time span of the visible range in clock ticks.

Return: time_end - time_start

Public Attributes Documentation

variable time_start

ClockTicks time_start {0};

Start of visible time range (absolute clock ticks).

variable time_end

ClockTicks time_end {0};

End of visible time range (absolute clock ticks).

variable viewport_width_px

int viewport_width_px {1};

Canvas width in pixels.


Updated on 2026-11-13 at 20:25:42 +0000