Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
blockly > blockRendering > ConstantProvider > shapeFor
blockRendering.ConstantProvider.shapeFor()-Methode
Ruft ein Objekt mit Informationen zur Verbindungsform und -größe basierend auf dem Verbindungstyp ab.
Unterschrift:
shapeFor(connection: RenderedConnection): Shape;
Parameter
Parameter |
Typ |
Beschreibung |
Verbindung |
RenderedConnection |
Die Verbindung, für die ein Formobjekt gefunden werden soll |
Gibt zurück:
Form
Das Formobjekt für die Verbindung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-28 (UTC).
[null,null,["Zuletzt aktualisiert: 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."]]