연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
blockly > blockRendering > Renderer
blockRendering.Renderer 클래스
블록 렌더러의 기본 클래스입니다.
서명:
export declare class Renderer implements IRegistrable
구현: IRegistrable
생성자
생성자 |
수정자 |
설명 |
(생성자)(이름) |
|
Renderer 클래스의 새 인스턴스를 생성합니다. |
속성
메서드
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eblockRendering.Renderer\u003c/code\u003e class serves as the foundation for rendering blocks in Blockly, managing their visual representation and interactions.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods for initialization, disposal, refreshing the display based on themes, and creating supporting components like drawers and render info objects.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eblockRendering.Renderer\u003c/code\u003e provides functionalities for handling connection previews and highlighting, allowing for interactive block connections.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can extend this base class to create custom renderers with unique block styles and behaviors using properties such as \u003ccode\u003econstants_\u003c/code\u003e and \u003ccode\u003eoverrides\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [blockRendering](./blockly.blockrendering_namespace.md) \\\u003e [Renderer](./blockly.blockrendering_namespace.renderer_class.md)\n\nblockRendering.Renderer class\n-----------------------------\n\nThe base class for a block renderer.\n\n**Signature:** \n\n export declare class Renderer implements IRegistrable \n\n**Implements:** [IRegistrable](./blockly.iregistrable_interface.md)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|---------------------------------------------------------------------------------------------------------|-----------|---------------------------------------------------|\n| [(constructor)(name)](./blockly.blockrendering_namespace.renderer_class._constructor__1_constructor.md) | | Constructs a new instance of the `Renderer` class |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|----------------------------------------------------------------------------------------|-------------|----------------------------------------------------------------------------------|----------------------------------------------------------|\n| [constants_](./blockly.blockrendering_namespace.renderer_class.constants__property.md) | `protected` | [ConstantProvider](./blockly.blockrendering_namespace.constantprovider_class.md) | The renderer's constant provider. |\n| [name](./blockly.blockrendering_namespace.renderer_class.name_property.md) | `protected` | string | |\n| [overrides](./blockly.blockrendering_namespace.renderer_class.overrides_property.md) | `protected` | object \\| null | Rendering constant overrides, passed in through options. |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|------------------------------------------------------------------------------------------------------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [dispose()](./blockly.blockrendering_namespace.renderer_class.dispose_1_method.md) | | Dispose of this renderer. Delete all DOM elements that this renderer and its constants created. |\n| [getClassName()](./blockly.blockrendering_namespace.renderer_class.getclassname_1_method.md) | | Gets the class name that identifies this renderer. |\n| [getConstants()](./blockly.blockrendering_namespace.renderer_class.getconstants_1_method.md) | | Get the current renderer's constant provider. We assume that when this is called, the renderer has already been initialized. |\n| [init(theme, opt_rendererOverrides)](./blockly.blockrendering_namespace.renderer_class.init_1_method.md) | | Initialize the renderer. |\n| [makeConstants_()](./blockly.blockrendering_namespace.renderer_class.makeconstants__1_method.md) | `protected` | Create a new instance of the renderer's constant provider. |\n| [makeDrawer_(block, info)](./blockly.blockrendering_namespace.renderer_class.makedrawer__1_method.md) | `protected` | Create a new instance of the renderer's drawer. |\n| [makePathObject(root, style)](./blockly.blockrendering_namespace.renderer_class.makepathobject_1_method.md) | | Create a new instance of a renderer path object. |\n| [makeRenderInfo_(block)](./blockly.blockrendering_namespace.renderer_class.makerenderinfo__1_method.md) | `protected` | Create a new instance of the renderer's render info object. |\n| [orphanCanConnectAtEnd(topBlock, orphanBlock, localType)](./blockly.blockrendering_namespace.renderer_class.orphancanconnectatend_1_method.md) | `protected` | Checks if an orphaned block can connect to the \"end\" of the topBlock's block-clump. If the clump is a row the end is the last input. If the clump is a stack, the end is the last next connection. If the clump is neither, then this returns false. |\n| [refreshDom(svg, theme, injectionDivIfIsParent)](./blockly.blockrendering_namespace.renderer_class.refreshdom_1_method.md) | | Refresh the renderer after a theme change. |\n| [shouldHighlightConnection(_conn)](./blockly.blockrendering_namespace.renderer_class.shouldhighlightconnection_1_method.md) | | Determine whether or not to highlight a connection. |"]]