GetAttribute on scaled layers

Discuss any general programming issues here
Post Reply
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

GetAttribute on scaled layers

Post by Flinx »

If I scale a layer to different dimensions then GetAttribute reports the original dimensions. Is that correct?

Code: Select all

@DISPLAY {Width = 300, Height = 200, Layers = True}
SetFillStyle(#FILLCOLOR)
Const #Name$="n"
Box(10, 20, 100, 50, #WHITE, {Name=#Name$})
DebugPrint("ATTRWIDTH",GetAttribute(#LAYER, #Name$, #ATTRWIDTH))
DebugPrint("ATTRHEIGHT",GetAttribute(#LAYER, #Name$, #ATTRHEIGHT))
Wait(1,#SECONDS)
SetLayerStyle(#Name$,{Width=250, Height=77})
DebugPrint("ATTRWIDTH",GetAttribute(#LAYER, #Name$, #ATTRWIDTH))
DebugPrint("ATTRHEIGHT",GetAttribute(#LAYER, #Name$, #ATTRHEIGHT))
Wait(10,#SECONDS)
Ralf
Flinx
Posts: 188
Joined: Sun Feb 14, 2021 9:54 am
Location: Germany

Re: GetAttribute on scaled layers

Post by Flinx »

Meanwhile I have found the answer in the GetAttribute() description of #ATTRRAWWIDTH and #ATTRRAWHEIGHT.
Post Reply