Skip to content

Commit

Permalink
Fixed gridAntialiasEnabled to always take effect
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Feb 23, 2016
1 parent 40ffdd0 commit 6e4bcbc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
8 changes: 2 additions & 6 deletions Charts/Classes/Renderers/ChartXAxisRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,8 @@ public class ChartXAxisRenderer: ChartAxisRendererBase
}

CGContextSaveGState(context)

if (!xAxis.gridAntialiasEnabled)
{
CGContextSetShouldAntialias(context, false)
}


CGContextSetShouldAntialias(context, xAxis.gridAntialiasEnabled)
CGContextSetStrokeColorWithColor(context, xAxis.gridColor.CGColor)
CGContextSetLineWidth(context, xAxis.gridLineWidth)
CGContextSetLineCap(context, xAxis.gridLineCap)
Expand Down
1 change: 1 addition & 0 deletions Charts/Classes/Renderers/ChartXAxisRendererBarChart.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public class ChartXAxisRendererBarChart: ChartXAxisRenderer

CGContextSaveGState(context)

CGContextSetShouldAntialias(context, xAxis.gridAntialiasEnabled)
CGContextSetStrokeColorWithColor(context, xAxis.gridColor.CGColor)
CGContextSetLineWidth(context, xAxis.gridLineWidth)
CGContextSetLineCap(context, xAxis.gridLineCap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public class ChartXAxisRendererHorizontalBarChart: ChartXAxisRendererBarChart

CGContextSaveGState(context)

CGContextSetShouldAntialias(context, xAxis.gridAntialiasEnabled)
CGContextSetStrokeColorWithColor(context, xAxis.gridColor.CGColor)
CGContextSetLineWidth(context, xAxis.gridLineWidth)
CGContextSetLineCap(context, xAxis.gridLineCap)
Expand Down
6 changes: 1 addition & 5 deletions Charts/Classes/Renderers/ChartYAxisRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,7 @@ public class ChartYAxisRenderer: ChartAxisRendererBase
{
CGContextSaveGState(context)

if (!yAxis.gridAntialiasEnabled)
{
CGContextSetShouldAntialias(context, false)
}

CGContextSetShouldAntialias(context, yAxis.gridAntialiasEnabled)
CGContextSetStrokeColorWithColor(context, yAxis.gridColor.CGColor)
CGContextSetLineWidth(context, yAxis.gridLineWidth)
CGContextSetLineCap(context, yAxis.gridLineCap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public class ChartYAxisRendererHorizontalBarChart: ChartYAxisRenderer
// pre alloc
var position = CGPoint()

CGContextSetShouldAntialias(context, yAxis.gridAntialiasEnabled)
CGContextSetStrokeColorWithColor(context, yAxis.gridColor.CGColor)
CGContextSetLineWidth(context, yAxis.gridLineWidth)
CGContextSetLineCap(context, yAxis.gridLineCap)
Expand Down

0 comments on commit 6e4bcbc

Please sign in to comment.