mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Some more tweaks to rotated+shrunk text
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@872 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -187,8 +187,9 @@ void draw_resampled_text(DC& dc, const RealPoint& pos, const RealRect& rect, dou
|
||||
// get image
|
||||
mdc.SelectObject(wxNullBitmap);
|
||||
// step 2. sample down
|
||||
if (!sideways(angle)) w = int(w * stretch); // GCC makes annoying conversion warnings if *= is used here.
|
||||
else h = int(h * stretch);
|
||||
double ca = fabs(cos(deg_to_rad(angle))), sa = fabs(sin(deg_to_rad(angle)));
|
||||
w += int(w * (stretch - 1) * ca); // GCC makes annoying conversion warnings if *= is used here.
|
||||
h += int(h * (stretch - 1) * sa);
|
||||
Image img_small(w, h, false);
|
||||
fill_image(img_small, color);
|
||||
downsample_to_alpha(buffer, img_small);
|
||||
|
||||
Reference in New Issue
Block a user