Enum ImageCropType
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نوع برش تصویر یک enum که نشان دهنده سبک های برش اعمال شده در اجزای تصویر است.
اگر می خواهید یک استایل برش را روی یک Icon Image
اعمال کنید، فقط می توانید از SQUARE
یا CIRCLE
استفاده کنید.
برای فراخوانی یک enum، کلاس والد، نام و ویژگی آن را فراخوانی می کنید. به عنوان مثال، CardService.ImageCropType.SQUARE
.
خواص
اموال | تایپ کنید | توضیحات |
---|
SQUARE | Enum | سبک برش مربع شکل. |
CIRCLE | Enum | سبک برش دایره ای شکل. |
RECTANGLE_CUSTOM | Enum | سبک برش مستطیلی با نسبت سفارشی. |
RECTANGLE_4_3 | Enum | سبک برش مستطیلی با نسبت 4:3. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eImageCropType\u003c/code\u003e is used to define how images are cropped in Google Apps Script's Card Service.\u003c/p\u003e\n"],["\u003cp\u003eIt offers four crop styles: \u003ccode\u003eSQUARE\u003c/code\u003e, \u003ccode\u003eCIRCLE\u003c/code\u003e, \u003ccode\u003eRECTANGLE_CUSTOM\u003c/code\u003e, and \u003ccode\u003eRECTANGLE_4_3\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen used with \u003ccode\u003eIconImage\u003c/code\u003e, only \u003ccode\u003eSQUARE\u003c/code\u003e and \u003ccode\u003eCIRCLE\u003c/code\u003e crop types are applicable.\u003c/p\u003e\n"],["\u003cp\u003eTo use these crop types, call them using the format: \u003ccode\u003eCardService.ImageCropType.SQUARE\u003c/code\u003e (or your desired style).\u003c/p\u003e\n"]]],["`ImageCropType` is an enum defining image crop styles. Available options include `SQUARE`, `CIRCLE`, `RECTANGLE_CUSTOM` (custom ratio), and `RECTANGLE_4_3` (4:3 ratio). When applying crop styles to `IconImage`, only `SQUARE` or `CIRCLE` can be used. To utilize a specific crop type call its parent class `CardService` along with its name and property. e.g: `CardService.ImageCropType.SQUARE`.\n"],null,["# Enum ImageCropType\n\nImageCropType\n\nAn enum that represents the crop styles applied to image components.\n\nIf you want to apply a crop style to an [IconImage](/apps-script/reference/card-service/icon-image), you can only use `SQUARE\n` or `CIRCLE`.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.ImageCropType.SQUARE`. \n\n### Properties\n\n| Property | Type | Description |\n|--------------------|--------|-----------------------------------------------|\n| `SQUARE` | `Enum` | Square shape crop style. |\n| `CIRCLE` | `Enum` | Circle shape crop style. |\n| `RECTANGLE_CUSTOM` | `Enum` | Rectangle shape crop style with custom ratio. |\n| `RECTANGLE_4_3` | `Enum` | Rectangle shape crop style with 4:3 ratio. |"]]