@Override public void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { if (this.scaleRadius) { this.renderRadiusScaled.put(zoomLevel, this.radius * scaleFactor); if (this.stroke != null) { Paint paint = graphicFactory.createPaint(stroke); paint.setStrokeWidth(this.strokeWidth * scaleFactor); strokes.put(zoomLevel, paint); } } }
@Override public void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { if (this.stroke != null) { if (this.scale == Scale.NONE) { scaleFactor = 1; } Paint paint = graphicFactory.createPaint(this.stroke); paint.setStrokeWidth(this.strokeWidth * scaleFactor); this.strokes.put(zoomLevel, paint); } }
@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); }
private static Paint createLineBack(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.WHITE); paint.setStrokeWidth(4 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
private static Paint createPaintFront(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.RED); paint.setStrokeWidth(2 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
private static Paint createLineFront(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.BLUE); paint.setStrokeWidth(2 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
private Paint createScaleBarPaint(Color color, float strokeWidth, Style style) { Paint paint = this.graphicFactory.createPaint(); paint.setColor(color); paint.setStrokeWidth(strokeWidth * this.scale); paint.setStyle(style); paint.setStrokeCap(Cap.SQUARE); return paint; }
private static Paint createPaintBack(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.WHITE); paint.setStrokeWidth(4 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
public Circle(GraphicFactory graphicFactory, DisplayModel displayModel, String elementName, XmlPullParser pullParser, int level) throws XmlPullParserException { super(graphicFactory, displayModel); this.level = level; this.fill = graphicFactory.createPaint(); this.fill.setColor(Color.TRANSPARENT); this.fill.setStyle(Style.FILL); this.fills = new HashMap<>(); this.stroke = graphicFactory.createPaint(); this.stroke.setColor(Color.TRANSPARENT); this.stroke.setStyle(Style.STROKE); this.strokes = new HashMap<>(); this.renderRadiusScaled = new HashMap<>(); extractValues(graphicFactory, displayModel, elementName, pullParser); if (!this.scaleRadius) { this.renderRadius = this.radius; this.stroke.setStrokeWidth(this.strokeWidth); } }
if (this.strokeIncrease > 1) { float scale = (float) Math.pow(this.strokeIncrease, Math.max(zoomLevel - STROKE_MIN_ZOOM, 0)); this.paintStroke.setStrokeWidth(strokeWidth * scale); this.paintStroke.setStrokeWidth(strokeWidth);
private Paint createTextPaint(Color color, float strokeWidth, Style style) { Paint paint = this.graphicFactory.createPaint(); paint.setColor(color); paint.setStrokeWidth(strokeWidth * this.scale); paint.setStyle(style); paint.setTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.setTextSize(12 * this.scale); return paint; }
this.stroke.setColor(XmlUtils.getColor(graphicFactory, value, displayModel.getThemeCallback())); } else if (STROKE_WIDTH.equals(name)) { this.stroke.setStrokeWidth(XmlUtils.parseNonNegativeFloat(name, value) * displayModel.getScaleFactor()); } else if (SYMBOL_ID.equals(name)) { this.symbolId = value;
this.stroke.setColor(XmlUtils.getColor(graphicFactory, value, displayModel.getThemeCallback())); } else if (STROKE_WIDTH.equals(name)) { this.stroke.setStrokeWidth(XmlUtils.parseNonNegativeFloat(name, value) * displayModel.getScaleFactor()); } else { throw XmlUtils.createXmlPullParserException(elementName, name, value, i);
private static Paint createTextBack(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.WHITE); paint.setTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.setTextSize(12 * displayModel.getScaleFactor()); paint.setStrokeWidth(4 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
private static Paint createPaintBack(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.WHITE); paint.setTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.setTextSize(25 * displayModel.getScaleFactor()); paint.setStrokeWidth(2 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
private static Paint createPaintBack(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.WHITE); paint.setTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.setTextSize(12 * displayModel.getScaleFactor()); paint.setStrokeWidth(2 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
@Override public void scaleStrokeWidth(float scaleFactor, byte zoomLevel) { if (this.stroke != null) { if (this.scale == Scale.NONE) { scaleFactor = 1; } Paint paint = graphicFactory.createPaint(this.stroke); paint.setStrokeWidth(this.strokeWidth * scaleFactor); this.strokes.put(zoomLevel, paint); } }
static Paint createPaint(int color, int strokeWidth, Style style) { Paint paint = AndroidGraphicFactory.INSTANCE.createPaint(); paint.setColor(color); paint.setStrokeWidth(strokeWidth); paint.setStyle(style); return paint; }
private static Paint createTextBack(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.WHITE); paint.setTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.setTextSize(12 * displayModel.getScaleFactor()); paint.setStrokeWidth(4 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }
private static Paint createPaintBack(GraphicFactory graphicFactory, DisplayModel displayModel) { Paint paint = graphicFactory.createPaint(); paint.setColor(Color.WHITE); paint.setTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.setTextSize(12 * displayModel.getScaleFactor()); paint.setStrokeWidth(2 * displayModel.getScaleFactor()); paint.setStyle(Style.STROKE); return paint; }