When you execute or fill a path in a context, the context deletes the path for you (it expects it to be executed). You must add the path again if you want to fill it after stroking.
It is probably best to create a local variable CGPathRef path , build a path, add it, hit, add it again, fill it.
CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, nil, 20, viewHeight-19.5); CGPathAddLineToPoint(path nil, 200, viewHeight-19.5);
Wain
source share