androidx.compose.ui.graphics
Interfaces
Canvas | |
GraphicsLayerScope |
A scope which can be used to define the effects to apply for the content, such as scaling (scaleX, scaleY), rotation (rotationX, rotationY, rotationZ), opacity (alpha), shadow (shadowElevation, shape), and clipping (clip, shape). |
ImageBitmap |
Graphics object that represents a 2 dimensional array of pixel information represented as ARGB values |
Paint | |
Path | |
PathEffect |
Effect applied to the geometry of a drawing primitive. |
PathMeasure | |
Shape |
Defines a generic shape. |
Classes
AndroidPaint | |
AndroidPath | |
AndroidPathMeasure | |
Brush | |
CanvasHolder |
Holder class that is used to issue scoped calls to a Canvas from the framework equivalent canvas without having to allocate an object on each draw call |
Color |
The |
ColorFilter |
Creates a color filter that applies the blend mode given as the second argument. |
LinearGradient |
Brush implementation used to apply a linear gradient on a given Paint |
Matrix | |
Outline |
Defines a simple shape, used for bounding graphical regions. |
PixelMap |
Result of a pixel read operation. |
RadialGradient |
Brush implementation used to apply a radial gradient on a given Paint |
ShaderBrush |
Brush implementation that wraps and applies a the provided shader to a Paint The shader can be lazily created based on a given size, or provided directly as a parameter |
Shadow |
A single shadow. |
SolidColor | |
SweepGradient |
Brush implementation used to apply a sweep gradient on a given Paint |
TransformOrigin |
A two-dimensional position represented as a fraction of the Layer's width and height |
Vertices |
A set of vertex data used by Canvas.drawVertices. |
Type-aliases
ColorStop |
Enums
BlendMode |
Algorithms to use when painting on the canvas. |
ClipOp |
Defines how a new clip region should be merged with the existing clip region. |
FilterQuality | |
ImageBitmapConfig |
Possible ImageBitmap configurations. |
PaintingStyle |
Strategies for painting shapes and paths on a canvas. |
PathFillType |
Determines the winding rule that decides how the interior of a Path is calculated. |
PathOperation |
Strategies for combining paths. |
PointMode |
Used by Canvas.drawPoints. |
StampedPathEffectStyle |
Strategy for transforming each point of the shape along the drawn path |
StrokeCap |
Styles to use for line endings. |
StrokeJoin |
Styles to use for line joins. |
TileMode | |
VertexMode |
Defines how a list of points is interpreted when drawing a set of triangles. |
Top-level constants summary
const Float |
Default alpha value used on Paint. |
const Float |
Default camera distance for all layers |
Top-level functions summary
Canvas | |
Canvas |
Canvas(image: ImageBitmap) Create a new Canvas instance that targets its drawing commands to the provided ImageBitmap |
Color |
Color(red: Float, green: Float, blue: Float, alpha: Float = 1f, colorSpace: ColorSpace = ColorSpaces.Srgb) Create a Color by passing individual red, green, blue, alpha, and colorSpace components. |
Color |
Creates a new Color instance from an ARGB color int. |
Color |
Creates a new Color instance from an ARGB color int. |
Color |
Color(@IntRange(0, 255) red: Int, @IntRange(0, 255) green: Int, @IntRange(0, 255) blue: Int, @IntRange(0, 255) alpha: Int = 0xFF) Creates a new Color instance from an ARGB color components. |
GraphicsLayerScope |
Creates simple GraphicsLayerScope. |
LinearGradient |
HorizontalGradient(colors: List<Color>, startX: Float, endX: Float, tileMode: TileMode = TileMode.Clamp) Creates a horizontal gradient with the given colors evenly dispersed within the gradient |
LinearGradient |
HorizontalGradient(vararg colorStops: ColorStop, startX: Float, endX: Float, tileMode: TileMode = TileMode.Clamp) Creates a horizontal gradient with the given colors dispersed at the provided offset defined in the ColorStop |
ImageBitmap |
ImageAsset(width: Int, height: Int, config: ImageBitmapConfig = ImageBitmapConfig.Argb8888, hasAlpha: Boolean = true, colorSpace: ColorSpace = ColorSpaces.Srgb) |
ImageBitmap |
ImageBitmap(width: Int, height: Int, config: ImageBitmapConfig = ImageBitmapConfig.Argb8888, hasAlpha: Boolean = true, colorSpace: ColorSpace = ColorSpaces.Srgb) |
Shader |
ImageShader(image: ImageBitmap, tileModeX: TileMode = TileMode.Clamp, tileModeY: TileMode = TileMode.Clamp) |
LinearGradient |
LinearGradient(colors: List<Color>, startX: Float, startY: Float, endX: Float, endY: Float, tileMode: TileMode = TileMode.Clamp) Creates a linear gradient with the provided colors along the given start and end coordinates. |
LinearGradient |
LinearGradient(vararg colorStops: ColorStop, startX: Float, startY: Float, endX: Float, endY: Float, tileMode: TileMode = TileMode.Clamp) Creates a linear gradient with the provided colors along the given start and end coordinates. |
Shader |