image
- class bgui.image.Image(parent, img, name=None, aspect=None, size=[1, 1], pos=[0, 0], texco=[(0, 0), (1, 0), (1, 1), (0, 1)], sub_theme='', options=0)
Bases:
Widget
Widget for displaying images
- Parameters:
parent – The widget’s parent
name – The name of the widget
img – The image to use for the widget
aspect – Constrain the widget size to a specified aspect ratio
size – A tuple containing the width and height
pos – A tuple containing the x and y position
texco – The UV texture coordinates to use for the image
sub_theme – Name of a sub_theme defined in the theme file (similar to CSS classes)
options – Various other options
- texco= None
The UV texture coordinates to use for the image.
- color= None
The color of the plane the texture is on.
- image_size
The size (in pixels) of the currently loaded image, or [0, 0] if an image is not loaded.
- update_image(img)
Changes the image texture.
- Parameters:
img – The path to the new image.
- Return type:
None.