研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >blockRendering >ConstantProvider >shapeFor
blockRendering.ConstantProvider.shapeFor() 方法
根据连接类型获取包含连接形状和尺寸信息的对象。
Signature:
shapeFor(connection: RenderedConnection): Shape;
参数
参数 |
类型 |
说明 |
连接 |
RenderedConnection |
为其查找形状对象的连接 |
返回:
形状
连接的形状对象。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-29。
[null,null,["最后更新时间 (UTC):2024-08-29。"],[[["The `blockRendering.ConstantProvider.shapeFor()` method retrieves the shape and size information for a given connection on a block."],["This method accepts a `RenderedConnection` object as input, representing the connection in question."],["It returns a `Shape` object containing the relevant shape and sizing details for the specified connection."]]],["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"]]