@Override public void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { if (this.scale == Scale.NONE) { scaleFactor = 1; } if (this.stroke != null) { Paint paint = graphicFactory.createPaint(stroke); paint.setStrokeWidth(this.strokeWidth * scaleFactor); if (this.scale == Scale.ALL) { float[] strokeDasharrayScaled = new float[this.strokeDasharray.length]; for (int i = 0; i < strokeDasharray.length; i++) { strokeDasharrayScaled[i] = this.strokeDasharray[i] * scaleFactor; } paint.setDashPathEffect(strokeDasharrayScaled); } strokes.put(zoomLevel, paint); } this.dyScaled.put(zoomLevel, this.dy * scaleFactor); }
this.strokeDasharray[f] = this.strokeDasharray[f] * displayModel.getScaleFactor(); this.stroke.setDashPathEffect(this.strokeDasharray); } else if (STROKE_LINECAP.equals(name)) { this.stroke.setStrokeCap(Cap.fromString(value));
@Override public void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { if (this.scale == Scale.NONE) { scaleFactor = 1; } if (this.stroke != null) { Paint paint = graphicFactory.createPaint(stroke); paint.setStrokeWidth(this.strokeWidth * scaleFactor); if (this.scale == Scale.ALL) { float[] strokeDasharrayScaled = new float[this.strokeDasharray.length]; for (int i = 0; i < strokeDasharray.length; i++) { strokeDasharrayScaled[i] = this.strokeDasharray[i] * scaleFactor; } paint.setDashPathEffect(strokeDasharrayScaled); } strokes.put(zoomLevel, paint); } this.dyScaled.put(zoomLevel, this.dy * scaleFactor); }
this.strokeDasharray[f] = this.strokeDasharray[f] * displayModel.getScaleFactor(); this.stroke.setDashPathEffect(this.strokeDasharray); } else if (STROKE_LINECAP.equals(name)) { this.stroke.setStrokeCap(Cap.fromString(value));
private Polyline drawBorder(BoundingBox boundingBox) { Paint paint = GRAPHIC_FACTORY.createPaint(); paint.setColor(BLUE); paint.setStrokeWidth(3); paint.setDashPathEffect(new float[]{3, 12}); Polyline polyline = new Polyline(asLatLong(boundingBox), paint, getTileSize()); addLayer(polyline); return polyline; }
private void initialize() { ROUTE_NOT_VALID_PAINT = graphicFactory.createPaint(); ROUTE_NOT_VALID_PAINT.setColor(0xFFFF0000); ROUTE_NOT_VALID_PAINT.setStrokeWidth(getRouteLineWidth()); ROUTE_DOWNLOADING_PAINT = graphicFactory.createPaint(); ROUTE_DOWNLOADING_PAINT.setColor(0x993379FF); ROUTE_DOWNLOADING_PAINT.setStrokeWidth(getRouteLineWidth()); ROUTE_DOWNLOADING_PAINT.setDashPathEffect(new float[]{3, 12}); }