Skip to content

Commit

Permalink
LineTexBucket: fix scale precision #105
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Jan 28, 2018
1 parent 1ba8380 commit 57ce026
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions vtm/src/org/oscim/renderer/bucket/LineTexBucket.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016-2017 devemux86
* Copyright 2016-2018 devemux86
* Copyright 2017 Longri
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
Expand Down Expand Up @@ -368,14 +368,13 @@ public static RenderBucket draw(RenderBucket b, GLViewport v,
GLUtils.setColor(shader.uBgColor, line.color, 1);

float pScale;

if (s >= 1) {
pScale = (line.stipple * s);
int cnt = (int) (pScale / line.stipple);
pScale = (float) line.stipple / (cnt + 1);
pScale = line.stipple * s;
float cnt = pScale / line.stipple;
pScale = line.stipple / (cnt + 1);
} else {
pScale = line.stipple / s;
int cnt = (int) (pScale / line.stipple);
float cnt = pScale / line.stipple;
pScale = line.stipple * cnt;
}

Expand Down

0 comments on commit 57ce026

Please sign in to comment.