///|
/// A floating-point rectangle.
///
/// The Cairo API that consumes the rectangle defines its coordinate space.
pub struct Rectangle {
  x : Double
  y : Double
  width : Double
  height : Double
} derive(Debug, Eq)

///|
/// Creates a rectangle without restricting its origin or dimensions.
pub fn Rectangle::new(
  x : Double,
  y : Double,
  width : Double,
  height : Double,
) -> Rectangle {
  { x, y, width, height }
}

///|
/// Returns `(x, y, width, height)`.
pub fn Rectangle::components(
  self : Rectangle,
) -> (Double, Double, Double, Double) {
  (self.x, self.y, self.width, self.height)
}