dewildte
11/07/2023, 8:55 PMModifier.border
antialiasing when using the circle shape?
I get this subtle ring around the image.
Example in 🧵val avatarModifier = modifier
.clip(CircleShape)
.size(avatarSize)
.border(style.borderSize, color = style.borderColor ?: Color.Transparent, shape = CircleShape)
annsofi
11/07/2023, 8:58 PMdewildte
11/07/2023, 9:26 PMTobias Suchalla
11/08/2023, 6:44 AMfun test() = singleWindowApplication {
MaterialTheme {
Box(Modifier.fillMaxSize(), Alignment.Center) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Box(
Modifier
.clip(CircleShape)
.size(48.dp)
.border(1.dp, Color.Red, CircleShape)
)
Box(
Modifier
.border(1.dp, Color.Red, CircleShape)
.clip(CircleShape)
.size(48.dp)
)
}
}
}
}
Which produces the attached circles (second image shows the difference).