研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
渲染信息
RenderInfo
决定了如何布局块的视觉元素。
块始终由输入、连接和字段构建而成,但这些布局可以采用多种不同的方式。例如,可以使用外部输入或内嵌输入呈现同一块定义。

渲染信息决定了选择哪种布局。
渲染的第一步是查看渲染信息块的定义,以及其视觉元素的测量结果。然后,它会确定块的布局方式,并相应地整理信息。这些信息会变成非重叠的元素和分隔符,然后将它们整理为非重叠的行和行分隔符。
然后,抽屉式导航栏会使用这些井然有序的布局信息创建代表代码块的 SVG 路径。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-07-24。
[null,null,["最后更新时间 (UTC):2023-07-24。"],[[["`RenderInfo` dictates the visual layout of a block's elements, such as inputs, connections, and fields, determining aspects like inline or external input placement."],["It analyzes the block definition and element measurements to establish an optimal layout, organizing the information into elements, spacers, rows, and row spacers for a non-overlapping visual structure."],["This organized layout information is then utilized by the drawer to generate the final SVG paths that visually represent the block."]]],["`RenderInfo` defines a block's visual layout. It analyzes a block's inputs, connections, and fields, considering external or inline input options. It determines the layout, organizing visual components into non-overlapping elements, spacers, rows, and row spacers. This structured information is then passed to the drawer, which generates the SVG paths for the block's visual representation. The core task of the render info is to take visual elements and organize them.\n"]]