-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
What problem does this solve or what need does it fill?
While working on #6177, I noticed some problems with OrthographicProjection's public fields:
-
left,right,bottom, andtop, which are used to set the borders of the projection, are public, even though they'll be set automatically ifscaling_modeis anything other thanScalingMode::None. -
window_originaffects the origin of the scaling, which means it doesn't have any effect ifscaling_modeisScalingMode::None.
What solution would you like?
-
left,right,bottom, andtopshould be private with public getters. Maybe they can be set throughScalingMode::None's fields; this might make it a bit difficult to update though. -
window_originshould be renamed toscaling_originor something similar.
What alternative(s) have you considered?
Replace scale with separate width and height values, which will scale the entire projection whether scaling_mode is enabled or not. Then make window_origin (scaling_origin) more flexible with a fractional value of the width and height instead of just WindowOrigin::BottomLeft and WindowOrigin::Center. This will improve usability overall.