/** * TrueType rounding functions * * These implement the various rounding modes used by the interpreter. */ import { type F26Dot6, type GraphicsState } from "./types.ts"; /** * Round to grid (nearest integer pixel) */ export declare function roundToGrid(distance: F26Dot6, compensation: F26Dot6): F26Dot6; /** * Round to half grid (nearest half pixel) */ export declare function roundToHalfGrid(distance: F26Dot6, compensation: F26Dot6): F26Dot6; /** * Round to double grid (nearest half pixel boundary) */ export declare function roundToDoubleGrid(distance: F26Dot6, compensation: F26Dot6): F26Dot6; /** * Round down to grid (floor to pixel) */ export declare function roundDownToGrid(distance: F26Dot6, compensation: F26Dot6): F26Dot6; /** * Round up to grid (ceiling to pixel) */ export declare function roundUpToGrid(distance: F26Dot6, compensation: F26Dot6): F26Dot6; /** * No rounding */ export declare function roundOff(distance: F26Dot6, _compensation: F26Dot6): F26Dot6; /** * Super rounding (parametric rounding) */ export declare function roundSuper(distance: F26Dot6, compensation: F26Dot6, GS: GraphicsState): F26Dot6; /** * Super rounding 45 degrees (for diagonal lines) */ export declare function roundSuper45(distance: F26Dot6, compensation: F26Dot6, GS: GraphicsState): F26Dot6; /** * Apply current rounding mode */ export declare function round(distance: F26Dot6, compensation: F26Dot6, GS: GraphicsState): F26Dot6; /** * Parse SROUND/S45ROUND selector byte */ export declare function parseSuperRound(selector: number, GS: GraphicsState): void; /** * Compensate distance for engine characteristics * Used with ROUND and movement instructions */ export declare function compensate(_distance: F26Dot6, _GS: GraphicsState): F26Dot6;