Index: core/src/fxge/win32/fx_win32_print.cpp |
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp |
index 163ee84a0a6e158f5f1ca4247cabb81f08c90bb0..2be8a30ecb6c78cf72980e8c87b535930568f7fe 100644 |
--- a/core/src/fxge/win32/fx_win32_print.cpp |
+++ b/core/src/fxge/win32/fx_win32_print.cpp |
@@ -80,33 +80,31 @@ FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource, FX_DWORD |
return FALSE; |
} |
return GDI_StretchBitMask(pBitmap, dest_left, dest_top, dest_width, dest_height, color, flags, alpha_flag, pIccTransform); |
- } else { |
- ASSERT(pSource != NULL); |
- if (pSource->HasAlpha()) { |
+ } |
+ if (pSource->HasAlpha()) { |
+ return FALSE; |
+ } |
+ if (dest_width < 0 || dest_height < 0) { |
+ CFX_DIBitmap* pFlipped = pSource->FlipImage(dest_width < 0, dest_height < 0); |
+ if (pFlipped == NULL) { |
return FALSE; |
} |
- if (dest_width < 0 || dest_height < 0) { |
- CFX_DIBitmap* pFlipped = pSource->FlipImage(dest_width < 0, dest_height < 0); |
- if (pFlipped == NULL) { |
- return FALSE; |
- } |
- if (dest_width < 0) { |
- dest_left += dest_width; |
- } |
- if (dest_height < 0) { |
- dest_top += dest_height; |
- } |
- FX_BOOL ret = GDI_StretchDIBits(pFlipped, dest_left, dest_top, abs(dest_width), abs(dest_height), flags, pIccTransform); |
- delete pFlipped; |
- return ret; |
+ if (dest_width < 0) { |
+ dest_left += dest_width; |
} |
- CFX_DIBExtractor temp(pSource); |
- CFX_DIBitmap* pBitmap = temp; |
- if (pBitmap == NULL) { |
- return FALSE; |
+ if (dest_height < 0) { |
+ dest_top += dest_height; |
} |
- return GDI_StretchDIBits(pBitmap, dest_left, dest_top, dest_width, dest_height, flags, pIccTransform); |
+ FX_BOOL ret = GDI_StretchDIBits(pFlipped, dest_left, dest_top, abs(dest_width), abs(dest_height), flags, pIccTransform); |
+ delete pFlipped; |
+ return ret; |
+ } |
+ CFX_DIBExtractor temp(pSource); |
+ CFX_DIBitmap* pBitmap = temp; |
+ if (pBitmap == NULL) { |
+ return FALSE; |
} |
+ return GDI_StretchDIBits(pBitmap, dest_left, dest_top, dest_width, dest_height, flags, pIccTransform); |
} |
static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_AffineMatrix* pDestMatrix) |
{ |