¶
luxe API (2025.1.2)¶
luxe: ui/image module¶
UIImage¶
import "luxe: ui/image" for UIImage
UIImageis a type ofControlmade to display images.var image = UIImage.create(ui) UIImage.set_image(image, Assets.image("path/to/image")) //setup positioning etc with `Control.___`
- create(ui_entity:
Entity) - set_image(control:
UIImage, image:Image) - set_image(control:
UIImage, image:Image, flags:UIImageFlags) - get_image(control:
UIImage) - set_material(control:
UIImage, material:Material) - set_uv(control:
UIImage, left:Num, top:Num, right:Num, bottom:Num) - set_color(control:
UIImage, color:Color) - get_color(control:
UIImage) - set_angle(control:
UIImage, degrees:Num) - set_fit(control:
UIImage, fit:UIImageFit) - get_fit(control:
UIImage)
Entity)
¶UIImage
Create a new UIImage control.
UIImage, image: Image)
¶None
Set image of
UIImagecontrol (usesUIImageFlags.nonewith linear interpolation). Setting an image will reset any set custom material and use an internal material created from theluxe: material_basis/ui_solidbasis instead.
UIImage, image: Image, flags: UIImageFlags)
¶None
Set displayed image of
UIImagecontrol. The flags determine what sampler is used to read the image. Setting an image will reset any set custom material and use an internal material created from theluxe: material_basis/ui_solidbasis instead.var image = UIImage.create(ui) UIImage.set_image(image, Assets.image("path/to/image"), UIImageFlags.pixelated)
UIImage)
¶Image
Get currently displayed image of
UIImage.
UIImage, material: Material)
¶None
Set the material used to render the
UIImage. Setting a custom material will reset the controls image, so you need to author that via the inputs on your material.
UIImage, left: Num, top: Num, right: Num, bottom: Num)
¶None
Set the uv bounds, default is (0, 0, 1, 1). Drawing only top left of the image would be (0.5, 0.5, 1, 1).
UIImage, color: Color)
¶None
Set the tint color of the
UIImage. Communicated to the shader via vertex colors.
UIImage)
¶Color
Get the current tint color of the
UIImage.
UIImage, degrees: Num)
¶None
Set the angle of the
UIImagecontrol. Note that this will not affect child controls.
UIImage, fit: UIImageFit)
¶None
Set the fit mode
UIImage)
¶UIImageFit
Get the fit mode