-
Notifications
You must be signed in to change notification settings - Fork 11
Rendering Widgets
George Atkinson edited this page Jan 3, 2021
·
2 revisions
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.