zui docs v0.0.5
GitHub ↗
Drawing and interaction Native Qt

Shape

Shape is a native Zui component in the drawing and interaction catalog, with 17 component-specific properties.

Usage

Ruby example

Paste this complete Builder example inside the app surface from the Quickstart. Replace illustrative asset paths with files from your project.

Ruby
shape "M 20 120 C 90 20, 180 20, 250 120", width: 280, height: 150, stroke: "#b7ff5a", stroke_width: 4, fill: "transparent"
API

Component properties

17 component-specific values, plus shared item and layout properties.

pathPath configuration for Shape.property
widthWidth configuration for Shape.property
heightHeight configuration for Shape.property
strokeStroke configuration for Shape.property
fillFill configuration for Shape.property
stroke_widthStroke width configuration for Shape.property
capCap configuration for Shape.property
joinJoin configuration for Shape.property
fill_ruleFill rule configuration for Shape.property
dash_patternDash pattern configuration for Shape.property
dash_offsetDash offset configuration for Shape.property
scaleScale configuration for Shape.property
preferred_rendererPreferred renderer configuration for Shape.property
asynchronousAsynchronous configuration for Shape.property
contains_modeContains mode configuration for Shape.property
antialiasingAntialiasing configuration for Shape.property
visibleVisible configuration for Shape.property
Show 13 shared item properties
enabledopacityrotationzfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

Subscribe with on widget, :event and keep behavior in Ruby.

statusNative event payload
clickNative event payload
hoverNative event payload