Skip to main content

IImage Interface

Definition

Namespace:Avalonia.Media
Assembly:Avalonia.Base
Package:Avalonia

Represents a raster or vector image.

public interface IImage

Methods

NameDescription
DrawDraws the image to a Avalonia.Media.DrawingContext.

Draw Method

Draws the image to a Avalonia.Media.DrawingContext.

public void Draw(Avalonia.Media.DrawingContext context, Avalonia.Rect sourceRect, Avalonia.Rect destRect)

Parameters

context Avalonia.Media.DrawingContext

The drawing context.

sourceRect Avalonia.Rect

The rect in the image to draw.

destRect Avalonia.Rect

The rect in the output to draw to.

Properties

NameDescription
SizeGets the size of the image, in device independent pixels.

Size Property

Gets the size of the image, in device independent pixels.

public Avalonia.Size Size { get; set; }