Class: TencentCloud::Ocr::V20181119::Polygon

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20181119/models.rb

Overview

文本的坐标,以四个顶点坐标表示 注意:此字段可能返回 null,表示取不到有效值

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lefttop = nil, righttop = nil, rightbottom = nil, leftbottom = nil) ⇒ Polygon

Returns a new instance of Polygon.



7869
7870
7871
7872
7873
7874
# File 'lib/v20181119/models.rb', line 7869

def initialize(lefttop=nil, righttop=nil, rightbottom=nil, leftbottom=nil)
  @LeftTop = lefttop
  @RightTop = righttop
  @RightBottom = rightbottom
  @LeftBottom = leftbottom
end

Instance Attribute Details

#LeftBottomObject

Parameters:

  • LeftTop:

    左上顶点坐标

  • RightTop:

    右上顶点坐标

  • RightBottom:

    右下顶点坐标

  • LeftBottom:

    左下顶点坐标



7867
7868
7869
# File 'lib/v20181119/models.rb', line 7867

def LeftBottom
  @LeftBottom
end

#LeftTopObject

Parameters:

  • LeftTop:

    左上顶点坐标

  • RightTop:

    右上顶点坐标

  • RightBottom:

    右下顶点坐标

  • LeftBottom:

    左下顶点坐标



7867
7868
7869
# File 'lib/v20181119/models.rb', line 7867

def LeftTop
  @LeftTop
end

#RightBottomObject

Parameters:

  • LeftTop:

    左上顶点坐标

  • RightTop:

    右上顶点坐标

  • RightBottom:

    右下顶点坐标

  • LeftBottom:

    左下顶点坐标



7867
7868
7869
# File 'lib/v20181119/models.rb', line 7867

def RightBottom
  @RightBottom
end

#RightTopObject

Parameters:

  • LeftTop:

    左上顶点坐标

  • RightTop:

    右上顶点坐标

  • RightBottom:

    右下顶点坐标

  • LeftBottom:

    左下顶点坐标



7867
7868
7869
# File 'lib/v20181119/models.rb', line 7867

def RightTop
  @RightTop
end

Instance Method Details

#deserialize(params) ⇒ Object



7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
# File 'lib/v20181119/models.rb', line 7876

def deserialize(params)
  unless params['LeftTop'].nil?
    @LeftTop = Coord.new
    @LeftTop.deserialize(params['LeftTop'])
  end
  unless params['RightTop'].nil?
    @RightTop = Coord.new
    @RightTop.deserialize(params['RightTop'])
  end
  unless params['RightBottom'].nil?
    @RightBottom = Coord.new
    @RightBottom.deserialize(params['RightBottom'])
  end
  unless params['LeftBottom'].nil?
    @LeftBottom = Coord.new
    @LeftBottom.deserialize(params['LeftBottom'])
  end
end