Class: Tesseract::Engine::BoundingBox
- Inherits:
-
Object
- Object
- Tesseract::Engine::BoundingBox
- Defined in:
- lib/tesseract/engine/bounding_box.rb
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(struct) ⇒ BoundingBox
constructor
A new instance of BoundingBox.
- #inspect ⇒ Object
- #width ⇒ Object
Constructor Details
#initialize(struct) ⇒ BoundingBox
Returns a new instance of BoundingBox.
28 29 30 |
# File 'lib/tesseract/engine/bounding_box.rb', line 28 def initialize (struct) @internal = struct end |
Instance Method Details
#height ⇒ Object
45 46 47 |
# File 'lib/tesseract/engine/bounding_box.rb', line 45 def height bottom - top end |
#inspect ⇒ Object
49 50 51 |
# File 'lib/tesseract/engine/bounding_box.rb', line 49 def inspect "#<BoundingBox(#{x}, #{y}): #{width}x#{height}>" end |
#width ⇒ Object
41 42 43 |
# File 'lib/tesseract/engine/bounding_box.rb', line 41 def width right - left end |