Code: Alles auswählen
Procedure WindowCallback(hWnd.l,uMsg.l,wParam.l,lParam.l)
Select uMsg
Case #WM_PAINT
hdc = BeginPaint_(hwnd,ps.PAINTSTRUCT)
hdcMem = CreateCompatibleDC_(hdc)
SelectObject_(hdcMem,ImageID(1))
BitBlt_(hdc,60,20,200,200,hdcMem,0,0,#SRCAND)
SelectObject_(hdcMem,ImageID(0))
BitBlt_(hdc,60,20,200,200,hdcMem,0,0,#SRCPAINT)
DeleteDC_(hdcMem)
EndPaint_(hwnd,ps)
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
CreateImage(0,200,200)
CreateImage(1,200,200)
StartDrawing(ImageOutput(0))
For i=0 To 100
FrontColor(RGB(50+i*205/100,0,0))
Ellipse(100,100,100-i,100-i)
Next
StopDrawing()
StartDrawing(ImageOutput(1))
Box(0,0,200,200,#White)
Ellipse(100,100,100,100,0)
StopDrawing()
OpenWindow(0,0,0,320,240,"Bitmap Mask",#WS_OVERLAPPEDWINDOW | 1)
SetWindowCallback(@WindowCallback())
SetWindowColor(0,RGB(80,130,180))
While WaitWindowEvent() ! 16 : Wend