PDA

View Full Version : Some problem while fill color in QPainterPath



ymc123405
29th August 2014, 14:34
I draw a QPainterPath like left side in attachment picture.
I want to fill some color, like black. I use QPainter::fillPath(), but what i get is like the right side in picture.
Only arc part can be filled. I cant understand why?

anda_skoa
29th August 2014, 14:46
Try to change the fillRule

Cheers,
_

d_stranz
29th August 2014, 17:48
Also ensure that the start of the rectangular section of the path begins at the end of the arc and not the beginning. Also make sure you have a closed path.