pub enum RoundMode {
Grid,
HalfGrid,
DoubleGrid,
DownToGrid,
UpToGrid,
Off,
Super,
Super45,
}Expand description
Rounding strategies supported by the interpreter.
Variants§
Grid
Distances are rounded to the closest grid line.
Set by RTG instruction.
HalfGrid
Distances are rounded to the nearest half grid line.
Set by RTHG instruction.
DoubleGrid
Distances are rounded to the closest half or integer pixel.
Set by RTDG instruction.
DownToGrid
Distances are rounded down to the closest integer grid line.
Set by RDTG instruction.
UpToGrid
Distances are rounded up to the closest integer pixel boundary.
Set by RUTG instruction.
Off
Rounding is turned off.
Set by ROFF instruction.
Super
Allows fine control over the effects of the round state variable by allowing you to set the values of three components of the round_state: period, phase, and threshold.
More formally, maps the domain of 26.6 fixed point numbers into a set of discrete values that are separated by equal distances.
Set by SROUND instruction.
Super45
Analogous to Super. The grid period is sqrt(2)/2 pixels rather than 1
pixel. It is useful for measuring at a 45 degree angle with the
coordinate axes.
Set by S45ROUND instruction.