Table of Contents

Class DrawingContext

Namespace
GHIElectronics.Endpoint.UI.Media
Assembly
GHIElectronics.Endpoint.UI.dll

Drawing Context.

public class DrawingContext : DispatcherObject, IDisposable
Inheritance
DrawingContext
Implements
Inherited Members

Properties

Height

public int Height { get; }

Property Value

int

Width

public int Width { get; }

Property Value

int

Methods

BlendImage(ImageSource, int, int, int, int, int, int, ushort)

public void BlendImage(ImageSource source, int destinationX, int destinationY, int sourceX, int sourceY, int sourceWidth, int sourceHeight, ushort opacity)

Parameters

source ImageSource
destinationX int
destinationY int
sourceX int
sourceY int
sourceWidth int
sourceHeight int
opacity ushort

Clear()

public void Clear()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

DrawEllipse(Brush, Pen, int, int, int, int)

public void DrawEllipse(Brush brush, Pen pen, int x, int y, int xRadius, int yRadius)

Parameters

brush Brush
pen Pen
x int
y int
xRadius int
yRadius int

DrawImage(ImageSource, int, int)

public void DrawImage(ImageSource source, int x, int y)

Parameters

source ImageSource
x int
y int

DrawImage(ImageSource, int, int, int, int, int, int)

public void DrawImage(ImageSource source, int destinationX, int destinationY, int sourceX, int sourceY, int sourceWidth, int sourceHeight)

Parameters

source ImageSource
destinationX int
destinationY int
sourceX int
sourceY int
sourceWidth int
sourceHeight int

DrawLine(Pen, int, int, int, int)

public void DrawLine(Pen pen, int x0, int y0, int x1, int y1)

Parameters

pen Pen
x0 int
y0 int
x1 int
y1 int

DrawPolygon(Brush, Pen, int[])

public void DrawPolygon(Brush brush, Pen pen, int[] pts)

Parameters

brush Brush
pen Pen
pts int[]

DrawRectangle(Brush, Pen, int, int, int, int)

public void DrawRectangle(Brush brush, Pen pen, int x, int y, int width, int height)

Parameters

brush Brush
pen Pen
x int
y int
width int
height int

DrawText(string, Font, Color, int, int)

public void DrawText(string text, Font font, Color color, int x, int y)

Parameters

text string
font Font
color Color
x int
y int

DrawText(ref string, Font, Color, int, int, int, int, TextAlignment, TextTrimming)

public bool DrawText(ref string text, Font font, Color color, int x, int y, int width, int height, TextAlignment alignment, TextTrimming trimming)

Parameters

text string
font Font
color Color
x int
y int
width int
height int
alignment TextAlignment
trimming TextTrimming

Returns

bool

GetClippingRectangle(out int, out int, out int, out int)

public void GetClippingRectangle(out int x, out int y, out int width, out int height)

Parameters

x int
y int
width int
height int

GetTranslation(out int, out int)

public void GetTranslation(out int x, out int y)

Parameters

x int
y int

PopClippingRectangle()

public void PopClippingRectangle()

PushClippingRectangle(int, int, int, int)

public void PushClippingRectangle(int x, int y, int width, int height)

Parameters

x int
y int
width int
height int

RotateImage(int, int, int, ImageSource, int, int, int, int, ushort)

public void RotateImage(int angle, int destinationX, int destinationY, ImageSource bitmap, int sourceX, int sourceY, int sourceWidth, int sourceHeight, ushort opacity)

Parameters

angle int
destinationX int
destinationY int
bitmap ImageSource
sourceX int
sourceY int
sourceWidth int
sourceHeight int
opacity ushort

Scale9Image(int, int, int, int, ImageSource, int, int, int, int, ushort)

public void Scale9Image(int xDst, int yDst, int widthDst, int heightDst, ImageSource bitmap, int leftBorder, int topBorder, int rightBorder, int bottomBorder, ushort opacity)

Parameters

xDst int
yDst int
widthDst int
heightDst int
bitmap ImageSource
leftBorder int
topBorder int
rightBorder int
bottomBorder int
opacity ushort

SetPixel(Color, int, int)

public void SetPixel(Color color, int x, int y)

Parameters

color Color
x int
y int

StretchImage(int, int, int, int, ImageSource, int, int, int, int, ushort)

public void StretchImage(int xDst, int yDst, int widthDst, int heightDst, ImageSource bitmap, int xSrc, int ySrc, int widthSrc, int heightSrc, ushort opacity)

Parameters

xDst int
yDst int
widthDst int
heightDst int
bitmap ImageSource
xSrc int
ySrc int
widthSrc int
heightSrc int
opacity ushort

TileImage(int, int, ImageSource, int, int, ushort)

public void TileImage(int xDst, int yDst, ImageSource bitmap, int width, int height, ushort opacity)

Parameters

xDst int
yDst int
bitmap ImageSource
width int
height int
opacity ushort

Translate(int, int)

public void Translate(int dx, int dy)

Parameters

dx int
dy int