I'd like to add rounded corners to my UI object. I have defined the _getdrawparams function, with d_boxfillcolor and d_cornersize.
My issue is: is there a way to constraint everything I paint in the _paint method to the area defined in _getdrawparams? (i.e. with the given cornersize?) More explicitely: if now inside the paint method I draw a red rectangle from (0, 0) with the width and height of my object, the corners of the objects are completely painted of red, whereas I'd like to preserve the corner roundness no matter what I ask to paint. (This is by the way a trivial example, but you can imagine more complicate examples, where I simply want to paint the portion of my object which is located next to a given corner, preserving the corner roundness).
Thanks a lot,