Restez organisé à l'aide des collections Enregistrez et classez les contenus selon vos préférences.
ImageStyle
Énumération qui définit un style de recadrage d'image.
Pour appeler un énumération, vous devez appeler sa classe parente, son nom et sa propriété. Par exemple, CardService.ImageStyle.SQUARE.
Propriétés
Propriété
Type
Description
SQUARE
Enum
Pas de recadrage. Par défaut.
CIRCLE
Enum
Recadrez l'image en cercle.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/26 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eImageStyle\u003c/code\u003e is an enum used to define how an image will be cropped within a card.\u003c/p\u003e\n"],["\u003cp\u003eThere are two cropping options: \u003ccode\u003eSQUARE\u003c/code\u003e (default, no cropping) and \u003ccode\u003eCIRCLE\u003c/code\u003e (crops the image into a circle).\u003c/p\u003e\n"],["\u003cp\u003eTo use an \u003ccode\u003eImageStyle\u003c/code\u003e, call it using the format \u003ccode\u003eCardService.ImageStyle.PROPERTY\u003c/code\u003e, for example, \u003ccode\u003eCardService.ImageStyle.SQUARE\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `ImageStyle` enum defines image cropping options. It's accessed via `CardService.ImageStyle.PROPERTY`. The available properties are `SQUARE`, which is the default and applies no cropping, and `CIRCLE`, which crops the image into a circular shape. These properties allow control over how images are displayed within a given card service. The type of each property is `Enum`.\n"],null,["# Enum ImageStyle\n\nImageStyle\n\nAn enum that defines an image cropping style.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.ImageStyle.SQUARE`. \n\n### Properties\n\n| Property | Type | Description |\n|----------|--------|-------------------------|\n| `SQUARE` | `Enum` | No cropping. Default. |\n| `CIRCLE` | `Enum` | Crop to a circle shape. |"]]