-
Notifications
You must be signed in to change notification settings - Fork 88
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!
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 anNVGColor
, applies the view transparency and returns a new color - The
RGB
andRGBf
methods families allow to create new colors from RGB(A) with the transparency already applied (wrappers aroundnvgRGB
functions)