Module qlibs.gui.sprite_drawer¶
Sprite drawer. Uses texture atlas to draw images.
Low level. Consider using qlibs.highlevel.graphics instead.
- class qlibs.gui.sprite_drawer.ObjectDrawer(texture, program, ctx)¶
Untested
- add_sprite(id_, x, y, w, h, r=0, z=0, color=(1, 1, 1, 1))¶
- assert_buffer()¶
- calc_buffer_size()¶
- property object_count¶
- remove_location(location)¶
- render(mvp=<qlibs.math.matrix.Matrix4 object>)¶
- update_location(location, data)¶
- class qlibs.gui.sprite_drawer.Sprite(location, owner, id_, x, y, w, h, r, z, color)¶
- remove()¶
- update()¶
- class qlibs.gui.sprite_drawer.SpriteDrawer(ctx, size, data, components=4, program=None)¶
- fork()¶
Create another sprite drawer. It will share texture but not buffers
- fork_object_mode()¶
- write_layer(id_, data)¶
- class qlibs.gui.sprite_drawer.SpriteDrawerBase(texture, program, ctx)¶
- add_sprite_centered(id_, x, y, w, h, z=0, color=(1, 1, 1, 1), tpoints=((0, 0), (1, 0), (1, 1), (0, 1)))¶
- add_sprite_rect(id_, x, y, w, h, z=0, color=(1, 1, 1, 1), tpoints=((0, 0), (1, 0), (1, 1), (0, 1)))¶
- add_sprite_rotated(id_, x, y, w, h, r, z=0, color=(1, 1, 1, 1), tpoints=((0, 0), (1, 0), (1, 1), (0, 1)))¶
- clear()¶
- prepare()¶
- render(mvp=<qlibs.math.matrix.Matrix4 object>, reset=True)¶