Skip to content

Rendering Widgets

George Atkinson edited this page Jan 3, 2021 · 2 revisions

Custom draw function

Tuix uses the style properties defined on each widget to draw them. This is fine if the widgets are simple rounded boxes but sometimes you wan't something more complicated visually. For this tuix exposes an on_draw() function within the EventHandler trait which provides access to the Canvas.

Under the hood tuix uses femtovg for drawing. This library has an API based on html canvas and can draw, boxes, circles, paths, images, and text, and supports clipping and transforms.

Contents

Widgets

  • Checkbox
Clone this wiki locally