class AmazonTRP::Geometry

Attributes

boundingBox[R]
polygon[R]

Public Class Methods

new(geometry) click to toggle source
# File lib/amazon-textract-parser-ruby.rb, line 57
def initialize(geometry)
  bbox = geometry[:bounding_box]
  pg = geometry[:polygon]
  @boundingBox = BoundingBox.new(bbox[:width], bbox[:height], bbox[:left], bbox[:top])
  @polygon = pg.map{|p| Point.new(p[:x], p[:y])}
end

Public Instance Methods

to_s() click to toggle source
# File lib/amazon-textract-parser-ruby.rb, line 64
def to_s
  "BoundingBox: #{@bounding_box}"
end