Page 1 of 1

FitScale=True, KeepProportions=True And Resizing the Display

Posted: Sat Sep 13, 2014 12:39 pm
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?

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

Posted: Sun Sep 14, 2014 6:36 pm
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...

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

Posted: Fri Oct 30, 2020 6:26 pm
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

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

Posted: Fri Oct 30, 2020 10:43 pm
by PEB
That's great! Thank you.
(I think I remember the project that I had in mind for this fix/change.)

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

Posted: Sat Oct 31, 2020 12:17 pm
by Clyde
Honestly, that is impressive, Andreas, and not very common. Thumbs up for your work!