add <image> widget
This commit is contained in:
@@ -160,7 +160,17 @@ _2nd gradient color_
|
||||
|
||||
### `<sprite>`
|
||||
|
||||
### Image widget, supports raster and svg vector
|
||||
### Image widget for small images,
|
||||
|
||||
Supported formats: svg, png, jpeg, gif, webp
|
||||
|
||||
Maximum image size: 256x256 pixels
|
||||
|
||||
For large or frequently changing images (e.g. album art), or if borders/rounding is desired, consider the `<image>` tag instead.
|
||||
|
||||
Sprite images are atlassed, making them very efficient to render.
|
||||
|
||||
Adding large sprites permanently increases the atlas size (and thus VRAM usage) for the session. (Atlas space can be re-used, but the atlas won't shrink back.)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -180,6 +190,44 @@ _Internal (assets) image path_
|
||||
|
||||
_wgui internal image path. Do not use directly unless it's related to the core wgui assets._
|
||||
|
||||
## image widget
|
||||
|
||||
### `<image>`
|
||||
|
||||
### Image widget for large images
|
||||
|
||||
Supported formats: svg, png, jpeg, gif, webp
|
||||
|
||||
Maximum image size: Max texture size for the GPU (usually 8K+)
|
||||
|
||||
For small images such as icons, consider using the `<sprite>` tag instead.
|
||||
|
||||
`<image>` requires a single draw call per widget, while `<sprite>` widgets all share a single draw call per panel.
|
||||
|
||||
#### Parameters
|
||||
|
||||
`src`: **string**
|
||||
|
||||
_External (filesystem) image path. Falls back to Internal (assets) if not found._
|
||||
|
||||
`src_ext`: **string**
|
||||
|
||||
_External (filesystem) image path_
|
||||
|
||||
`src_builtin`: **string**
|
||||
|
||||
_Internal (assets) image path_
|
||||
|
||||
`src_internal`: **string**
|
||||
|
||||
_wgui internal image path. Do not use directly unless it's related to the core wgui assets._
|
||||
|
||||
`round`: **float** (default: 0) | **percent** (0-100%)
|
||||
|
||||
`border`: **float**
|
||||
|
||||
`border_color`: #FFAABB | #FFAABBCC
|
||||
|
||||
---
|
||||
|
||||
# Components
|
||||
|
||||
Reference in New Issue
Block a user