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
    }
    


1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
# File 'proto_docs/google/apps/card/v1/card.rb', line 1804

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.



1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
# File 'proto_docs/google/apps/card/v1/card.rb', line 1804

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