Dotted Line for PDF Rendering in iOS -


i wont know how render dotted line on pdf.

cgcontextref currentcontext = uigraphicsgetcurrentcontext();  cgcontextsetstrokecolorwithcolor(currentcontext, [uicolor graycolor].cgcolor); cgfloat lengths[] = {0, 8}; cgcontextsetlinecap(currentcontext, kcglinecapround); cgcontextsetlinewidth(currentcontext, 1); cgcontextsetlinedash(currentcontext, 0.0f, lengths, 2);  cgcontextbeginpath(currentcontext); cgcontextmovetopoint(currentcontext, x1, y1); cgcontextaddlinetopoint(currentcontext, x2, y2);  cgcontextclosepath(currentcontext); cgcontextdrawpath(currentcontext, kcgpathstroke); 

from understand, code should produce dotted line has 0 units of painted (dot) followed 8 units of unpainted line. not. produces following instead:

a dot followed 8 units of empty space followed dot followed 1 unit of empty space followed dot followed 8 units of empty space...etc. post picture don't have enough rep points.

what doing wrong?


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -