# {py:mod}`simvx.core.nodes_2d.ninepatch` ```{py:module} simvx.core.nodes_2d.ninepatch ``` ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`PatchRect ` - ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.PatchRect :summary: ``` * - {py:obj}`NinePatchRect ` - ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect :summary: ``` ```` ### API `````{py:class} PatchRect :canonical: simvx.core.nodes_2d.ninepatch.PatchRect Bases: {py:obj}`typing.NamedTuple` ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.PatchRect ``` ````{py:attribute} x :canonical: simvx.core.nodes_2d.ninepatch.PatchRect.x :type: float :value: > None ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.PatchRect.x ``` ```` ````{py:attribute} y :canonical: simvx.core.nodes_2d.ninepatch.PatchRect.y :type: float :value: > None ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.PatchRect.y ``` ```` ````{py:attribute} w :canonical: simvx.core.nodes_2d.ninepatch.PatchRect.w :type: float :value: > None ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.PatchRect.w ``` ```` ````{py:attribute} h :canonical: simvx.core.nodes_2d.ninepatch.PatchRect.h :type: float :value: > None ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.PatchRect.h ``` ```` ````` `````{py:class} NinePatchRect(**kwargs: typing.Any) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect Bases: {py:obj}`simvx.core.nodes_2d.node2d.Node2D` ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.__init__ ``` ````{py:attribute} texture :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.texture :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.texture ``` ```` ````{py:attribute} texture_size :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.texture_size :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.texture_size ``` ```` ````{py:attribute} size :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.size :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.size ``` ```` ````{py:attribute} patch_margin_left :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_left :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_left ``` ```` ````{py:attribute} patch_margin_top :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_top :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_top ``` ```` ````{py:attribute} patch_margin_right :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_right :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_right ``` ```` ````{py:attribute} patch_margin_bottom :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_bottom :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.patch_margin_bottom ``` ```` ````{py:attribute} draw_center :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.draw_center :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.draw_center ``` ```` ````{py:attribute} axis_stretch_horizontal :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.axis_stretch_horizontal :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.axis_stretch_horizontal ``` ```` ````{py:attribute} axis_stretch_vertical :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.axis_stretch_vertical :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.axis_stretch_vertical ``` ```` ````{py:attribute} modulate :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.modulate :value: > 'Property(...)' ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.modulate ``` ```` ````{py:method} get_rect() -> simvx.core.nodes_2d.ninepatch.PatchRect :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.get_rect ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.get_rect ``` ```` ````{py:method} get_nine_patch_rects() -> list[tuple[simvx.core.nodes_2d.ninepatch.PatchRect, simvx.core.nodes_2d.ninepatch.PatchRect]] :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.get_nine_patch_rects ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.get_nine_patch_rects ``` ```` ````{py:method} draw(renderer) -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.draw ```{autodoc2-docstring} simvx.core.nodes_2d.ninepatch.NinePatchRect.draw ``` ```` ````{py:attribute} z_index :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.z_index :value: > 'Property(...)' ```` ````{py:attribute} z_as_relative :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.z_as_relative :value: > 'Property(...)' ```` ````{py:attribute} render_layer :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.render_layer :value: > 'Property(...)' ```` ````{py:method} set_render_layer(index: int, enabled: bool = True) -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.set_render_layer ```` ````{py:method} is_on_render_layer(index: int) -> bool :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.is_on_render_layer ```` ````{py:property} absolute_z_index :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.absolute_z_index :type: int ```` ````{py:property} position :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.position :type: simvx.core.math.types.Vec2 ```` ````{py:property} rotation :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.rotation :type: float ```` ````{py:property} rotation_degrees :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.rotation_degrees :type: float ```` ````{py:property} scale :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.scale :type: simvx.core.math.types.Vec2 ```` ````{py:property} world_position :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.world_position :type: simvx.core.math.types.Vec2 ```` ````{py:property} world_rotation :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.world_rotation :type: float ```` ````{py:property} world_scale :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.world_scale :type: simvx.core.math.types.Vec2 ```` ````{py:property} forward :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.forward :type: simvx.core.math.types.Vec2 ```` ````{py:property} right :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.right :type: simvx.core.math.types.Vec2 ```` ````{py:method} translate(offset: tuple[float, float] | numpy.ndarray) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.translate ```` ````{py:method} rotate(radians: float) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.rotate ```` ````{py:method} rotate_deg(degrees: float) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.rotate_deg ```` ````{py:method} look_at(target: tuple[float, float] | numpy.ndarray) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.look_at ```` ````{py:method} transform_points(points: list[simvx.core.math.types.Vec2]) -> list[simvx.core.math.types.Vec2] :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.transform_points ```` ````{py:method} draw_polygon(renderer, points: list[simvx.core.math.types.Vec2], closed=True, colour=None) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.draw_polygon ```` ````{py:method} wrap_screen(margin: float = 20) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.wrap_screen ```` ````{py:attribute} strict_errors :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.strict_errors :type: typing.ClassVar[bool] :value: > True ```` ````{py:attribute} script_error_raised :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.script_error_raised :value: > 'Signal(...)' ```` ````{py:method} __init_subclass__(**kwargs) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.__init_subclass__ :classmethod: ```` ````{py:property} name :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.name :type: str ```` ````{py:property} process_mode :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.process_mode :type: simvx.core.descriptors.ProcessMode ```` ````{py:method} reset_error() -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.reset_error ```` ````{py:method} add_child(node: simvx.core.node.Node) -> simvx.core.node.Node :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.add_child ```` ````{py:method} remove_child(node: simvx.core.node.Node) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.remove_child ```` ````{py:method} reparent(new_parent: simvx.core.node.Node) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.reparent ```` ````{py:method} get_node(path: str) -> simvx.core.node.Node :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.get_node ```` ````{py:method} find_child(name: str, recursive: bool = False) -> simvx.core.node.Node | None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.find_child ```` ````{py:method} find(node_type: type, recursive: bool = True) -> simvx.core.node.Node | None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.find ```` ````{py:method} find_all(node_type: type, recursive: bool = True) -> list :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.find_all ```` ````{py:property} path :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.path :type: str ```` ````{py:method} add_to_group(group: str) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.add_to_group ```` ````{py:method} remove_from_group(group: str) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.remove_from_group ```` ````{py:method} is_in_group(group: str) -> bool :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.is_in_group ```` ````{py:method} ready() -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.ready ```` ````{py:method} enter_tree() -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.enter_tree ```` ````{py:method} exit_tree() -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.exit_tree ```` ````{py:method} process(dt: float) -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.process ```` ````{py:method} physics_process(dt: float) -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.physics_process ```` ````{py:method} input_event(event: simvx.core.events.InputEvent) -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.input_event ```` ````{py:method} input(event: simvx.core.events.TreeInputEvent) -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.input ```` ````{py:method} unhandled_input(event: simvx.core.events.TreeInputEvent) -> None :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.unhandled_input ```` ````{py:method} start_coroutine(gen: simvx.core.descriptors.Coroutine) -> simvx.core.descriptors.CoroutineHandle :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.start_coroutine ```` ````{py:method} stop_coroutine(gen_or_handle) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.stop_coroutine ```` ````{py:method} clear_children() :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.clear_children ```` ````{py:method} destroy() :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.destroy ```` ````{py:property} app :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.app ```` ````{py:property} tree :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.tree :type: simvx.core.scene_tree.SceneTree ```` ````{py:method} get_tree() -> simvx.core.scene_tree.SceneTree :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.get_tree ```` ````{py:method} __getitem__(key: str) :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.__getitem__ ```` ````{py:method} get_properties() -> dict[str, simvx.core.descriptors.Property] :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.get_properties :classmethod: ```` ````{py:method} __repr__() :canonical: simvx.core.nodes_2d.ninepatch.NinePatchRect.__repr__ ```` `````