# DrawScope

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+class:androidx.compose.ui.graphics.drawscope.DrawScope) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/All
- Cmn

  ```
  @DrawScopeMarker
  interface DrawScope : Density
  ```
Known direct subclasses [CanvasDrawScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/CanvasDrawScope), [ContentDrawScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/ContentDrawScope)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/CanvasDrawScope` | Implementation of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` that issues drawing commands into the specified canvas and bounds via `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/CanvasDrawScope#draw(androidx.compose.ui.unit.Density,androidx.compose.ui.unit.LayoutDirection,androidx.compose.ui.graphics.Canvas,androidx.compose.ui.geometry.Size,kotlin.Function1)` |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/ContentDrawScope` | Receiver scope for drawing content into a layout, where the content can be drawn between other canvas operations. |

*** ** * ** ***

Creates a scoped drawing environment with the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas`. This provides a declarative, stateless API to draw shapes and paths without requiring consumers to maintain underlying `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas` state information. `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` implementations are also provided sizing information and transformations are done relative to the local translation. That is left and top coordinates are always the origin and the right and bottom coordinates are always the specified width and height respectively. Drawing content is not clipped, so it is possible to draw outside of the specified bounds.

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.draw
import androidx.compose.ui.graphics.drawscope.inset
import androidx.compose.ui.graphics.drawscope.rotate
import androidx.compose.ui.unit.dp

