示例#1
0
        public IEditableFrame Capture()
        {
            try
            {
                OnCapture();

                var img = _dcTarget.GetEditableFrame();

                return(img);
            }
            catch (Exception e) when(!(e is WindowClosedException))
            {
                return(RepeatFrame.Instance);
            }
        }
示例#2
0
        public IEditableFrame Capture()
        {
            // Update Location
            _region.Location = _locationFunc();

            var hdcDest = _dcTarget.GetDC();

            Gdi32.BitBlt(hdcDest, 0, 0, _region.Width, _region.Height,
                         _hdcSrc, _region.X, _region.Y,
                         (int)CopyPixelOperation.SourceCopy);

            if (_includeCursor)
            {
                MouseCursor.Draw(hdcDest, PointTransform);
            }

            var img = _dcTarget.GetEditableFrame();

            return(img);
        }