研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
渲染信息
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
RenderInfo
决定了某个版块的视觉元素的布局方式。
块始终由输入、连接和字段构建而成,但这些元素可以以多种不同的方式排列。例如,可以使用内嵌输入或外部输入来呈现相同的块定义。

渲染信息决定了选择哪种布局。
作为呈现的第一步,呈现信息会查看该版块的定义及其视觉元素的测量值。然后,它会决定该块的布局方式,并相应地整理信息。这些信息会转换为不重叠的元素和间隔符,这些元素和间隔符会整理为不重叠的行和行间隔符。
然后,抽屉会使用整理好的布局信息创建表示该块的 SVG 路径。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-04-14。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-04-14。"],[[["`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"]]