Enum ImageCropType
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
نوعاقتصاص الصورة
عنصر مصنّف يمثّل أنماط الاقتصاص المطبَّقة على مكونات الصور.
إذا كنت تريد تطبيق نمط اقتصاص على IconImage
، يمكنك استخدام SQUARE
أو CIRCLE
فقط.
لاستدعاء قائمة أرقام صحيحة، عليك استدعاء الصف الرئيسي والاسم والخاصية. مثلاً:
CardService.ImageCropType.SQUARE
أماكن إقامة
الموقع | النوع | الوصف |
SQUARE | Enum | نمط اقتصاص مربّع الشكل |
CIRCLE | Enum | نمط اقتصاص على شكل دائرة |
RECTANGLE_CUSTOM | Enum | نمط اقتصاص مستطيل الشكل بنسبة مخصّصة |
RECTANGLE_4_3 | Enum | نمط اقتصاص مستطيل الشكل بنسبة عرض إلى ارتفاع 4:3 |
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\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. |"]]