Exemplo n.º 1
0
        public Bitmap RenderFromDesktop(Bitmap desktop, System.Windows.Forms.Screen screen)
        {
            // Convert screen rect to monitor rect
            var r = new Rect(Location.Left - screen.Bounds.Left, Location.Top - screen.Bounds.Top, Location.Width, Location.Height);

            var InnerLocation = new Rect(
                r.Left + Clip.LClip,
                r.Top + Clip.TopClip,
                r.Width - Clip.LClip - Clip.RClip,
                r.Height - Clip.TopClip - Clip.BottomClip
                );

            return(ImageExtensions.Copy(desktop, InnerLocation));
        }