klyn.gui.windows.filesystem.FileSystemIcons.draw
method
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
Description

Draws a shared icon and restores the complete painter state.

Parameters
ParameterDescription
painterDrawing context.
kindSemantic kind returned by kindFor(), or "computer".
xLeft of the icon slot, in client pixels.
yTop of the icon slot, in client pixels.
sizeIcon width and height, already scaled for the display.
expandedDraws an open folder when true.
foregroundOptional foreground for the computer outline.
Returns

False for an unknown kind, null painter or nonpositive size; no painter commands are recorded in that case.

Example

FileSystemIcons.draw(painter, "folder", 8, 8, 22, expanded=true)