C# Class GDIGeometryRenderer, NewTOAPIA

A bit about drawing with GDI32. There are several parameters that determine exactly what's going to get drawn on the screen RasterOp Pen Brush Background Color Foreground Line Drawing X X Curve Drawing Framing
Inheritance: IRenderGDI
ファイルを表示 Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Methods

Method Description
AlphaBlend ( int x, int y, int width, int height, IntPtr srchDC, int srcX, int srcY, int srcWidth, int srcHeight, byte alpha ) : bool
BeginPath ( ) : bool
BitBlt ( int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, TernaryRasterOps dwRop ) : bool
BitBlt ( int x, int y, PixelBuffer, bitmap ) : void
BlendPixel ( Point aPoint, uint colorref, byte alpha ) : bool
CreateBitmap ( int width, int height ) : PixelBuffer,
CreateBrush ( int aStyle, int hatch, uint colorref, System.Guid uniqueID ) : Brush,
CreatePen ( int aStyle, int width, uint color, System.Guid uniqueID ) : Pen,
DrawBitmap ( PixelBuffer, img, Point origin ) : void

DrawImage, will draw the supplied image graphic on the screen. It will use the Image's frame and size to determine where to display it.

DrawBitmap ( PixelBuffer, img, Rectangle, srcRect, Rectangle, dstRect ) : void
DrawEllipse ( EllipseG, aEllipse, Pen, aPen, Brush, aBrush ) : void
DrawLine ( LineG, aLine, Pen, pen ) : void
DrawLine ( Point startPoint, Point endPoint ) : void
DrawLine ( int x1, int y1, int x2, int y2 ) : void
DrawPath ( ) : bool
DrawPolygon ( Point points ) : void
DrawPolygon ( Point points, Pen, aPen, Brush, aBrush ) : void
DrawPolygon ( PolygonG, poly, Pen, aPen, Brush, aBrush ) : void
DrawRectangle ( Rectangle, aRect, Pen, aPen, Brush, aBrush ) : void
DrawString ( int x, int y, string aString ) : void
Ellipse ( int left, int top, int right, int bottom ) : void
EndPath ( ) : bool
FillEllipse ( EllipseG, aEllipse, Brush, aBrush ) : void
FillPath ( ) : bool
FillPolygon ( PolygonG, poly, Brush, aBrush ) : void
FillRectangle ( Rectangle, aRect, Brush, aBrush ) : void
Flush ( ) : void
FrameEllipse ( EllipseG, aEllipse, Pen, aPen ) : void
FramePath ( ) : bool
FramePolygon ( PolygonG, poly, Pen, aPen ) : void
FrameRectangle ( Rectangle, aRect, Pen, pen ) : void
GDIGeometryRenderer ( GDIDeviceContext devContext ) : System
GetPixel ( int x, int y ) : uint
GradientFill ( TRIVERTEX pVertex, GRADIENT_RECT pMesh, uint dwMode ) : void
GradientFill ( TRIVERTEX pVertex, GRADIENT_TRIANGLE pMesh, uint dwMode ) : void
LineTo ( Point toPoint ) : void
LineTo ( int x, int y ) : void
MeasureCharacter ( char c, int &width, int &height ) : void
MoveTo ( Point aPoint ) : void
MoveTo ( int x, int y ) : void
OffsetWindowOrigin ( int x, int y ) : void
PlgBlt ( Point lpPoint, IntPtr hdcSrc, int srcX, int srcY, int width, int height, IntPtr hbmMask, int xMask, int yMask ) : bool
PolyBezier ( Point points ) : void
PolyDraw ( Point apt, byte aj ) : void
PolyLine ( Point points ) : void
Polygon ( Point points ) : void
Rectangle ( Rectangle, aRect ) : void
Rectangle ( int left, int top, int right, int bottom ) : void

Draw the frame of a rectangle using a pen. Leave the interior alone.

