Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Trình kết xuất đồ hoạ
Renderer
là một lớp nhà máy (factory) gói tất cả các thành phần
khác của trình kết xuất lại với nhau.
Tệp này chứa các phương thức để tạo trình cung cấp không đổi, thông tin hiển thị, đối tượng đường dẫn và ngăn kéo.
Và nó chứa mã để kết nối tất cả chúng với nhau khi kết xuất một khối.
Nếu chỉ muốn thay đổi một phần của trình kết xuất hiện có (ví dụ: hằng số), bạn có thể phân lớp con cho phương thức nhà máy có liên quan.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2023-07-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2023-07-24 UTC."],[[["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"]]