Canvas
classin packageklyn.gui.windows
public abstract class Canvas extends Widget:
└ Canvas

Base class for custom drawing widgets.

A canvas is intentionally non-focusable and expansive on both axes. It is meant to occupy the central drawing area of an interface while side controls keep their preferred width or height.

class Gauge extends Canvas:
public override paint(painter as Painter) as Void:
painter.fillRect(this.x, this.y, this.width, this.height)
Properties inherited from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, right, sizePolicy, styleClass, width, window, x, y
Constructors
Modifier and Type Member Description
public Canvas Creates an expansive non-focusable drawing widget.
Methods inherited from Widget: blur, containsPoint, paint, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds