Class: Google::Apps::Card::V1::ImageCropStyle
- Inherits:
-
Object
- Object
- Google::Apps::Card::V1::ImageCropStyle
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/apps/card/v1/card.rb
Overview
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
}
Defined Under Namespace
Modules: ImageCropType
Instance Attribute Summary collapse
-
#aspect_ratio ⇒ ::Float
The aspect ratio to use if the crop type is
RECTANGLE_CUSTOM. -
#type ⇒ ::Google::Apps::Card::V1::ImageCropStyle::ImageCropType
The crop type.
Instance Attribute Details
#aspect_ratio ⇒ ::Float
Returns 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
}
```.
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1550 class ImageCropStyle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the crop style applied to an image. # # [Google Workspace Add-ons # and Chat apps](https://developers.google.com/workspace/extend): module ImageCropType # Don't use. Unspecified. IMAGE_CROP_TYPE_UNSPECIFIED = 0 # Default value. Applies a square crop. SQUARE = 1 # Applies a circular crop. CIRCLE = 2 # Applies a rectangular crop with a custom aspect ratio. Set the custom # aspect ratio with `aspectRatio`. RECTANGLE_CUSTOM = 3 # Applies a rectangular crop with a 4:3 aspect ratio. RECTANGLE_4_3 = 4 end end |
#type ⇒ ::Google::Apps::Card::V1::ImageCropStyle::ImageCropType
Returns The crop type.
1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 |
# File 'proto_docs/google/apps/card/v1/card.rb', line 1550 class ImageCropStyle include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Represents the crop style applied to an image. # # [Google Workspace Add-ons # and Chat apps](https://developers.google.com/workspace/extend): module ImageCropType # Don't use. Unspecified. IMAGE_CROP_TYPE_UNSPECIFIED = 0 # Default value. Applies a square crop. SQUARE = 1 # Applies a circular crop. CIRCLE = 2 # Applies a rectangular crop with a custom aspect ratio. Set the custom # aspect ratio with `aspectRatio`. RECTANGLE_CUSTOM = 3 # Applies a rectangular crop with a 4:3 aspect ratio. RECTANGLE_4_3 = 4 end end |