bool AlphaDrawImage(Graphics g, tagBASE pBase, int nXPos, int nYPos, int nDestWidth, int nDestHeight, int nXSource, int nYSource, Color tranColor) { if (_bitmap == null) { return(false); } CRect rcImage = new CRect(nXPos, nYPos, nXPos + nDestWidth, nYPos + nDestHeight); CRect rcBack = new CRect(pBase.ptBase.x, pBase.ptBase.y, pBase.ptBase.x + pBase.nWidth, pBase.ptBase.y + pBase.nHeight); if (GameGraphics.IntersectRect(rcImage, rcBack)) { GameGraphics.DrawAlphaImage(g, _bitmap, nXPos - pBase.ptBase.x, nYPos - pBase.ptBase.y, nDestWidth, nDestHeight, nXSource, nYSource, nDestWidth, nDestHeight, tranColor); } return(true); }
protected void DrawAlphaImage(Graphics g, Image image, int dstX, int dstY, int width, int height, int srcX, int srcY, Color tranColor) { GameGraphics.DrawAlphaImage(g, image, dstX, dstY, width, height, srcX, srcY, tranColor); }