Public Member Functions | |
| None | __init__ (self, "App" app, str|Path|None image=None, *, int width=0, int height=0, str vertex_shader="", str fragment_shader="") |
| A 2D image that can be queued for drawing each frame. | |
| None | close (self) |
| None | draw (self, int x=0, int y=0, *, int|None width=None, int|None height=None, float scale=1.0, float rotation=0.0) |
| None | enable_extended_uniforms (self) |
| None | set_mouse (self, float x, float y, bool pressed=False) |
| None | set_uniform (self, int index, float x, float y, float z, float w) |
| None | shader_params (self, float first=0.0, float second=0.0, float third=0.0, float fourth=0.0) |
| None | update (self, object pixels, int width, int height, *, int pitch=0) |
Public Attributes | |
| native = None | |
| Create an image sprite or an empty dynamic texture. | |
Definition at line 45 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.__init__ | ( | self, | |
| "App" | app, | ||
| str | Path | None | image = None, | ||
| * | , | ||
| int | width = 0, | ||
| int | height = 0, | ||
| str | vertex_shader = "", | ||
| str | fragment_shader = "" ) |
A 2D image that can be queued for drawing each frame.
Definition at line 48 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.close | ( | self | ) |
Definition at line 123 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.draw | ( | self, | |
| int | x = 0, | ||
| int | y = 0, | ||
| * | , | ||
| int | None | width = None, | ||
| int | None | height = None, | ||
| float | scale = 1.0, | ||
| float | rotation = 0.0 ) |
Definition at line 70 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.enable_extended_uniforms | ( | self | ) |
Definition at line 101 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.set_mouse | ( | self, | |
| float | x, | ||
| float | y, | ||
| bool | pressed = False ) |
Definition at line 105 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.set_uniform | ( | self, | |
| int | index, | ||
| float | x, | ||
| float | y, | ||
| float | z, | ||
| float | w ) |
Definition at line 112 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.shader_params | ( | self, | |
| float | first = 0.0, | ||
| float | second = 0.0, | ||
| float | third = 0.0, | ||
| float | fourth = 0.0 ) |
Definition at line 97 of file graphics.py.
| None mxvk_wrap.graphics.Sprite.update | ( | self, | |
| object | pixels, | ||
| int | width, | ||
| int | height, | ||
| * | , | ||
| int | pitch = 0 ) |
Definition at line 89 of file graphics.py.
| mxvk_wrap.graphics.Sprite.native = None |
Create an image sprite or an empty dynamic texture.
Set one of four generic vectors for an extended sprite shader.
| app | The owning application. |
| image | Image file to load; omit for an empty sprite. |
| width | Empty texture width. |
| height | Empty texture height. |
| vertex_shader | Optional vertex SPIR-V path. |
| fragment_shader | Optional fragment SPIR-V path. |
| index | Vector index from zero through three. |
| x | First component. |
| y | Second component. |
| z | Third component. |
| w | Fourth component. |
Definition at line 56 of file graphics.py.