[][src]Module imgui_ext::image

image(...) docs.

Params

  • size local function returning image size

Optional params

  • border local function returning the border color
  • tint local function returning tint color

Limitations

  • border, tint and size cannot be set at runtime.
  • No support to edit UVs yet.

Example

use imgui_ext::ImGuiExt;

#[derive(ImGuiExt)]
struct Image {
    #[imgui(image(size = "img_size"))]
    texture: usize,
    #[imgui(image(size = "img_size", tint = "img_tint", border = "img_border"))]
    texture_tint: usize,
}

const fn img_size() -> (f32, f32) {
    (512.0, 64.0)
}

const fn img_tint() -> (f32, f32, f32, f32) {
    (1.0, 0.0, 1.0, 1.0)
}

const fn img_border() -> (f32, f32, f32, f32) {
    (1.0, 1.0, 1.0, 1.0)
}

Result

Structs

ImageParams

Traits

Image