Code: Select all
; Setting a clip region to an RGB brush works
CreateBrush(1, 400, 300)
SelectBrush(1)
CreateClipRegion(1, #BOX, 0, 0, 320, 240)
SetClipRegion(1)
Box(1, 1, 350, 250, #BLUE)
EndSelect()
DisplayBrush(1, 0, 0)
Wait(100)
Cls
; Setting a clip region to a palette brush doesn't work
CreateBrush(2, 400, 300, {Palette=#PALETTE_GRAY8})
SelectBrush(2)
CreateClipRegion(2, #BOX, 0, 0, 320, 240)
SetClipRegion(2) ; Wrong usage/parameters for this command! Why? Bug?
Box(1, 1, 350, 250, #BLUE)
EndSelect()
DisplayBrush(2, 0, 0)
WaitLeftMouse()