ios - Core Grapphics - Fill Transparent color in inner path of main path -



ios - Core Grapphics - Fill Transparent color in inner path of main path -

i have implemented floor drawing path co-ordinates, , need fill path in main path , should display transparent color in inner path. have tried filling transparent color, inner path shows color of outer path. how can clear inner path created area of outer path show background of viewcontroller.view?

any suggestions appreciable.

here screenshot inner & outer path

if([[self.arpoints objectatindex:icount] objectforkey:@"coordsouter"]) { self.levelpointinfo = [[self.arpoints objectatindex:icount] objectforkey:@"coordsline"]; self.levelpointinfo=[self.levelpointinfo substringfromindex:1]; self.levelpointinfo=[self.levelpointinfo substringtoindex:[self.levelpointinfo length]-2]; self.arlevelpoints=[self.levelpointinfo componentsseparatedbystring:@");("]; startpoint=cgpointmake([[[[self.arlevelpoints objectatindex:0] componentsseparatedbystring:@";"] objectatindex:1] floatvalue], [[[[self.arlevelpoints objectatindex:0] componentsseparatedbystring:@";"] objectatindex:2] floatvalue]); for(int jcount=1; jcount<[self.arlevelpoints count];++jcount) { @autoreleasepool { endpoint = cgpointmake([[[[self.arlevelpoints objectatindex:jcount] componentsseparatedbystring:@";"] objectatindex:1] floatvalue], [[[[self.arlevelpoints objectatindex:jcount] componentsseparatedbystring:@";"] objectatindex:2] floatvalue]); //cgcontextsavegstate(context); cgcontextsetlinecap(context, kcglinecapsquare); cgcontextsetstrokecolorwithcolor(context, [uicolor blackcolor].cgcolor); cgcontextsetlinewidth(context, line_width); cgcontextmovetopoint(context,( (startpoint.x-minx)/((maxx-minx)/(self.frame.size.width-(2*paddingx)))+(paddingx) )/self.scalevalue,(self.frame.size.height - ( (startpoint.y-miny)/((maxy-miny)/(self.frame.size.height-(2*paddingy)))+(paddingy)))/self.scalevalue); cgcontextaddlinetopoint(context,( (endpoint.x-minx)/((maxx-minx)/(self.frame.size.width-(2*paddingx)))+(paddingx))/self.scalevalue, (self.frame.size.height - ((endpoint.y-miny)/((maxy-miny)/(self.frame.size.height-(2*paddingy)))+(paddingy)))/self.scalevalue); cgcontextsetfillcolorwithcolor(context, [uicolor yellowcolor].cgcolor); cgcontextstrokepath(context); //cgcontextrestoregstate(context); startpoint = endpoint; } } } if([[self.arpoints objectatindex:icount] objectforkey:@"coordsinner"]) { self.levelpointinfo = [[self.arpoints objectatindex:icount] objectforkey:@"coordsminus"]; self.levelpointinfo=[self.levelpointinfo substringfromindex:1]; self.levelpointinfo=[self.levelpointinfo substringtoindex:[self.levelpointinfo length]-2]; self.arlevelpoints=[self.levelpointinfo componentsseparatedbystring:@");("]; cgpoint firstpoint; for(int jcount=0; jcount<[self.arlevelpoints count];++jcount) {

ios objective-c drawing core-graphics

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -