ios - Subtract Multiple Overlapping Paths from Path -


i have 3 paths. want 2 of paths, path1 , path2, subtracted path3. not want area overlaps between path1 , path2 filled. here's diagram made explain mean:

diagram

i tried this question, accepted answer produces found above in "result eoclip." tried cgcontextsetblendmode(ctx, kcgblendmodeclear), did make fill black. ideas?

playing bit paintcode () landed this. maybe works case?

let context = uigraphicsgetcurrentcontext() cgcontextbegintransparencylayer(context, nil)  let path3path = uibezierpath(rect: cgrectmake(0, 0, 40, 40)) uicolor.bluecolor().setfill() path3path.fill()  cgcontextsetblendmode(context, kcgblendmodedestinationout) let path2path = uibezierpath(rect: cgrectmake(5, 5, 20, 20)) path2path.fill() let path1path = uibezierpath(rect: cgrectmake(15, 15, 20, 20)) path1path.fill()  cgcontextendtransparencylayer(context) 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -