Stay organized with collections
Save and categorize content based on your preferences.
blockly > blockRendering > ConstantProvider > shapeFor
blockRendering.ConstantProvider.shapeFor() method
Get an object with connection shape and sizing information based on the type of the connection.
Signature:
shapeFor(connection: RenderedConnection): Shape;
Parameters
Parameter |
Type |
Description |
connection |
RenderedConnection |
The connection to find a shape object for |
Returns:
Shape
The shape object for the connection.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[],["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,[]]