iOS/iOS Swift 개발 일기

[iOS swift] strokePath()

Developer-Michelle 2022. 5. 14. 18:24

https://developer.apple.com/documentation/coregraphics/cgcontext/1454490-strokepath

 

Apple Developer Documentation

 

developer.apple.com

strokePath()

 

현재 경로를 따라 선을 그립니다.

 

컨텍스트 그래픽 상태의 선 너비와 획 색상은 경로를 그리는 데 사용됩니다. 현재 경로는 이 함수 호출의 부작용으로 지워집니다.

 

응용 >>

do it! 책 p612 꽃 그리기에서 원 5개 그릴 때, 마지막에 한번만

context.strokePath() 를 써줘야 한다. (원 한개 끝날때마다 쓰는게 아니라..)