Draw a regoin


#1

hi everyone ,how to draw a regoin? like SetWindowRgn() in Windows SDK.


#2

SetWindowRgn doesn’t draw anything, it’s just a (very old-fashioned) way to change a window’s shape.

If you want to draw a shape, you’d use Graphics::fillPath. If you want a non-rectangular window, then just make it transparent and draw any shape you want.


#3

I am careless,I meant use CreateEllipticRgn() to draw a regoin ,just like as SDK says,If I can use JUCE’ function,…

I create a child window ,but SetWindowRgn() 's hWnd must point itself,not parent window,how,…

BTW, create child window,SetWindowRgn(), CreateEllipticRgn() and parent window,how does is it association with each other?


#4

CreateEllipticRgn also doesn’t draw anything.

Are you trying to find Path::addEllipse() or Graphics::fillEllipse()?


#5

yeah,I have a try .jules , thank you.