C# Class ScreenToGif.Util.Native

Show file Open project: dbremner/ScreenToGif

Public Methods

Method Description
Capture ( Size size, int positionX, int positionY ) : Bitmap

Captures the screen using the SourceCopy | CaptureBlt.

DrawFrame ( IntPtr hWnd, double scale ) : void

Draws a rectangle over a Window.

Private Methods

Method Description
BitBlt ( [ hdc, int nXDest, int nYDest, int nWidth, int nHeight, [ hdcSrc, int nXSrc, int nYSrc, CopyPixelOperation dwRop ) : bool
ClientToScreen ( IntPtr hWnd, System.Windows.Forms.POINT &lpPoint ) : bool
CopyIcon ( IntPtr hIcon ) : IntPtr
CreateCompatibleBitmap ( IntPtr hdc, int nWidth, int nHeight ) : IntPtr
CreateCompatibleDC ( [ hdc ) : IntPtr
DeleteDC ( [ hdc ) : bool
DeleteObject ( [ hObject ) : bool
DwmExtendFrameIntoClientArea ( IntPtr hwnd, MARGINS &margins ) : void
DwmIsCompositionEnabled ( ) : bool
GetCurrentPositionEx ( IntPtr hdc, System.Windows.Forms.POINT &lpPoint ) : bool
GetCursorInfo ( CURSORINFO &pci ) : bool
GetDesktopWindow ( ) : IntPtr
GetDeviceCaps ( IntPtr hdc, Int32 capindex ) : Int32
GetIconInfo ( IntPtr hIcon, ICONINFO &piconinfo ) : bool
GetProcessDpiAwareness ( IntPtr hprocess, PROCESS_DPI_AWARENESS &awareness ) : void
GetProcessId ( IntPtr handle ) : int
GetWindowDC ( IntPtr ptr ) : IntPtr
GetWindowOrgEx ( IntPtr hdc, System.Windows.Forms.POINT &lpPoint ) : bool
GetWindowRect ( IntPtr hwnd, System.Windows.Forms.RECT &lpRect ) : bool
OffsetRect ( System.Windows.Forms.RECT &lprc, int dx, int dy ) : bool
PatBlt ( IntPtr hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, uint dwRop ) : bool
ReleaseDC ( IntPtr hWnd, IntPtr hDc ) : bool
SelectObject ( [ hdc, [ hgdiobj ) : IntPtr
SetProcessDpiAwareness ( PROCESS_DPI_AWARENESS awareness ) : bool
WindowFromPoint ( int xPoint, int yPoint ) : IntPtr

Method Details

Capture() public static method

Captures the screen using the SourceCopy | CaptureBlt.
public static Capture ( Size size, int positionX, int positionY ) : Bitmap
size System.Drawing.Size The size of the final image.
positionX int Source capture Left position.
positionY int Source capture Top position.
return System.Drawing.Bitmap

DrawFrame() public static method

Draws a rectangle over a Window.
public static DrawFrame ( IntPtr hWnd, double scale ) : void
hWnd System.IntPtr The window handle.
scale double
return void