Class: Google::Apis::ContentwarehouseV1::GoogleCloudDocumentaiV1Vertex

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/contentwarehouse_v1/classes.rb,
lib/google/apis/contentwarehouse_v1/representations.rb,
lib/google/apis/contentwarehouse_v1/representations.rb

Overview

A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1Vertex

Returns a new instance of GoogleCloudDocumentaiV1Vertex.



6586
6587
6588
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 6586

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#xFixnum

X coordinate. Corresponds to the JSON property x

Returns:

  • (Fixnum)


6579
6580
6581
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 6579

def x
  @x
end

#yFixnum

Y coordinate (starts from the top of the image). Corresponds to the JSON property y

Returns:

  • (Fixnum)


6584
6585
6586
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 6584

def y
  @y
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6591
6592
6593
6594
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 6591

def update!(**args)
  @x = args[:x] if args.key?(:x)
  @y = args[:y] if args.key?(:y)
end