Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #101 from ShivamSoni24/charts-40276768
Browse files Browse the repository at this point in the history
Cast operands to float
  • Loading branch information
DorreenRostami authored Oct 14, 2023
2 parents 3ee9158 + 8a37f5f commit d01b17b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/de/dennisguse/opentracks/chart/ChartView.java
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,8 @@ private void drawMarker(Canvas canvas) {
}
canvas.save();
float x = getX(getMarkerXValue(marker));
canvas.drawLine(x, topBorder + spacer + markerHeight / 2, x, topBorder + effectiveHeight, markerPaint);
canvas.translate(x - (markerWidth * MARKER_X_ANCHOR), topBorder + spacer);
canvas.drawLine(x, (float)(topBorder) + spacer + markerHeight / 2, x, (float)(topBorder) + effectiveHeight, markerPaint);
canvas.translate(x - (markerWidth * MARKER_X_ANCHOR), (float)(topBorder + spacer));

markerPin.draw(canvas);
canvas.restore();
Expand All @@ -654,7 +654,7 @@ private void drawGrid(Canvas canvas) {
List<Double> xAxisMarkerPositions = getXAxisMarkerPositions(getXAxisInterval());
for (double position : xAxisMarkerPositions) {
int x = getX(position);
canvas.drawLine(x, topBorder, x, topBorder + effectiveHeight, gridPaint);
canvas.drawLine(x, topBorder, x, (float)(topBorder) + effectiveHeight, gridPaint);
}
// Y axis grid
float rightEdge = getX(maxX);
Expand Down

0 comments on commit d01b17b

Please sign in to comment.