From d8c275e702da7ab51418e22fc9e36701c71e1483 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 9 May 2019 19:54:18 -0700 Subject: libstage: remove vestigial stage_fit() This hasn't belonged in libstage since losing all dimensionality --- src/stage.c | 22 ---------------------- 1 file changed, 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; -- cgit v1.2.3