// Sample showing how to use the DrawScope receiver scope to issue
// drawing commands
Canvas(Modifier.size(120.dp)) {
    drawRect(color = Color.Gray) // Draw grey background
    // Inset content by 10 pixels on the left/right sides and 12 by the
    // top/bottom
    inset(10.0f, 12.0f) {
        val quadrantSize = size / 2.0f

        // Draw a rectangle within the inset bounds
        drawRect(size = quadrantSize, color = Color.Red)

        rotate(45.0f) { drawRect(size = quadrantSize, color = Color.Blue) }
    }
}
```

## Summary

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#DefaultBlendMode()` Default blending mode used for each drawing operation. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/FilterQuality` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#DefaultFilterQuality()` Default FilterQuality used for determining the filtering algorithm to apply when scaling `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` objects. | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawArc(androidx.compose.ui.graphics.Brush,kotlin.Float,kotlin.Float,kotlin.Boolean,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sweepAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, useCenter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draw an arc scaled to fit inside the given rectangle. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawArc(androidx.compose.ui.graphics.Color,kotlin.Float,kotlin.Float,kotlin.Boolean,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, sweepAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, useCenter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draw an arc scaled to fit inside the given rectangle. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawCircle(androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, radius: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, center: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a circle at the provided center coordinate and radius. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawCircle(androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, radius: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, center: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a circle at the provided center coordinate and radius. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` into the canvas with its top-left corner at the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)( image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap, srcOffset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset, srcSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize, dstOffset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset, dstSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode, filterQuality: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/FilterQuality )` Draws the subset of the given image described by the `src` argument into the canvas in the axis-aligned rectangle given by the `dst` argument. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap, pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect?, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a line between the given points using the given paint. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap, pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect?, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a line between the given points using the given paint. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawOval(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws an oval with the given offset and size. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawOval(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws an oval with the given offset and size. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPath(androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path, brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPath(androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPoints(kotlin.collections.List,androidx.compose.ui.graphics.PointMode,androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( points: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>, pointMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode, brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap, pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect?, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a sequence of points according to the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPoints(kotlin.collections.List,androidx.compose.ui.graphics.PointMode,androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( points: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>, pointMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap, pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect?, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a sequence of points according to the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRect(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a rectangle with the given offset and size. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRect(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a rectangle with the given offset and size. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRoundRect(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,androidx.compose.ui.geometry.CornerRadius,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, cornerRadius: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/CornerRadius, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a rounded rectangle with the provided size, offset and radii for the x and y axis respectively. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRoundRect(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,androidx.compose.ui.geometry.CornerRadius,androidx.compose.ui.graphics.drawscope.DrawStyle,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, cornerRadius: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/CornerRadius, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws a rounded rectangle with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.layer.GraphicsLayer).record(androidx.compose.ui.unit.IntSize,kotlin.Function1)(size: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Record the corresponding drawing commands for this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` instance using the `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` from the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` as defaults. | Cmn |

| ### Public properties |
|---|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#center()` Center of the current bounds of the drawing environment | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawContext` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawContext()` The current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawContext` that contains the dependencies needed to create the drawing environment | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#layoutDirection()` The layout direction of the layout being drawn in. | Cmn |
| `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#size()` Provides the dimensions of the current drawing environment | Cmn |

| ### Extension functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawCircularProgressIndicator(kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.compose.ui.unit.Dp)( progress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors, strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, allowProgressOverflow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, gapSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp )` Draw a simple non-animating circular progress indicator. | android |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).clipPath(androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.ClipOp,kotlin.Function1)(path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path, clipOp: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ClipOp, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Reduces the clip region to the intersection of the current clip and the given path. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).clipRect(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,androidx.compose.ui.graphics.ClipOp,kotlin.Function1)( left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, clipOp: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ClipOp, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Reduces the clip region to the intersection of the current clip and the given rectangle indicated by the given left, top, right and bottom bounds. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).draw(androidx.compose.ui.unit.Density,androidx.compose.ui.unit.LayoutDirection,androidx.compose.ui.graphics.Canvas,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.layer.GraphicsLayer,kotlin.Function1)( density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density, layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection, canvas: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, graphicsLayer: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer?, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Draws into the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas` with the commands specified in the lambda with this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` as a receiver | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawIntoCanvas(kotlin.Function1)(block: (https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Provides access to draw directly with the underlying `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Function1)(inset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Convenience method modifies the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` bounds to inset both left, top, right and bottom bounds by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Function1)`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Function1)(horizontal: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, vertical: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Convenience method modifies the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` bounds to inset both left and right bounds by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Function1)` as well as the top and bottom by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Function1)`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Function1)( left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Simultaneously translate the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` coordinate space by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Function1)` as well as modify the dimensions of the current painting area. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).rotate(kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Function1)(degrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add a rotation (in degrees clockwise) to the current transform at the given pivot point. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).rotateRad(kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Function1)(radians: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add a rotation (in radians clockwise) to the current transform at the given pivot point. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).scale(kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Function1)(scale: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add an axis-aligned scale to the current transform, scaling both the horizontal direction and the vertical direction at the given pivot coordinate. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).scale(kotlin.Float,kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Function1)( scaleX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, scaleY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Add an axis-aligned scale to the current transform, scaling by the first argument in the horizontal direction and the second in the vertical direction at the given pivot coordinate. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).translate(kotlin.Float,kotlin.Float,kotlin.Function1)(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Translate the coordinate space by the given delta in pixels in both the x and y coordinates respectively | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).withTransform(kotlin.Function1,kotlin.Function1)(transformBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawTransform.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, drawBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Perform 1 or more transformations and execute drawing commands with the specified transformations applied. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawLayer(androidx.compose.ui.graphics.layer.GraphicsLayer)(graphicsLayer: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer)` Draw the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` into the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawOutline(androidx.compose.ui.graphics.Outline,androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( outline: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline, brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` on a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawOutline(androidx.compose.ui.graphics.Outline,androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)( outline: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle, colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draws the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` on a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextLayoutResult,androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.BlendMode)( textLayoutResult: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult, brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draw an existing text layout as produced by `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextLayoutResult,androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.BlendMode)( textLayoutResult: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow?, textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration?, drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle?, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draw an existing text layout as produced by `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,kotlin.String,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)( textMeasurer: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer, text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow, softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draw text using a TextMeasurer. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.collections.List,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)( textMeasurer: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer, text: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString, topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle, overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow, softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>>, size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size, blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode )` Draw styled text using a TextMeasurer. | Cmn |

### Inherited functions

From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).roundToPx()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` by rounding
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).roundToPx()()`

Convert Sp to `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` by rounding
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toDp()()`

Convert an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` pixel value to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toDp()()`

Convert a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` pixel value to a Dp
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize` `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.geometry.Size).toDpSize()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize`.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).toPx()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to pixels.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).toPx()()`

Convert Sp to pixels.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpRect.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpRect).toRect()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpRect` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpSize).toSize()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toSp()()`

Convert an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` pixel value to Sp.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toSp()()`

Convert a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` pixel value to a Sp
Cmn From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.TextUnit).toDp()()`

Convert Sp to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`.
Cmn `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.Dp).toSp()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to Sp.
Cmn

### Inherited properties

From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#density()`

The logical density of the display.
Cmn From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#fontScale()`

Current user preference for the scaling factor for fonts.
Cmn

## Public companion properties

### DefaultBlendMode

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val DefaultBlendMode: BlendMode
```

Default blending mode used for each drawing operation. This ensures that content is drawn on top of the pixels in the destination

### DefaultFilterQuality

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.1.0)

```
val DefaultFilterQuality: FilterQuality
```

Default FilterQuality used for determining the filtering algorithm to apply when scaling `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` objects. Maps to the default behavior of bilinear filtering

## Public functions

### drawArc

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawArc(
    brush: Brush,
    startAngle: Float,
    sweepAngle: Float,
    useCenter: Boolean,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draw an arc scaled to fit inside the given rectangle. It starts from startAngle degrees around the oval up to startAngle + sweepAngle degrees around the oval, with zero degrees being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval. If useCenter is true, the arc is closed back to the center, forming a circle sector. Otherwise, the arc is not closed, forming a circle segment.

| Parameters |
|---|---|
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | Color or fill to be applied to the arc |
| `startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Starting angle in degrees. 0 represents 3 o'clock |
| `sweepAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Size of the arc in degrees that is drawn clockwise relative to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawArc(androidx.compose.ui.graphics.Brush,kotlin.Float,kotlin.Float,kotlin.Boolean,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` |
| `useCenter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Flag indicating if the arc is to close the center of the bounds |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the arc to draw |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the arc from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the arc is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawArc(androidx.compose.ui.graphics.Brush,kotlin.Float,kotlin.Float,kotlin.Boolean,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the arc when it is drawn |

### drawArc

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawArc(
    color: Color,
    startAngle: Float,
    sweepAngle: Float,
    useCenter: Boolean,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draw an arc scaled to fit inside the given rectangle. It starts from startAngle degrees around the oval up to startAngle + sweepAngle degrees around the oval, with zero degrees being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval. If useCenter is true, the arc is closed back to the center, forming a circle sector. Otherwise, the arc is not closed, forming a circle segment.

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | Color to be applied to the arc |
| `startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Starting angle in degrees. 0 represents 3 o'clock |
| `sweepAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Size of the arc in degrees that is drawn clockwise relative to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawArc(androidx.compose.ui.graphics.Color,kotlin.Float,kotlin.Float,kotlin.Boolean,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` |
| `useCenter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Flag indicating if the arc is to close the center of the bounds |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the arc to draw |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the arc from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the arc is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawArc(androidx.compose.ui.graphics.Color,kotlin.Float,kotlin.Float,kotlin.Boolean,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the arc when it is drawn |

### drawCircle

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawCircle(
    brush: Brush,
    radius: Float = size.minDimension / 2.0f,
    center: Offset = this.center,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a circle at the provided center coordinate and radius. If no center point is provided the center of the bounds is used.

| Parameters |
|---|---|
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | The color or fill to be applied to the circle |
| `radius: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = size.minDimension / 2.0f` | The radius of the circle |
| `center: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = this.center` | The center coordinate where the circle is to be drawn |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the circle from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the circle is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawCircle(androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the brush |

### drawCircle

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawCircle(
    color: Color,
    radius: Float = size.minDimension / 2.0f,
    center: Offset = this.center,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a circle at the provided center coordinate and radius. If no center point is provided the center of the bounds is used.

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | The color or fill to be applied to the circle |
| `radius: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = size.minDimension / 2.0f` | The radius of the circle |
| `center: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = this.center` | The center coordinate where the circle is to be drawn |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the circle from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the circle is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawCircle(androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the brush |

### drawImage

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawImage(
    image: ImageBitmap,
    topLeft: Offset = Offset.Zero,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` into the canvas with its top-left corner at the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset`. The image is composited into the canvas using the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint`.

| Parameters |
|---|---|
| `image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` | The `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` to draw |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Specifies whether the image is to be drawn filled in or as a rectangular stroke |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to apply to destination |

### drawImage

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun drawImage(
    image: ImageBitmap,
    srcOffset: IntOffset = IntOffset.Zero,
    srcSize: IntSize = IntSize(image.width, image.height),
    dstOffset: IntOffset = IntOffset.Zero,
    dstSize: IntSize = srcSize,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode,
    filterQuality: FilterQuality = DefaultFilterQuality
): Unit
```

Draws the subset of the given image described by the `src` argument into the canvas in the axis-aligned rectangle given by the `dst` argument.

If no src rect is provided, the entire image is scaled into the corresponding destination bounds

| Parameters |
|---|---|
| `image: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ImageBitmap` | The source image to draw |
| `srcOffset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset = IntOffset.Zero` | Optional offset representing the top left offset of the source image to draw, this defaults to the origin of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)` |
| `srcSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize = IntSize(image.width, image.height)` | Optional dimensions of the source image to draw relative to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)`, this defaults the width and height of `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)` |
| `dstOffset: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntOffset = IntOffset.Zero` | Optional offset representing the top left offset of the destination to draw the given image, this defaults to the origin of the current translation tarting top left offset in the destination to draw the image |
| `dstSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize = srcSize` | Optional dimensions of the destination to draw, this defaults to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)` |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Specifies whether the image is to be drawn filled in or as a rectangular stroke |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to apply to destination |
| `filterQuality: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/FilterQuality = DefaultFilterQuality` | Sampling algorithm applied to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawImage(androidx.compose.ui.graphics.ImageBitmap,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,androidx.compose.ui.unit.IntOffset,androidx.compose.ui.unit.IntSize,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode,androidx.compose.ui.graphics.FilterQuality)` when it is scaled and drawn into the destination. The default is `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/FilterQuality#Low()` which scales using a bilinear sampling algorithm |

### drawLine

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawLine(
    brush: Brush,
    start: Offset,
    end: Offset,
    strokeWidth: Float = Stroke.HairlineWidth,
    cap: StrokeCap = Stroke.DefaultCap,
    pathEffect: PathEffect? = null,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a line between the given points using the given paint. The line is stroked.

| Parameters |
|---|---|
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | the color or fill to be applied to the line |
| `start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | first point of the line to be drawn |
| `end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | second point of the line to be drawn |
| `strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Stroke.HairlineWidth` | stroke width to apply to the line |
| `cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap = Stroke.DefaultCap` | treatment applied to the ends of the line segment |
| `pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect? = null` | optional effect or pattern to apply to the line |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | opacity to be applied to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | the blending algorithm to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` |

### drawLine

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawLine(
    color: Color,
    start: Offset,
    end: Offset,
    strokeWidth: Float = Stroke.HairlineWidth,
    cap: StrokeCap = Stroke.DefaultCap,
    pathEffect: PathEffect? = null,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a line between the given points using the given paint. The line is stroked.

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | the color to be applied to the line |
| `start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | first point of the line to be drawn |
| `end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | second point of the line to be drawn |
| `strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Stroke.HairlineWidth` | The stroke width to apply to the line |
| `cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap = Stroke.DefaultCap` | treatment applied to the ends of the line segment |
| `pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect? = null` | optional effect or pattern to apply to the line |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | opacity to be applied to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | the blending algorithm to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawLine(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` |

### drawOval

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawOval(
    brush: Brush,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws an oval with the given offset and size. If no offset from the top left is provided, it is drawn starting from the origin of the current translation. If no size is provided, the size of the current environment is used.

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.draw
import androidx.compose.ui.unit.dp

Canvas(Modifier.size(120.dp)) {
    drawOval(
        brush = Brush.linearGradient(listOf(Color.Red, Color.Blue)),
        topLeft = Offset(10f, 10f),
        size = Size(size.width - 20f, size.height - 20f),
    )
}
```

| Parameters |
|---|---|
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | Color or fill to be applied to the oval |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the rectangle to draw |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the oval from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the oval is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawOval(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the brush |

### drawOval

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawOval(
    color: Color,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws an oval with the given offset and size. If no offset from the top left is provided, it is drawn starting from the origin of the current translation. If no size is provided, the size of the current environment is used.

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.draw
import androidx.compose.ui.unit.dp

Canvas(Modifier.size(120.dp)) {
    drawOval(
        color = Color.Cyan,
        topLeft = Offset(10f, 10f),
        size = Size(size.width - 20f, size.height - 20f),
    )
}
```

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | Color to be applied to the oval |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the rectangle to draw |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the oval from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the oval is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawOval(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the brush |

### drawPath

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawPath(
    path: Path,
    brush: Brush,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color`. Whether this shape is filled or stroked (or both) is controlled by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle`. If the path is filled, then subpaths within it are implicitly closed (see `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#close()`).

| Parameters |
|---|---|
| `path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | Path to draw |
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | Brush to be applied to the path |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the path from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the path is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPath(androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the path when it is drawn |

### drawPath

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawPath(
    path: Path,
    color: Color,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color`. Whether this shape is filled or stroked (or both) is controlled by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle`. If the path is filled, then subpaths within it are implicitly closed (see `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path#close()`).

| Parameters |
|---|---|
| `path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | Path to draw |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | Color to be applied to the path |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the path from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the path is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPath(androidx.compose.ui.graphics.Path,androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the path when it is drawn |

### drawPoints

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawPoints(
    points: List<Offset>,
    pointMode: PointMode,
    brush: Brush,
    strokeWidth: Float = Stroke.HairlineWidth,
    cap: StrokeCap = StrokeCap.Butt,
    pathEffect: PathEffect? = null,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a sequence of points according to the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode`.

The `points` argument is interpreted as offsets from the origin.

| Parameters |
|---|---|
| `points: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>` | List of points to draw with the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` |
| `pointMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` used to indicate how the points are to be drawn |
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | Brush to be applied to the points |
| `strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Stroke.HairlineWidth` | The stroke width to apply to the line |
| `cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap = StrokeCap.Butt` | Treatment applied to the ends of the line segment |
| `pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect? = null` | optional effect or pattern to apply to the points |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the path from 0.0f to 1.0f representing fully transparent to fully opaque respectively. |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPoints(kotlin.collections.List,androidx.compose.ui.graphics.PointMode,androidx.compose.ui.graphics.Brush,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the path when it is drawn |

### drawPoints

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawPoints(
    points: List<Offset>,
    pointMode: PointMode,
    color: Color,
    strokeWidth: Float = Stroke.HairlineWidth,
    cap: StrokeCap = StrokeCap.Butt,
    pathEffect: PathEffect? = null,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a sequence of points according to the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode`.

The `points` argument is interpreted as offsets from the origin.

| Parameters |
|---|---|
| `points: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>` | List of points to draw with the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` |
| `pointMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PointMode` used to indicate how the points are to be drawn |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | Color to be applied to the points |
| `strokeWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Stroke.HairlineWidth` | The stroke width to apply to the line |
| `cap: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/StrokeCap = StrokeCap.Butt` | Treatment applied to the ends of the line segment |
| `pathEffect: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathEffect? = null` | optional effect or pattern to apply to the point |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the path from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawPoints(kotlin.collections.List,androidx.compose.ui.graphics.PointMode,androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.graphics.StrokeCap,androidx.compose.ui.graphics.PathEffect,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the path when it is drawn |

### drawRect

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawRect(
    brush: Brush,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a rectangle with the given offset and size. If no offset from the top left is provided, it is drawn starting from the origin of the current translation. If no size is provided, the size of the current environment is used.

| Parameters |
|---|---|
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | The color or fill to be applied to the rectangle |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the rectangle to draw |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRect(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the rectangle is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRect(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to apply to destination |

### drawRect

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawRect(
    color: Color,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a rectangle with the given offset and size. If no offset from the top left is provided, it is drawn starting from the origin of the current translation. If no size is provided, the size of the current environment is used.

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | The color to be applied to the rectangle |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the rectangle to draw |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRect(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Whether or not the rectangle is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRect(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` source pixels |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to apply to destination |

### drawRoundRect

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawRoundRect(
    brush: Brush,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    cornerRadius: CornerRadius = CornerRadius.Zero,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a rounded rectangle with the provided size, offset and radii for the x and y axis respectively. This rectangle is drawn with the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` parameter and is filled or stroked based on the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle`

| Parameters |
|---|---|
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | The color or fill to be applied to the rounded rectangle |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the rectangle to draw |
| `cornerRadius: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/CornerRadius = CornerRadius.Zero` | Corner radius of the rounded rectangle, negative radii values are clamped to 0 |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to rounded rectangle from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Specifies whether the rounded rectangle is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRoundRect(androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,androidx.compose.ui.geometry.CornerRadius,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the brush |

### drawRoundRect

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun drawRoundRect(
    color: Color,
    topLeft: Offset = Offset.Zero,
    size: Size = this.size.offsetSize(topLeft),
    cornerRadius: CornerRadius = CornerRadius.Zero,
    style: DrawStyle = Fill,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DefaultBlendMode
): Unit
```

Draws a rounded rectangle with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint`. Whether the rectangle is filled or stroked (or both) is controlled by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Paint#style()`.

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | The color to be applied to the rounded rectangle |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offset from the local origin of 0, 0 relative to the current translation |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = this.size.offsetSize(topLeft)` | Dimensions of the rectangle to draw |
| `cornerRadius: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/CornerRadius = CornerRadius.Zero` | Corner radius of the rounded rectangle, negative radii values are clamped to 0 |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Specifies whether the rounded rectangle is stroked or filled in |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to rounded rectangle from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope#drawRoundRect(androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Size,androidx.compose.ui.geometry.CornerRadius,androidx.compose.ui.graphics.drawscope.DrawStyle,kotlin.Float,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DefaultBlendMode` | Blending algorithm to be applied to the color |

### GraphicsLayer.record

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:record)

```
open fun GraphicsLayer.record(
    size: IntSize = this@DrawScope.size.toIntSize(),
    block: DrawScope.() -> Unit
): Unit
```

Record the corresponding drawing commands for this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` instance using the `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` from the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` as defaults. This will retarget the underlying canvas of the provided DrawScope to draw within the layer itself and reset it to the original canvas on the conclusion of this method call.

## Public properties

### center

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
open val center: Offset
```

Center of the current bounds of the drawing environment

### drawContext

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val drawContext: DrawContext
```

The current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawContext` that contains the dependencies needed to create the drawing environment

### layoutDirection

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val layoutDirection: LayoutDirection
```

The layout direction of the layout being drawn in.

### size

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
open val size: Size
```

Provides the dimensions of the current drawing environment

## Extension functions

### DrawScope.drawCircularProgressIndicator

android Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/CircularProgressIndicator.kt+function:drawCircularProgressIndicator)

```
fun DrawScope.drawCircularProgressIndicator(
    progress: Float,
    colors: ProgressIndicatorColors,
    strokeWidth: Dp,
    enabled: Boolean = true,
    allowProgressOverflow: Boolean = false,
    startAngle: Float = CircularProgressIndicatorDefaults.StartAngle,
    endAngle: Float = startAngle,
    gapSize: Dp = CircularProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)
): Unit
```

Draw a simple non-animating circular progress indicator. Prefer to use `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicator.composable#CircularProgressIndicator(kotlin.Function0,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)` directly instead of this method in order to access the recommended animations, but this method can be used when custom animations are required.

Example of a circular progress indicator with custom progress animation:

```kotlin
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.focusable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.wear.compose.material3.CircularProgressIndicator
import androidx.wear.compose.material3.CircularProgressIndicatorDefaults
import androidx.wear.compose.material3.MaterialTheme
import androidx.wear.compose.material3.ProgressIndicatorDefaults
import androidx.wear.compose.material3.drawCircularProgressIndicator

val animatedProgress = remember { Animatable(0f) }
val colors =
    ProgressIndicatorDefaults.colors(indicatorColor = Color.Green, trackColor = Color.White)

LaunchedEffect(Unit) {
    animatedProgress.animateTo(1f, tween(durationMillis = 1024, easing = LinearEasing))
    animatedProgress.animateTo(0f, tween(durationMillis = 1024, easing = LinearEasing))
}

Box(
    modifier =
        Modifier.background(MaterialTheme.colorScheme.background)
            .padding(CircularProgressIndicatorDefaults.FullScreenPadding)
            .fillMaxSize()
) {
    // Draw the circular progress indicator with custom animation
    Spacer(
        Modifier.fillMaxSize().focusable().drawBehind {
            drawCircularProgressIndicator(
                progress = animatedProgress.value,
                strokeWidth = 10.dp,
                colors = colors,
                startAngle = 120f,
                endAngle = 60f,
            )
        }
    )
}
```

| Parameters |
|---|---|
| `progress: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The progress of this progress indicator where 0.0 represents no progress and 1.0 represents completion. |
| `colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors` that will be used to resolve the indicator and track color for this progress indicator in different states. |
| `strokeWidth: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | The stroke width for the progress indicator. The recommended values are `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicatorDefaults#largeStrokeWidth()` and `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicatorDefaults#smallStrokeWidth()`. |
| `enabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | controls the enabled state. Although this component is not clickable, it can be contained within a clickable component. When enabled is `false`, this component will appear visually disabled. |
| `allowProgressOverflow: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | When progress overflow is allowed, values smaller than 0.0 will be coerced to 0, while values larger than 1.0 will be wrapped around and shown as overflow with a different track color `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/ProgressIndicatorColors#overflowTrackBrush(kotlin.Boolean,kotlin.Float)`. For example values 1.2, 2.2 etc will be shown as 20% progress with the overflow color. When progress overflow is not allowed, progress values will be coerced into the range 0..1. |
| `startAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = CircularProgressIndicatorDefaults.StartAngle` | The starting position of the progress arc, measured clockwise in degrees (0 to 360) from the 3 o'clock position. For example, 0 and 360 represent 3 o'clock, 90 and 180 represent 6 o'clock and 9 o'clock respectively. Default is 270 degrees `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/CircularProgressIndicatorDefaults#StartAngle()` (top of the screen). |
| `endAngle: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = startAngle` | The ending position of the progress arc, measured clockwise in degrees (0 to 360) from the 3 o'clock position. For example, 0 and 360 represent 3 o'clock, 90 and 180 represent 6 o'clock and 9 o'clock respectively. By default equal to `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawCircularProgressIndicator(kotlin.Float,androidx.wear.compose.material3.ProgressIndicatorColors,androidx.compose.ui.unit.Dp,kotlin.Boolean,kotlin.Boolean,kotlin.Float,kotlin.Float,androidx.compose.ui.unit.Dp)`. |
| `gapSize: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = CircularProgressIndicatorDefaults.calculateRecommendedGapSize(strokeWidth)` | The size (in Dp) of the gap between the ends of the progress indicator and the track. The stroke endcaps are not included in this distance. |

### DrawScope.clipPath

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:clipPath)

```
inline fun DrawScope.clipPath(
    path: Path,
    clipOp: ClipOp = ClipOp.Intersect,
    block: DrawScope.() -> Unit
): Unit
```

Reduces the clip region to the intersection of the current clip and the given path. This method provides a callback to issue drawing commands within the region defined by the clipped path. After this method is invoked, this clip is no longer applied.

| Parameters |
|---|---|
| `path: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Path` | Shape to clip drawing content within |
| `clipOp: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ClipOp = ClipOp.Intersect` | Clipping operation to conduct on the given bounds, defaults to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ClipOp#Intersect()` |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Lambda callback with this CanvasScope as a receiver scope to issue drawing commands within the provided clip |

### DrawScope.clipRect

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:clipRect)

```
inline fun DrawScope.clipRect(
    left: Float = 0.0f,
    top: Float = 0.0f,
    right: Float = size.width,
    bottom: Float = size.height,
    clipOp: ClipOp = ClipOp.Intersect,
    block: DrawScope.() -> Unit
): Unit
```

Reduces the clip region to the intersection of the current clip and the given rectangle indicated by the given left, top, right and bottom bounds. This provides a callback to issue drawing commands within the clipped region. After this method is invoked, this clip is no longer applied.

Use `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ClipOp#Difference()` to subtract the provided rectangle from the current clip.

| Parameters |
|---|---|
| `left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | Left bound of the rectangle to clip |
| `top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | Top bound of the rectangle to clip |
| `right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = size.width` | Right bound of the rectangle to clip |
| `bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = size.height` | Bottom bound of the rectangle to clip |
| `clipOp: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ClipOp = ClipOp.Intersect` | Clipping operation to conduct on the given bounds, defaults to `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ClipOp#Intersect()` |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Lambda callback with this CanvasScope as a receiver scope to issue drawing commands within the provided clip |

### DrawScope.draw

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:draw)

```
inline fun DrawScope.draw(
    density: Density,
    layoutDirection: LayoutDirection,
    canvas: Canvas,
    size: Size,
    graphicsLayer: GraphicsLayer? = null,
    block: DrawScope.() -> Unit
): Unit
```

Draws into the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas` with the commands specified in the lambda with this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` as a receiver

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithCache
import androidx.compose.ui.graphics.drawscope.draw
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
import androidx.compose.ui.graphics.nativeCanvas
import androidx.compose.ui.unit.dp

Box(
    modifier =
        Modifier.size(120.dp).drawWithCache {
            // Example that shows how to redirect rendering to an Android Picture and then
            // draw the picture into the original destination
            // Note:
            // Canvas#drawPicture is supported with hardware acceleration on Android API 23+
            // Check
            // https://developer.android.com/topic/performance/hardware-accel#drawing-support
            // for details of which drawing operations are supported with hardware acceleration
            val picture = android.graphics.Picture()
            val width = this.size.width.toInt()
            val height = this.size.height.toInt()
            onDrawWithContent {
                val pictureCanvas =
                    androidx.compose.ui.graphics.Canvas(picture.beginRecording(width, height))
                draw(this, this.layoutDirection, pictureCanvas, this.size) {
                    this@onDrawWithContent.drawContent()
                }
                picture.endRecording()

                drawIntoCanvas { canvas -> canvas.nativeCanvas.drawPicture(picture) }
            }
        }
)
```

| Parameters |
|---|---|
| `density: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` used to assist in conversions of density independent pixels to raw pixels to draw |
| `layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` of the layout being drawn in. |
| `canvas: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas` | target canvas to render into |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | bounds relative to the current canvas translation in which the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` should draw within |
| `graphicsLayer: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer? = null` | Current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` we are drawing into. Might be null if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).draw(androidx.compose.ui.unit.Density,androidx.compose.ui.unit.LayoutDirection,androidx.compose.ui.graphics.Canvas,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.layer.GraphicsLayer,kotlin.Function1)` is not provided by a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer`, for example in the case of a software-accelerated drawing |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda that is called to issue drawing commands on this `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` |

### DrawScope.drawIntoCanvas

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:drawIntoCanvas)

```
inline fun DrawScope.drawIntoCanvas(block: (Canvas) -> Unit): Unit
```

Provides access to draw directly with the underlying `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas`. This is helpful for situations to re-use alternative drawing logic in combination with `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope`

| Parameters |
|---|---|
| `block: (https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Lambda callback to issue drawing commands on the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Canvas` |

### DrawScope.inset

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:inset)

```
inline fun DrawScope.inset(inset: Float, block: DrawScope.() -> Unit): Unit
```

Convenience method modifies the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` bounds to inset both left, top, right and bottom bounds by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Function1)`. After this method is invoked, the coordinate space is returned to the state before this inset was applied.

| Parameters |
|---|---|
| `inset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | number of pixels to inset left, top, right, and bottom bounds. |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda that is called to issue additional drawing commands within the modified coordinate space |

### DrawScope.inset

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:inset)

```
inline fun DrawScope.inset(
    horizontal: Float = 0.0f,
    vertical: Float = 0.0f,
    block: DrawScope.() -> Unit
): Unit
```

Convenience method modifies the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` bounds to inset both left and right bounds by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Function1)` as well as the top and bottom by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Function1)`. After this method is invoked, the coordinate space is returned to the state before this inset was applied.

| Parameters |
|---|---|
| `horizontal: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | number of pixels to inset both left and right bounds. Zero by default |
| `vertical: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | Optional number of pixels to inset both top and bottom bounds. Zero by default |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda that is called to issue additional drawing commands within the modified coordinate space |

### DrawScope.inset

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:inset)

```
inline fun DrawScope.inset(
    left: Float,
    top: Float,
    right: Float,
    bottom: Float,
    block: DrawScope.() -> Unit
): Unit
```

Simultaneously translate the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` coordinate space by `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).inset(kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Float,kotlin.Function1)` as well as modify the dimensions of the current painting area. This provides a callback to issue more drawing instructions within the modified coordinate space. This method modifies the width of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope` to be equivalent to width - (left + right) as well as height to height - (top + bottom). After this method is invoked, the coordinate space is returned to the state before the inset was applied.

| Parameters |
|---|---|
| `left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | number of pixels to inset the left drawing bound |
| `top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | number of pixels to inset the top drawing bound |
| `right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | number of pixels to inset the right drawing bound |
| `bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | number of pixels to inset the bottom drawing bound |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda that is called to issue drawing commands within the inset coordinate space |

### DrawScope.rotate

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:rotate)

```
inline fun DrawScope.rotate(degrees: Float, pivot: Offset = center, block: DrawScope.() -> Unit): Unit
```

Add a rotation (in degrees clockwise) to the current transform at the given pivot point. The pivot coordinate remains unchanged by the rotation transformation. After the provided lambda is invoked, the rotation transformation is undone.

| Parameters |
|---|---|
| `degrees: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | to rotate clockwise |
| `pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = center` | The coordinate for the pivot point, defaults to the center of the coordinate space |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda that is called to issue drawing commands within the rotated coordinate space |

### DrawScope.rotateRad

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:rotateRad)

```
inline fun DrawScope.rotateRad(radians: Float, pivot: Offset = center, block: DrawScope.() -> Unit): Unit
```

Add a rotation (in radians clockwise) to the current transform at the given pivot point. The pivot coordinate remains unchanged by the rotation transformation

| Parameters |
|---|---|
| `radians: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | to rotate clockwise |
| `pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = center` | The coordinate for the pivot point, defaults to the center of the coordinate space |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda that is called to issue drawing commands within the rotated coordinate space |

### DrawScope.scale

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:scale)

```
inline fun DrawScope.scale(scale: Float, pivot: Offset = center, block: DrawScope.() -> Unit): Unit
```

Add an axis-aligned scale to the current transform, scaling both the horizontal direction and the vertical direction at the given pivot coordinate. The pivot coordinate remains unchanged by the scale transformation. After this method is invoked, the coordinate space is returned to the state before the scale was applied.

| Parameters |
|---|---|
| `scale: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The amount to scale uniformly in both directions |
| `pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = center` | The coordinate for the pivot point, defaults to the center of the coordinate space |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda used to issue drawing commands within the scaled coordinate space |

### DrawScope.scale

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:scale)

```
inline fun DrawScope.scale(
    scaleX: Float,
    scaleY: Float,
    pivot: Offset = center,
    block: DrawScope.() -> Unit
): Unit
```

Add an axis-aligned scale to the current transform, scaling by the first argument in the horizontal direction and the second in the vertical direction at the given pivot coordinate. The pivot coordinate remains unchanged by the scale transformation. After this method is invoked, the coordinate space is returned to the state before the scale was applied.

| Parameters |
|---|---|
| `scaleX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The amount to scale in X |
| `scaleY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The amount to scale in Y |
| `pivot: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = center` | The coordinate for the pivot point, defaults to the center of the coordinate space |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda used to issue drawing commands within the scaled coordinate space |

### DrawScope.translate

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:translate)

```
inline fun DrawScope.translate(left: Float = 0.0f, top: Float = 0.0f, block: DrawScope.() -> Unit): Unit
```

Translate the coordinate space by the given delta in pixels in both the x and y coordinates respectively

| Parameters |
|---|---|
| `left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | Pixels to translate the coordinate space in the x-axis |
| `top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | Pixels to translate the coordinate space in the y-axis |
| `block: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | lambda that is called to issue drawing commands within the translated coordinate space |

### DrawScope.withTransform

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/drawscope/DrawScope.kt+function:withTransform)

```
inline fun DrawScope.withTransform(transformBlock: DrawTransform.() -> Unit, drawBlock: DrawScope.() -> Unit): Unit
```

Perform 1 or more transformations and execute drawing commands with the specified transformations applied. After this call is complete, the transformation before this call was made is restored

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.size
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.draw
import androidx.compose.ui.graphics.drawscope.inset
import androidx.compose.ui.graphics.drawscope.rotate
import androidx.compose.ui.graphics.drawscope.withTransform
import androidx.compose.ui.unit.dp

Canvas(Modifier.size(120.dp)) { // CanvasScope
    inset(20.0f) {
        // Use withTransform to batch multiple transformations for 1 or more drawing calls
        // that are to be drawn.
        // This is more efficient than issuing nested translation, rotation and scaling
        // calls as the internal state is saved once before and after instead of multiple
        // times between each transformation if done individually
        withTransform({
            translate(10.0f, 12.0f)
            rotate(45.0f, center)
            scale(2.0f, 0.5f)
        }) {
            drawRect(Color.Cyan)
            drawCircle(Color.Blue)
        }
        drawRect(Color.Red, alpha = 0.25f)
    }
}
```

| Parameters |
|---|---|
| `transformBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawTransform.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Callback invoked to issue transformations to be made before the drawing operations are issued |
| `drawBlock: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | Callback invoked to issue drawing operations after the transformations are applied |

### DrawScope.drawLayer

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/layer/GraphicsLayer.kt+function:drawLayer)

```
fun DrawScope.drawLayer(graphicsLayer: GraphicsLayer): Unit
```

Draw the provided `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` into the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope`. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer` provided must have `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/layer/GraphicsLayer#record(androidx.compose.ui.unit.Density,androidx.compose.ui.unit.LayoutDirection,androidx.compose.ui.unit.IntSize,kotlin.Function1)` invoked on it otherwise no visual output will be seen in the rendered result.

```kotlin
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.layer.drawLayer
import androidx.compose.ui.unit.IntOffset

// Build the layer with the density, layout direction and size from the DrawScope
// and position the top left to be 20 pixels from the left and 30 pixels from the top.
// This will the bounds of the layer with a red rectangle
layer.apply {
    record { drawRect(Color.Red) }
    this.topLeft = IntOffset(20, 30)
}

// Draw the layer into the provided DrawScope
drawLayer(layer)
```

```kotlin
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.layer.drawLayer
import androidx.compose.ui.unit.IntSize

// Create a 200 x 200 pixel layer that has a red rectangle drawn in the lower right
// corner.
layer.apply {
    record(size = IntSize(200, 200)) {
        drawRect(Color.Red, topLeft = Offset(size.width / 2f, size.height / 2f))
    }
    // Scale the layer by 1.5x in both the x and y axis relative to the bottom
    // right corner
    scaleX = 1.5f
    scaleY = 1.5f
    pivotOffset = Offset(this.size.width.toFloat(), this.size.height.toFloat())
}

// Draw the layer into the provided DrawScope
drawLayer(layer)
```

```kotlin
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.layer.drawLayer

// Create a layer with the same configuration as the destination DrawScope
// and draw a red rectangle in the layer
layer.apply {
    record { drawRect(Color.Red) }
    // Apply a ColorFilter that will tint the contents of the layer to blue
    // when it is drawn into the destination DrawScope
    colorFilter = ColorFilter.tint(Color.Blue)
}

drawLayer(layer)
```

```kotlin
import androidx.compose.ui.graphics.BlurEffect
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.TileMode
import androidx.compose.ui.graphics.drawscope.DrawScope
import androidx.compose.ui.graphics.drawscope.inset
import androidx.compose.ui.graphics.layer.drawLayer

// Create a layer sized to the destination draw scope that is comprised
// of an inset red rectangle
layer.apply {
    record { inset(20f, 20f) { drawRect(Color.Red) } }
    // Configure a blur to the contents of the layer that is applied
    // when drawn to the destination DrawScope
    renderEffect = BlurEffect(20f, 20f, TileMode.Decal)
}

drawLayer(layer)
```

```kotlin
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.drawscope.inset
import androidx.compose.ui.graphics.layer.drawLayer

// Create a layer sized to the destination draw scope that is comprised
// of an inset red rectangle
layer.apply {
    record { inset(20f, 20f) { drawRect(Color.Red) } }
    // Renders the content of the layer with 50% alpha when it is drawn
    // into the destination
    alpha = 0.5f
}

drawLayer(layer)
```

```kotlin
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.layer.drawLayer

layer.apply {
    record { drawRect(Color.Yellow) }
    // Rotates the yellow rect 45f clockwise relative to the x axis
    rotationX = 45f
}

drawLayer(layer)
```

```kotlin
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.layer.drawLayer

layer.apply {
    record { drawRect(Color.Yellow) }
    // Rotates the yellow rect 45f clockwise relative to the y axis
    rotationY = 45f
    cameraDistance = 5.0f
}

drawLayer(layer)
```

### DrawScope.drawOutline

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/Outline.kt+function:drawOutline)

```
fun DrawScope.drawOutline(
    outline: Outline,
    brush: Brush,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Draws the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` on a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope`.

| Parameters |
|---|---|
| `outline: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` | the outline to draw. |
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | Brush applied to the outline when it is drawn |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to outline from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Specifies whether the outline is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | : ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DrawScope.DefaultBlendMode` | : Blending algorithm to be applied to the outline |

### DrawScope.drawOutline

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/Outline.kt+function:drawOutline)

```
fun DrawScope.drawOutline(
    outline: Outline,
    color: Color,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float = 1.0f,
    style: DrawStyle = Fill,
    colorFilter: ColorFilter? = null,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Draws the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` on a `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope`.

| Parameters |
|---|---|
| `outline: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Outline` | the outline to draw. |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | Color applied to the outline when it is drawn |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | Opacity to be applied to outline from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle = Fill` | Specifies whether the outline is stroked or filled in |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/ColorFilter? = null` | : ColorFilter to apply to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawOutline(androidx.compose.ui.graphics.Outline,androidx.compose.ui.graphics.Color,kotlin.Float,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.ColorFilter,androidx.compose.ui.graphics.BlendMode)` when drawn into the destination |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DrawScope.DefaultBlendMode` | : Blending algorithm to be applied to the outline |

### DrawScope.drawText

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/TextPainter.kt+function:drawText)

```
fun DrawScope.drawText(
    textLayoutResult: TextLayoutResult,
    brush: Brush,
    topLeft: Offset = Offset.Zero,
    alpha: Float = Float.NaN,
    shadow: Shadow? = null,
    textDecoration: TextDecoration? = null,
    drawStyle: DrawStyle? = null,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Draw an existing text layout as produced by `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer`.

This draw function cannot relayout when async font loading resolves. If using async fonts or other dynamic text layout, you are responsible for invalidating layout on changes.

| Parameters |
|---|---|
| `textLayoutResult: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` | Text Layout to be drawn |
| `brush: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Brush` | The brush to use when drawing the text. |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offsets the text from top left point of the current coordinate system. |
| `alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Float.NaN` | Opacity to be applied to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextLayoutResult,androidx.compose.ui.graphics.Brush,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.BlendMode)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively. |
| `shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow? = null` | The shadow effect applied on the text. |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | The decorations to paint on the text (e.g., an underline). |
| `drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle? = null` | Whether or not the text is stroked or filled in. |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DrawScope.DefaultBlendMode` | Blending algorithm to be applied to the text |

### DrawScope.drawText

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/TextPainter.kt+function:drawText)

```
fun DrawScope.drawText(
    textLayoutResult: TextLayoutResult,
    color: Color = Color.Unspecified,
    topLeft: Offset = Offset.Zero,
    alpha: Float = Float.NaN,
    shadow: Shadow? = null,
    textDecoration: TextDecoration? = null,
    drawStyle: DrawStyle? = null,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Draw an existing text layout as produced by `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer`.

This draw function cannot relayout when async font loading resolves. If using async fonts or other dynamic text layout, you are responsible for invalidating layout on changes.

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.layout.layout
import androidx.compose.ui.text.TextLayoutResult
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.drawText
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.unit.sp

val textMeasurer = rememberTextMeasurer()
var textLayoutResult by remember { mutableStateOf<TextLayoutResult?>(null) }

Canvas(
    Modifier.fillMaxSize().layout { measurable, constraints ->
        val placeable = measurable.measure(constraints)
        // TextLayout can be done any time prior to its use in draw, including in a
        // background thread.
        // In this sample, text layout is measured in layout modifier. This way the layout
        // call can be restarted when async font loading completes due to the fact that
        // `.measure` call is executed in `.layout`.
        textLayoutResult =
            textMeasurer.measure(text = "Hello, World!", style = TextStyle(fontSize = 24.sp))
        layout(placeable.width, placeable.height) { placeable.placeRelative(0, 0) }
    }
) {
    // This happens during draw phase.
    textLayoutResult?.let { drawText(it) }
}
```

```kotlin
import androidx.compose.animation.animateColor
import androidx.compose.animation.core.infiniteRepeatable
import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.tween
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.LocalTextStyle
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.drawWithCache
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.layout.layout
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.drawText
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Constraints

// We can disable implicit caching since we will cache in DrawWithCache
val textMeasurer = rememberTextMeasurer(cacheSize = 0)
// Apply the current text style from theme, otherwise TextStyle.Default will be used.
val materialTextStyle = LocalTextStyle.current

// Animate color repeatedly
val infiniteTransition = rememberInfiniteTransition()
val color by
    infiniteTransition.animateColor(
        initialValue = Color.Red,
        targetValue = Color.Blue,
        animationSpec = infiniteRepeatable(tween(1000)),
    )

Box(
    Modifier.fillMaxSize().drawWithCache {
        // Text layout will be measured just once until the size of the drawing area or
        // materialTextStyle changes.
        val textLayoutResult =
            textMeasurer.measure(
                text = "Hello, World!",
                style = materialTextStyle,
                constraints =
                    Constraints.fixed(
                        width = (size.width / 2).roundToInt(),
                        height = (size.height / 2).roundToInt(),
                    ),
                overflow = TextOverflow.Ellipsis,
            )
        // color changes will only invalidate draw phase
        onDrawWithContent {
            drawContent()
            drawText(
                textLayoutResult,
                color = color,
                topLeft =
                    Offset(
                        (size.width - textLayoutResult.size.width) / 2,
                        (size.height - textLayoutResult.size.height) / 2,
                    ),
            )
        }
    }
)
```

| Parameters |
|---|---|
| `textLayoutResult: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` | Text Layout to be drawn |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | Text color to use |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offsets the text from top left point of the current coordinate system. |
| `alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Float.NaN` | opacity to be applied to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextLayoutResult,androidx.compose.ui.graphics.Color,androidx.compose.ui.geometry.Offset,kotlin.Float,androidx.compose.ui.graphics.Shadow,androidx.compose.ui.text.style.TextDecoration,androidx.compose.ui.graphics.drawscope.DrawStyle,androidx.compose.ui.graphics.BlendMode)` from 0.0f to 1.0f representing fully transparent to fully opaque respectively |
| `shadow: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shadow? = null` | The shadow effect applied on the text. |
| `textDecoration: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextDecoration? = null` | The decorations to paint on the text (e.g., an underline). |
| `drawStyle: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/DrawStyle? = null` | Whether or not the text is stroked or filled in. |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DrawScope.DefaultBlendMode` | Blending algorithm to be applied to the text |

