diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-25 19:25:38 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-09-25 19:25:38 +0000 |
commit | 2cf824fd2efaec5fa0125fdde5fd513dd906d844 (patch) | |
tree | aadae8304f8cf90c06c73ca49180c62faeef539b /plugins/Clist_modern/src/modern_skinopt.cpp | |
parent | a01f62f394fc01e3c6ed89924be804d2438787e5 (diff) |
plugins cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@6233 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_skinopt.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_skinopt.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 5d4003185e..7fb29421e3 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -240,19 +240,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara imgPos.x = workRect.left+(( wWidth-dWidth )>>1 );
imgPos.y = workRect.top+(( wHeight-dHeight )>>1 );
//DrawImage
- if ( !g_CluiData.fGDIPlusFail ) //Use gdi+ engine
- {
- DrawAvatarImageWithGDIp( memDC, imgPos.x, imgPos.y, dWidth, dHeight, hPreviewBitmap, 0, 0, bmp.bmWidth, bmp.bmHeight, 8, 255 );
- }
- else
- {
- BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
- HDC imgDC = CreateCompatibleDC( dis->hDC );
- HBITMAP imgOldbmp = (HBITMAP) SelectObject( imgDC, hPreviewBitmap );
- ske_AlphaBlend( memDC, imgPos.x, imgPos.y, dWidth, dHeight, imgDC, 0, 0, bmp.bmWidth, bmp.bmHeight, bf );
- SelectObject( imgDC, imgOldbmp );
- DeleteDC( imgDC );
- }
+ DrawAvatarImageWithGDIp( memDC, imgPos.x, imgPos.y, dWidth, dHeight, hPreviewBitmap, 0, 0, bmp.bmWidth, bmp.bmHeight, 8, 255 );
}
BitBlt( dis->hDC, dis->rcItem.left, dis->rcItem.top, mWidth, mHeight, memDC, 0, 0, SRCCOPY );
SelectObject( memDC, holdbmp );
@@ -553,8 +541,6 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam) {
DRAWITEMSTRUCT *dis = ( DRAWITEMSTRUCT * )wParam;
- HDC imgDC;
- HBITMAP imgOldbmp;
int mWidth, mHeight;
RECT workRect = {0};
mWidth = dis->rcItem.right-dis->rcItem.left;
@@ -593,16 +579,7 @@ INT_PTR SvcPreviewSkin(WPARAM wParam, LPARAM lParam) imgPos.x = workRect.left+(( wWidth-dWidth )>>1 );
imgPos.y = workRect.top+(( wHeight-dHeight )>>1 );
//DrawImage
- if ( !g_CluiData.fGDIPlusFail ) //Use gdi+ engine
- DrawAvatarImageWithGDIp( dis->hDC, imgPos.x, imgPos.y, dWidth, dHeight, hPreviewBitmap, 0, 0, bmp.bmWidth, bmp.bmHeight, 8, 255 );
- else {
- BLENDFUNCTION bf = {AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
- imgDC = CreateCompatibleDC( dis->hDC );
- imgOldbmp = ( HBITMAP )SelectObject( imgDC, hPreviewBitmap );
- ske_AlphaBlend( dis->hDC, imgPos.x, imgPos.y, dWidth, dHeight, imgDC, 0, 0, bmp.bmWidth, bmp.bmHeight, bf );
- SelectObject( imgDC, imgOldbmp );
- DeleteDC( imgDC );
- }
+ DrawAvatarImageWithGDIp( dis->hDC, imgPos.x, imgPos.y, dWidth, dHeight, hPreviewBitmap, 0, 0, bmp.bmWidth, bmp.bmHeight, 8, 255 );
ske_UnloadGlyphImage(hPreviewBitmap);
}
}
|