Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement paragraph's drawStyle and blendMode paramenters #470

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

MatkovIvan
Copy link
Member

Proposed Changes

  • Implement paragraph's drawStyle and blendMode paramenters.

image

Testing

val textMeasure = rememberTextMeasurer()
Canvas(modifier = Modifier
    .size(400.dp, 100.dp), onDraw = {
    drawRect(color = Green,
        topLeft = Offset(0f, 50.dp.toPx()))
    drawText(
        textMeasurer = textMeasure,
        text = "Text on Canvas",
        style = TextStyle(
            fontSize = 50.sp,
            color = Red
        ),
        topLeft = Offset(20.dp.toPx(), 20.dp.toPx()),
        blendMode = BlendMode.SrcOut
    )
})
Text(
    text = "Hello",
    style = TextStyle(
        fontSize = 200.sp,
        color = Blue,
        drawStyle = Stroke(10f)
    )
)

Issues Fixed

Fixes JetBrains/compose-multiplatform#2883

@MatkovIvan MatkovIvan requested a review from igordmn March 31, 2023 08:45
@MatkovIvan MatkovIvan changed the title Ivan.matkov/new paragraph drawing Implement paragraph's drawStyle and blendMode paramenters Mar 31, 2023
@MatkovIvan MatkovIvan merged commit 9eba4e2 into jb-main Mar 31, 2023
@MatkovIvan MatkovIvan deleted the ivan.matkov/new-paragraph-drawing branch March 31, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants