Skip to content

Struct QAccelPlot::AxisMapping

ClassList > QAccelPlot > AxisMapping

Snapshot of an axis viewport that maps between data values and pixel positions. More...

  • #include <AxisMapping.hpp>

Public Attributes

Type Name
bool flipped = {false}
Whether pixel positions grow against data values, as on vertical axes.
bool logarithmic = {false}
Whether values are mapped through log10 .
double origin = {0.0}
Viewport minimum in mapped space: log10 on logarithmic axes.
double span = {1.0}
Viewport extent in mapped space; negative for an inverted viewport.
bool valid = {false}
False for a collapsed, nonfinite, or nonpositive logarithmic viewport.

Public Functions

Type Name
double toCoord (double pixel, double length) noexcept const
Maps a pixel position along an axis of__length pixels back to a data-space value.
double toMapped (double value) noexcept const
Returns value in mapped space.
double toPixel (double value, double length) noexcept const
Maps a data-space value to a pixel position along an axis of__length pixels.

Detailed Description

Obtained from Axis::mapping(). It is the single implementation of the axis mapping, shared by Axis::coordToPixel(), Axis::pixelToCoord(), and the inspection queries.

Public Attributes Documentation

variable flipped

Whether pixel positions grow against data values, as on vertical axes.

bool QAccelPlot::AxisMapping::flipped;


variable logarithmic

Whether values are mapped through log10 .

bool QAccelPlot::AxisMapping::logarithmic;


variable origin

Viewport minimum in mapped space: log10 on logarithmic axes.

double QAccelPlot::AxisMapping::origin;


variable span

Viewport extent in mapped space; negative for an inverted viewport.

double QAccelPlot::AxisMapping::span;


variable valid

False for a collapsed, nonfinite, or nonpositive logarithmic viewport.

bool QAccelPlot::AxisMapping::valid;


Public Functions Documentation

function toCoord

Maps a pixel position along an axis of__length pixels back to a data-space value.

double QAccelPlot::AxisMapping::toCoord (
    double pixel,
    double length
) noexcept const


function toMapped

Returns value in mapped space.

double QAccelPlot::AxisMapping::toMapped (
    double value
) noexcept const


function toPixel

Maps a data-space value to a pixel position along an axis of__length pixels.

double QAccelPlot::AxisMapping::toPixel (
    double value,
    double length
) noexcept const



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/axis/AxisMapping.hpp