Harlock.Layout.Rect (harlock v0.2.0)

Copy Markdown View Source

A rectangle in cell coordinates, returned by Harlock.Layout.split/3.

(row, col) is the top-left corner; w spans cols rightward, h spans rows downward. All values are non-negative integers; an empty rect has w == 0 or h == 0.

Summary

Types

t()

@type t() :: %Harlock.Layout.Rect{
  col: non_neg_integer(),
  h: non_neg_integer(),
  row: non_neg_integer(),
  w: non_neg_integer()
}

Functions

empty?(rect)

@spec empty?(t()) :: boolean()

new(row, col, w, h)