Class: Google::Apis::DriveV3::Drive::BackgroundImageFile
- Inherits:
-
Object
- Object
- Google::Apis::DriveV3::Drive::BackgroundImageFile
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/drive_v3/classes.rb,
lib/google/apis/drive_v3/representations.rb,
lib/google/apis/drive_v3/representations.rb
Overview
An image file and cropping parameters from which a background image for this
shared drive is set. This is a write only field; it can only be set on drive.
drives.update
requests that don't set themeId
. When specified, all fields
of the backgroundImageFile
must be set.
Instance Attribute Summary collapse
-
#id ⇒ String
The ID of an image file in Google Drive to use for the background image.
-
#width ⇒ Float
The width of the cropped image in the closed range of 0 to 1.
-
#x_coordinate ⇒ Float
The X coordinate of the upper left corner of the cropping area in the background image.
-
#y_coordinate ⇒ Float
The Y coordinate of the upper left corner of the cropping area in the background image.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BackgroundImageFile
constructor
A new instance of BackgroundImageFile.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BackgroundImageFile
Returns a new instance of BackgroundImageFile.
1136 1137 1138 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1136 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
The ID of an image file in Google Drive to use for the background image.
Corresponds to the JSON property id
1109 1110 1111 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1109 def id @id end |
#width ⇒ Float
The width of the cropped image in the closed range of 0 to 1. This value
represents the width of the cropped image divided by the width of the entire
image. The height is computed by applying a width to height aspect ratio of 80
to 9. The resulting image must be at least 1280 pixels wide and 144 pixels
high.
Corresponds to the JSON property width
1118 1119 1120 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1118 def width @width end |
#x_coordinate ⇒ Float
The X coordinate of the upper left corner of the cropping area in the
background image. This is a value in the closed range of 0 to 1. This value
represents the horizontal distance from the left side of the entire image to
the left side of the cropping area divided by the width of the entire image.
Corresponds to the JSON property xCoordinate
1126 1127 1128 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1126 def x_coordinate @x_coordinate end |
#y_coordinate ⇒ Float
The Y coordinate of the upper left corner of the cropping area in the
background image. This is a value in the closed range of 0 to 1. This value
represents the vertical distance from the top side of the entire image to the
top side of the cropping area divided by the height of the entire image.
Corresponds to the JSON property yCoordinate
1134 1135 1136 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1134 def y_coordinate @y_coordinate end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1141 1142 1143 1144 1145 1146 |
# File 'lib/google/apis/drive_v3/classes.rb', line 1141 def update!(**args) @id = args[:id] if args.key?(:id) @width = args[:width] if args.key?(:width) @x_coordinate = args[:x_coordinate] if args.key?(:x_coordinate) @y_coordinate = args[:y_coordinate] if args.key?(:y_coordinate) end |