> ## Documentation Index
> Fetch the complete documentation index at: https://docs.otter-shell.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Types and operations

> Point, Rect, Circle, Padding, Align, and Transform in otter-geo.

All types export from the root module.

## Point

```zig theme={null}
const geo = @import("otter_geo");

const p1 = geo.Point{ .x = 10, .y = 20 };
const p2 = geo.Point{ .x = 5, .y = 10 };
const sum = p1.add(p2);
const bounds = p1.spanningRect(p2);
```

## Rect

```zig theme={null}
const rect = geo.Rect{ .x = 0, .y = 0, .width = 100, .height = 100 };
const centered = rect.center(geo.Point{ .x = 20, .y = 20 });

if (rect.intersection(other)) |inter| {
    _ = inter;
}

if (rect.removePadding(geo.Padding.uniform(10))) |inner| {
    _ = inner;
}
```

Common helpers: `containsPoint`, `containsRect`, `inset`, `offset`, `clipTo`.

## Circle

```zig theme={null}
const circle = geo.Circle.largestCircle(rect);
if (circle.containsPoint(p1)) { }
```

## Padding

Four-sided inset: north, south, east, west. `Padding.uniform(n)` sets all sides.

## Align

`Align` enum: `start`, `center`, `end`. Used by `otter-ui` `LayoutSpec` for child alignment in flex containers.

## Transform

2D rotation and composition with i32 fixed-point matrix math.

```zig theme={null}
const rotated = geo.Transform.rotate_cw;
const combined = geo.Transform.identity.compose(rotated);
```

Use for icon rotation and surface transforms where floats would complicate damage tracking.
