diff options
Diffstat (limited to 'src')
| -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;  | 
