Class: Google::Apps::Card::V1::ImageCropStyle

Inherits:
Object
  • Object
show all
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

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
}
```.

Returns:

  • (::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
    }
    


1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
# File 'proto_docs/google/apps/card/v1/card.rb', line 1514

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.



1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
# File 'proto_docs/google/apps/card/v1/card.rb', line 1514

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