### DrawScope.drawText

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/TextPainter.kt+function:drawText)

```
fun DrawScope.drawText(
    textMeasurer: TextMeasurer,
    text: String,
    topLeft: Offset = Offset.Zero,
    style: TextStyle = TextStyle.Default,
    overflow: TextOverflow = TextOverflow.Clip,
    softWrap: Boolean = true,
    maxLines: Int = Int.MAX_VALUE,
    size: Size = Size.Unspecified,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Draw text using a TextMeasurer.

This draw function supports only one text style, and async font loading.

TextMeasurer carries an internal cache to optimize text layout measurement for repeated calls in draw phase. If layout affecting attributes like font size, font weight, overflow, softWrap, etc. are changed in consecutive calls to this method, TextMeasurer and its internal cache that holds layout results may not offer any benefits. Check out `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer` and drawText overloads that take `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` to learn more about text layout and draw phase optimizations.

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.drawText
import androidx.compose.ui.text.rememberTextMeasurer

val textMeasurer = rememberTextMeasurer()

Canvas(Modifier.fillMaxSize()) { drawText(textMeasurer, "Hello, World!") }
```

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.drawText
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.sp

val textMeasurer = rememberTextMeasurer()

Canvas(Modifier.fillMaxSize()) {
    drawText(
        textMeasurer = textMeasurer,
        text = "Hello, World!",
        style =
            TextStyle(
                fontSize = 24.sp,
                fontWeight = FontWeight.Bold,
                textDecoration = TextDecoration.Underline,
            ),
    )
}
```

| Parameters |
|---|---|
| `textMeasurer: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer` | Measures and lays out the text |
| `text: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Text to be drawn |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offsets the text from top left point of the current coordinate system. |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TextStyle.Default` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` to be applied to the text |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | How visual overflow should be handled. |
| `softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Whether the text should break at soft line breaks. If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,kotlin.String,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` is false, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,kotlin.String,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` and TextAlign may have unexpected effects. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated according to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,kotlin.String,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,kotlin.String,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)`. If it is not null, then it must be greater than zero. |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = Size.Unspecified` | how wide and tall the text should be. If left `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#Unspecified()` as its default value, text will be forced to fit inside the total drawing area from where it's placed. If size is specified, `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#width()` will define the width of the text. `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#height()` helps defining the number of lines that fit if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,kotlin.String,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` is enabled and `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,kotlin.String,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` is `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow#Ellipsis()`. Otherwise, `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#height()` either defines where the text is clipped (`https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow#Clip()`) or becomes no-op. |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DrawScope.DefaultBlendMode` | Blending algorithm to be applied to the text |

