detect square (diagonal) banners, and give a small margin of error

This commit is contained in:
Glenn Maynard
2003-06-16 18:26:24 +00:00
parent 568e27849e
commit 5e1cde48fb
4 changed files with 20 additions and 2 deletions
+2 -1
View File
@@ -10,6 +10,7 @@
#include "RageUtil.h"
#include "RageLog.h"
#include "BannerCache.h"
#include "CroppedSprite.h"
#include "PrefsManager.h"
#include "SDL_utils.h"
#include "SDL_dither.h"
@@ -304,7 +305,7 @@ void BannerCache::CacheBannerInternal( CString BannerPath )
bool WasRotatedBanner = false;
if( img->w == img->h )
if( CroppedSprite::IsDiagonalBanner(img->w , img->h) )
{
/* Ack. It's a diagonal banner. Problem: if we resize a diagonal banner, we
* get ugly checker patterns. We need to un-rotate it.