Skip to content

Commit d979e54

Browse files
committed
chor: Rename drawPlotLines to drawPolyline
1 parent c0bf874 commit d979e54

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Sources/AGGRenderer/AGGRenderer/AGGRenderer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public class AGGRenderer: Renderer{
185185
agg_object)
186186
}
187187

188-
public func drawPlotLines(polyline: Polyline,
188+
public func drawPolyline(_ polyline: Polyline,
189189
strokeWidth thickness: Float,
190190
strokeColor: Color,
191191
isDashed: Bool) {

Sources/QuartzRenderer/QuartzRenderer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ public class QuartzRenderer: Renderer {
401401
context.setLineDash(phase: 1, lengths: [])
402402
}
403403

404-
public func drawPlotLines(polyline: Polyline,
404+
public func drawPolyline(_ polyline: Polyline,
405405
strokeWidth thickness: Float,
406406
strokeColor: Color,
407407
isDashed: Bool) {

Sources/SVGRenderer/SVGRenderer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public class SVGRenderer: Renderer{
186186
lines.append(line)
187187
}
188188

189-
public func drawPlotLines(polyline: Polyline,
189+
public func drawPolyline(_ polyline: Polyline,
190190
strokeWidth thickness: Float,
191191
strokeColor: Color,
192192
isDashed: Bool) {

Sources/SwiftPlot/Histogram.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ extension Histogram: HasGraphLayout {
331331
func endLine() {
332332
// This algorithm should never produce lines with less than 2 points
333333
guard let polyline = Polyline(points: line) else { fatalError("drawData: Expecting 2 or more points, got \(line.count) instead") }
334-
renderer.drawPlotLines(polyline: polyline, strokeWidth: strokeWidth,
334+
renderer.drawPolyline(polyline, strokeWidth: strokeWidth,
335335
strokeColor: series.color, isDashed: false)
336336
line.removeAll(keepingCapacity: true)
337337
}

Sources/SwiftPlot/LineChart.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ extension LineGraph: HasGraphLayout {
423423
let p2 = s.scaledValues[1]
424424
let tail = s.scaledValues[2...].map { Point(Float($0.x), Float($0.y)) }
425425

426-
renderer.drawPlotLines(polyline: Polyline(Point(Float(p1.x),Float(p1.y)), Point(Float(p2.x), Float(p2.y)), tail: tail),
426+
renderer.drawPolyline(Polyline(Point(Float(p1.x),Float(p1.y)), Point(Float(p2.x), Float(p2.y)), tail: tail),
427427
strokeWidth: plotLineThickness,
428428
strokeColor: s.color,
429429
isDashed: false)
@@ -433,7 +433,7 @@ extension LineGraph: HasGraphLayout {
433433
let p1 = s.scaledValues[0]
434434
let p2 = s.scaledValues[1]
435435
let tail = s.scaledValues[2...].map { Point(Float($0.x), Float($0.y)) }
436-
renderer.drawPlotLines(polyline: Polyline(Point(Float(p1.x),Float(p1.y)), Point(Float(p2.x), Float(p2.y)), tail: tail),
436+
renderer.drawPolyline(Polyline(Point(Float(p1.x),Float(p1.y)), Point(Float(p2.x), Float(p2.y)), tail: tail),
437437
strokeWidth: plotLineThickness,
438438
strokeColor: s.color,
439439
isDashed: true)

Sources/SwiftPlot/Renderer.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ public protocol Renderer: AnyObject{
6666
strokeWidth thickness: Float,
6767
strokeColor: Color, isDashed: Bool)
6868

69-
/*drawPlotLines()
69+
/*drawPolyline()
7070
*params: polyline: Polyline,
7171
* strokeWidth thickness: Float,
7272
* strokeColor: Color,
7373
* isDashed: Bool
7474
*description: Draws all the line segments in a single data series for a Line Graph.
7575
* This function always operates in the coordinate system with the shifted origin.
7676
*/
77-
func drawPlotLines(polyline: Polyline,
78-
strokeWidth thickness: Float,
79-
strokeColor: Color, isDashed: Bool)
77+
func drawPolyline(_ polyline: Polyline,
78+
strokeWidth thickness: Float,
79+
strokeColor: Color, isDashed: Bool)
8080

8181
/*drawText()
8282
*params: text s: String,

0 commit comments

Comments
 (0)