### DrawScope.drawText

Cmn Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/TextPainter.kt+function:drawText)

```
fun DrawScope.drawText(
    textMeasurer: TextMeasurer,
    text: AnnotatedString,
    topLeft: Offset = Offset.Zero,
    style: TextStyle = TextStyle.Default,
    overflow: TextOverflow = TextOverflow.Clip,
    softWrap: Boolean = true,
    maxLines: Int = Int.MAX_VALUE,
    placeholders: List<AnnotatedString.Range<Placeholder>> = listOf(),
    size: Size = Size.Unspecified,
    blendMode: BlendMode = DrawScope.DefaultBlendMode
): Unit
```

Draw styled text using a TextMeasurer.

This draw function supports multi-styling and async font loading.

TextMeasurer carries an internal cache to optimize text layout measurement for repeated calls in draw phase. If layout affecting attributes like font size, font weight, overflow, softWrap, etc. are changed in consecutive calls to this method, TextMeasurer and its internal cache that holds layout results may not offer any benefits. Check out `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer` and drawText overloads that take `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult` to learn more about text layout and draw phase optimizations.

```kotlin
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.ParagraphStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.drawText
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.withStyle

val textMeasurer = rememberTextMeasurer()

Canvas(Modifier.fillMaxSize()) {
    drawText(
        textMeasurer = textMeasurer,
        text =
            buildAnnotatedString {
                withStyle(ParagraphStyle(textAlign = TextAlign.Start)) { append("Hello") }
                withStyle(ParagraphStyle(textAlign = TextAlign.End)) { append("World") }
            },
    )
}
```

