Skip to content

Commit 61e97db

Browse files
authored
Merge pull request #3 from GoodNotes/khoi/gg
Expose MBezierPath helper methods as public API
2 parents 7509456 + 01e44f6 commit 61e97db

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Source/UI/MBezierPath+Extension_macOS.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ extension MBezierPath {
9898
close()
9999
}
100100

101-
func addLine(to: NSPoint) {
101+
public func addLine(to: NSPoint) {
102102
self.line(to: to)
103103
}
104104

105-
func addCurve(to: NSPoint, controlPoint1: NSPoint, controlPoint2: NSPoint) {
105+
public func addCurve(to: NSPoint, controlPoint1: NSPoint, controlPoint2: NSPoint) {
106106
self.curve(to: to, controlPoint1: controlPoint1, controlPoint2: controlPoint2)
107107
}
108108

109-
func addQuadCurve(to: NSPoint, controlPoint: NSPoint) {
109+
public func addQuadCurve(to: NSPoint, controlPoint: NSPoint) {
110110
let QP0 = self.currentPoint
111111
let CP3 = to
112112

@@ -123,17 +123,17 @@ extension MBezierPath {
123123
self.addCurve(to: CP3, controlPoint1: CP1, controlPoint2: CP2)
124124
}
125125

126-
func addArc(withCenter: NSPoint, radius: CGFloat, startAngle: CGFloat, endAngle: CGFloat, clockwise: Bool) {
126+
public func addArc(withCenter: NSPoint, radius: CGFloat, startAngle: CGFloat, endAngle: CGFloat, clockwise: Bool) {
127127
let startAngleRadian = ((startAngle) * (180.0 / .pi))
128128
let endAngleRadian = ((endAngle) * (180.0 / .pi))
129129
self.appendArc(withCenter: withCenter, radius: radius, startAngle: startAngleRadian, endAngle: endAngleRadian, clockwise: !clockwise)
130130
}
131131

132-
func addPath(path: NSBezierPath!) {
132+
public func addPath(path: NSBezierPath) {
133133
self.append(path)
134134
}
135135

136-
func apply(_ transform: CGAffineTransform) {
136+
public func apply(_ transform: CGAffineTransform) {
137137
let affineTransform = AffineTransform(
138138
m11: transform.a,
139139
m12: transform.b,

0 commit comments

Comments
 (0)