• OctoMY API
  • OctoMY API Reference
  • dragnumberformat Namespace
  • dragnumberformat Namespace

    Lays out one DragNumber value on a fixed column grid. More...

    Header: #include <dragnumberformat>
    Since: 1.0

    Functions

    dragnumberformat::Cell layout(double value, int decimals, int fractionColumns, int columns)

    Detailed Description

    The functions here know no widget and no font. A DragNumber measures one column, gives each number a run of whole columns, and asks layout() for the text. Rows that share fractionColumns put their decimal points on one column (vector-drag-number §VND-5, §VND-9).

    See also DragNumber.

    Function Documentation

    dragnumberformat::Cell dragnumberformat::layout(double value, int decimals, int fractionColumns, int columns)

    Lays out value in exactly columns characters.

    decimals is what the parameter shows. fractionColumns is the fraction width of the group, and is raised to decimals when it is smaller. The rules of vector-drag-number §VND-5 apply in order, and the first that fits wins: the point on the point column, then the most decimals that fit right aligned, then 'e' notation, then '#'. NaN and infinity are the words nan, inf and -inf, right aligned.

    \returnthe text, the column of its '.', and the rule that made it.