ResetClip ( ) : void
RestoreState ( ) : void
RestoreState ( int relative ) : void
RoundRect ( int left, int top, int right, int bottom, int width, int height ) : void
SaveState ( ) : void
SelectObject ( Brush, aBrush ) : void
SelectObject ( Font, aFont ) : void
SelectObject ( IntPtr objectHandle ) : void
SelectObject ( Pen, aPen ) : void
SelectStockObject ( int objectIndex ) : void
SelectUniqueObject ( System.Guid objectID ) : void
SetBkColor ( uint colorref ) : void
SetBkMode ( int bkMode ) : void
SetClip ( Rectangle, clipRect ) : void
SetClip ( Region, clipRegion ) : void
SetDefaultBrushColor ( uint colorref ) : void
SetDefaultPenColor ( uint colorref ) : void
SetMappingMode ( MappingModes aMode ) : void
SetPathAsClipRegion ( ) : bool
SetPen ( Pen, aPen ) : void
SetPixel ( int x, int y, uint colorref ) : void
SetPolyFillMode ( int fillMode ) : void
SetTextColor ( uint colorref ) : void
SetViewportExtent ( int width, int height ) : void
SetViewportOrigin ( int x, int y ) : void
SetWindowExtent ( int width, int height ) : Size,
SetWindowOrigin ( int x, int y ) : void
StretchBlt ( int x, int y, int width, int height, IntPtr srchDC, int srcX, int srcY, int srcWidth, int srcHeight, TernaryRasterOps dwRop ) : bool
TranslateTransform ( int dx, int dy ) : bool
UseDefaultBrush ( ) : void
UseDefaultPen ( ) : void

Private Methods

Method Description
GetWorldTransform ( ) : XFORM
SetWorldTransform ( XFORM aTransform ) : bool

Method Details

AlphaBlend() public method

public AlphaBlend ( int x, int y, int width, int height, IntPtr srchDC, int srcX, int srcY, int srcWidth, int srcHeight, byte alpha ) : bool
x int
y int
width int
height int
srchDC IntPtr
srcX int
srcY int
srcWidth int
srcHeight int
alpha byte
return bool

BeginPath() public method

public BeginPath ( ) : bool
return bool

BitBlt() public method

public BitBlt ( int x, int y, int nWidth, int nHeight, IntPtr hSrcDC, int xSrc, int ySrc, TernaryRasterOps dwRop ) : bool
x int
y int
nWidth int
nHeight int
hSrcDC IntPtr
xSrc int
ySrc int
dwRop TernaryRasterOps
return bool

BitBlt() public method

public BitBlt ( int x, int y, PixelBuffer, bitmap ) : void
x int
y int
bitmap PixelBuffer,
return void

BlendPixel() public method

public BlendPixel ( Point aPoint, uint colorref, byte alpha ) : bool
aPoint Point
colorref uint
alpha byte
return bool

CreateBitmap() public method

public CreateBitmap ( int width, int height ) : PixelBuffer,
width int
height int
return PixelBuffer,

CreateBrush() public method

public CreateBrush ( int aStyle, int hatch, uint colorref, System.Guid uniqueID ) : Brush,
aStyle int
hatch int
colorref uint
uniqueID System.Guid
return Brush,

CreatePen() public method

public CreatePen ( int aStyle, int width, uint color, System.Guid uniqueID ) : Pen,
aStyle int
width int
color uint
uniqueID System.Guid
return Pen,

DrawBitmap() public method

DrawImage, will draw the supplied image graphic on the screen. It will use the Image's frame and size to determine where to display it.
public DrawBitmap ( PixelBuffer, img, Point origin ) : void
img PixelBuffer,
origin Point
return void

DrawBitmap() public method

public DrawBitmap ( PixelBuffer, img, Rectangle, srcRect, Rectangle, dstRect ) : void
img PixelBuffer,
srcRect Rectangle,
dstRect Rectangle,
return void

DrawEllipse() public method

public DrawEllipse ( EllipseG, aEllipse, Pen, aPen, Brush, aBrush ) : void
aEllipse EllipseG,
aPen Pen,
aBrush Brush,
return void

DrawLine() public method

public DrawLine ( LineG, aLine, Pen, pen ) : void
aLine LineG,
pen Pen,
return void

DrawLine() public method

public DrawLine ( Point startPoint, Point endPoint ) : void
startPoint Point
endPoint Point
return void

