Cluster marker is clipped, fixed by reducing radius (#382)

* fixed cluster marker is clipped by reducing radius

fixed comment, swaped fill <-> outline

* replaced static size with dpi dependent size
This commit is contained in:
Wolfgang Schramm 2017-07-24 18:16:55 +02:00 committed by Emux
parent b90d99f82b
commit c38975fcba

View File

@ -1,6 +1,7 @@
/*
* Copyright 2017 nebular
* Copyright 2017 devemux86
* Copyright 2017 Wolfgang Schramm
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
@ -74,11 +75,12 @@ public class ScreenUtils {
private void draw(Canvas canvas) {
int halfsize = mSize >> 1;
final int noneClippingRadius = halfsize - getPixels(2);
// outline
canvas.drawCircle(halfsize, halfsize, halfsize, mPaintCircle);
// fill
canvas.drawCircle(halfsize, halfsize, halfsize, mPaintBorder);
canvas.drawCircle(halfsize, halfsize, noneClippingRadius, mPaintCircle);
// outline
canvas.drawCircle(halfsize, halfsize, noneClippingRadius, mPaintBorder);
// draw the number at the center
canvas.drawText(mText,
(canvas.getWidth() - mPaintText.getTextWidth(mText)) * 0.5f,