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

[IR][Preview] Handle predefined Compose colors during parsing #231

Open
egorikftp opened this issue Oct 15, 2024 · 0 comments
Open

[IR][Preview] Handle predefined Compose colors during parsing #231

egorikftp opened this issue Oct 15, 2024 · 0 comments

Comments

@egorikftp
Copy link
Member

Sample:

val CustomIcons.Play get() = _PlayIcon

private val _PlayIcon =
    ImageVector.Builder(
        name = "Play",
        defaultWidth = 32.dp,
        defaultHeight = 32.dp,
        viewportWidth = 32f,
        viewportHeight = 32f
    ).apply {
        path(
            stroke = SolidColor(Color.White),
            fillAlpha = 1.0f,
            fill = SolidColor(Color.White.copy(alpha = 0.15f)),
            strokeAlpha = 1.0f,
            strokeLineWidth = 2f,
            strokeLineCap = StrokeCap.Round,
            strokeLineJoin = StrokeJoin.Round,
            strokeLineMiter = 10f,
            pathFillType = PathFillType.NonZero
        ) {
            moveTo(3f, 16.2047f)
            verticalLineTo(10.2714f)
            curveTo(3f, 2.9047f, 8.2167f, -0.1119f, 14.6f, 3.5714f)
            lineTo(19.75f, 6.53807f)
            lineTo(24.9f, 9.50474f)
            curveTo(31.2833f, 13.1881f, 31.2833f, 19.2214f, 24.9f, 22.9047f)
            lineTo(19.75f, 25.8714f)
            lineTo(14.6f, 28.8381f)
            curveTo(8.2167f, 32.5214f, 3f, 29.5047f, 3f, 22.1381f)
            verticalLineTo(16.2047f)
            close()
        }
    }.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant