Module Byo_toplayer.Anchor

type t
val sexp_of_t : t -> Sexplib0.Sexp.t
val of_bounding_box : relative_to:[ `Viewport | `Document ] -> top:float -> left:float -> bottom:float -> right:float -> t

top, bottom, and left, right are the # of pixels down and right from the top left corner to form the (top, bottom), and (left, right) borders of the virtual bounding box.

relative_to defaults to `Viewport, and determines whether the coordinates you provide should be in terms of "Client" or "Page" coordinate systems: https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_view/Coordinate_systems

val of_coordinate : relative_to:[ `Viewport | `Document ] -> x:float -> y:float -> t

x and y are the # of pixels right/down from the top left corner.

relative_to determines whether the coordinates you provide should be in terms of viewport/"Client" or document/"Page" coordinate systems: https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_view/Coordinate_systems