开发者

Cropping a QRegion for setMask

开发者 https://www.devze.com 2023-04-06 15:01 出处:网络
I am setMask()\'ing a QRegion I\'ve a Big QRect of that I am making a Circle //config->rectangle = QRect(0,0 275x275)

I am setMask()'ing a QRegion I've a Big QRect of that I am making a Circle

//config->rectangle = QRect(0,0 275x275)
QRegion circleRegion(config->rectangle, QRegion::Ellipse)

and now I've a small widgetRect QRect(43,0 93x110) that area I need to crop from the previous region and use for setMasking.

What I am doing circleRegion.intersected(widgetRect) which is not giving me the proper result. I am expecting a Pie Reg开发者_JAVA百科ion. Where am I missing ?

0

精彩评论

暂无评论...
验证码 换一张
取 消