FitScale=True, KeepProportions=True And Resizing the Display

Report any Hollywood bugs here
Post Reply
PEB
Posts: 567
Joined: Sun Feb 21, 2010 1:28 am

FitScale=True, KeepProportions=True And Resizing the Display

Post by PEB »

Hi Andreas,

I'm not sure if this is really a bug or expected behavior. If it is expected behavior, then I'll put in a feature request to change this behavior in future Hollywood versions. ;-)

I noticed that if set FitScale=True and KeepProportions=True in the @DISPLAY preprocessor command, then I'm restricted to the width/height ratio that is used when the program starts. This code shows the problem:

Code: Select all

@DISPLAY {Borderless=True, Width=600, Height=200, Color=#WHITE, ScaleMode=#SCALEMODE_LAYER, FitScale=True, KeepProportions=True}
WaitLeftMouse()
SetDisplayAttributes({Width=400, Height=400})
What I hoped would happen is that when I call SetDisplayAttributes({Width=400, Height=400}) the display would then look the same as if I had started with @DISPLAY {Borderless=True, Width=400, Height=400, Color=#WHITE, ScaleMode=#SCALEMODE_LAYER, FitScale=True, KeepProportions=True}

A related feature request would be to have FitScale and KeepProportions changeable through SetDisplayAttributes().

Is there any kind of a work-around way to change the width/height ratio if FitScale=True and KeepProportions=True are used at the start?
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: FitScale=True, KeepProportions=True And Resizing the Dis

Post by airsoftsoftwair »

True, this is not working correctly. I'll fix this for the next release. The only work-around I can think of is closing the display and opening it again but this of course won't look very nice...
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: FitScale=True, KeepProportions=True And Resizing the Display

Post by airsoftsoftwair »

Nothing is ever forgotten :)

Code: Select all

- Change: When "KeepProportions" is active for a display and DisplayBGPic() or ChangeDisplaySize() is
  called, the scaling dimensions are now re-calculated to fit the aspect-ratio of the new BGPic or display
  size; this change also affects SetDisplayAttributes() when it is called with "Width" and "Height" parameters
PEB
Posts: 567
Joined: Sun Feb 21, 2010 1:28 am

Re: FitScale=True, KeepProportions=True And Resizing the Display

Post by PEB »

That's great! Thank you.
(I think I remember the project that I had in mind for this fix/change.)
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: FitScale=True, KeepProportions=True And Resizing the Display

Post by Clyde »

Honestly, that is impressive, Andreas, and not very common. Thumbs up for your work!
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
Post Reply