Class: Google::Apis::VectortileV1::Vertex2DList
- Inherits:
-
Object
- Object
- Google::Apis::VectortileV1::Vertex2DList
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/vectortile_v1/classes.rb,
lib/google/apis/vectortile_v1/representations.rb,
lib/google/apis/vectortile_v1/representations.rb more...
Overview
2D vertex list used for lines and areas. Each entry represents an offset from the previous one in local tile coordinates. The first entry is offset from (0, 0). For example, the list of vertices [(1,1), (2, 2), (1, 2)] would be encoded in vertex offsets as [(1, 1), (1, 1), (-1, 0)].
Instance Attribute Summary collapse
-
#x_offsets ⇒ Array<Fixnum>
List of x-offsets in local tile coordinates.
-
#y_offsets ⇒ Array<Fixnum>
List of y-offsets in local tile coordinates.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Vertex2DList
constructor
A new instance of Vertex2DList.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Vertex2DList
Returns a new instance of Vertex2DList.
814 815 816 |
# File 'lib/google/apis/vectortile_v1/classes.rb', line 814 def initialize(**args) update!(**args) end |
Instance Attribute Details
#x_offsets ⇒ Array<Fixnum>
List of x-offsets in local tile coordinates.
Corresponds to the JSON property xOffsets
807 808 809 |
# File 'lib/google/apis/vectortile_v1/classes.rb', line 807 def x_offsets @x_offsets end |
#y_offsets ⇒ Array<Fixnum>
List of y-offsets in local tile coordinates.
Corresponds to the JSON property yOffsets
812 813 814 |
# File 'lib/google/apis/vectortile_v1/classes.rb', line 812 def y_offsets @y_offsets end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
819 820 821 822 |
# File 'lib/google/apis/vectortile_v1/classes.rb', line 819 def update!(**args) @x_offsets = args[:x_offsets] if args.key?(:x_offsets) @y_offsets = args[:y_offsets] if args.key?(:y_offsets) end |