Position constant value

Find quick help here to get you started with Hollywood
Post Reply
User avatar
emeck
Posts: 65
Joined: Fri Apr 03, 2015 3:17 pm

Position constant value

Post by emeck » Fri Apr 12, 2019 11:33 am

Aren't #TOP and #LEFT supposed to be 0, and the other position constants dependent on display's dimensions?
It seems to be hardecoded for me.

For example:

Code: Select all

@DISPLAY 1, {Width = 640, Height = 480, Color = #BLACK}

TextOut(#CENTER, #CENTER, "Text")
TextOut(#LEFT, #CENTER, "Text")
TextOut(#RIGHT, #CENTER, "Text")
TextOut(#CENTER, #TOP, "Text")
TextOut(#CENTER, #BOTTOM, "Text")

DebugPrint("Left: "..#LEFT)
DebugPrint("Right: "..#RIGHT)
DebugPrint("Top: "..#TOP)
DebugPrint("Bottom: "..#BOTTOM)
DebugPrint("Topout: "..#TOPOUT)
DebugPrint("Bottomout: "..#BOTTOMOUT) 

Repeat
    WaitEvent()
Forever 
The text is displayed correctly, but debugprint always prints:
Left: -90000
Right: -80000
Top: -70000
Bottom: -60000
Topout: -30000
Bottomout: -20000

I have tried different display dimensions but always same results. This is with MOS3.11 and HW8.

Edit: same output with HW8 for Linux arm.

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

Re: Position constant value

Post by airsoftsoftwair » Fri Apr 12, 2019 5:35 pm

I think #TOP and #LEFT can also be used for some other purposes like clip regions which makes it impossible to define them as 0...

User avatar
emeck
Posts: 65
Joined: Fri Apr 03, 2015 3:17 pm

Re: Position constant value

Post by emeck » Fri Apr 12, 2019 7:05 pm

I see it now. I was focusing only on display dimensions but some of those constants work for other things too.
Thanks for the reply.

Post Reply