Android.Graphics Namespace

Contains types for bitmap pixels, color values, and canvas drawing.

Classes

Name Description
AvoidXfermode

AvoidXfermode xfermode will draw the src everywhere except on top of the opColor or, depending on the Mode, draw only on top of the opColor.

AvoidXfermode.Mode

Lists historical avoidance-transfer choices retained for compatibility.

Bitmap

Represents image pixels together with bitmap dimensions and storage attributes.

Bitmap.CompressFormat

Specifies the known formats a bitmap can be compressed into

Bitmap.Config

Possible bitmap configurations.

Bitmap.InterfaceConsts

Provides inherited Parcelable constants for Bitmap.

BitmapFactory

Creates Bitmap objects from various sources, including files, streams, and byte-arrays.

BitmapFactory.Options

Holds bitmap-decoding requests and the decoder's reported image information.

BitmapRegionDecoder

BitmapRegionDecoder can be used to decode a rectangle region from an image.

BitmapShader

Shader used to draw a bitmap as a texture.

BlendMode

Defines operators for combining source and destination colors.

BlendModeColorFilter

A color filter that can be used to tint the source pixels using a single color and a specific BlendMode.

BlurMaskFilter

This takes a mask, and blurs its edge by the specified radius.

BlurMaskFilter.Blur

Chooses which portions of a source mask remain after blurring.

Camera

A camera instance can be used to compute 3D transformations and generate a matrix that can be applied, for instance, on a Canvas.

Canvas

The Canvas class holds the "draw" calls.

Canvas.EdgeType

Constant values used as parameters to quickReject() calls.

Canvas.VertexMode

Selects how vertex entries are grouped into triangles.

ColorFilter

A color filter can be used with a Paint to modify the color of each pixel drawn with that paint.

ColorMatrix

4x5 matrix for transforming the color and alpha components of a Bitmap.

ColorMatrixColorFilter

A color filter that transforms colors through a 4x5 color matrix.

ColorObject

