コード例 #1
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);
        }
コード例 #2
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);
        }
コード例 #3
0
        public void DrawImage(Graphics g, int left, int top)
        {
            if (_bitmap == null)
            {
                return;
            }

            GameGraphics.DrawImage(g, _bitmap, left, top, GetWidth(), GetHeight(), 0, 0);
        }
コード例 #4
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);
        }
コード例 #5
0
ファイル: CDC.cs プロジェクト: dannisliang/BBMessenger
        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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #10
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);
        }
コード例 #11
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);
 }