Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Card::V1::ImageCropStyle.
Represents the crop style applied to an image.
Google Workspace Add-ons and Chat apps:
For example, here's how to apply a 16:9 aspect ratio:
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#aspect_ratio
def aspect_ratio() -> ::Float
-
(::Float) — The aspect ratio to use if the crop type is
RECTANGLE_CUSTOM
.For example, here's how to apply a 16:9 aspect ratio:
cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 }
#aspect_ratio=
def aspect_ratio=(value) -> ::Float
-
value (::Float) — The aspect ratio to use if the crop type is
RECTANGLE_CUSTOM
.For example, here's how to apply a 16:9 aspect ratio:
cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 }
-
(::Float) — The aspect ratio to use if the crop type is
RECTANGLE_CUSTOM
.For example, here's how to apply a 16:9 aspect ratio:
cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 }
#type
def type() -> ::Google::Apps::Card::V1::ImageCropStyle::ImageCropType
- (::Google::Apps::Card::V1::ImageCropStyle::ImageCropType) — The crop type.
#type=
def type=(value) -> ::Google::Apps::Card::V1::ImageCropStyle::ImageCropType
- value (::Google::Apps::Card::V1::ImageCropStyle::ImageCropType) — The crop type.
- (::Google::Apps::Card::V1::ImageCropStyle::ImageCropType) — The crop type.