SCALEMODE_LAYER/NONE bug

Report any Hollywood bugs here
Post Reply
Ferin
Posts: 18
Joined: Fri May 26, 2017 12:41 am

SCALEMODE_LAYER/NONE bug

Post by Ferin »

Hi guys,

I think i found a bug, when i use #SCALEMODE_LAYER or #SCALEMODE_NONE in the code below and try to resize the window of my app system hangs.
Apart from this, i've noticed that in this particular case, when background is invisible and there is no window borders, KeepProportion of the DISPLAY function
does not do the job, in this case i was expecting it to resize everyting inside app's window proportionally.

Another thing, it's not a bug, rather mistake in naming convention, DisplayBrush's ShadowSize tag, does not change size but rather distance of the shadow from the brush that is casting it.
Maybe it should be changed to ShadowDistance to not confuse anyone?

Gray square is a resizing area you can use to change the size, while running below script.

Code: Select all

@DISPLAY {
			Borderless = True, 			
			Hidden = True,				
										
			NoModeSwitch=True,			
			Layers = True,				
			DragRegion = 				
			{
				{Type = #BOX, X=0, Y=0, Width=500, Height=500}
			},
			ScaleMode = #SCALEMODE_LAYER, ; change it to #SCALEMODE_AUTO and it works
			Sizeable=True,				
			SizeRegion = {{Type = #BOX, X=300, Y=300, Width = 100, Height =  100}},
			KeepProportions = True	; has no effect in this case
			}

	
SetFillStyle(#FILLCOLOR)
SetFormStyle(#ANTIALIAS)

StartPath(1)			
AddCircleToPath(1, 250, 250, 250)
ClosePath(1)

background = PathToBrush(Nil, {{ID=1, Color=$FFFFFF }})

BrushToBGPic(background,1)
DisplayBGPic(1, {X = #KEEPPOSITION, Y = #KEEPPOSITION})
OpenDisplay(1)

StartPath(2)
AddBoxToPath(2, 0, 0, 100, 100)
ClosePath(2)
DrawPath(2,300, 300, #SILVER)

WaitRightMouse()
End()

User avatar
airsoftsoftwair
Posts: 4328
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SCALEMODE_LAYER/NONE bug

Post by airsoftsoftwair »

On which system does this crash?
Another thing, it's not a bug, rather mistake in naming convention, DisplayBrush's ShadowSize tag, does not change size but rather distance of the shadow from the brush that is casting it.
Maybe it should be changed to ShadowDistance to not confuse anyone?
It's historical so I'd rather keep it because I'll have to keep supporting ShadowSize anyway in order to keep compatibility.

Ferin
Posts: 18
Joined: Fri May 26, 2017 12:41 am

Re: SCALEMODE_LAYER/NONE bug

Post by Ferin »

airsoftsoftwair wrote:On which system does this crash?
AOS4.1 fe hollywood7.0/7.1

It's historical so I'd rather keep it because I'll have to keep supporting ShadowSize anyway in order to keep compatibility.
i understand.

User avatar
airsoftsoftwair
Posts: 4328
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SCALEMODE_LAYER/NONE bug

Post by airsoftsoftwair »

Right, I can confirm this bug on OS4. Will be fixed, thanks for reporting!

Ferin
Posts: 18
Joined: Fri May 26, 2017 12:41 am

Re: SCALEMODE_LAYER/NONE bug

Post by Ferin »

I'm glad i could help. Just to let you know, problem exists on macs and windows as well, of course systems do not crash, however above mentioned script does not behave as intended.

User avatar
airsoftsoftwair
Posts: 4328
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SCALEMODE_LAYER/NONE bug

Post by airsoftsoftwair »

Code: Select all

- Fix: Transforming brushes created by PathToBrush() crashed Hollywood

User avatar
airsoftsoftwair
Posts: 4328
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SCALEMODE_LAYER/NONE bug

Post by airsoftsoftwair »

Code: Select all

- Fix [Windows/Linux]: In case of overlapping drag and size regions, the size region is now given
  precedence in order to be consistent with the behaviour on Amiga compatible systems

Post Reply