icon
Display an icon rasterized lazily from tvg_bytes.
See buttonIcon and buttonLabelAndIcon.
icon_opts controls the rasterization, and opts.color_text is multiplied in the shader. If icon_opts is the default, then the text color is multiplied in the shader even if not passed in opts.
Only valid between Window.beginand Window.end.
Parameters
- src:std.builtin.SourceLocation
- std.builtin.SourceLocation
- name:[]const u8
- []const u8
- tvg_bytes:[]const u8
- []const u8
- icon_opts:IconRenderOptions
- IconRenderOptions
- opts:Options
- Options
Source
Implementation
pub fn icon(src: std.builtin.SourceLocation, name: []const u8, tvg_bytes: []const u8, icon_opts: IconRenderOptions, opts: Options) void {
var iw: IconWidget = undefined;
iw.init(src, name, tvg_bytes, icon_opts, opts);
iw.draw();
iw.deinit();
}