Class: Kreuzberg::BoundingBox

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/kreuzberg/types.rb

Overview

Bounding box coordinates for element positioning.

Represents rectangular coordinates for an element within a page.

Examples:

bbox = Kreuzberg::BoundingBox.new(
  x0: 10.0,
  y0: 20.0,
  x1: 100.0,
  y1: 50.0
)
puts "Width: #{bbox.x1 - bbox.x0}"