package oxbow

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

Module Oxbow_core.RectSource

Sourcetype screen

A screen rect is in output coordinates.

Sourcetype canon

A canon rect is in the axis-swapped canonical space of Xform.

Sourcetype ('a, 'space) tagged = {
  1. x : 'a;
  2. y : 'a;
  3. w : 'a;
  4. h : 'a;
}
Sourcetype 'a t = ('a, screen) tagged
Sourcetype 'a canonical = ('a, canon) tagged

canonical is the rect type of the canonical (left-master) layout space. Xform.pre and Xform.post are the only crossings.

Sourceval to_int : int32 t -> int t

to_int r is r with each field converted by Int32.to_int.

Sourceval to_int32 : int t -> int32 t

to_int32 r is r with each field converted by Int32.of_int.

Sourceval inset : by:int -> int t -> int t

inset ~by r shrinks r by by pixels on every side; width and height floor at 1.

Sourceval contains : x:int32 -> y:int32 -> int32 t -> bool

contains ~x ~y g is true when the point (x, y) lies inside g; the right and bottom edges are exclusive.

Sourceval intersect : int t -> int t -> int t option

intersect a b is the overlapping region of a and b, or None when they are disjoint; touching edges are disjoint.