Skip to content

Migrate Brush APIs snippets - #1098

Open
pengzhi-cb wants to merge 1 commit into
android:mainfrom
pengzhi-cb:pengzhi-cb/ink-api-brush-apis
Open

pengzhi-cb wants to merge 1 commit into
android:mainfrom
pengzhi-cb:pengzhi-cb/ink-api-brush-apis

Conversation

@pengzhi-cb

Copy link
Copy Markdown
Contributor

Code snippets are for:

List of modifications:

  • Ink-api-brush-apis page: Updated StockBrushes.pressure() to real API StockBrushes.pressurePen() and parameter colorIntArgb to color in Brush.createWithComposeColor (D17/D14).
  • Ink-api-brush-apis page: Updated android.graphics.Color constants Color.RED and Color.BLUE to Compose Color.Red and Color.Blue in Brush.createWithComposeColor and copyWithComposeColor (D17/D14).
  • Ink-api-brush-apis page (___ink-api-custom-brushes.md shared include): Placed const val TAG inside companion object and updated loadCustomBrushes(context) to loadCustomBrushes() to match parameterless signature (D17/D14).
  • Formatter Measurement (D19): Executed ./gradlew :compose:snippets:spotlessApply. Line deltas: android_compose_stylus_ink_brush_create (6 -> 6 lines), android_compose_stylus_ink_brush_modify (9 -> 9 lines), android_compose_stylus_ink_brush_custom (34 -> 33 lines).

Added assets & origin (D11):

  • compose/snippets/src/main/res/drawable/draw_24px.xml, flag_24px.xml, format_paint_24px.xml: Official Material Symbols vector icons (draw, flag, format_paint).
  • compose/snippets/src/main/res/raw/calligraphy, flag_banner, graffiti: Gzipped binary BrushFamily protocol buffer resources for custom brush loading sample.

Snippets not migrated:

  • None (all 3 snippets on the page were migrated).

@google-cla

google-cla Bot commented Sep 14, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@pengzhi-cb
pengzhi-cb force-pushed the pengzhi-cb/ink-api-brush-apis branch from 483ce1a to c2da65e Compare September 17, 2026 18:20
@pengzhi-cb
pengzhi-cb force-pushed the pengzhi-cb/ink-api-brush-apis branch from c2da65e to e2d2f32 Compare September 17, 2026 18:21
@pengzhi-cb
pengzhi-cb marked this pull request as ready for review September 17, 2026 18:23
@pengzhi-cb
pengzhi-cb requested a review from a team as a code owner September 17, 2026 18:23
@snippet-bot

snippet-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 3 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

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

Successfully merging this pull request may close these issues.

1 participant