void fill(int color) { if (GraphicUtils.getAlpha(color) > 0) { this.canvas.fillColor(color); } }
/** * Fills the area outside the specificed rectangle with color. * This method is used to blank out areas that fall outside the map area. * * @param color the fill color for the outside area * @param insideArea the inside area on which not to draw */ void fillOutsideAreas(int color, Rectangle insideArea) { this.canvas.setClipDifference((int) insideArea.left, (int) insideArea.top, (int) insideArea.getWidth(), (int) insideArea.getHeight()); this.canvas.fillColor(color); this.canvas.resetClip(); }
/** * Fills the area outside the specificed rectangle with color. Use this method when * overpainting with a transparent color as it sets the PorterDuff mode. * This method is used to blank out areas that fall outside the map area. * * @param color the fill color for the outside area * @param insideArea the inside area on which not to draw */ void fillOutsideAreas(Color color, Rectangle insideArea) { this.canvas.setClipDifference((int) insideArea.left, (int) insideArea.top, (int) insideArea.getWidth(), (int) insideArea.getHeight()); this.canvas.fillColor(color); this.canvas.resetClip(); }
canvas.fillColor(this.displayModel.getBackgroundColor());
@Override protected void redraw(Canvas canvas) { canvas.fillColor(Color.TRANSPARENT); ScaleBarLengthAndValue lengthAndValue = this.calculateScaleBarLengthAndValue(); ScaleBarLengthAndValue lengthAndValue2; if (this.scaleBarMode == ScaleBarMode.BOTH) { lengthAndValue2 = this.calculateScaleBarLengthAndValue(this.secondaryDistanceUnitAdapter); } else { lengthAndValue2 = new ScaleBarLengthAndValue(0, 0); } drawScaleBar(canvas, lengthAndValue.scaleBarLength, lengthAndValue2.scaleBarLength, this.paintScaleBarStroke, this.scale); drawScaleBar(canvas, lengthAndValue.scaleBarLength, lengthAndValue2.scaleBarLength, this.paintScaleBar, this.scale); String scaleText1 = this.distanceUnitAdapter.getScaleText(lengthAndValue.scaleBarValue); String scaleText2 = this.scaleBarMode == ScaleBarMode.BOTH ? this.secondaryDistanceUnitAdapter.getScaleText(lengthAndValue2.scaleBarValue) : ""; drawScaleText(canvas, scaleText1, scaleText2, this.paintScaleTextStroke, this.scale); drawScaleText(canvas, scaleText1, scaleText2, this.paintScaleText, this.scale); }
void fill(int color) { if (GraphicUtils.getAlpha(color) > 0) { this.canvas.fillColor(color); } }
/** * Fills the area outside the specificed rectangle with color. * This method is used to blank out areas that fall outside the map area. * * @param color the fill color for the outside area * @param insideArea the inside area on which not to draw */ void fillOutsideAreas(int color, Rectangle insideArea) { this.canvas.setClipDifference((int) insideArea.left, (int) insideArea.top, (int) insideArea.getWidth(), (int) insideArea.getHeight()); this.canvas.fillColor(color); this.canvas.resetClip(); }
/** * Fills the area outside the specificed rectangle with color. Use this method when * overpainting with a transparent color as it sets the PorterDuff mode. * This method is used to blank out areas that fall outside the map area. * * @param color the fill color for the outside area * @param insideArea the inside area on which not to draw */ void fillOutsideAreas(Color color, Rectangle insideArea) { this.canvas.setClipDifference((int) insideArea.left, (int) insideArea.top, (int) insideArea.getWidth(), (int) insideArea.getHeight()); this.canvas.fillColor(color); this.canvas.resetClip(); }
canvas.fillColor(this.displayModel.getBackgroundColor());
@Override protected void redraw(Canvas canvas) { canvas.fillColor(Color.TRANSPARENT); ScaleBarLengthAndValue lengthAndValue = this.calculateScaleBarLengthAndValue(); ScaleBarLengthAndValue lengthAndValue2; if (this.scaleBarMode == ScaleBarMode.BOTH) { lengthAndValue2 = this.calculateScaleBarLengthAndValue(this.secondaryDistanceUnitAdapter); } else { lengthAndValue2 = new ScaleBarLengthAndValue(0, 0); } drawScaleBar(canvas, lengthAndValue.scaleBarLength, lengthAndValue2.scaleBarLength, this.paintScaleBarStroke, this.scale); drawScaleBar(canvas, lengthAndValue.scaleBarLength, lengthAndValue2.scaleBarLength, this.paintScaleBar, this.scale); String scaleText1 = this.distanceUnitAdapter.getScaleText(lengthAndValue.scaleBarValue); String scaleText2 = this.scaleBarMode == ScaleBarMode.BOTH ? this.secondaryDistanceUnitAdapter.getScaleText(lengthAndValue2.scaleBarValue) : ""; drawScaleText(canvas, scaleText1, scaleText2, this.paintScaleTextStroke, this.scale); drawScaleText(canvas, scaleText1, scaleText2, this.paintScaleText, this.scale); }