s

    Shalaga44

    1 year ago
    message has been deleted
    Albert Chang

    Albert Chang

    1 year ago
    This should work:
    Box(modifier = Modifier.fillMaxSize().drawWithCache {
        onDrawWithContent {
            drawRect(Color.Unspecified, blendMode = BlendMode.Clear)
            drawContent()
            val midWidth = size.width / 2
            val midSpace = 200f * density
            val leftPoint = midWidth - (midSpace / 2)
            val rightPoint = midWidth + (midSpace / 2)
            val leftPath = Path().apply {
                moveTo(size.width, 0f)
                lineTo(rightPoint, 0f)
                lineTo(leftPoint, size.height)
                lineTo(size.width, size.height)
                close()
            }
            drawPath(leftPath, Color.Red, blendMode = BlendMode.Xor)
        }
    }) {
        Text(
            text = "ABILITY TO",
            textAlign = TextAlign.Center,
            modifier = Modifier.align(Alignment.Center),
            style = MaterialTheme.typography.h1,
            fontWeight = FontWeight.Bold,
            color = Color.Red
        )
    }
    s

    Shalaga44

    1 year ago
    @Albert Chang ThanQ😍❤️