Table of Contents

Class Graphics

Namespace
GHIElectronics.Endpoint.Drawing
Assembly
GHIElectronics.Endpoint.Drawing.dll
public class Graphics : MarshalByRefObject, IDisposable
Inheritance
Graphics
Implements
Inherited Members

Properties

Height

public int Height { get; }

Property Value

int

PageUnit

public GraphicsUnit PageUnit { get; }

Property Value

GraphicsUnit

Width

public int Width { get; }

Property Value

int

Methods

Clear()

public void Clear()

Dispose()

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

public void Dispose()

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

public void DrawEllipse(Pen pen, int x, int y, int width, int height)

Parameters

pen Pen
x int
y int
width int
height int

DrawImage(Image, Rectangle, Rectangle, GraphicsUnit)

public void DrawImage(Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit)

Parameters

image Image
destRect Rectangle
srcRect Rectangle
srcUnit GraphicsUnit

DrawImage(Image, int, int)

public void DrawImage(Image image, int x, int y)

Parameters

image Image
x int
y int

DrawImage(Image, int, int, Rectangle, GraphicsUnit)

public void DrawImage(Image image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit)

Parameters

image Image
x int
y int
srcRect Rectangle
srcUnit GraphicsUnit

DrawImage(Image, int, int, int, int)

public void DrawImage(Image image, int x, int y, int width, int height)

Parameters

image Image
x int
y int
width int
height int

DrawImage(int, int, Image, int, int, int, int, ushort)

public void DrawImage(int xDst, int yDst, Image image, int xSrc, int ySrc, int width, int height, ushort opacity)

Parameters

xDst int
yDst int
image Image
xSrc int
ySrc int
width int
height int
opacity ushort

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

public void DrawLine(Pen pen, int x1, int y1, int x2, int y2)

Parameters

pen Pen
x1 int
y1 int
x2 int
y2 int

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

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

Parameters

pen Pen
x int
y int
width int
height int

DrawString(string, Font, Brush, RectangleF)

public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle)

Parameters

s string
font Font
brush Brush
layoutRectangle RectangleF

DrawString(string, Font, Brush, RectangleF, StringFormat)

public void DrawString(string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format)

Parameters

s string
font Font
brush Brush
layoutRectangle RectangleF
format StringFormat

DrawString(string, Font, Brush, float, float)

public void DrawString(string s, Font font, Brush brush, float x, float y)

Parameters

s string
font Font
brush Brush
x float
y float

DrawTextInRect(string, int, int, int, int, DrawTextAlignment, Color, Font)

public void DrawTextInRect(string text, int x, int y, int width, int height, Graphics.DrawTextAlignment dtFlags, Color color, Font font)

Parameters

text string
x int
y int
width int
height int
dtFlags Graphics.DrawTextAlignment
color Color
font Font

DrawTextInRect(ref string, ref int, ref int, int, int, int, int, DrawTextAlignment, Color, Font)

public bool DrawTextInRect(ref string text, ref int xRelStart, ref int yRelStart, int x, int y, int width, int height, Graphics.DrawTextAlignment dtFlags, Color color, Font font)

Parameters

text string
xRelStart int
yRelStart int
x int
y int
width int
height int
dtFlags Graphics.DrawTextAlignment
color Color
font Font

Returns

bool

FillEllipse(Brush, int, int, int, int)

public void FillEllipse(Brush brush, int x, int y, int width, int height)

Parameters

brush Brush
x int
y int
width int
height int

FillRectangle(Brush, int, int, int, int)

public void FillRectangle(Brush brush, int x, int y, int width, int height)

Parameters

brush Brush
x int
y int
width int
height int

~Graphics()

protected ~Graphics()

Flush(int, int, int, int)

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

Parameters

x int
y int
width int
height int

FromData(byte[])

public static Graphics FromData(byte[] data)

Parameters

data byte[]

Returns

Graphics

FromData(byte[], int, int)

public static Graphics FromData(byte[] data, int width, int height)

Parameters

data byte[]
width int
height int

Returns

Graphics

FromImage(Image)

public static Graphics FromImage(Image image)

Parameters

image Image

Returns

Graphics

GetBitmap()

public byte[] GetBitmap()

Returns

byte[]

GetBitmap(int, int, int, int)

public byte[] GetBitmap(int x, int y, int width, int height)

Parameters

x int
y int
width int
height int

Returns

byte[]

GetPixel(int, int)

public uint GetPixel(int x, int y)

Parameters

x int
y int

Returns

uint

MakeTransparent(Color)

public void MakeTransparent(Color color)

Parameters

color Color

MeasureString(string, Font)

public SizeF MeasureString(string text, Font font)

Parameters

text string
font Font

Returns

SizeF

MeasureString(string, Font, SizeF, StringFormat)

public SizeF MeasureString(string text, Font font, SizeF layoutArea, StringFormat stringFormat)

Parameters

text string
font Font
layoutArea SizeF
stringFormat StringFormat

Returns

SizeF

RotateImage(int, int, int, Image, int, int, int, int, ushort)

public void RotateImage(int angle, int xDst, int yDst, Image image, int xSrc, int ySrc, int width, int height, ushort opacity)

Parameters

angle int
xDst int
yDst int
image Image
xSrc int
ySrc int
width int
height int
opacity ushort

Scale9Image(int, int, int, int, Image, int, int, int, int, ushort)

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

Parameters

xDst int
yDst int
widthDst int
heightDst int
image Image
leftBorder int
topBorder int
rightBorder int
bottomBorder int
opacity ushort

SetClippingRectangle(int, int, int, int)

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

Parameters

x int
y int
width int
height int

SetPixel(int, int, Color)

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

Parameters

x int
y int
color Color

StretchImage(int, int, int, int, Image, int, int, int, int, ushort)

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

Parameters

xDst int
yDst int
widthDst int
heightDst int
image Image
xSrc int
ySrc int
widthSrc int
heightSrc int
opacity ushort

TileImage(int, int, Image, int, int, ushort)

public void TileImage(int xDst, int yDst, Image image, int width, int height, ushort opacity)

Parameters

xDst int
yDst int
image Image
width int
height int
opacity ushort

Events

OnFlushEvent

public static event Graphics.OnFlushHandler OnFlushEvent

Event Type

Graphics.OnFlushHandler