One of the problems with full art cards is finding an image size that works for both big & small cards. For big cards, it's stretched and on small cards it's compressed, so you have to find something in the middle, which isn't really good for either size. This is what I've done so far. Here's the result:
- BeforeSmall.jpg (15.63 KiB) Viewed 7088 times
I just figured out a simple solution - crop the small card art for full art cards to normal proportions before drawing. Here's what you get:
- AfterSmall.jpg (17.74 KiB) Viewed 7088 times
I'm very happy with the results; what do you think?
Of course this means I need to redo 500+ pieces of art I've cropped & processed over that last 2 months, but I think the results are worth it!
Here's the code, btw:
- Code: Select all
int DrawSmallArt(HDC hdc, const RECT* rect, int id, int version) {
if( !ArtIsPortrait(id, version) ){
return DrawBigArt(hdc, rect, id, version);
}
else{//crop inline for small art
if (!LoadBigArt(id, version, 0, 0)) {
EnterCriticalSection(&crit);
gdi::Graphics graphics(hdc);
gdi::SolidBrush brush(gdi::Color(211,211,211));
gdi::Rect tmpRect(rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top);
graphics.FillRectangle(&brush, tmpRect);
LeaveCriticalSection(&crit);
return 0;
}
EnterCriticalSection(&crit);
gdi::Graphics graphics(hdc);
std::string path = idToNameFun(id, version);
gdi::Rect tmpRect(rect->left, rect->top, rect->right - rect->left, rect->bottom - rect->top);
UINT wid = (*cache)[path].get()->GetWidth();
graphics.DrawImage((*cache)[path].get(), tmpRect, 0, 0, wid, (29*wid)/36, gdi::UnitPixel);
LeaveCriticalSection(&crit);
return 1;
}
}