Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 742 Bytes

README.md

File metadata and controls

22 lines (14 loc) · 742 Bytes

Rounded Irregular Shape

中文说明

How to draw irregular shapes easily?

  • Convert irregular shapes into SVG image
  • Parse SVG image to UIBeizerPath(via PocketSVG)
  • Create ShapeLayer with UIBeizerPath

How to add rounded corners to irregular shapes?

  • Parse (CGPoint, CGPathElementType) from CGPath
  • Caculate radius for each line type points
  • Add arc to these points
  • Integrate all to generate new UIBeizerPath

Done!

demo

For more details please run DEMO project.