Example #1
0
        public void DrawImage(Graphics g, int left, int top, int width, int height, int srcX, int srcY)
        {
            if (_bitmap == null)
            {
                return;
            }

            GameGraphics.DrawImage(g, _bitmap, left, top, width, height, srcX, srcY);
        }
Example #2
0
        public void BitBlt(Graphics g, int xDest, int yDest)
        {
            if (_bitmap == null)
            {
                return;
            }

            GameGraphics.DrawImage(g, _bitmap, xDest, yDest, _bitmap.Width, _bitmap.Height, 0, 0);
        }
Example #3
0
        public void DrawImage(CDC DCBuffer, int left, int top)
        {
            if (_bitmap == null)
            {
                return;
            }

            GameGraphics.DrawImage(DCBuffer.GetGraphics(), _bitmap, left, top, GetWidth(), GetHeight(), 0, 0);
        }
Example #4
0
        public void BitBlt(int x, int y, int nWidth, int nHeight, CBitmap srcBitmap, int xSrc, int ySrc, int dwRop)
        {
            if (_graphics == null)
            {
                return;
            }

            GameGraphics.DrawImage(_graphics, srcBitmap.GetBitmap(), x, y, nWidth, nHeight, xSrc, ySrc);
        }
Example #5
0
        public void DrawImage(Graphics g, int left, int top)
        {
            if (_bitmap == null)
            {
                return;
            }

            GameGraphics.DrawImage(g, _bitmap, left, top, GetWidth(), GetHeight(), 0, 0);
        }
Example #6
0
        // added by usc at 2014/03/11
        public bool DrawImage(Graphics g, int nXDest, int nYDest, int nDestWidth, int nDestHeight, int nXSource, int nYSource, int nSrcWidth, int nSrcHeight)
        {
            if (_bitmap == null)
            {
                return(false);
            }

            GameGraphics.DrawImage(g, _bitmap, nXDest, nYDest, nDestWidth, nDestHeight, nXSource, nYSource, nSrcWidth, nSrcHeight);

            return(true);
        }
Example #7
0
        public bool DrawImage(Graphics g, int xDest, int nYDest, int width, int height, int srcX, int srcY)
        {
            if (_bitmap == null)
            {
                return(false);
            }

            GameGraphics.DrawImage(g, _bitmap, xDest, nYDest, width, height, srcX, srcY);

            return(true);
        }
Example #8
0
        //绘画图片
        public bool DrawImage(Graphics g, int nXDest, int nYDest)
        {
            if (_bitmap == null)
            {
                return(false);
            }

            GameGraphics.DrawImage(g, _bitmap, nXDest, nYDest, _bitmap.Width, _bitmap.Height, 0, 0);

            return(true);
        }
Example #9
0
        public bool DrawImage(Graphics g, tagBASE pBase, int nXDest, int nYDest)
        {
            if (_bitmap == null)
            {
                return(false);
            }

            CRect rcImage = new CRect(nXDest, nYDest, nXDest + GetWidth(), nYDest + GetHeight());
            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.DrawImage(g, _bitmap, nXDest - pBase.ptBase.x, nYDest - pBase.ptBase.y, GetWidth(), GetHeight(), 0, 0);
            }

            return(true);
        }
Example #10
0
        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);
        }
Example #11
0
        bool BitBlt(Graphics g, tagBASE pBase, int nXPos, int nYPos)
        {
            if (_bitmap == null)
            {
                return(false);
            }

            CRect rcImage = new CRect(nXPos, nYPos, nXPos + GetWidth(), nYPos + GetHeight());
            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.BitBlt(g, _bitmap, nXPos - pBase.ptBase.x, nYPos - pBase.ptBase.y, GetWidth(), GetHeight());
            }

            return(true);
        }
Example #12
0
        //绘画图片
        bool DrawImage(Graphics g, tagBASE pBase, int nXDest, int nYDest, int nDestWidth, int nDestHeight, int nXSource, int nYSource, int nSrcWidth, int nSrcHeight, int cbAlpha)
        {
            if (_bitmap == null)
            {
                return(false);
            }

            CRect rcImage = new CRect(nXDest, nYDest, nXDest + nDestWidth, nYDest + 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.DrawImage(g, _bitmap, nXDest - pBase.ptBase.x, nYDest - pBase.ptBase.y, nDestWidth, nDestHeight, nXSource, nYSource, nSrcWidth, nSrcHeight, cbAlpha);
            }

            return(true);
        }
Example #13
0
 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);
 }
Example #14
0
 protected void DrawImage(Graphics g, Image image, int dstX, int dstY, int width, int height, int srcX, int srcY)
 {
     GameGraphics.DrawImage(g, image, dstX, dstY, width, height, srcX, srcY);
 }