Class: Google::Apis::SheetsV4::OverlayPosition

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

Overview

The location an object is overlaid on top of a grid.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ OverlayPosition

Returns a new instance of OverlayPosition.



7264
7265
7266
# File 'lib/google/apis/sheets_v4/classes.rb', line 7264

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

Instance Attribute Details

#anchor_cellGoogle::Apis::SheetsV4::GridCoordinate

A coordinate in a sheet. All indexes are zero-based. Corresponds to the JSON property anchorCell



7241
7242
7243
# File 'lib/google/apis/sheets_v4/classes.rb', line 7241

def anchor_cell
  @anchor_cell
end

#height_pixelsFixnum

The height of the object, in pixels. Defaults to 371. Corresponds to the JSON property heightPixels

Returns:

  • (Fixnum)


7246
7247
7248
# File 'lib/google/apis/sheets_v4/classes.rb', line 7246

def height_pixels
  @height_pixels
end

#offset_x_pixelsFixnum

The horizontal offset, in pixels, that the object is offset from the anchor cell. Corresponds to the JSON property offsetXPixels

Returns:

  • (Fixnum)


7252
7253
7254
# File 'lib/google/apis/sheets_v4/classes.rb', line 7252

def offset_x_pixels
  @offset_x_pixels
end

#offset_y_pixelsFixnum

The vertical offset, in pixels, that the object is offset from the anchor cell. Corresponds to the JSON property offsetYPixels

Returns:

  • (Fixnum)


7257
7258
7259
# File 'lib/google/apis/sheets_v4/classes.rb', line 7257

def offset_y_pixels
  @offset_y_pixels
end

#width_pixelsFixnum

The width of the object, in pixels. Defaults to 600. Corresponds to the JSON property widthPixels

Returns:

  • (Fixnum)


7262
7263
7264
# File 'lib/google/apis/sheets_v4/classes.rb', line 7262

def width_pixels
  @width_pixels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7269
7270
7271
7272
7273
7274
7275
# File 'lib/google/apis/sheets_v4/classes.rb', line 7269

def update!(**args)
  @anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell)
  @height_pixels = args[:height_pixels] if args.key?(:height_pixels)
  @offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels)
  @offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels)
  @width_pixels = args[:width_pixels] if args.key?(:width_pixels)
end