Enum ImageCropType
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ImageCropType
อาร์เรย์แบบจำกัดที่แสดงรูปแบบการครอบตัดที่ใช้กับคอมโพเนนต์รูปภาพ
หากต้องการใช้รูปแบบการครอบตัดกับ IconImage
คุณจะใช้ได้เฉพาะ SQUARE
หรือ CIRCLE
เท่านั้น
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
CardService.ImageCropType.SQUARE
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
SQUARE | Enum | รูปแบบการครอบตัดรูปสี่เหลี่ยมจัตุรัส |
CIRCLE | Enum | รูปแบบการครอบตัดรูปทรงกลม |
RECTANGLE_CUSTOM | Enum | รูปแบบการครอบตัดรูปสี่เหลี่ยมผืนผ้าที่มีสัดส่วนที่กำหนดเอง |
RECTANGLE_4_3 | Enum | รูปแบบการครอบตัดรูปสี่เหลี่ยมผืนผ้าที่มีสัดส่วน 4:3 |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\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. |"]]