| Parameters |
|---|---|
| `textMeasurer: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextMeasurer` | Measures and lays out the text |
| `text: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | Text to be drawn |
| `topLeft: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = Offset.Zero` | Offsets the text from top left point of the current coordinate system. |
| `style: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle = TextStyle.Default` | the `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` to be applied to the text |
| `overflow: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow = TextOverflow.Clip` | How visual overflow should be handled. |
| `softWrap: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Whether the text should break at soft line breaks. If false, the glyphs in the text will be positioned as if there was unlimited horizontal space. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.collections.List,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` is false, `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.collections.List,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` and TextAlign may have unexpected effects. |
| `maxLines: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = Int.MAX_VALUE` | An optional maximum number of lines for the text to span, wrapping if necessary. If the text exceeds the given number of lines, it will be truncated according to `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.collections.List,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.collections.List,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)`. If it is not null, then it must be greater than zero. |
| `placeholders: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString.Range<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder>> = listOf()` | a list of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`s that specify ranges of text which will be skipped during layout and replaced with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder`. It's required that the range of each `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/Placeholder` doesn't cross paragraph boundary, otherwise `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` is thrown. |
| `size: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size = Size.Unspecified` | how wide and tall the text should be. If left `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#Unspecified()` as its default value, text will be forced to fit inside the total drawing area from where it's placed. If size is specified, `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#width()` will define the width of the text. `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#height()` helps defining the number of lines that fit if `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.collections.List,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` is enabled and `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/package-summary#(androidx.compose.ui.graphics.drawscope.DrawScope).drawText(androidx.compose.ui.text.TextMeasurer,androidx.compose.ui.text.AnnotatedString,androidx.compose.ui.geometry.Offset,androidx.compose.ui.text.TextStyle,androidx.compose.ui.text.style.TextOverflow,kotlin.Boolean,kotlin.Int,kotlin.collections.List,androidx.compose.ui.geometry.Size,androidx.compose.ui.graphics.BlendMode)` is `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow#Ellipsis()`. Otherwise, `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size#height()` either defines where the text is clipped (`https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/TextOverflow#Clip()`) or becomes no-op. |
| `blendMode: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/BlendMode = DrawScope.DefaultBlendMode` | Blending algorithm to be applied to the text |