DrawLine() public method

public DrawLine ( int x1, int y1, int x2, int y2 ) : void
x1 int
y1 int
x2 int
y2 int
return void

DrawPath() public method

public DrawPath ( ) : bool
return bool

DrawPolygon() public method

public DrawPolygon ( Point points ) : void
points Point
return void

DrawPolygon() public method

public DrawPolygon ( Point points, Pen, aPen, Brush, aBrush ) : void
points Point
aPen Pen,
aBrush Brush,
return void

DrawPolygon() public method

public DrawPolygon ( PolygonG, poly, Pen, aPen, Brush, aBrush ) : void
poly PolygonG,
aPen Pen,
aBrush Brush,
return void

DrawRectangle() public method

public DrawRectangle ( Rectangle, aRect, Pen, aPen, Brush, aBrush ) : void
aRect Rectangle,
aPen Pen,
aBrush Brush,
return void

DrawString() public method

public DrawString ( int x, int y, string aString ) : void
x int
y int
aString string
return void

Ellipse() public method

public Ellipse ( int left, int top, int right, int bottom ) : void
left int
top int
right int
bottom int
return void

EndPath() public method

public EndPath ( ) : bool
return bool

FillEllipse() public method

public FillEllipse ( EllipseG, aEllipse, Brush, aBrush ) : void
aEllipse EllipseG,
aBrush Brush,
return void

FillPath() public method

public FillPath ( ) : bool
return bool

FillPolygon() public method

public FillPolygon ( PolygonG, poly, Brush, aBrush ) : void
poly PolygonG,
aBrush Brush,
return void

FillRectangle() public method

public FillRectangle ( Rectangle, aRect, Brush, aBrush ) : void
aRect Rectangle,
aBrush Brush,
return void

Flush() public method

public Flush ( ) : void
return void

FrameEllipse() public method

public FrameEllipse ( EllipseG, aEllipse, Pen, aPen ) : void
aEllipse EllipseG,
aPen Pen,
return void

FramePath() public method

public FramePath ( ) : bool
return bool

FramePolygon() public method

public FramePolygon ( PolygonG, poly, Pen, aPen ) : void
poly PolygonG,
aPen Pen,
return void

FrameRectangle() public method

public FrameRectangle ( Rectangle, aRect, Pen, pen ) : void
aRect Rectangle,
pen Pen,
return void

GDIGeometryRenderer() public method

public GDIGeometryRenderer ( GDIDeviceContext devContext ) : System
devContext GDIDeviceContext
return System

GetPixel() public method

public GetPixel ( int x, int y ) : uint
x int
y int
return uint

GradientFill() public method

public GradientFill ( TRIVERTEX pVertex, GRADIENT_RECT pMesh, uint dwMode ) : void
pVertex TRIVERTEX
pMesh TOAPI.Types.GRADIENT_RECT
dwMode uint
return void

GradientFill() public method

public GradientFill ( TRIVERTEX pVertex, GRADIENT_TRIANGLE pMesh, uint dwMode ) : void
pVertex TRIVERTEX
pMesh TOAPI.Types.GRADIENT_TRIANGLE
dwMode uint
return void

LineTo() public method

public LineTo ( Point toPoint ) : void
toPoint Point
return void

LineTo() public method

public LineTo ( int x, int y ) : void
x int
y int
return void

MeasureCharacter() public method

public MeasureCharacter ( char c, int &width, int &height ) : void
c char
width int
height int
return void

MoveTo() public method

public MoveTo ( Point aPoint ) : void
aPoint Point
return void

MoveTo() public method

public MoveTo ( int x, int y ) : void
x int
y int
return void

OffsetWindowOrigin() public method

public OffsetWindowOrigin ( int x, int y ) : void
x int
y int
return void

PlgBlt() public method

public PlgBlt ( Point lpPoint, IntPtr hdcSrc, int srcX, int srcY, int width, int height, IntPtr hbmMask, int xMask, int yMask ) : bool
lpPoint Point
hdcSrc IntPtr
srcX int
srcY int
width int
height int
hbmMask IntPtr
xMask int
yMask int
return bool

