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()