Fixed
Status Update
Comments
as...@gmail.com <as...@gmail.com> #2
Any updates on this?
an...@gmail.com <an...@gmail.com> #3
Any Update?
ha...@google.com <ha...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 834b2e8efa1317bb69827b5bf31f778295b2e73a
Author: Halil Ozercan <halilibo@google.com>
Date: Fri Aug 12 15:31:52 2022
Add an Experimental DrawStyle parameter to `paint` methods in Paragraph.
DrawStyle is a class from DrawScope that defines how to draw shapes with regards to whether the shape is filled or stroke through. Android platform shares this ability for drawing text besides shapes. By default, the drawing style for text is Fill.
Bug: b/155421273
Relnote: N/A
Test: :compose:ui:ui-text:cAT
Change-Id: Ia775be9576c00afd4ce12bdd0d3044c52ffcc930
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/SkiaParagraph.skiko.kt
M compose/ui/ui-text/api/public_plus_experimental_1.3.0-beta03.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidTextPaintTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/Paragraph.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidParagraph.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/Paragraph.skiko.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidTextPaint.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
https://android-review.googlesource.com/2185559
Branch: androidx-main
commit 834b2e8efa1317bb69827b5bf31f778295b2e73a
Author: Halil Ozercan <halilibo@google.com>
Date: Fri Aug 12 15:31:52 2022
Add an Experimental DrawStyle parameter to `paint` methods in Paragraph.
DrawStyle is a class from DrawScope that defines how to draw shapes with regards to whether the shape is filled or stroke through. Android platform shares this ability for drawing text besides shapes. By default, the drawing style for text is Fill.
Bug:
Relnote: N/A
Test: :compose:ui:ui-text:cAT
Change-Id: Ia775be9576c00afd4ce12bdd0d3044c52ffcc930
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Paragraph.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/SkiaParagraph.skiko.kt
M compose/ui/ui-text/api/public_plus_experimental_1.3.0-beta03.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidTextPaintTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/Paragraph.android.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidParagraph.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/Paragraph.skiko.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidTextPaint.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
na...@google.com <na...@google.com> #5
This bug was linked in a change in the following release(s):
androidx.compose.ui:ui-text:1.3.0-beta03
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit cede2146b89c1459e990a58cb9728eecc6561173
Author: Halil Ozercan <halilibo@google.com>
Date: Fri Aug 12 15:31:52 2022
Add an Experimental DrawStyle parameter to `paint` methods in MultiParagraph.
Bug: b/155421273
DrawStyle is a class from DrawScope that defines how to draw shapes with regards to whether the shape is filled or stroke through. Android platform shares this ability for drawing text besides shapes. By default, the drawing style for text is Fill.
Relnote: "Added DrawStyle parameter to Paragraph and MultiParagraph paint functions that enables drawing outlined text."
Test: :compose:ui:ui-text:cAT
Change-Id: Ic8102680bd95cd65f03bac4f3b866e3df637cacf
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidMultiParagraphDraw.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/platform/PlatformMultiParagraphDraw.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaMultiParagraphDraw.skiko.kt
https://android-review.googlesource.com/2185560
Branch: androidx-main
commit cede2146b89c1459e990a58cb9728eecc6561173
Author: Halil Ozercan <halilibo@google.com>
Date: Fri Aug 12 15:31:52 2022
Add an Experimental DrawStyle parameter to `paint` methods in MultiParagraph.
Bug:
DrawStyle is a class from DrawScope that defines how to draw shapes with regards to whether the shape is filled or stroke through. Android platform shares this ability for drawing text besides shapes. By default, the drawing style for text is Fill.
Relnote: "Added DrawStyle parameter to Paragraph and MultiParagraph paint functions that enables drawing outlined text."
Test: :compose:ui:ui-text:cAT
Change-Id: Ic8102680bd95cd65f03bac4f3b866e3df637cacf
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidMultiParagraphDraw.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/platform/PlatformMultiParagraphDraw.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/TextTestExtensions.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/MultiParagraphIntegrationTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/MultiParagraph.kt
M compose/ui/ui-text/src/skikoMain/kotlin/androidx/compose/ui/text/platform/SkiaMultiParagraphDraw.skiko.kt
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit d3c3fac44d85a711ce24cdb42ca053a52cbe364d
Author: Halil Ozercan <halilibo@google.com>
Date: Thu Aug 04 15:11:55 2022
Add demos for DrawStyle in Text
Bug: b/155421273
Test: N/A - only demo change
Change-Id: Ib40df2a91332076d466f8eb7f5f5dcc1f245da61
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/StrokeDemo.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
https://android-review.googlesource.com/2177785
Branch: androidx-main
commit d3c3fac44d85a711ce24cdb42ca053a52cbe364d
Author: Halil Ozercan <halilibo@google.com>
Date: Thu Aug 04 15:11:55 2022
Add demos for DrawStyle in Text
Bug:
Test: N/A - only demo change
Change-Id: Ib40df2a91332076d466f8eb7f5f5dcc1f245da61
A compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/StrokeDemo.kt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/TextDemos.kt
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 40bca873ee88887caf34da1a1aaee93cb6ddc7b6
Author: Halil Ozercan <halilibo@google.com>
Date: Thu Aug 04 15:11:55 2022
Introduce DrawStyle in TextStyle and SpanStyle to enable outlined text drawing.
Bug: b/155421273
This change adds Experimental DrawStyle attribute to both TextStyle and SpanStyle. DrawStyle is a sealed class that effectively corresponds to `android.graphics.Paint.Style` enum which indicates how to draw a path or shape. Until now the default value have been `FILL` which colors in the text as expected. `Stroke` DrawStyle enables developers to color only the outline of a path or text.
Test: :compose:ui:ui-text:testDebug
Test: :compose:ui:ui-text:cAT
Relnote: "Added DrawStyle as an Experimental attribute to TextStyle and SpanStyle to enable drawing outlined text."
Change-Id: If24b8510daa597283c9f4d39c590747ebd822d69
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleLayoutAttributesTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/SpanStyleTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextPainter.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/SpanStyle.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/style/DrawStyleSpan.android.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidTextPaint.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
https://android-review.googlesource.com/2177784
Branch: androidx-main
commit 40bca873ee88887caf34da1a1aaee93cb6ddc7b6
Author: Halil Ozercan <halilibo@google.com>
Date: Thu Aug 04 15:11:55 2022
Introduce DrawStyle in TextStyle and SpanStyle to enable outlined text drawing.
Bug:
This change adds Experimental DrawStyle attribute to both TextStyle and SpanStyle. DrawStyle is a sealed class that effectively corresponds to `android.graphics.Paint.Style` enum which indicates how to draw a path or shape. Until now the default value have been `FILL` which colors in the text as expected. `Stroke` DrawStyle enables developers to color only the outline of a path or text.
Test: :compose:ui:ui-text:testDebug
Test: :compose:ui:ui-text:cAT
Relnote: "Added DrawStyle as an Experimental attribute to TextStyle and SpanStyle to enable drawing outlined text."
Change-Id: If24b8510daa597283c9f4d39c590747ebd822d69
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleLayoutAttributesTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/SpanStyleTest.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextPainter.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/SpanStyle.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/style/DrawStyleSpan.android.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/TextStyleTest.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextStyle.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidTextPaint.android.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/AndroidParagraphTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.android.kt
ha...@google.com <ha...@google.com>
na...@google.com <na...@google.com> #9
The following release(s) address this bug:
androidx.compose.foundation:foundation:1.4.0-alpha01
androidx.compose.ui:ui-text:1.4.0-alpha01
Description
This is useful when drawing text over a background or image to improve readability.