Add little logo to the ticker.

This commit is contained in:
kenkeiras 2018-01-25 23:43:23 +01:00
parent bddc4f64a8
commit 7a8d92cb95

View File

@ -122,6 +122,24 @@ public class Ticker implements Part {
new Rect(_left, _top,
_right, _bottom),
paint);
// Craw a little clock
Paint clockPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
clockPaint.setStyle(Paint.Style.STROKE);
clockPaint.setColor(Color.YELLOW);
clockPaint.setStrokeWidth(2f);
int halfX = (_left + _right) / 2;
int halfY = (_top + _bottom) / 2;
int radius = (_bottom - _top) / 2;
canvas.drawCircle(halfX, halfY,
radius * .8f, clockPaint);
canvas.drawLine(halfX, halfY - radius * 0.2f,
halfX, halfY - radius * 0.8f,
clockPaint);
}
}