Geometry Types

typedef int16_t PuglCoord

A pixel coordinate within/of a view.

This is used to represent coordinates in two different spaces, depending on context: parent-relative and view-relative.

Parent-relative coordinates of a view are relative to the top-left of the parent it’s embedded in, or to that of a system-specific root. Top-level positions should be between -16000 and 16000.

View-relative coordinates in a view are relative to the top-left of the view.

typedef uint16_t PuglSpan

A pixel span (width or height) within/of a view.

The width and height of a view should be between 1 and 10000.

struct PuglArea

A 2-dimensional size within/of a view.

struct PuglPoint

A 2-dimensional position within/of a view.