แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
blockly > blockRendering > ConstantProvider > shapeFor
เมธอด blockRendering.ConstantProvider.shapeFor()
รับออบเจ็กต์ที่มีข้อมูลรูปร่างและขนาดการเชื่อมต่อตามประเภทของการเชื่อมต่อ
ลายเซ็น:
shapeFor(connection: RenderedConnection): Shape;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
การเชื่อมต่อ |
RenderedConnection |
การเชื่อมต่อเพื่อค้นหาออบเจ็กต์รูปร่างสำหรับ |
การคืนสินค้า:
รูปร่าง
ออบเจ็กต์รูปร่างสำหรับการเชื่อมต่อ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-28 UTC
[null,null,["อัปเดตล่าสุด 2025-07-28 UTC"],[[["\u003cp\u003eThe \u003ccode\u003eblockRendering.ConstantProvider.shapeFor()\u003c/code\u003e method retrieves the shape and size information for a given connection on a block.\u003c/p\u003e\n"],["\u003cp\u003eThis method accepts a \u003ccode\u003eRenderedConnection\u003c/code\u003e object as input, representing the connection in question.\u003c/p\u003e\n"],["\u003cp\u003eIt returns a \u003ccode\u003eShape\u003c/code\u003e object containing the relevant shape and sizing details for the specified connection.\u003c/p\u003e\n"]]],["The `shapeFor()` method, part of `blockRendering.ConstantProvider`, retrieves shape and sizing data for a given connection. It accepts a `RenderedConnection` as input and returns a `Shape` object. This `Shape` object contains details about the connection's appearance, determined by its type. The method's primary action is mapping a connection to its corresponding visual representation, facilitating block rendering.\n"],null,["[blockly](./blockly.md) \\\u003e [blockRendering](./blockly.blockrendering_namespace.md) \\\u003e [ConstantProvider](./blockly.blockrendering_namespace.constantprovider_class.md) \\\u003e [shapeFor](./blockly.blockrendering_namespace.constantprovider_class.shapefor_1_method.md)\n\nblockRendering.ConstantProvider.shapeFor() method\n-------------------------------------------------\n\nGet an object with connection shape and sizing information based on the type of the connection.\n\n**Signature:** \n\n shapeFor(connection: RenderedConnection): Shape;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|------------|--------------------|-------------------------------------------|\n| connection | RenderedConnection | The connection to find a shape object for |\n\n**Returns:**\n\nShape\n\nThe shape object for the connection."]]