Small refactoring
This commit is contained in:
parent
95a1d5c9ee
commit
f5974f7cf3
2 changed files with 5 additions and 13 deletions
|
@ -95,16 +95,10 @@ public class Renderable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBorderPaint(@NonNull Paint paint) {
|
public void setGradientTrackParams(GradientScaleType gradientScaleType, @NonNull Paint borderPaint, boolean shouldDrawBorder) {
|
||||||
borderPaint = paint;
|
this.scaleType = gradientScaleType;
|
||||||
}
|
this.borderPaint = borderPaint;
|
||||||
|
this.drawBorder = shouldDrawBorder;
|
||||||
public void setGradientScaleType(GradientScaleType type) {
|
|
||||||
this.scaleType = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void shouldDrawBorder(boolean drawBorder) {
|
|
||||||
this.drawBorder = drawBorder;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GpxGeometryWay getGeometryWay() {
|
public GpxGeometryWay getGeometryWay() {
|
||||||
|
|
|
@ -726,9 +726,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
updatePaints(color, width, selectedGpxFile.isRoutePoints(), currentTrack, settings, tileBox);
|
updatePaints(color, width, selectedGpxFile.isRoutePoints(), currentTrack, settings, tileBox);
|
||||||
if (ts.renderer instanceof Renderable.RenderableSegment) {
|
if (ts.renderer instanceof Renderable.RenderableSegment) {
|
||||||
Renderable.RenderableSegment renderableSegment = (Renderable.RenderableSegment) ts.renderer;
|
Renderable.RenderableSegment renderableSegment = (Renderable.RenderableSegment) ts.renderer;
|
||||||
renderableSegment.setBorderPaint(borderPaint);
|
renderableSegment.setGradientTrackParams(scaleType, borderPaint, true);
|
||||||
renderableSegment.setGradientScaleType(scaleType);
|
|
||||||
renderableSegment.shouldDrawBorder(true);
|
|
||||||
renderableSegment.drawSegment(view.getZoom(), paint, canvas, tileBox);
|
renderableSegment.drawSegment(view.getZoom(), paint, canvas, tileBox);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue