Enum ImageStyle
圖片樣式
定義圖片裁剪樣式的列舉。
如要呼叫列舉,請呼叫其父項類別、名稱和屬性。例如
CardService.ImageStyle.SQUARE
。
屬性
屬性 | 類型 | 說明 |
SQUARE | Enum | 不裁剪。預設值。 |
CIRCLE | Enum | 裁剪成圓形。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-02 (世界標準時間)。
[null,null,["上次更新時間:2024-12-02 (世界標準時間)。"],[[["`ImageStyle` is an enum used to define how an image will be cropped within a card."],["There are two cropping options: `SQUARE` (default, no cropping) and `CIRCLE` (crops the image into a circle)."],["To use an `ImageStyle`, call it using the format `CardService.ImageStyle.PROPERTY`, for example, `CardService.ImageStyle.SQUARE`."]]],["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"]]