Table of Contents

Interface IImageDrawingContext

Namespace
Xui.Core.Canvas
Assembly
Xui.Core.dll

Defines methods for drawing images onto the canvas. Mirrors the drawImage API from the HTML5 Canvas 2D context. https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage

public interface IImageDrawingContext

Methods

DrawImage(IImage, Rect)

Draws the entire image scaled to fit dest at full opacity.

void DrawImage(IImage image, Rect dest)

Parameters

image IImage
dest Rect

DrawImage(IImage, Rect, NFloat)

Draws the entire image scaled to fit dest at the given opacity.

void DrawImage(IImage image, Rect dest, NFloat opacity)

Parameters

image IImage
dest Rect
opacity NFloat

DrawImage(IImage, Rect, Rect, NFloat)

Draws the sub-region source of image scaled to fit dest at the given opacity. Mirrors the 9-argument form of drawImage in the HTML5 Canvas API.

void DrawImage(IImage image, Rect source, Rect dest, NFloat opacity)

Parameters

image IImage
source Rect
dest Rect
opacity NFloat