Skip to content

Commit 5562eb7

Browse files
committed
Remove GraphLayout.roundMarkers (NFC)
1 parent 0be8104 commit 5562eb7

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Sources/SwiftPlot/GraphLayout.swift

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,12 @@ extension GraphLayout {
104104

105105
// 3. Now that we have the final sizes of everything, we can calculate their locations.
106106
let plotRect = layoutPlotRect(plotSize: plotSize, componentSizes: sizes)
107-
let roundedMarkers = markers.map { var m = $0; roundMarkers(&m); return m } ?? PlotMarkers()
108107

109108
var plan = LayoutPlan(totalSize: size,
110109
plotBorderRect: plotRect,
111110
allComponents: components,
112111
sizes: sizes,
113-
plotMarkers: roundedMarkers,
112+
plotMarkers: markers ?? PlotMarkers(),
114113
legendLabels: legendInfo ?? [])
115114
calcMarkerTextLocations(renderer: renderer, plan: &plan)
116115
calcLegend(plan.legendLabels, renderer: renderer, plan: &plan)
@@ -222,19 +221,6 @@ extension GraphLayout {
222221
return plotSize
223222
}
224223

225-
/// Rounds the given markers to integer pixel locations, for sharper gridlines.
226-
private func roundMarkers(_ markers: inout PlotMarkers) {
227-
// for i in markers.xMarkers.indices {
228-
// markers.xMarkers[i].round(.down)
229-
// }
230-
// for i in markers.yMarkers.indices {
231-
// markers.yMarkers[i].round(.down)
232-
// }
233-
// for i in markers.y2Markers.indices {
234-
// markers.y2Markers[i].round(.down)
235-
// }
236-
}
237-
238224
private func calcMarkerTextLocations(renderer: Renderer, plan: inout LayoutPlan) {
239225
let xLabelOffset = plotBorder.thickness + Self.markerStemLength + Self.xMarkerSpace
240226
let yLabelOffset = plotBorder.thickness + Self.markerStemLength + Self.yMarkerSpace

0 commit comments

Comments
 (0)