Setting a clip region to a palette brush fails

Report any Hollywood bugs here
Post Reply
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Setting a clip region to a palette brush fails

Post by jPV »

I'm trying to find a work-around for some other palette issue, and found this one, which looks like a bug for me. I can't see any mentions in the documentation that SetClipRegion() shouldn't work when SelectBrush() is a palette brush.

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()
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Setting a clip region to a palette brush fails

Post by airsoftsoftwair »

Yup, clearly a bug, will be fixed.
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Setting a clip region to a palette brush fails

Post by airsoftsoftwair »

Code: Select all

- Fix: SetClipRegion() fail when the current output device was a palette brush
Post Reply