mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
Correct mistake in XImage::CopyScaled
This commit is contained in:
parent
8993c7a7ec
commit
f280ab3323
@ -221,10 +221,10 @@ void XImage::CopyScaled(const XImage& Image, float scale)
|
|||||||
{
|
{
|
||||||
int lx = (int)(x / scale);
|
int lx = (int)(x / scale);
|
||||||
float dx = x - lx * scale;
|
float dx = x - lx * scale;
|
||||||
int a01 = (x == 0) ? 0 : -Pixel;
|
int a01 = (lx == 0) ? 0 : -Pixel;
|
||||||
int a10 = (y == 0) ? 0 : -Row;
|
int a10 = (ly == 0) ? 0 : -Row;
|
||||||
int a21 = (x == W - 1) ? 0 : Pixel;
|
int a21 = (lx == W - 1) ? 0 : Pixel;
|
||||||
int a12 = (y == H - 1) ? 0 : Row;
|
int a12 = (ly == H - 1) ? 0 : Row;
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL& dst = *GetPixelPtr(x, y);
|
EFI_GRAPHICS_OUTPUT_BLT_PIXEL& dst = *GetPixelPtr(x, y);
|
||||||
dst.Blue = Smooth(&Source[lx + ly * SrcWidth].Blue, a01, a10, a21, a12, dx, dy, scale);
|
dst.Blue = Smooth(&Source[lx + ly * SrcWidth].Blue, a01, a10, a21, a12, dx, dy, scale);
|
||||||
dst.Green = Smooth(&Source[lx + ly * SrcWidth].Green, a01, a10, a21, a12, dx, dy, scale);
|
dst.Green = Smooth(&Source[lx + ly * SrcWidth].Green, a01, a10, a21, a12, dx, dy, scale);
|
||||||
|
Loading…
Reference in New Issue
Block a user