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
    }
    


1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
# File 'proto_docs/google/apps/card/v1/card.rb', line 1784

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.



1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
# File 'proto_docs/google/apps/card/v1/card.rb', line 1784

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