summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/popup_gdiplus.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-02 15:55:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-02 15:55:48 +0000
commitab53b72bf7067feb9dede0fd76b5a3cbc13863b9 (patch)
tree677a18bc997d1cf118379b288a7c2dd2c160d9b1 /plugins/Popup/src/popup_gdiplus.cpp
parent1c229f90bfc6c8032bd2d20e297e97f321eb4db7 (diff)
- old PNG conversion code (png2dib, dib2png) removed;
- m_png.h also removed; - all calls of LoadImage replaced with CallService(MS_IMG_LOAD); - four invalid CloseHandle() calls removed; - massive code cleaning for Popup, HistoryStats & SplashScreen plugins git-svn-id: http://svn.miranda-ng.org/main/trunk@13974 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/popup_gdiplus.cpp')
-rw-r--r--plugins/Popup/src/popup_gdiplus.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/Popup/src/popup_gdiplus.cpp b/plugins/Popup/src/popup_gdiplus.cpp
index aeee9ecb03..d323654740 100644
--- a/plugins/Popup/src/popup_gdiplus.cpp
+++ b/plugins/Popup/src/popup_gdiplus.cpp
@@ -43,7 +43,8 @@ void LoadGDIPlus()
if (g_gdiplusToken == 0)
Gdiplus::GdiplusStartup(&g_gdiplusToken, &gdiplusStartupInput, NULL);
}
- __except (EXCEPTION_EXECUTE_HANDLER) {
+ __except (EXCEPTION_EXECUTE_HANDLER)
+ {
gbGdiPlusLoaded = false;
}
}
@@ -55,7 +56,8 @@ void UnloadGDIPlus()
if (g_gdiplusToken && gbGdiPlusLoaded)
Gdiplus::GdiplusShutdown(g_gdiplusToken);
}
- __except (EXCEPTION_EXECUTE_HANDLER) {
+ __except (EXCEPTION_EXECUTE_HANDLER)
+ {
// do nothing
}
gbGdiPlusLoaded = true;
@@ -87,12 +89,10 @@ HBITMAP SkinEngine_CreateDIB32(int cx, int cy)
UINT *ptPixels;
HBITMAP DirectBitmap = CreateDIBSection(NULL, &RGB32BitsBITMAPINFO, DIB_RGB_COLORS, (void **)&ptPixels, NULL, 0);
- if ((DirectBitmap == NULL || ptPixels == NULL) && cx != 0 && cy != 0)
- {
+ if ((DirectBitmap == NULL || ptPixels == NULL) && cx != 0 && cy != 0) {
;
}
- else
- {
+ else {
memset(ptPixels, 0, cx*cy * 4);
}
return DirectBitmap;
@@ -172,9 +172,8 @@ void GDIPlus_ExtractAnimatedGIF(TCHAR *szName, int width, int height, HBITMAP &p
int * delays = (int*)mir_alloc(nFrameCount*sizeof(int));
memset(delays, 0, nFrameCount*sizeof(int));
- for (int i = 1; i < nFrameCount + 1; i++)
- {
- GUID pageGuid = FrameDimensionTime;
+ for (int i = 1; i < nFrameCount + 1; i++) {
+ GUID pageGuid = FrameDimensionTime;
RectF rect((float)(i - 1)*clipWidth, (float)0, (float)clipWidth, (float)clipHeight);
graphics.DrawImage(&image, rect, (float)0, (float)0, (float)imWidth, (float)imHeight, UnitPixel, &attr, NULL, NULL);
image.SelectActiveFrame(&pageGuid, i);