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.
| Parameter | Type | Description |
|---|---|---|
dx | int | |
dy | int |
GetTranslation(out int x, out int y)
public void GetTranslation(out int x, out int y)
No description available.
| Parameter | Type | Description |
|---|---|---|
x | out int | |
y | out 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.
| Parameter | Type | Description |
|---|---|---|
brush | Brush | |
pen | Pen | |
pts | int[] |
SetPixel(Color color, int x, int y)
public void SetPixel(Color color, int x, int y)
No description available.
| Parameter | Type | Description |
|---|---|---|
color | Color | |
x | int | |
y | int |
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.
| Parameter | Type | Description |
|---|---|---|
pen | Pen | |
x0 | int | |
y0 | int | |
x1 | int | |
y1 | int |
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.
| Parameter | Type | Description |
|---|---|---|
brush | Brush | |
pen | Pen | |
x | int | |
y | int | |
xRadius | int | |
yRadius | int |
DrawImage(ImageSource source, int x, int y)
public void DrawImage(ImageSource source, int x, int y)
No description available.
| Parameter | Type | Description |
|---|---|---|
source | ImageSource | |
x | int | |
y | int |
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.
| Parameter | Type | Description |
|---|---|---|
source | ImageSource | |
destinationX | int | |
destinationY | int | |
sourceX | int | |
sourceY | int | |
sourceWidth | int | |
sourceHeight | int |
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.
| Parameter | Type | Description |
|---|---|---|
source | ImageSource | |
destinationX | int | |
destinationY | int | |
sourceX | int | |
sourceY | int | |
sourceWidth | int | |
sourceHeight | int | |
opacity | ushort |
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.
| Parameter | Type | Description |
|---|---|---|
angle | int | |
destinationX | int | |
destinationY | int | |
bitmap | ImageSource | |
sourceX | int | |
sourceY | int | |
sourceWidth | int | |
sourceHeight | int | |
opacity | ushort |
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.
| Parameter | Type | Description |
|---|---|---|
xDst | int | |
yDst | int | |
widthDst | int | |
heightDst | int | |
bitmap | ImageSource | |
xSrc | int | |
ySrc | int | |
widthSrc | int | |
heightSrc | int | |
opacity | ushort |
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.
| Parameter | Type | Description |
|---|---|---|
xDst | int | |
yDst | int | |
bitmap | ImageSource | |
width | int | |
height | int | |
opacity | ushort |
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.
| Parameter | Type | Description |
|---|---|---|
xDst | int | |
yDst | int | |
widthDst | int | |
heightDst | int | |
bitmap | ImageSource | |
leftBorder | int | |
topBorder | int | |
rightBorder | int | |
bottomBorder | int | |
opacity | ushort |
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.
| Parameter | Type | Description |
|---|---|---|
text | string | |
font | System.Drawing.Font | |
color | Color | |
x | int | |
y | int |
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.
| Parameter | Type | Description |
|---|---|---|
text | ref string | |
font | System.Drawing.Font | |
color | Color | |
x | int | |
y | int | |
width | int | |
height | int | |
alignment | TextAlignment | |
trimming | TextTrimming |
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.
| Parameter | Type | Description |
|---|---|---|
x | out int | |
y | out int | |
width | out int | |
height | out int |
PushClippingRectangle(int x, int y, int width, int height)
public void PushClippingRectangle(int x, int y, int width, int height)
No description available.
| Parameter | Type | Description |
|---|---|---|
x | int | |
y | int | |
width | int | |
height | int |
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.
| Parameter | Type | Description |
|---|---|---|
brush | Brush | |
pen | Pen | |
x | int | |
y | int | |
width | int | |
height | int |
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)
| Parameter | Type | Description |
|---|---|---|
disposing | bool | Not used. |