package toffee

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Geometry.Absolute_axisSource

Absolute horizontal and vertical axis representation.

This module provides a simple representation of the two absolute geometric axes in 2D space: horizontal (x-axis) and vertical (y-axis). Unlike abstract axes which depend on writing mode, absolute axes have fixed orientation.

Absolute axes are used throughout the layout engine to index into geometric primitives like Size, Rect, and Point in a direction-agnostic way.

Sourcetype t =
  1. | Horizontal
    (*

    The horizontal axis (x-axis)

    *)
  2. | Vertical
    (*

    The vertical axis (y-axis)

    *)
Sourceval other : t -> t

other axis returns the perpendicular axis. Useful for iterating over both axes or selecting the cross-axis in layout computations.