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 brush usage in SkiaParagraph #426

Merged
merged 7 commits into from Mar 13, 2023
Merged

Conversation

MatkovIvan
Copy link
Member

@MatkovIvan MatkovIvan commented Mar 7, 2023

Proposed Changes

Compose 1.2.0 adds Brush API to TextStyle to provide a way to draw text with complex coloring. Here is implementation of this API for Compose Multiplatform (skiko)

Testing

Test: Use experimental API for passing brush to text style

Text(
    text = text,
    style = TextStyle(
        fontWeight = FontWeight.Bold,
        brush = Brush.linearGradient(
            colors = listOf(Red, Blue)
        )
    )
)

image

Issues Fixed

Fixes JetBrains/compose-multiplatform#2814

@MatkovIvan MatkovIvan marked this pull request as ready for review March 9, 2023 15:02
@MatkovIvan MatkovIvan self-assigned this Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants