C# Class NewTOAPIA.Drawing.GDIContext

Inheritance: GDIInfoContext
Exibir arquivo Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Methods

Method Description
AlphaBlend ( GDIContext srcDC, Rectangle srcRect, Rectangle dstRect, byte opacity ) : bool
BeginPath ( ) : void
BitBlt ( GDIContext srcDC, Point srcPoint, Rectangle dstRect, TernaryRasterOps dwRop ) : bool
ClearToBlack ( ) : void
ClearToWhite ( ) : void

Fills the entire context with white pixels. This is most useful when clearing a bitmap, but it can be used for any context.

CreateForAllAttachedMonitors ( ) : GDIContext
CreateForDefaultDisplay ( ) : GDIContext
CreateForDesktopBackground ( ) : GDIContext

Create a GDIContext so that drawing to the desktop can occur. On Vista, the drawing will be behind all windows, but will draw on top of any icons on the actual desktop. For Windows XP, the drawing will be behind those icons as well.

CreateForDevice ( string device, string name ) : GDIContext
CreateForDisplay ( string displayName ) : GDIContext
CreateForMemory ( ) : GDIContext
CreateForWholeWindow ( IntPtr hWnd ) : GDIContext
CreateForWindowClientArea ( IntPtr hWnd ) : GDIContext
DrawRegion ( GDIRegion region ) : void
EndPath ( ) : void
FillPath ( ) : void
FillRectangleWithBlack ( Rectangle rect ) : void
FillRectangleWithWhite ( Rectangle rect ) : void

Fill a particular rectangle with white pixels. Similar to the ClearToWhite call, but takes a specific Rectangle as the area to be filled.

FillRegion ( GDIRegion region, GDIBrush aBrush ) : void
FlattenPath ( ) : void
FloodFill ( int x, int y, uint colorref, FloodFillType floodtype ) : bool
Flush ( ) : void
FrameRegion ( GDIRegion region, GDIBrush aBrush, Size strokeSize ) : void
GetBkColor ( ) : uint
GetBkMode ( ) : int
GetDCBrushColor ( ) : uint
GetDCPenColor ( ) : uint
GetPixel ( int x, int y ) : UInt32

Retrieves a single pixel value from the Device Context.

GetROP2 ( ) : BinaryRasterOps
InvertRegion ( GDIRegion region ) : void
LineTo ( int x, int y ) : void
MoveTo ( int x, int y ) : void
OffsetWindowOrigin ( int x, int y ) : void
PatBlt ( int x, int y, int width, int height, TernaryRasterOps rasterOp ) : bool
PixelBlt ( Rectangle srcRect, Rectangle dstRect, IntPtr pixelPtr, BitCount bitsPerPixel ) : int
PlgBlt ( GDIContext srcDC, Rectangle srcRect, POINT dstParallelogramPoints, IntPtr hbmMask, int xMask, int yMask ) : bool
PolyBezierTo ( POINT pts ) : void
PolyLine ( POINT points ) : void
PolyLineTo ( POINT points ) : void
PolyPolyLine ( POINT points, int polypoints, int nCount ) : void
Rectangle ( int left, int top, int right, int bottom ) : void
ReplayPath ( GPath aPath ) : void
ResetState ( ) : void
RestoreState ( int toState ) : void
RoundRect ( int left, int top, int right, int bottom, int xRadius, int yRadius ) : void
SaveState ( ) : void
SetBkColor ( uint colorref ) : void
SetBkMode ( int bkMode ) : void
SetDefaultPenColor ( UInt32 colorref ) : void
SetMappingMode ( MappingModes aMode ) : void
SetPathAsClipRegion ( ) : void
SetPixel ( int x, int y, UInt32 colorref ) : UInt32
SetPolyFillMode ( PolygonFillMode fillMode ) : void
SetROP2 ( BinaryRasterOps rasOp ) : void
SetViewportExtent ( int width, int height ) : void
SetViewportOrigin ( int x, int y ) : void
SetWindowExtent ( int width, int height ) : void
SetWindowOrigin ( int x, int y ) : void
SetWorldTransform ( Transform2D aTransform ) : void
StretchBlt ( GDIContext srcDC, Rectangle srcRect, Rectangle dstRect, TernaryRasterOps dwRop ) : bool
StrokeAndFillPath ( ) : void
StrokePath ( ) : void

Protected Methods

Method Description
SetupDefaultState ( ) : void

Setup the device to be in a known good starting state. We know we want ADVANCED drawing, so that is set.

Private Methods

Method Description
GDIContext ( GDIContext aDC ) : System
GDIContext ( IntPtr hDC, bool ownHandle ) : System
GetWorldTransform ( ) : Transform2D

Method Details

AlphaBlend() public method

public AlphaBlend ( GDIContext srcDC, Rectangle srcRect, Rectangle dstRect, byte opacity ) : bool
srcDC GDIContext
srcRect System.Drawing.Rectangle
dstRect System.Drawing.Rectangle
opacity byte
return bool

BeginPath() public method

public BeginPath ( ) : void
return void

BitBlt() public method

public BitBlt ( GDIContext srcDC, Point srcPoint, Rectangle dstRect, TernaryRasterOps dwRop ) : bool
srcDC GDIContext
srcPoint Point
dstRect System.Drawing.Rectangle
dwRop TernaryRasterOps
return bool

ClearToBlack() public method

public ClearToBlack ( ) : void
return void

ClearToWhite() public method

Fills the entire context with white pixels. This is most useful when clearing a bitmap, but it can be used for any context.
public ClearToWhite ( ) : void
return void

CreateForAllAttachedMonitors() public static method

public static CreateForAllAttachedMonitors ( ) : GDIContext
return GDIContext

CreateForDefaultDisplay() public static method

public static CreateForDefaultDisplay ( ) : GDIContext
return GDIContext

CreateForDesktopBackground() public static method

Create a GDIContext so that drawing to the desktop can occur. On Vista, the drawing will be behind all windows, but will draw on top of any icons on the actual desktop. For Windows XP, the drawing will be behind those icons as well.
public static CreateForDesktopBackground ( ) : GDIContext
return GDIContext

CreateForDevice() public static method

public static CreateForDevice ( string device, string name ) : GDIContext
device string
name string
return GDIContext

CreateForDisplay() public static method

public static CreateForDisplay ( string displayName ) : GDIContext
displayName string
return GDIContext

CreateForMemory() public static method

public static CreateForMemory ( ) : GDIContext
return GDIContext

CreateForWholeWindow() public static method

public static CreateForWholeWindow ( IntPtr hWnd ) : GDIContext
hWnd System.IntPtr
return GDIContext

CreateForWindowClientArea() public static method

public static CreateForWindowClientArea ( IntPtr hWnd ) : GDIContext
hWnd System.IntPtr
return GDIContext

DrawRegion() public method

public DrawRegion ( GDIRegion region ) : void
region GDIRegion
return void

EndPath() public method

public EndPath ( ) : void
return void

FillPath() public method

public FillPath ( ) : void
return void

FillRectangleWithBlack() public method

public FillRectangleWithBlack ( Rectangle rect ) : void
rect System.Drawing.Rectangle
return void

FillRectangleWithWhite() public method

Fill a particular rectangle with white pixels. Similar to the ClearToWhite call, but takes a specific Rectangle as the area to be filled.
public FillRectangleWithWhite ( Rectangle rect ) : void
rect System.Drawing.Rectangle
return void

FillRegion() public method

public FillRegion ( GDIRegion region, GDIBrush aBrush ) : void
region GDIRegion
aBrush GDIBrush
return void

FlattenPath() public method

public FlattenPath ( ) : void
return void

FloodFill() public method

public FloodFill ( int x, int y, uint colorref, FloodFillType floodtype ) : bool
x int
y int
colorref uint
floodtype FloodFillType
return bool

Flush() public method

public Flush ( ) : void
return void

FrameRegion() public method

public FrameRegion ( GDIRegion region, GDIBrush aBrush, Size strokeSize ) : void
region GDIRegion
aBrush GDIBrush
strokeSize System.Drawing.Size
return void

GetBkColor() public method

public GetBkColor ( ) : uint
return uint

GetBkMode() public method

public GetBkMode ( ) : int
return int

GetDCBrushColor() public method

public GetDCBrushColor ( ) : uint
return uint

GetDCPenColor() public method

public GetDCPenColor ( ) : uint
return uint

GetPixel() public method

Retrieves a single pixel value from the Device Context.
public GetPixel ( int x, int y ) : UInt32
x int
y int
return System.UInt32

GetROP2() public method

public GetROP2 ( ) : BinaryRasterOps
return BinaryRasterOps

InvertRegion() public method

public InvertRegion ( GDIRegion region ) : void
region GDIRegion
return void

LineTo() public method

public LineTo ( int x, int y ) : void
x int
y int
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

PatBlt() public method

public PatBlt ( int x, int y, int width, int height, TernaryRasterOps rasterOp ) : bool
x int
y int
width int
height int
rasterOp TernaryRasterOps
return bool

PixelBlt() public method

public PixelBlt ( Rectangle srcRect, Rectangle dstRect, IntPtr pixelPtr, BitCount bitsPerPixel ) : int
srcRect System.Drawing.Rectangle
dstRect System.Drawing.Rectangle
pixelPtr System.IntPtr
bitsPerPixel BitCount
return int

PlgBlt() public method

public PlgBlt ( GDIContext srcDC, Rectangle srcRect, POINT dstParallelogramPoints, IntPtr hbmMask, int xMask, int yMask ) : bool
srcDC GDIContext
srcRect System.Drawing.Rectangle
dstParallelogramPoints POINT
hbmMask System.IntPtr
xMask int
yMask int
return bool

PolyBezierTo() public method

public PolyBezierTo ( POINT pts ) : void
pts POINT
return void

PolyLine() public method

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

PolyLineTo() public method

public PolyLineTo ( POINT points ) : void
points POINT
return void

PolyPolyLine() public method

public PolyPolyLine ( POINT points, int polypoints, int nCount ) : void
points POINT
polypoints int
nCount int
return void

Rectangle() public method

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

ReplayPath() public method

public ReplayPath ( GPath aPath ) : void
aPath GPath
return void

ResetState() public method

public ResetState ( ) : void
return void

RestoreState() public method

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

RoundRect() public method

public RoundRect ( int left, int top, int right, int bottom, int xRadius, int yRadius ) : void
left int
top int
right int
bottom int
xRadius int
yRadius int
return void

SaveState() public method

public SaveState ( ) : void
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

SetDefaultPenColor() public method

public SetDefaultPenColor ( UInt32 colorref ) : void
colorref System.UInt32
return void

SetMappingMode() public method

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

SetPathAsClipRegion() public method

public SetPathAsClipRegion ( ) : void
return void

SetPixel() public method

public SetPixel ( int x, int y, UInt32 colorref ) : UInt32
x int
y int
colorref System.UInt32
return System.UInt32

SetPolyFillMode() public method

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

SetROP2() public method

public SetROP2 ( BinaryRasterOps rasOp ) : void
rasOp BinaryRasterOps
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 ) : void
width int
height int
return void

SetWindowOrigin() public method

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

SetWorldTransform() public method

public SetWorldTransform ( Transform2D aTransform ) : void
aTransform Transform2D
return void

SetupDefaultState() protected method

Setup the device to be in a known good starting state. We know we want ADVANCED drawing, so that is set.
protected SetupDefaultState ( ) : void
return void

StretchBlt() public method

public StretchBlt ( GDIContext srcDC, Rectangle srcRect, Rectangle dstRect, TernaryRasterOps dwRop ) : bool
srcDC GDIContext
srcRect System.Drawing.Rectangle
dstRect System.Drawing.Rectangle
dwRop TernaryRasterOps
return bool

StrokeAndFillPath() public method

public StrokeAndFillPath ( ) : void
return void

StrokePath() public method

public StrokePath ( ) : void
return void