Add little logo to the ticker.
This commit is contained in:
parent
bddc4f64a8
commit
7a8d92cb95
@ -122,6 +122,24 @@ public class Ticker implements Part {
|
|||||||
new Rect(_left, _top,
|
new Rect(_left, _top,
|
||||||
_right, _bottom),
|
_right, _bottom),
|
||||||
paint);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user