/*================================================================= _ / | | \ \/_/ \_\| / __ \/_/__\ .--='/~\ //绘画出梦一般色彩的头像:D ____,__/__,_____,______)/ /{~}}} //传入的坐标是Screen坐标 -,-----,--\--,-----,---,\'-' {{~}} __/\_ '--=.\}/ /_/ |\\ \/ */ int KUiPortrait::DrawPortrait(int nIndex, int nX, int nY, int nbDarkness) { if(nIndex > 0 && nIndex < m_PortraitParam.nPortraitCount + 1 && m_pImage[nIndex].szImage[0]) { m_pImage[nIndex].oPosition.nX = nX; m_pImage[nIndex].oPosition.nY = nY; if(nbDarkness) { m_pImage[nIndex].Color.Color_b.a = LOLIGHT_ALPHA; } else { m_pImage[nIndex].Color.Color_b.a = HILIGHT_ALPHA; } g_pRepresentShell->DrawPrimitives(1, m_pImage + nIndex, RU_T_IMAGE, TRUE); IR_NextFrame(m_pImage[nIndex]); return 1; } return 0; }
long KInlinePicSink::DrawPic(unsigned short wIndex, int x, int y) { _ASSERT(m_Images.size() == m_ImageParams.size() && m_CustomImages.size() == m_CustomImageParams.size()); if (!m_pRepShell || wIndex < MAX_SYSTEM_INLINE_PICTURES && wIndex >= m_Images.size() || wIndex >= MAX_SYSTEM_INLINE_PICTURES && ((unsigned int)(wIndex - MAX_SYSTEM_INLINE_PICTURES) >= m_CustomImages.size() || !m_CustomImages[wIndex - MAX_SYSTEM_INLINE_PICTURES].szImage[0])) return E_FAIL; KUiImageRef* pPic = NULL; if (wIndex < MAX_SYSTEM_INLINE_PICTURES) pPic = &(m_Images[wIndex]); else pPic = &(m_CustomImages[wIndex - MAX_SYSTEM_INLINE_PICTURES]); pPic->oPosition.nX = x; pPic->oPosition.nY = y; m_pRepShell->DrawPrimitives(1, pPic, RU_T_IMAGE, true); IR_NextFrame(*pPic); return S_OK; }
//-------------------------------------------------------------------------- // 功能:图形换帧 //-------------------------------------------------------------------------- int KWndImage::NextFrame() { return IR_NextFrame(m_Image); }