round derived color values for bitmap scaling (PR 8955)

svn: r7456
This commit is contained in:
Matthew Flatt 2007-10-08 20:47:11 +00:00
parent 0c1b099a0c
commit dd31459f28
2 changed files with 6 additions and 6 deletions

View File

@ -698,9 +698,9 @@ static void ScaleSection(wxMemoryDC *dest, wxBitmap *src,
b = (b * (1 - a)) + ((double)s2[p+3] * a);
}
s2[p+1] = (int)r;
s2[p+2] = (int)g;
s2[p+3] = (int)b;
s2[p+1] = (int)round(r);
s2[p+2] = (int)round(g);
s2[p+3] = (int)round(b);
}
}

View File

@ -564,9 +564,9 @@ static void ScaleSection(wxMemoryDC *dest, wxBitmap *src,
b = (b * (1 - a)) + ((double)s2[p+3] * a);
}
s2[p+1] = (int)r;
s2[p+2] = (int)g;
s2[p+3] = (int)b;
s2[p+1] = (int)round(r);
s2[p+2] = (int)round(g);
s2[p+3] = (int)round(b);
}
}