Page 1 of 1

SCALEMODE_LAYER/NONE bug

Posted: Mon Mar 19, 2018 12:40 am
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()

Re: SCALEMODE_LAYER/NONE bug

Posted: Tue Mar 20, 2018 7:43 pm
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.

Re: SCALEMODE_LAYER/NONE bug

Posted: Wed Mar 21, 2018 1:12 pm
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.

Re: SCALEMODE_LAYER/NONE bug

Posted: Sun Mar 25, 2018 11:21 pm
by airsoftsoftwair
Right, I can confirm this bug on OS4. Will be fixed, thanks for reporting!

Re: SCALEMODE_LAYER/NONE bug

Posted: Tue Mar 27, 2018 9:59 pm
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.

Re: SCALEMODE_LAYER/NONE bug

Posted: Thu Dec 27, 2018 12:34 pm
by airsoftsoftwair

Code: Select all

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

Re: SCALEMODE_LAYER/NONE bug

Posted: Thu Dec 27, 2018 11:28 pm
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