From f04d64869f3b1de54fb343f28f955584780001b8 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Sat, 26 Nov 2011 15:41:10 +0000 Subject: Project folders rename part 3 git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@215 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- skinengine/src/skin_simple.cpp | 79 ------------------------------------------ 1 file changed, 79 deletions(-) delete mode 100644 skinengine/src/skin_simple.cpp (limited to 'skinengine/src/skin_simple.cpp') diff --git a/skinengine/src/skin_simple.cpp b/skinengine/src/skin_simple.cpp deleted file mode 100644 index 7e72dfe..0000000 --- a/skinengine/src/skin_simple.cpp +++ /dev/null @@ -1,79 +0,0 @@ -#include "headers.h" - -void CSkinImage::LoadFromXml(HXML hXml) -{ - CSkinObject::LoadFromXml(hXml); - m_source = xi.getAttrValue(hXml, _T("src")); - m_hbmp = m_ds->GetBitmap(m_source); - GetObject(m_hbmp, sizeof(m_bi), &m_bi); -} - -void CSkinImage::Measure(SkinRenderParams *params) -{ - - SetRect(¶ms->rc, 0, 0, 0, 0); - if (m_width == 0) params->rc.right = m_bi.bmWidth; - else if (m_width < 0) params->rc.right = 0; - else params->rc.right = m_width; - if (m_height == 0) params->rc.bottom = m_bi.bmHeight; - else if (m_height < 0) params->rc.bottom = 0; - else params->rc.bottom = m_height; -} - -void CSkinImage::Paint(SkinRenderParams *params) -{ - HDC hdc = CreateCompatibleDC(params->hdc); - SelectObject(hdc, m_hbmp); - BLENDFUNCTION bf = {0}; - bf.AlphaFormat = AC_SRC_ALPHA; - bf.BlendOp = AC_SRC_OVER; - bf.SourceConstantAlpha = 255; - AlphaBlend(params->hdc, - m_rcPosition.left, m_rcPosition.top, - m_rcPosition.right - m_rcPosition.left, m_rcPosition.bottom - m_rcPosition.top, - hdc, 0, 0, - m_bi.bmWidth, abs(m_bi.bmHeight), - bf); - DeleteDC(hdc); -} - -void CSkinIcon::LoadFromXml(HXML hXml) -{ - CSkinObject::LoadFromXml(hXml); - m_source = xi.getAttrValue(hXml, _T("src")); -} - -void CSkinIcon::Measure(SkinRenderParams *params) -{ - SetRect(¶ms->rc, 0, 0, 16, 16); -} - -void CSkinIcon::Paint(SkinRenderParams *params) -{ - DrawIconEx(params->hdc, - (m_rcPosition.left + m_rcPosition.right - 16) / 2, - (m_rcPosition.top + m_rcPosition.bottom - 16) / 2, - LoadSkinnedIcon(SKINICON_OTHER_MIRANDA), - 16, 16, - 0, NULL, DI_NORMAL); -} - -void CSkinText::LoadFromXml(HXML hXml) -{ - CSkinObject::LoadFromXml(hXml); - m_text = xi.getAttrValue(hXml, _T("text")); -} - -void CSkinText::Measure(SkinRenderParams *params) -{ - LPCTSTR text = m_ds ? m_ds->GetText(m_text) : m_text; - DrawText(params->hdc, text, lstrlen(text), ¶ms->rc, DT_NOPREFIX|DT_WORDBREAK|DT_CALCRECT); -} - -void CSkinText::Paint(SkinRenderParams *params) -{ - LPCTSTR text = m_ds ? m_ds->GetText(m_text) : m_text; - SetTextColor(params->hdc, RGB(255, 255, 255)); - SetBkMode(params->hdc, TRANSPARENT); - DrawText(params->hdc, text, lstrlen(text), &m_rcPosition, DT_NOPREFIX|DT_WORDBREAK); -} -- cgit v1.2.3