Module winGDI
[hide private]
[frames] | no frames]

Source Code for Module winGDI

 1  from ctypes import * 
 2  from ctypes.wintypes import * 
 3   
 4  user32=windll.user32 
 5  gdi32=windll.gdi32 
 6   
7 -class RGBQUAD(Structure):
8 _fields_=[ 9 ('rgbBlue',c_ubyte), 10 ('rgbGreen',c_ubyte), 11 ('rgbRed',c_ubyte), 12 ('rgbReserved',c_ubyte), 13 ]
14
15 -class BITMAPINFOHEADER(Structure):
16 _fields_=[ 17 ('biSize',DWORD), 18 ('biWidth',LONG), 19 ('biHeight',LONG), 20 ('biPlanes',WORD), 21 ('biBitCount',WORD), 22 ('biCompression',WORD), 23 ('biSizeImage',DWORD), 24 ('biXPelsPerMeter',LONG), 25 ('biYPelsPerMeter',LONG), 26 ('biClrUsed',DWORD), 27 ('biClrImportant',DWORD), 28 ]
29
30 -class BITMAPINFO(Structure):
31 _fields_=[ 32 ('bmiHeader',BITMAPINFOHEADER), 33 ('bmiColors',(RGBQUAD*1)), 34 ]
35 36 BI_RGB=0 37 SRCCOPY=0x00CC0020 38 DIB_RGB_COLORS=0 39