androidx.core.graphics
Classes
BitmapCompat |
Helper for accessing features in |
BlendModeColorFilterCompat |
Helper for accessing ColorFilter APIs on various API levels of the platform |
ColorUtils |
A set of color-related utility methods, building upon those available in |
Insets |
An Insets instance holds four integer offsets which describe changes to the four edges of a Rectangle. |
PaintCompat |
Helper for accessing features in |
PathSegment |
A line segment that represents an approximate fraction of a |
PathUtils |
A set of path-related utility methods. |
TypefaceCompat |
Helper for accessing features in |
Enums
BlendModeCompat |
Compat version of |
Top-level functions summary
Bitmap |
createBitmap(width: Int, height: Int, config: Config = Bitmap.Config.ARGB_8888) Returns a mutable bitmap with the specified width and height. |
Bitmap |
createBitmap(width: Int, height: Int, config: Config = Bitmap.Config.ARGB_8888, hasAlpha: Boolean = true, colorSpace: ColorSpace = ColorSpace.get(ColorSpace.Named.SRGB)) Returns a mutable bitmap with the specified width and height. |
Matrix |
rotationMatrix(degrees: Float, px: Float = 0.0f, py: Float = 0.0f) Creates a rotation matrix, defined by a rotation angle in degrees around the pivot point located at the coordinates (px, py). |
Matrix |
scaleMatrix(sx: Float = 1.0f, sy: Float = 1.0f) Creates a scale matrix with the scale factor sx and sy respectively on the
|
Matrix |
translationMatrix(tx: Float = 0.0f, ty: Float = 0.0f) Creates a translation matrix with the translation amounts tx and ty
respectively on the |
Extension functions summary
For android.graphics.Bitmap | |
Bitmap |
Bitmap.applyCanvas(block: Canvas.() -> Unit) Creates a new Canvas to draw on this bitmap and executes the specified block on the newly created canvas. |
operator Boolean |
Returns true if the specified point is inside the bitmap. |
operator Boolean |
Returns true if the specified point is inside the bitmap. |
operator Int |
Returns the value of the pixel at the specified location. |
Bitmap |
Creates a new bitmap, scaled from this bitmap, when possible. |
operator Unit |
Writes the specified color int into the bitmap
(assuming it is mutable) at the specified |
For android.graphics.Canvas | |
Unit |
Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount. |
Unit |
Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount. |
Unit |
Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount. |
Unit |
Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount. |
Unit |
Wrap the specified block in calls to Canvas.save/Canvas.clipPath and Canvas.restoreToCount. |
Unit |
Canvas.withMatrix(matrix: Matrix = Matrix(), block: Canvas.() -> Unit) Wrap the specified block in calls to Canvas.save/Canvas.concat and Canvas.restoreToCount. |
Unit |
Canvas.withRotation(degrees: Float = 0.0f, pivotX: Float = 0.0f, pivotY: Float = 0.0f, block: Canvas.() -> Unit) Wrap the specified block in calls to Canvas.save/Canvas.rotate and Canvas.restoreToCount. |
Unit |