iOS Swift Stroke Width -
iOS Swift Stroke Width -
i have problem linewidth when drawing different shapes in uiview. shapes in attached pictured should have linewidth of 3. here's code used:
var path:uibezierpath = uibezierpath() path.movetopoint(cgpoint(x: 0.0, y: 0.0)) path.addlinetopoint(cgpoint(x: 0.0, y: 50.0)) path.linewidth = 3.0 path.stroke() can see in pic, circle has true stroke size of 3px. hands of clock 2px (this why they're badly aligned).
can help me please?
i figured out, i'll post reply interested. line stroke drawn on every side of shape. so, in case, started drawing @ point (0,0) (0,50). left side clipped, , right side beingness drawn. changing code
path.movetopoint(cgpoint(x: 1.0, y: 0.0)) path.addlinetopoint(cgpoint(x: 1.0, y: 50.0)) resolved problem.
ios swift path draw
Comments
Post a Comment