Skip to content

Drawing stuff

Nathan S edited this page Jun 15, 2020 · 4 revisions

borealis uses nanovg (nvg) to draw stuff on screen. Look at the nvg documentation to know what you can do with borealis!

Transparency

Every view has an alpha attribute which corresponds to their transparency multiplied by the one of their parent. It means that a hidden BoxLayout will have all its children hidden as well.

The View class has helper methods to easily apply that transparency system to nanovg colors:

  • The a method takes an NVGColor, applies the view transparency and returns a new color
  • The RGB and RGBf methods families allow to create new colors from RGB(A) with the transparency already applied (wrappers around nvgRGB functions)
Clone this wiki locally