SkiaSharp Namespace
SkiaSharp is a 2D graphics engine powered by the Skia library.
Classes
| Name | Description |
|---|---|
| GRBackendRenderTarget |
Wrap an existing render target created by the client in the 3D API. |
| GRBackendTexture |
Wrap an existing texture created by the client in the 3D API. |
| GRContext |
Represents an underlying backend 3D API context. |
| GRContextOptions |
Represents the collection of options for the construction of a context. |
| GRD3DBackendContext |
Represents the Direct3D 12 backend context used to create a GPU-backed GRContext. |
| GRD3DTextureResourceInfo |
Represents Direct3D texture resource information for GPU interoperability. |
| GRGlInterface |
The GRGlInterface is used to interface with OpenGL. |
| GRMtlBackendContext |
Represents the Metal backend context used to create a GPU-backed GRContext. |
| GRRecordingContext |
A context for recording GPU operations that can be replayed later. |
| GRSharpVkBackendContext |
A Vulkan backend context that uses SharpVk types for Vulkan interoperability. |
| GRVkBackendContext |
Represents the Vulkan backend context for GPU rendering. |
| GRVkExtensions |
Represents a collection of Vulkan extensions for use with Skia's GPU backend. |
| GRVkExtensionsSharpVkExtensions |
Provides extension methods for GRVkExtensions to support SharpVk types. |
| GRVorticeD3DBackendContext |
Represents a Direct3D 12 backend context using Vortice types for creating a GPU-backed GRContext. |
| GRVorticeD3DTextureResourceInfo |
Represents information about a Direct3D 12 texture resource using Vortice types. |
| SK3dView |
A utility class that can be used to create 3D transformations. |
| SKAbstractManagedStream |
Represents a SKStreamAsset (a seekable, rewindable Skia stream). |
| SKAbstractManagedWStream |
Represents a SKWStream (a writeable Skia stream). |
| SKAutoCanvasRestore |
Convenience class used to restore the canvas state in a using statement. |
| SKAutoCoInitialize |
Convenience class used to automatically initialize and uninitialize COM on supported platforms. |
| SKAutoMaskFreeImage |
Convenience class used to automatically free the image data for a mask in a using statement. |
| SKBitmap |
The SKBitmap specifies a raster bitmap. |
| SKBlender |
Represents a custom blending function that combines source and destination colors. |
| SKCanvas |
Encapsulates all of the state about drawing into a device (bitmap or surface). |
| SKCodec |
An abstraction layer directly on top of an image codec. |
| SKColorFilter |
Color filters for use with the ColorFilter property of a SKPaint. |
| SKColorSpace |
Represents a color space. |
| SKColorSpaceIccProfile |
Represents an ICC color profile used to describe the color characteristics of a device or color space. |
| SKColorTable |
Holds a premultiplied color table for indexed 8-bit bitmaps. |
| SKData |
The SKData holds an immutable data buffer. |
| SKDocument |
A high-level API for creating a document-based canvas. |
| SKDrawable |
Represents the base class for objects that draw into SKCanvas. |
| SKDynamicMemoryWStream |
A writeable, dynamically-sized, memory-based stream. |
| SKFileStream |
A seekable stream backed by a file on the file system. |
| SKFileWStream |
A writeable stream backed by a file on the file system. |
| SKFont |
Represents a font used for drawing and measuring text. |
| SKFontManager |
Manages a collection of fonts. |
| SKFontStyle |
Represents a particular style (bold, italic, condensed) of a typeface. |
| SKFontStyleSet |
Represents the set of styles for a particular font family. |
| SKFrontBufferedManagedStream |
A read-only stream that buffers the specified first chunk of bytes. |
| SKFrontBufferedStream |
A read-only stream that buffers the specified first chunk of bytes. |
| SKGraphics |
Provides global settings and cache management for Skia graphics operations. |
| SKHorizontalRunBuffer |
A run buffer for horizontally-positioned text where glyphs share a common Y coordinate. |
| SKHorizontalTextRunBuffer |
A buffer for horizontally-positioned text runs with cluster and text data. |
| SkiaExtensions |
Convenience methods for SKPixelGeometry. |
| SkiaSharpVersion |
Provides version information for SkiaSharp and its native library. |
| SKImage |
An abstraction for drawing a rectangle of pixels. |
| SKImageFilter |
Image filters for use with the ImageFilter property of a SKPaint. |
| SKImageFilter.CropRect |
The rectangle to which the output processing of an SKImageFilter will be limited. |
| SKManagedPixelSerializer |
Represents a mechanism for serializing pixels. |
| SKManagedStream |
Wraps a Stream into a SKStreamAsset (a seekable, rewindable Skia stream) |
| SKManagedWStream | |
| SKMaskFilter |
Mask filters perform transformations on an alpha-channel mask before drawing. A mask filter is set using the MaskFilter property on SKPaint type. |
| SKMatrix44 |
A 3D, 4x4 matrix. |
| SKMemoryStream |
A memory-based stream. |
| SKNativeObject |
Represents a native object. |
| SKNoDrawCanvas |
A type of SKCanvas that provides a base type for canvases that do not need to rasterize. |
| SKNWayCanvas |
A type of SKCanvas that draws to multiple canvases at the same time. |
| SKObject |
Represents a tracked native object. |
| SKOverdrawCanvas |
A canvas that captures all drawing commands, and rather than draw the actual content, it increments the alpha channel of each pixel every time it would have been touched by a draw call. |
| SKPaint |
Holds the style and color information about how to draw geometries, text and bitmaps. |
| SKPath |
A compound geometric path. |
| SKPath.Iterator |
Iterator object to scan the all of the segments (lines, quadratics, cubics) of each contours in a path. |
| SKPath.OpBuilder |
Perform a series of path operations, optimized for unioning many paths together. |
| SKPath.RawIterator |
Iterator object to scan through the verbs in the path, providing the associated points. |
| SKPathEffect |
The base class for objects in the SKPaint that affect the geometry of a drawing primitive before it is transformed by the canvas' matrix and drawn. |
| SKPathMeasure |
Represents a type that can be used to calculate the length of, and segments of, a path. |
| SKPicture |
Recorded drawing operations made to a SKCanvas to be played back at a later time. |
| SKPictureRecorder |
The picture recorder is used to record drawing operations made to a SKCanvas and stored in a SKPicture. |
| SKPixelSerializer |
Represents a mechanism for serializing pixels. |
| SKPixmap |
Pairs SKImageInfo with actual pixels and rowbytes. |
| SKPositionedRunBuffer |
A run buffer for fully-positioned text where each glyph has an independent X and Y position. |
| SKPositionedTextRunBuffer |
A buffer for fully-positioned text runs with cluster and text data. |
| SKRegion |
Encapsulates the geometric region used to specify clipping areas for drawing. |
| SKRegion.ClipIterator |
Iterates over the rectangles of a region clipped to a bounding rectangle. |
| SKRegion.RectIterator |
Iterates over the rectangles that make up a region. |
| SKRegion.SpanIterator |
Iterates over the horizontal spans of a region at a specific y-coordinate. |
| SKRotationScaleRunBuffer |
A run buffer for text with rotation and scale transformations applied to each glyph. |
| SKRotationScaleTextRunBuffer |
A buffer for storing a text run with rotation and scale transformations applied to each glyph. |
| SKRoundRect |
Represents a rounded rectangle with a potentially different radii for each corner. |
| SKRunBuffer |
A run buffer that provides access to glyph data for a text run. |
| SKRuntimeBlenderBuilder |
A builder for creating blenders from SkSL runtime effects. |
| SKRuntimeColorFilterBuilder |
A builder for creating color filters from SkSL runtime effects. |
| SKRuntimeEffect |
Represents a compiled SkSL runtime effect that can be used to create shaders, color filters, or blenders. |
| SKRuntimeEffectBuilder |
Base class for building runtime effects with uniforms and child effects. |
| SKRuntimeEffectBuilderException |
The exception that is thrown when a runtime effect builder encounters an error. |
| SKRuntimeEffectChildren |
Represents a collection of child shaders or color filters for use with SKRuntimeEffect. |
| SKRuntimeEffectUniforms |
Represents a collection of uniform values for an SKRuntimeEffect. |
| SKRuntimeShaderBuilder |
A builder for creating shaders from SkSL runtime effects. |
| SKShader |
Shaders specify the source color(s) for what is being drawn in the SKPaint. |
| SKStream |
An abstraction for a source of bytes, which can be backed by memory, or a file, or something else. |
| SKStreamAsset |
An abstract, seekable stream with a known length. |
| SKStreamMemory |
An abstract, memory-based stream. |
| SKStreamRewindable |
An abstract, rewindable stream. |
| SKStreamSeekable |
An abstract, rewindable stream that supports the seek operation. |
| SKSurface |
Represents the backend/results of drawing to a canvas. |
| SKSurfaceProperties |
Describes properties and constraints of a given SKSurface. |
| SKSvgCanvas |
A specialized SKCanvas which generates SVG commands from its draw calls. |
| SKSwizzle |
Various utility methods for when swizzling pixels. |
| SKTextBlob |
Represents multiple text runs of glyphs and positions. |
| SKTextBlobBuilder |
A builder object that is used to create a SKTextBlob. |
| SKTextRunBuffer |
A buffer for storing a text run with glyph IDs, positions, clusters, and text data. |
| SKTraceMemoryDump |
An abstract base class for receiving memory tracing callbacks from Skia. |
| SKTypeface |
Represents a specific typeface and intrinsic style of a font. |
| SKVertices |
Represents an immutable set of vertex data that can be used with DrawVertices(SKVertices, SKBlendMode, SKPaint). |
| SKWStream |
An abstraction for writing a stream of bytes, which can be backed by memory, or a file, or something else. |
| SKXmlStreamWriter |
A stream-based XML writer. |
| SKXmlWriter |
An abstract, XML writer. |
| StringUtilities |
Various utility methods for when working with strings and text. |
Structs
| Name | Description |
|---|---|
| GRBackendRenderTargetDesc |
Wrap an existing render target created by the client in the 3D API with an underlying GRRenderTarget object. |
| GRBackendTextureDesc |
Wrap an existing texture created by the client in the 3D API with an underlying GRTexture object. |
| GRGlBackendTextureDesc |
Wrap an existing OpenGL texture created by the client in the 3D API with an underlying GRTexture object. |
| GRGlFramebufferInfo |
Represents a handle to an existing OpenGL framebuffer. |
| GRGlTextureInfo |
Represents a handle to an existing OpenGL texture. |
| GRMtlTextureInfo |
Represents information about a Metal texture used as a backend texture in SkiaSharp. |
| GRVkAlloc |
Represents Vulkan memory allocation information for use with Skia's GPU backend. |
| GRVkImageInfo |
Represents information about a Vulkan image for use with Skia's GPU backend. |
| GrVkYcbcrConversionInfo |
Configuration information for Vulkan YCbCr color space conversion. |
| SKCanvasSaveLayerRec |
Contains the configuration for saving a layer on an SKCanvas. |
| SKCodecFrameInfo |
Information about individual frames in a multi-framed image. |
| SKCodecOptions |
Additional options to pass to GetPixels(SKImageInfo, IntPtr, SKCodecOptions) or one of the overloads that accepts a SKCodecOptions. |
| SKColor |
32-bit ARGB unpremultiplied color value. |
| SKColorF |
16-bit, floating-point, ARGB unpremultiplied color value. |
| SKColors |
Definitions for some common color names. |
| SKColorSpacePrimaries |
Describes a color gamut with primaries and a white point. |
| SKColorSpaceTransferFn |
Represents the coefficients for a common transfer function equation. |
| SKColorSpaceXyz |
Represents a 3x3 matrix used for color space transformation between RGB and XYZ coordinates. |
| SKCubicResampler |
Represents a cubic resampler with configurable B and C parameters for high-quality image scaling. |
| SKDocumentPdfMetadata |
Optional metadata to be passed into the PDF factory function. |
| SKFontMetrics |
Structure to represent measurements for a font. |
| SKHighContrastConfig |
High contrast configuration settings for use with CreateHighContrast(SKHighContrastConfig). |
| SKImageInfo |
Describe an image's dimensions and pixel type. |
| SKJpegEncoderOptions |
Options to control the JPEG encoding. |
| SKLattice |
Specifies coordinates to divide a bitmap into (XDivs * YDivs) rectangles. |
| SKMask |
A mask is used to describe alpha bitmaps, either 1-bit, 8-bit, or the 3-channel 3D format. |
| SKMatrix |
A 3x3 transformation matrix with perspective. |
| SKPMColor |
32-bit ARGB premultiplied color value. |
| SKPngEncoderOptions |
Options to control the PNG encoding. |
| SKPoint |
Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane. |
| SKPoint3 |
Represents an ordered pair of floating-point x-, y- and z-coordinates that defines a point in a three-dimensional plane. |
| SKPointI |
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane. |
| SKRawRunBuffer<T> |
A raw run buffer providing direct access to glyph, position, cluster, and text data. |
| SKRect |
Stores a set of four floating-point numbers that represent the upper-left corner and lower-right corner of a rectangle. |
| SKRectI |
Stores a set of four integers that represent the upper-left corner and lower-right corner of a rectangle. |
| SKRotationScaleMatrix |
Represents a 2D rotation and uniform scale matrix. |
| SKRuntimeEffectChild |
Represents a child effect that can be passed to a runtime effect, wrapping a shader, color filter, or blender. |
| SKRuntimeEffectUniform |
Represents a uniform value that can be passed to an SKRuntimeEffect. |
| SKSamplingOptions |
Specifies the sampling options used when drawing images, including filter mode, mipmap mode, and cubic resampling. |
| SKSize |
Stores an ordered pair of floating-point numbers describing the width and height of a rectangle. |
| SKSizeI |
Stores an ordered pair of integers describing the width and height of a rectangle. |
| SKSurfaceProps |
Describes properties and constraints of a given SKSurface. |
| SKWebpEncoderOptions |
Options to control the WEBP encoding. |
Enums
| Name | Description |
|---|---|
| GRBackend |
Possible 3D APIs that may be used by Ganesh. |
| GRBackendState |
Various flags for the ResetContext(GRBackendState) method. |
| GRBackendTextureDescFlags |
Additional options for a backend texture. |
| GRGlBackendState |
Various flags for the ResetContext(GRGlBackendState) method when using a OpenGL backend. |
| GRPixelConfig |
Various pixel configurations supported. |
| GRSurfaceOrigin |
The origin of a texture. |
| SKAlphaType |
Describes how to interpret the alpha component of a pixel. |
| SKBitmapAllocFlags |
Flags to use with SKBitmap(). |
| SKBitmapResizeMethod |
Channel selector type for the Resize(SKBitmap, SKBitmap, SKBitmapResizeMethod) method or the Resize(SKPixmap, SKPixmap, SKBitmapResizeMethod) method. |
| SKBlendMode |
Predefined blend modes. |
| SKBlurMaskFilterFlags |
Flags to use with CreateBlur(SKBlurStyle, Single). |
| SKBlurStyle |
Blur types for the CreateBlur(SKBlurStyle, Single) method and its overloads. |
| SKCanvasSaveLayerRecFlags |
Specifies the options for saving a layer on an SKCanvas. |
| SKClipOperation |
The logical operations that can be performed when combining two regions. |
| SKCodecAnimationBlend |
Specifies how a frame should be blended with a previous frame in an animated image. |
| SKCodecAnimationDisposalMethod |
Represents how the next frame in the image is based on the current frame. |
| SKCodecOrigin |
The various origins of a bitmap. |
| SKCodecResult |
Used to describe the result of a call to GetPixels(SKImageInfo, IntPtr, SKCodecOptions) or one of the overloads that accepts a SKCodecOptions. |
| SKCodecScanlineOrder |
The orders in which scanlines can be returned. |
| SKColorChannel |
Identifies a specific color channel in an RGBA color. |
| SKColorSpaceFlags |
Various flags that are used when creating a SKColorSpace. |
| SKColorSpaceGamut |
Various gamut values for use with a SKColorSpace. |
| SKColorSpaceRenderTargetGamma |
Represents gamma transfer functions. |
| SKColorSpaceType |
The various types of color spaces. |
| SKColorType |
Describes how to interpret the components of a pixel. |
| SKCropRectFlags |
Flags used by the SKImageFilter.CropRect method. |
| SKDisplacementMapEffectChannelSelectorType |
Channel selector type for the CreateDisplacementMapEffect(SKDisplacementMapEffectChannelSelectorType, SKDisplacementMapEffectChannelSelectorType, Single, SKImageFilter, SKImageFilter, SKImageFilter+CropRect) method. |
| SKDropShadowImageFilterShadowMode |
The various types of shadow modes for use with the CreateDropShadow(Single, Single, Single, Single, SKColor, SKDropShadowImageFilterShadowMode, SKImageFilter, SKImageFilter+CropRect) method. |
| SKEncodedImageFormat |
The various formats used by a SKCodec. |
| SKEncodedOrigin |
Represents various origin values returned by Origin. |
| SKEncoding |
Text encoding definition. |
| SKFilterMode |
Specifies the filtering algorithm for scaling and transforming images. |
| SKFilterQuality |
Filter quality settings. |
| SKFontEdging |
Specifies the type of edge smoothing to use when rendering glyphs. |
| SKFontHinting |
Specifies the level of hinting to be performed when rendering glyphs. |
| SKFontStyleSlant |
Various font slants for use with SKTypeface. |
| SKFontStyleWeight |
Various predefined font weights for use with SKTypeface. |
| SKFontStyleWidth |
Various predefined font widths for use with SKTypeface. |
| SKHighContrastConfigInvertStyle |
Various invert styles for high contrast calculations. |
| SKImageCachingHint |
Hints to image calls where the system might cache computed intermediates. |
| SKJpegEncoderAlphaOption |
Various options to control how alpha should be handled. |
| SKJpegEncoderDownsample |
Various options for the downsampling factor of the U and V components. |
| SKLatticeRectType |
Optional setting per rectangular grid entry to make it transparent, or to fill the grid entry with a color. |
| SKMaskFormat |
Formats that indicate the memory format of the underlying image data of a SKMask. |
| SKMatrix44TypeMask |
Various flags describing the transformations of a SKMatrix44. |
| SKMatrixConvolutionTileMode |
Matrix convolution tile modes for use with CreateMatrixConvolution(SKSizeI, Single[], Single, Single, SKPointI, SKMatrixConvolutionTileMode, Boolean, SKImageFilter, SKImageFilter+CropRect). |
| SKMipmapMode |
Specifies the mipmap mode used when sampling images. |
| SKNamedGamma |
Various standard gamma corrections. |
| SKPaintHinting |
Levels of hinting that can be performed. |
| SKPaintStyle |
Indications on how to draw geometry. |
| SKPath1DPathEffectStyle |
How to transform path at each point (based on the current position and tangent). |
| SKPathAddMode |
Controls how a path is added to another path. |
| SKPathArcSize |
Indication for whether the smaller or larger of possible two arcs is drawn. |
| SKPathConvexity |
Convexity for paths. |
| SKPathDirection |
Direction for path contours. |
| SKPathFillType |
Possible path fill type values. |
| SKPathMeasureMatrixFlags |
Flags to indicate how to compute a matrix from a position along a path. |
| SKPathOp |
The logical operations that can be performed when combining two paths using Op(SKPath, SKPathOp). |
| SKPathSegmentMask |
The flags used by SegmentMasks. |
| SKPathVerb |
Verbs contained in an SKPath. |
| SKPixelGeometry |
Describes how LCD strips are organized for each pixel. |
| SKPngEncoderFilterFlags |
Various row filters to use when encoding a PNG. |
| SKPointMode |
Possible values to interpret the incoming array of points for the DrawPoints(SKPointMode, SKPoint[], SKPaint) method. |
| SKRegionOperation |
The logical operations that can be performed when combining two regions. |
| SKRoundRectCorner |
Represents the corners of a rounded rectangle. |
| SKRoundRectType |
Represents the various sub-types of rounded rectangles. |
| SKShaderTileMode |
Indications on how the shader should handle drawing outside the original bounds. |
| SKStrokeCap |
Various options for StrokeCap. |
| SKStrokeJoin |
Join style for stroking operations. |
| SKSurfacePropsFlags |
Flags for the SKSurfaceProps. |
| SKTextAlign |
Possible text alignment values. |
| SKTextEncoding |
Possible text encodings. |
| SKTransferFunctionBehavior |
Various flags to be used with PremulBehavior. |
| SKTrimPathEffectMode |
Represents the type of trimming to perform. |
| SKTypefaceStyle |
Specifies the intrinsic style attributes of a given typeface. |
| SKVertexMode |
Various mode with which to interpret triangles when invoking DrawVertices(SKVertexMode, SKPoint[], SKColor[], SKPaint). |
| SKWebpEncoderCompression |
The various types of compression for WEBP files. |
| SKZeroInitialized |
Specifies whether the memory passed to GetPixels(SKImageInfo, IntPtr, SKCodecOptions) (or one of the overloads that accepts a SKCodecOptions) is zero initialized. |
Delegates
| Name | Description |
|---|---|
| GRGlGetProcDelegate |
The delegate that is used when locating the various endpoints of an OpenGL implementation. |
| GRGlGetProcedureAddressDelegate |
Represents a method that retrieves the address of an OpenGL function by name. |
| GRSharpVkGetProcedureAddressDelegate |
Represents a method that retrieves Vulkan procedure addresses using SharpVk types. |
| GRVkGetProcedureAddressDelegate |
A delegate for resolving Vulkan function addresses by name. |
| SKBitmapReleaseDelegate |
The delegate that is used when releasing the memory for a bitmap. |
| SKDataReleaseDelegate |
The delegate that is used when a SKData instance is about to be released. |
| SKGlyphPathDelegate |
Represents a callback method that receives the path and transformation matrix for each glyph when enumerating glyph paths. |
| SKImageRasterReleaseDelegate |
The delegate that is used when releasing the memory for a raster-based image. |
| SKImageTextureReleaseDelegate |
The delegate that is used when releasing the memory for a texture-based image. |
| SKSurfaceReleaseDelegate |
The delegate that is used when releasing the memory for a surface. |
The SkiaSharp provides a complete set of APIs to render 2D images. Usually you start by creating a surface with SKSurface, obtain an SKCanvas from it, and issue drawing commands there. You can then access the underlying bitmap, or get it encoded as an image.