diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2019-05-09 19:54:18 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2019-05-10 14:18:28 -0700 |
commit | d8c275e702da7ab51418e22fc9e36701c71e1483 (patch) | |
tree | 8c0dbffbd677c4d2ad7561c391fd4c5172ec38bd /src/stage.c | |
parent | 0836af39624f5bcf0361d26782695bf0e967f52b (diff) |
libstage: remove vestigial stage_fit()
This hasn't belonged in libstage since losing all dimensionality
Diffstat (limited to 'src/stage.c')
-rw-r--r-- | src/stage.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/stage.c b/src/stage.c index a9a5829..d05c842 100644 --- a/src/stage.c +++ b/src/stage.c @@ -225,28 +225,6 @@ void stage_clear(stage_t *stage) } -/* fit a stage to the supplied dimensions, returns the fitted dimensions in the result pointers */ -/* the idea is this can be used in a window resize hook to enforce the stage's aspect ratio */ -void stage_fit(float aspect_ratio, int width, int height, int *res_width, int *res_height) -{ - float full_width = aspect_ratio * ((float)height); - - if (full_width == width) { - /* perfect fit */ - *res_width = width; - *res_height = height; - } else if (full_width > width) { - /* height is too large */ - *res_height = (1.0f / aspect_ratio) * ((float)width); - *res_width = width; - } else { - /* width is too large */ - *res_width = full_width; - *res_height = height; - } -} - - static void _render_stage(const stage_t *stage, float alpha) { float a = alpha * stage->alpha; |