mini_arcade_core.runtime.render.render_port¶
Render service definition.
Classes¶
Render Service. |
Module Contents¶
- class mini_arcade_core.runtime.render.render_port.RenderServicePort¶
Bases:
ProtocolRender Service. This service manages rendering statistics and state.
- Variables:
(float) (last_frame_ms) – Time taken for the last frame in milliseconds.
(RenderStats) (last_stats) – Rendering statistics from the last frame.
- last_frame_ms: float¶
- load_texture(path: str) int¶
Load a texture from a file path and return its texture ID.
- Parameters:
path (str) – The file path to the texture image.
- Returns:
The texture ID assigned by the backend.
- Return type:
int
- draw_texture_tiled_y(tex_id: int, x: int, y: int, w: int, h: int)¶
Draw a texture repeated vertically to fill (w,h). Assumes you can resolve tex_id -> pygame.Surface, and supports scaling width.
- Parameters:
tex_id (int) – The texture ID to draw.
x (int) – The x-coordinate to draw the texture.
y (int) – The y-coordinate to draw the texture.
w (int) – The width to draw the texture (height is determined by tiling).
h (int) – The height to fill with the tiled texture.