PolyBezier() public method

public PolyBezier ( Point points ) : void
points Point
return void

PolyDraw() public method

public PolyDraw ( Point apt, byte aj ) : void
apt Point
aj byte
return void

PolyLine() public method

public PolyLine ( Point points ) : void
points Point
return void

Polygon() public method

public Polygon ( Point points ) : void
points Point
return void

Rectangle() public method

public Rectangle ( Rectangle, aRect ) : void
aRect Rectangle,
return void

Rectangle() public method

Draw the frame of a rectangle using a pen. Leave the interior alone.
public Rectangle ( int left, int top, int right, int bottom ) : void
left int
top int
right int
bottom int
return void

ResetClip() public method

public ResetClip ( ) : void
return void

RestoreState() public method

public RestoreState ( ) : void
return void

RestoreState() public method

public RestoreState ( int relative ) : void
relative int
return void

RoundRect() public method

public RoundRect ( int left, int top, int right, int bottom, int width, int height ) : void
left int
top int
right int
bottom int
width int
height int
return void

SaveState() public method

public SaveState ( ) : void
return void

SelectObject() public method

public SelectObject ( Brush, aBrush ) : void
aBrush Brush,
return void

SelectObject() public method

public SelectObject ( Font, aFont ) : void
aFont Font,
return void

SelectObject() public method

public SelectObject ( IntPtr objectHandle ) : void
objectHandle IntPtr
return void

SelectObject() public method

public SelectObject ( Pen, aPen ) : void
aPen Pen,
return void

SelectStockObject() public method

public SelectStockObject ( int objectIndex ) : void
objectIndex int
return void

SelectUniqueObject() public method

public SelectUniqueObject ( System.Guid objectID ) : void
objectID System.Guid
return void

SetBkColor() public method

public SetBkColor ( uint colorref ) : void
colorref uint
return void

SetBkMode() public method

public SetBkMode ( int bkMode ) : void
bkMode int
return void

SetClip() public method

public SetClip ( Rectangle, clipRect ) : void
clipRect Rectangle,
return void

SetClip() public method

public SetClip ( Region, clipRegion ) : void
clipRegion Region,
return void

SetDefaultBrushColor() public method

public SetDefaultBrushColor ( uint colorref ) : void
colorref uint
return void

SetDefaultPenColor() public method

public SetDefaultPenColor ( uint colorref ) : void
colorref uint
return void

SetMappingMode() public method

public SetMappingMode ( MappingModes aMode ) : void
aMode MappingModes
return void

SetPathAsClipRegion() public method

public SetPathAsClipRegion ( ) : bool
return bool

SetPen() public method

public SetPen ( Pen, aPen ) : void
aPen Pen,
return void

SetPixel() public method

public SetPixel ( int x, int y, uint colorref ) : void
x int
y int
colorref uint
return void

SetPolyFillMode() public method

public SetPolyFillMode ( int fillMode ) : void
fillMode int
return void

SetTextColor() public method

public SetTextColor ( uint colorref ) : void
colorref uint
return void

SetViewportExtent() public method

public SetViewportExtent ( int width, int height ) : void
width int
height int
return void

SetViewportOrigin() public method

public SetViewportOrigin ( int x, int y ) : void
x int
y int
return void

SetWindowExtent() public method

public SetWindowExtent ( int width, int height ) : Size,
width int
height int
return Size,

SetWindowOrigin() public method

public SetWindowOrigin ( int x, int y ) : void
x int
y int
return void

StretchBlt() public method

public StretchBlt ( int x, int y, int width, int height, IntPtr srchDC, int srcX, int srcY, int srcWidth, int srcHeight, TernaryRasterOps dwRop ) : bool
x int
y int
width int
height int
srchDC IntPtr
srcX int
srcY int
srcWidth int
srcHeight int
dwRop TernaryRasterOps
return bool

TranslateTransform() public method

public TranslateTransform ( int dx, int dy ) : bool
dx int
dy int
return bool

UseDefaultBrush() public method

public UseDefaultBrush ( ) : void
return void

UseDefaultPen() public method

public UseDefaultPen ( ) : void
return void