Class: Tesseract::Engine::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/tesseract/engine/bounding_box.rb

Instance Method Summary collapse

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

#heightObject



45
46
47
# File 'lib/tesseract/engine/bounding_box.rb', line 45

def height
	bottom - top
end

#inspectObject



49
50
51
# File 'lib/tesseract/engine/bounding_box.rb', line 49

def inspect
	"#<BoundingBox(#{x}, #{y}): #{width}x#{height}>"
end

#widthObject



41
42
43
# File 'lib/tesseract/engine/bounding_box.rb', line 41

def width
	right - left
end