View Source Vivid.Bounds.Of protocol (vivid v0.4.4)
This protocol is used to calculate the bounds of a given shape.
Implement this protocol if you are defining any new shape types.
Summary
Functions
Return the bounds of a Shape as a two element tuple of bottom-left and top-right points.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec bounds(Vivid.Shape.t()) :: {Vivid.Point.t(), Vivid.Point.t()}
Return the bounds of a Shape as a two element tuple of bottom-left and top-right points.