🎨 Identicon rendering improvements

This commit is contained in:
Christian Basler 2018-04-20 07:00:55 +02:00
parent 61e579c0d4
commit be7a7f1af6

View File

@ -95,7 +95,7 @@ class Identicon(input: BitmessageAddress) : Drawable() {
} }
if (isChan) { if (isChan) {
textPaint.textSize = 2 * cellHeight textPaint.textSize = 2 * cellHeight
canvas.drawText("[isChan]", offsetX + width / 2, offsetY + 6.7f * cellHeight, textPaint) canvas.drawText("[ chan ]", offsetX + width / 2, offsetY + 6.7f * cellHeight, textPaint)
} }
} }
@ -156,7 +156,7 @@ class MultiIdenticon(input: List<BitmessageAddress>, @ColorInt private val backg
} }
4 -> { 4 -> {
canvas.drawCircle(width / 2, height / 2, width / 2, paint) canvas.drawCircle(width / 2, height / 2, width / 2, paint)
val scale = 2f / (1f + sqrt(2f)) val scale = 1f / (1f + sqrt(2f))
val borderScale = 0.5f - scale val borderScale = 0.5f - scale
val w = width * scale val w = width * scale
val h = height * scale val h = height * scale