6-1-1 Canvas Basics 1 Use canvas draw basic shapes like line, circle, rectangle, and points with different attributes such as style, stroke cap, brush.
• Canvas • DrawScope • Path • Path Effect
|
 |
|
|
6-1-2 Canvas Basics 2 Use canvas to draw arc, with path effect, stroke cap, stroke join, miter and other attributes and draw images with src, dst attributes.
• Canvas • DrawScope • Path • Path Effect
|
 |
|
|
6-1-3 Canvas Paths Use canvas to draw path using absolute and relative positions, adding arc to path, drawing custom paths, progress, polygons, quads, and cubic.
• Canvas • DrawScope • Path • Path Effect
|
 |
|
|
6-1-4 Canvas Path Ops Use canvas to clip paths, or canvas using path, or rectangle with operations such as Difference, Intersect, Union, Xor, or ReverseDifference…
• Canvas • DrawScope • Path • PathOperation • ClipOperation
|
 |
|
|
6-1-5 Canvas Path Segments Use canvas to flatten Android Path to path segments and display PathSegment start and/or end points.
• Canvas • DrawScope • Path • PathSegment
|
 |
|
|
6-1-6 Canvas PathEffect Use PathEffect such as dashedPathEffect, cornerPathEffect, chainPathEffect and stompedPathEffect to draw shapes add path effects around Composables
• Canvas • DrawScope • Path • Path Effect
|
 |
|
|
6-2-1 Blend(Porter-Duff) Modes Use blend(Porter-Duff) modes to change drawing source/destination or clip based on blend mode ,and manipulate pixels.
• Canvas • DrawScope • Path • Path Effect • BlendMode
|
 |
|
|
6-2-3 Multi-Color VectorDrawable Use blend(Porter-Duff) to create multi colored VectorDrawables or VectorDrawables with fill/empty animations
• Canvas • DrawScope • VectorDrawable • BlendMode
|
 |
|
|
6-4-2 Drawing App Draw to canvas using touch down, move and up events using array of paths to have erase, undo, redo actions and set properties for each path separately.
• Canvas • DrawScope • Path • AwaitPointerEventScope • PointerInputChange • BlendMode
|
 |
|
|
6-5 Color Picker Color Picker that calculates angle from center and gets a color using hue and returns a color as in HSL or RGB color model.
• Canvas • DrawScope • Path • AwaitPointerEventScope • PointerInputChange • BlendMode
|
 |
|
|
6-6 Scale/Translation Edit Editable Composable that changes position and scale when touched and dragged from handles or changes position when touched inside.
• Canvas • DrawScope • Scale • Translate • AwaitPointerEventScope • PointerInputChange
|
 |
|
|
6-7 Gooey Effect Create basic Gooey Effect with static circles and one with moves with touch.
• Canvas • DrawScope • Gooey • Translate • AwaitPointerEventScope • PointerInputChange
|
 |
|
|
6-8-1 Cutout Arc Shape Use Path.cubicTo, Path.arcTo to draw cutout shape.
• Canvas • Path • Scale
|
 |
|
|
6-9-1 Neon Glow Effect Use paint.asFrameworkPaint() to create blur effect to mimic neon glow and infinite animation to dim and glow infinitely.
• Canvas • Path • Neon • AwaitPointerEventScope • PointerInputChange
|
 |
|
|
6-11 Canvas Erase Percentage Use blend(Porter-Duff) modes with androidx.compose.ui.graphics.Canvas to erase and compare pixels with erased Bitmap to find ou percentage of erased area.
• ActualCanvas • Path • AwaitPointerEventScope • PointerInputChange
|
 |
|
|
6-12 Diagonal Price Tag Use Modifier.drawBehind and Modifier.composed to draw diagonal price tag with shimmer effect
• TextMeasurer • Canvas • Composed • Brush • Image
|
 |
|
|
6-13 Border Progress Use Path segments to create path with progress to display remaining time
• Canvas • Path • PathSegment
|
 |
|
|
6-14 Pie Chart Draw pie chart with dividers, and text between angles.
• Canvas • Path • Animatable • TextMeasurer
|
 |
|
|
6-15 Pie Chart with Touch Animation Animate Pie Chart on touch and get data of touched section.
• Canvas • Path • Animatable • TextMeasurer • detectTapGestures
|
 |
|
|
6-17 Animated Rainbow Border Draw animated rainbow color border using BlendMode.SrcIn and Modifier.drawWithCache
• Canvas • Shape • BlendMode • Brush
|
 |
|
|
6-20 PathParser and PathMeasure Create Path from string and animate segments via PathMeasure.
• Canvas • Path • PathParser • PathMeasure • PathSegment • animateFloatAsState
|
|
评论