研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
渲染程序
Renderer
是一个工厂类,用于将渲染程序的所有其他组件捆绑在一起。
它包含用于创建常量提供程序、渲染信息、路径对象和抽屉式导航栏的方法。此代码包含在渲染代码块时用于将所有代码互连在一起的代码。
如果您只想更改现有渲染程序的某个部分(例如常量),可以创建相关工厂方法的子类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-07-24。
[null,null,["最后更新时间 (UTC):2023-07-24。"],[[["The `Renderer` is a factory class that groups together all the components of a renderer, including methods for creating constant providers, render info, path objects, and drawers."],["It manages the process of connecting and utilizing these components when rendering a block."],["Customizing specific aspects of a renderer, like constants, can be achieved by subclassing the corresponding factory method."]]],["The `Renderer` class acts as a central factory, managing components like the constant provider, render info, path object, and drawer. It includes methods for creating these elements and orchestrates their interaction during block rendering. Customization of existing renderers is achievable by subclassing specific factory methods within the `Renderer` class, allowing modification of individual parts, like constants. This class essentially bundles and connects all the elements required for rendering a block.\n"]]