How to add new labels to Paint Widget

Hello everyone,
I’m trying to use Paint Widget like in this example; example.

But how we can add more colors/labels to it?

I tried to use addRGBPoint with setLabel like this;

cfun.addRGBPoint(1, 0, 0, 1); // label "1" will be blue
cfun.addRGBPoint(2, 1, 0, 0); // label "2" will be red


But no hope sor far, how can I do that? Thank you in advance.

I find out we need to add this line to PaintFilter’s actor. I works fine now!

1 Like