{

ColorSpace

{

ColorSpace.Adaptation

{

ColorSpace.Connector

{

ColorSpace.Model

A color model is required by a ColorSpace to describe the way colors can be represented as tuples of numbers.

ColorSpace.Named

{

ColorSpace.RenderIntent

A render intent determines how a ColorSpace.Connector connector maps colors from one color space to another.

ColorSpace.Rgb

{

ColorSpace.Rgb.TransferParameters

Defines the parameters for the ICC parametric curve type 4, as defined in ICC.1:2004-10, section 10.15.

ColorValueMarshaler

Generates expressions that convert between color values and packed 32-bit integers.

ComposePathEffect

Combines path effects by applying one to the result of another.

ComposeShader

A subclass of shader that returns the composition of two other shaders, combined by an android.graphics.Xfermode subclass.

CornerPathEffect

Rounds corners between line segments in path geometry.

DashPathEffect

Defines alternating drawn and gap intervals for stroked paths.

DiscretePathEffect

A path effect that segments contours and displaces their vertices.

DrawFilter

A DrawFilter subclass can be installed in a Canvas.

EmbossMaskFilter

Exposes the legacy emboss mask-filter constructor, which Android marks as unsupported.

Gainmap

Gainmap represents a mechanism for augmenting an SDR image to produce an HDR one with variable display adjustment capability.

Gainmap.InterfaceConsts

Provides inherited Parcelable constants for Gainmap.

HardwareBufferRenderer

Creates an instance of a hardware-accelerated renderer.

HardwareBufferRenderer.RenderRequest

Sets the parameters that can be used to control a render request for a HardwareBufferRenderer.

HardwareBufferRenderer.RenderResult

Class that contains data regarding the result of the render request.

HardwareRenderer

Creates an instance of a hardware-accelerated renderer.

HardwareRenderer.FrameRenderRequest

Sets the parameters that can be used to control a render request for a HardwareRenderer.

ImageDecoder

A class for converting encoded images (like PNG, JPEG, WEBP, GIF, or HEIF) into Drawable or Bitmap objects.

ImageDecoder.DecodeException

Information about an interrupted decode.

ImageDecoder.HeaderDecodedEventArgs

Carries the decoder, image information, and source supplied to a header-decoded event.

ImageDecoder.ImageInfo

Information about an encoded image.

ImageDecoder.PartialImageEventArgs

Carries an interrupted decode and the decision to accept its partial image.

ImageDecoder.Source

Source of encoded image data.

ImageFormat

Provides image-format codes and queries about their pixel representation.

Insets

An Insets instance holds four integer offsets which describe changes to the four edges of a Rectangle.

Insets.InterfaceConsts

Provides inherited Parcelable constants for Insets.

Interpolator

Stores timed key frames and computes arrays of interpolated floating-point values.

Interpolator.Result

Describes whether an interpolator sample used an ordinary time or reached a sampling boundary.

LayerRasterizer

Removed as this feature is not supported by hardware-accelerated or PDF backends.

LightingColorFilter

A color filter that can be used to simulate simple lighting effects.

LinearGradient

A shader whose color stops are positioned along a line.

MaskFilter

MaskFilter is the base class for object that perform transformations on an alpha-channel mask before drawing it.

Matrix

The Matrix class holds a 3x3 matrix for transforming coordinates.

Matrix.ScaleToFit

Controls how the src rect should align into the dst rect for setRectToRect().

Matrix44

The Matrix44 class holds a 4x4 matrix for transforming coordinates.

Mesh

Class representing a mesh object.

MeshSpecification

Class responsible for holding specifications for Mesh creations.

MeshSpecification.Attribute

Data class to represent a single attribute in a shader.

MeshSpecification.Varying

Data class to represent a single varying variable.

Movie

This member is deprecated.

NinePatch

The NinePatch class permits drawing a bitmap in nine or more sections.

Outline

Defines a simple shape, used for bounding graphical regions.

Paint

The Paint class holds the style and color information about how to draw geometries, text and bitmaps.

Paint.Align

Align specifies how drawText aligns its text relative to the [x,y] coordinates.

Paint.Cap

The Cap specifies the treatment for the beginning and ending of stroked lines and paths.

Paint.FontMetrics

Class that describes the various metrics for a font at a given text size.

Paint.FontMetricsInt

Convenience method for callers that want to have FontMetrics values as integers.

Paint.Join

The Join specifies the treatment where lines and curve segments join on a stroked path.

Paint.Style

The Style specifies if the primitive being drawn is filled, stroked, or both (in the same color).

PaintFlagsDrawFilter

A draw filter configured to clear and set selected paint flags.

ParcelableColorSpace

A Parcelable wrapper for a ColorSpace.

ParcelableColorSpace.InterfaceConsts

Provides inherited Parcelable constants for ParcelableColorSpace.

Path

The Path class encapsulates compound (multiple contour) geometric paths consisting of straight line segments, quadratic curves, and cubic curves.

Path.Direction

Specifies how closed shapes (e.

Path.FillType

Enum for the ways a path may be filled.

Path.Op

The logical operations that can be performed when combining two paths.

PathDashPathEffect

Repeats a supplied path shape along another path's contour.

PathDashPathEffect.Style

Selects how a path-dash effect transforms each copy of its shape.

PathEffect

PathEffect is the base class for objects in the Paint that affect the geometry of a drawing primitive before it is transformed by the canvas' matrix and drawn.

PathIterator

PathIterator can be used to query a given Path object, to discover its operations and point values.

PathIterator.Segment

This class holds the data for a given segment in a path, as returned by #next().

PathMeasure

Measures distances, positions, and tangents along one contour of a path at a time.

Picture

A Picture records drawing calls (via the canvas returned by beginRecording) and can then play them back into Canvas (via Picture#draw(Canvas) or Canvas#drawPicture(Picture)).

PixelFormat

Holds byte and bit counts for pixel formats and provides format-code queries.

PixelXorXfermode

PixelXorXfermode implements a simple pixel xor (op ^ src ^ dst).

Point

Point holds two integer coordinates

Point.InterfaceConsts

Provides inherited Parcelable constants for Point.

PointF

PointF holds two float coordinates

PointF.InterfaceConsts

Provides inherited Parcelable constants for PointF.

PorterDuff

This class contains the list of alpha compositing and blending modes that can be passed to PorterDuffXfermode, a specialized implementation of Paint's Paint#setXfermode(Xfermode) transfer mode.

PorterDuff.Mode

{

PorterDuffColorFilter

A color filter that can be used to tint the source pixels using a single color and a specific PorterDuff Porter-Duff composite mode.

PorterDuffXfermode

Specialized implementation of Paint's Paint#setXfermode(Xfermode) transfer mode.

RadialGradient

A gradient shader defined by circle geometry and color stops.

Rasterizer

Removed as this feature is not supported by hardware-accelerated or PDF backends.

RecordingCanvas

A Canvas implementation that records view system drawing operations for deferred rendering.

Rect

Rect holds four integer coordinates for a rectangle.

Rect.InterfaceConsts

Provides inherited Parcelable constants for Rect.

RectF

RectF holds four float coordinates for a rectangle.

RectF.InterfaceConsts

Provides inherited Parcelable constants for RectF.

Region

Represents an area made from integer-coordinate rectangles.

Region.InterfaceConsts

Provides inherited Parcelable constants for Region.

Region.Op

Selects a set operation for combining two integer regions.

RegionIterator

Enumerates rectangles in a retained snapshot of a region.

RenderEffect

Intermediate rendering step used to render drawing commands with a corresponding visual effect.

RenderNode

RenderNode is used to build hardware accelerated rendering hierarchies.

RuntimeColorFilter

A RuntimeColorFilter calculates a per-pixel color based on the output of a user * defined Android Graphics Shading Language (AGSL) function.

RuntimeShader

A RuntimeShader calculates a per-pixel color based on the output of a user defined Android Graphics Shading Language (AGSL) function.

RuntimeXfermode

A RuntimeXfermode calculates a per-pixel color based on the output of a user * defined Android Graphics Shading Language (AGSL) function.

Shader

Shader is the base class for objects that return horizontal spans of colors during drawing.

Shader.TileMode

Selects how shader coordinates outside the original domain are handled.

SumPathEffect

Combines results from two effects applied to the same input path.

SurfaceTexture

Captures frames from an image stream as an OpenGL ES texture.

SurfaceTexture.FrameAvailableEventArgs

Provides data for the FrameAvailable event.

SurfaceTexture.OutOfResourcesException

Exception thrown when a SurfaceTexture couldn't be created or resized.

SweepGradient

A gradient shader whose color stops vary with angle around a center.

Typeface

The Typeface class specifies the typeface and intrinsic style of a font.

Typeface.Builder

A builder class for creating new Typeface instance.

Typeface.CustomFallbackBuilder

A builder class for creating new Typeface instance.

Xfermode

Xfermode is the base class for objects that are called to implement custom "transfer-modes" in the drawing pipeline.

YuvImage

YuvImage contains YUV data and provides a method that compresses a region of the YUV data to a Jpeg.

Structs

Name Description
AndroidBitmapInfo

Provides information about the pixel buffer of an Android Bitmap. This struct corresponds to the native AndroidBitmapInfo type from the Android NDK.

Color

Stores an alpha byte and three RGB bytes in a 32-bit value.

Interfaces

Name Description
ImageDecoder.IOnHeaderDecodedListener

Interface for changing the default settings of a decode.

ImageDecoder.IOnPartialImageListener

Interface for inspecting a DecodeException DecodeException and potentially preventing it from being thrown.

IPostProcessor

Helper interface for adding custom processing to an image.

SurfaceTexture.IOnFrameAvailableListener

Callback interface for being notified that a new stream frame is available.

Enums

Name Description
BitmapShaderFilterMode

Selects the bitmap shader's sampling-filter mode.

Cursor

Selects how a text-run cursor query relates to the supplied offset.

Format

Enumerates values returned by several types and taken as a parameter of several types.

GainmapDirection

Selects the base-to-alternative dynamic-range direction for a gainmap.

HardwareBufferRenderResult

Reports the status of a hardware-buffer render request.

ImageDecoderAllocator

Selects the requested pixel-storage allocator for image decoding.

ImageDecoderErrorType

Classifies image decode-interruption and gainmap-extraction errors.

ImageDecoderMemoryPolicy

Selects the decoder's memory-versus-image-quality policy.

ImageFormatType

Lists the image-format codes exposed by the Android binding.

MatrixFlags

Enumerates values returned by the Position, and Tangent members and taken as a parameter of the F:Android.Graphics.PathMeasure.GetMatrix member.

MeshAlphaType

Describes how mesh colors represent alpha.

MeshSpecificationType

Identifies a mesh shader declaration's element type.

MeshType

Selects how mesh vertices form triangles.

PaintFlags

Enumerates values returned by several types and taken as a parameter of several types.

PaintHinting

Enumerates values returned by several types.

PathVerb

Identifies a path-iterator operation or its end-of-iteration marker.

SaveFlags

Enumerates values returned by several methods of SaveFlags and taken as a parameter of several methods of Canvas.

Sync

Contains status bits returned by a hardware-renderer synchronization and drawing request.

TypefaceStyle

Enumerates values returned by several types and taken as a parameter of several types.