-
BitmapPainter
Painter implementation used to draw an ImageBitmap into the provided canvas This implementation can handle applying alpha and ColorFilter to it's drawn result
-
BlurEffect
Create a BlurEffect that implicitly blurs the contents of the GraphicsLayerScope it is configured on
- Canvas
-
Color
Create a Color by passing individual red, green, blue, alpha, and colorSpace components.
-
CompositeShader
Creates a composited result between 2 shaders and the specified BlendMode.
-
GraphicsContext
Create a new GraphicsContext with the provided ViewGroup to contain View based layers.
- ImageBitmap
-
ImageShader
Creates a Shader using the given ImageBitmap as an input texture.
-
LayerOutsets
Creates a LayerOutsets with the same value for all sides.
-
LinearGradientShader
Creates a linear gradient from `from` to `to`.
-
OffsetEffect
Create an OffsetEffect that implicitly offsets the contents of the GraphicsLayerScope it is configured on
- Paint
- Path
-
PathHitTester
Creates a new PathHitTester to query whether certain x/y coordinates lie inside a given Path.
- PathIterator
- PathMeasure
-
RadialGradientShader
Creates a radial gradient centered at `center` that ends at `radius` distance from the center.
-
ShaderBrush
Convenience method to create a ShaderBrush that always returns the same shader instance regardless of size
-
ShadowContext
Create a new ShadowContext
-
SweepGradientShader
Creates a circular gradient that sweeps around a provided center point.
-
adapt
Performs the chromatic adaptation of a color space from its native white point to the specified white point.
-
addOutline
Adds the outline to the Path.
-
addSvg
Adds the specified SVG path data to this Path.
- asAndroidBitmap
-
asAndroidColorFilter
Obtain a android.graphics.ColorFilter instance from this ColorFilter
- asAndroidPath
- asAndroidPathEffect
-
asComposeColorFilter
Create a ColorFilter from the given android.graphics.ColorFilter instance
-
asComposePaint
Convert an android.graphics.Paint instance into a Compose-compatible Paint
-
asComposePath
Convert the android.graphics.Path instance into a Compose-compatible Path
-
asComposeRenderEffect
Convert the android.graphics.RenderEffect instance into a Compose-compatible RenderEffect
-
asImageBitmap
Create an ImageBitmap from the given Bitmap.
- clearCache
-
clipPath
Reduces the clip region to the intersection of the current clip and the given path.
-
clipRect
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.
-
compositeOver
Composites this color on top of background using the Porter-Duff 'source over' mode.
-
computeDirection
Computes this Path's direction (or winding, or orientation), which can be either Path.Direction.Clockwise or Path.Direction.CounterClockwise.
-
connect
Connects two color spaces to allow conversion from the source color space to the destination color space.
-
copy
Create a new path, copying the contents from the src path.
- createDropShadowPainter
- createInnerShadowPainter
-
decodeToImageBitmap
Decodes a byte array of a Bitmap to an ImageBitmap.
-
divide
Divides this path into a list of paths.
- draw
-
drawIntoCanvas
Provides access to draw directly with the underlying Canvas.
-
drawLayer
Draw the provided GraphicsLayer into the current DrawScope.
-
drawOutline
Draws the Outline on a DrawScope.
-
fromColorLong
Creates a Color from an Android 64-bit color value.
-
inset
Simultaneously translate the DrawScope coordinate space by left and top as well as modify the dimensions of the current painting area.
-
isIdentity
Whether the given matrix is the identity matrix.
-
isSupported
Helper method to determine if the appropriate BlendMode is supported on the given Android API level this provides an opportunity for consumers to fallback on an alternative user e…
-
lerp
Linear interpolate between two ColorsColor, start and stop with fraction fraction between the two.
-
luminance
Returns the relative luminance of this color.
- obtainInnerShadowRenderer
-
reverse
Reverses the segments of this path into the specified destination, turning a clockwise path into a counter-clockwise path and vice-versa.
-
rotate
Add a rotation (in degrees clockwise) to the current transform at the given pivot point.
-
rotateRad
Add a rotation (in radians clockwise) to the current transform at the given pivot point.
-
scale
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 coordinat…
-
setFrom
Set the matrix values the native android.graphics.Matrix.
-
setOutline
Configures an outline for this GraphicsLayer based on the provided Outline object.
-
takeOrElse
If this color isSpecified then this is returned, otherwise block is executed and its result is returned.
-
toAndroidColorSpace
Convert the Compose ColorSpace into an Android framework android.graphics.ColorSpace
-
toAndroidRect
Creates a new instance of android.graphics.Rect with the same bounds specified in the given Rect
-
toAndroidRectF
Creates a new instance of android.graphics.RectF with the same bounds specified in the given Rect
- toAndroidTileMode
- toAndroidVertexMode
-
toArgb
Converts this color to an ARGB color int.
-
toColorLong
Converts the Color to a 64-bit ColorLong value that can be used by Android's framework.
-
toComposeColorSpace
Convert the android.graphics.ColorSpace into a Compose ColorSpace
-
toComposeIntRect
Creates a new instance of androidx.compose.ui.unit.IntRect with the same bounds specified in the given android.graphics.Rect
- toComposePathEffect
-
toComposeRect
Creates a new instance of androidx.compose.ui.geometry.Rect with the same bounds specified in the given android.graphics.Rect
- toComposeTileMode
-
toPath
Converts this list of PathNode into a Path by adding the appropriate commands to the target path.
-
toPixelMap
Convenience method to extract pixel information from the given ImageBitmap into a PixelMap that supports for querying pixel information based on Note this method can block so it i…
-
toSvg
Returns an SVG representation of this path.
-
translate
Translate the coordinate space by the given delta in pixels in both the x and y coordinates respectively
-
withSave
Saves a copy of the current transform and clip on the save stack and executes the provided lambda with the current transform applied.
-
withSaveLayer
Saves a copy of the current transform and clip on the save stack, and then creates a new group which subsequent calls will become a part of.
-
withTransform
Perform 1 or more transformations and execute drawing commands with the specified transformations applied.
ui-graphics
Jetpack Compose API reference for ui-graphics.