Skip to main content

DrawingContext Class

Namespace: GHIElectronics.TinyCLR.UI.Media · Assembly: GHIElectronics.TinyCLR.UI

Drawing Context.

public class DrawingContext : DispatcherObject, IDisposable

Properties

Width

public int Width { get; }

Column width in pixels. (inherited)

Height

public int Height { get; }

Frame height in pixels. (inherited)

Methods

Translate(int dx, int dy)

public void Translate(int dx, int dy)

No description available.

ParameterTypeDescription
dxint
dyint

GetTranslation(out int x, out int y)

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

No description available.

ParameterTypeDescription
xout int
yout int

Clear()

public void Clear()

Removes all elements from the UIElementCollection. (inherited)

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

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

No description available.

ParameterTypeDescription
brushBrush
penPen
ptsint[]

SetPixel(Color color, int x, int y)

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

No description available.

ParameterTypeDescription
colorColor
xint
yint

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

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

No description available.

ParameterTypeDescription
penPen
x0int
y0int
x1int
y1int

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

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

No description available.

ParameterTypeDescription
brushBrush
penPen
xint
yint
xRadiusint
yRadiusint

DrawImage(ImageSource source, int x, int y)

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

No description available.

ParameterTypeDescription
sourceImageSource
xint
yint

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

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

No description available.

ParameterTypeDescription
sourceImageSource
destinationXint
destinationYint
sourceXint
sourceYint
sourceWidthint
sourceHeightint

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

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

No description available.

ParameterTypeDescription
sourceImageSource
destinationXint
destinationYint
sourceXint
sourceYint
sourceWidthint
sourceHeightint
opacityushort

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

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

No description available.

ParameterTypeDescription
angleint
destinationXint
destinationYint
bitmapImageSource
sourceXint
sourceYint
sourceWidthint
sourceHeightint
opacityushort

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

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

No description available.

ParameterTypeDescription
xDstint
yDstint
widthDstint
heightDstint
bitmapImageSource
xSrcint
ySrcint
widthSrcint
heightSrcint
opacityushort

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

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

No description available.

ParameterTypeDescription
xDstint
yDstint
bitmapImageSource
widthint
heightint
opacityushort

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

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

No description available.

ParameterTypeDescription
xDstint
yDstint
widthDstint
heightDstint
bitmapImageSource
leftBorderint
topBorderint
rightBorderint
bottomBorderint
opacityushort

DrawText(string text, System.Drawing.Font font, Color color, int x, int y)

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

No description available.

ParameterTypeDescription
textstring
fontSystem.Drawing.Font
colorColor
xint
yint

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

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

No description available.

ParameterTypeDescription
textref string
fontSystem.Drawing.Font
colorColor
xint
yint
widthint
heightint
alignmentTextAlignment
trimmingTextTrimming

Returns bool

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

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

No description available.

ParameterTypeDescription
xout int
yout int
widthout int
heightout int

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

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

No description available.

ParameterTypeDescription
xint
yint
widthint
heightint

PopClippingRectangle()

public void PopClippingRectangle()

No description available.

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

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

No description available.

ParameterTypeDescription
brushBrush
penPen
xint
yint
widthint
heightint

Dispose()

public void Dispose()

Releases buffered memory (the unmanaged firmware/application buffers). (inherited)

Dispose(bool disposing)

protected virtual void Dispose(bool disposing)

Closes a response stream, if present. (inherited)

ParameterTypeDescription
disposingboolNot used.