Exemplo n.º 1
0
        public IEditableFrame Capture()
        {
            foreach (var entry in _outputs)
            {
                try
                {
                    if (!entry.DuplCapture.Get(_editorSession.DesktopTexture, entry.MousePointer, entry.Location))
                    {
                        return(RepeatFrame.Instance);
                    }
                }
                catch
                {
                    try { entry.DuplCapture.Init(); }
                    catch
                    {
                        // ignored
                    }

                    return(RepeatFrame.Instance);
                }
            }

            var editor = new Direct2DEditor(_editorSession);

            foreach (var entry in _outputs)
            {
                entry.MousePointer?.Draw(editor, entry.Location);
            }

            return(editor);
        }
Exemplo n.º 2
0
        public IEditableFrame Capture()
        {
            try
            {
                if (!_duplCapture.Get(_desktopImageTexture, _mousePointer))
                {
                    return(RepeatFrame.Instance);
                }
            }
            catch
            {
                try { _duplCapture.Init(); }
                catch
                {
                    // ignored
                }

                return(RepeatFrame.Instance);
            }

            var editor = new Direct2DEditor(_editorSession);

            _mousePointer?.Draw(editor);

            return(editor);
        }
Exemplo n.º 3
0
        public void Draw(Direct2DEditor Editor)
        {
            if (!_pointerPosition.Visible)
            {
                return;
            }

            var bmp = _pointerShape?.GetBitmap();

            if (bmp == null)
            {
                return;
            }

            var rect = new Rectangle(_pointerPosition.Position.X,
                                     _pointerPosition.Position.Y,
                                     (int)bmp.Size.Width,
                                     (int)bmp.Size.Height);

            Editor.DrawImage(bmp, rect);
        }