public final class ImageCropStyle extends GeneratedMessageV3 implements ImageCropStyleOrBuilder
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:
<code><code>
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
</code></code>
Protobuf type google.apps.card.v1.ImageCropStyle
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ASPECT_RATIO_FIELD_NUMBER
public static final int ASPECT_RATIO_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static ImageCropStyle getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static ImageCropStyle.Builder newBuilder()
newBuilder(ImageCropStyle prototype)
public static ImageCropStyle.Builder newBuilder(ImageCropStyle prototype)
public static ImageCropStyle parseDelimitedFrom(InputStream input)
public static ImageCropStyle parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static ImageCropStyle parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static ImageCropStyle parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(CodedInputStream input)
public static ImageCropStyle parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(InputStream input)
public static ImageCropStyle parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static ImageCropStyle parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<ImageCropStyle> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getAspectRatio()
public double getAspectRatio()
The aspect ratio to use if the crop type is RECTANGLE_CUSTOM
.
For example, here's how to apply a 16:9 aspect ratio:
<code><code>
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
</code></code>
double aspect_ratio = 2;
Returns |
Type |
Description |
double |
The aspectRatio.
|
getDefaultInstanceForType()
public ImageCropStyle getDefaultInstanceForType()
getParserForType()
public Parser<ImageCropStyle> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getType()
public ImageCropStyle.ImageCropType getType()
The crop type.
.google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
getTypeValue()
public int getTypeValue()
The crop type.
.google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
Returns |
Type |
Description |
int |
The enum numeric value on the wire for type.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public ImageCropStyle.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ImageCropStyle.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public ImageCropStyle.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides