SKCanvas.DrawImage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| DrawImage(SKImage, SKRect, SKRect, SKSamplingOptions, SKPaint) |
Draws a portion of an image scaled to fit the destination rectangle with sampling options. |
| DrawImage(SKImage, Single, Single, SKPaint) |
Draws an image on the canvas. |
| DrawImage(SKImage, SKRect, SKSamplingOptions, SKPaint) |
Draws an image scaled to fit the destination rectangle with sampling options. |
| DrawImage(SKImage, Single, Single, SKSamplingOptions, SKPaint) |
Draws an image at the specified coordinates with sampling options. |
| DrawImage(SKImage, SKPoint, SKSamplingOptions, SKPaint) |
Draws an image at the specified point with sampling options. |
| DrawImage(SKImage, SKRect, SKPaint) |
Draws an image on the canvas. |
| DrawImage(SKImage, SKPoint, SKPaint) |
Draws an image on the canvas. |
| DrawImage(SKImage, SKRect, SKRect, SKPaint) |
Draws an image on the canvas. |
DrawImage(SKImage, SKRect, SKRect, SKSamplingOptions, SKPaint)
Draws a portion of an image scaled to fit the destination rectangle with sampling options.
public void DrawImage(SkiaSharp.SKImage image, SkiaSharp.SKRect source, SkiaSharp.SKRect dest, SkiaSharp.SKSamplingOptions sampling, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- source
- SKRect
The source rectangle within the image.
- dest
- SKRect
The destination rectangle to draw the image into.
- sampling
- SKSamplingOptions
The sampling options for image filtering.
- paint
- SKPaint
The paint used when drawing the image, or null.
Applies to
DrawImage(SKImage, Single, Single, SKPaint)
Draws an image on the canvas.
public void DrawImage(SkiaSharp.SKImage image, float x, float y, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- x
- Single
The destination x-coordinate for the image.
- y
- Single
The destination y-coordinate for the image.
- paint
- SKPaint
The paint to use when drawing the image, or null.
Applies to
DrawImage(SKImage, SKRect, SKSamplingOptions, SKPaint)
Draws an image scaled to fit the destination rectangle with sampling options.
public void DrawImage(SkiaSharp.SKImage image, SkiaSharp.SKRect dest, SkiaSharp.SKSamplingOptions sampling, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- dest
- SKRect
The destination rectangle to draw the image into.
- sampling
- SKSamplingOptions
The sampling options for image filtering.
- paint
- SKPaint
The paint used when drawing the image, or null.
Applies to
DrawImage(SKImage, Single, Single, SKSamplingOptions, SKPaint)
Draws an image at the specified coordinates with sampling options.
public void DrawImage(SkiaSharp.SKImage image, float x, float y, SkiaSharp.SKSamplingOptions sampling, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- x
- Single
The x-coordinate of the left edge of the image.
- y
- Single
The y-coordinate of the top edge of the image.
- sampling
- SKSamplingOptions
The sampling options for image filtering.
- paint
- SKPaint
The paint used when drawing the image, or null.
Applies to
DrawImage(SKImage, SKPoint, SKSamplingOptions, SKPaint)
Draws an image at the specified point with sampling options.
public void DrawImage(SkiaSharp.SKImage image, SkiaSharp.SKPoint p, SkiaSharp.SKSamplingOptions sampling, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- p
- SKPoint
The point at which to draw the image.
- sampling
- SKSamplingOptions
The sampling options for image filtering.
- paint
- SKPaint
The paint used when drawing the image, or null.
Applies to
DrawImage(SKImage, SKRect, SKPaint)
Draws an image on the canvas.
public void DrawImage(SkiaSharp.SKImage image, SkiaSharp.SKRect dest, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- dest
- SKRect
The region to draw the image into.
- paint
- SKPaint
The paint to use when drawing the image, or null.
Applies to
DrawImage(SKImage, SKPoint, SKPaint)
Draws an image on the canvas.
public void DrawImage(SkiaSharp.SKImage image, SkiaSharp.SKPoint p, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- p
- SKPoint
The destination coordinates for the image.
- paint
- SKPaint
The paint to use when drawing the image, or null.
Applies to
DrawImage(SKImage, SKRect, SKRect, SKPaint)
Draws an image on the canvas.
public void DrawImage(SkiaSharp.SKImage image, SkiaSharp.SKRect source, SkiaSharp.SKRect dest, SkiaSharp.SKPaint paint = default);
Parameters
- image
- SKImage
The image to draw.
- source
- SKRect
The source region to copy.
- dest
- SKRect
The region to draw the image into.
- paint
- SKPaint
The paint to use when drawing the image, or null.