public static draw(painter as Painter, kind as String, x as Int, y as Int, size as Int, expanded as Boolean = false, foreground as Color = null) as Boolean
Draws a shared icon and restores the complete painter state.
| Parameter | Description |
|---|---|
painter | Drawing context. |
kind | Semantic kind returned by kindFor(), or "computer". |
x | Left of the icon slot, in client pixels. |
y | Top of the icon slot, in client pixels. |
size | Icon width and height, already scaled for the display. |
expanded | Draws an open folder when true. |
foreground | Optional foreground for the computer outline. |
False for an unknown kind, null painter or nonpositive size; no painter commands are recorded in that case.
FileSystemIcons.draw(painter, "folder", 8, 8, 22, expanded=true)