public IBitmapImage Capture(bool IncludeCursor) { var cursorPos = _platformServices.CursorPosition; var screenBounds = _platformServices.DesktopRectangle; var w = _settings.AroundMouse.Width; var h = _settings.AroundMouse.Height; var region = new Rectangle(cursorPos.X - w / 2, cursorPos.Y - h / 2, w, h); if (region.Right > screenBounds.Right) { region.X = screenBounds.Right - w; } if (region.Bottom > screenBounds.Bottom) { region.Y = screenBounds.Bottom - h; } if (region.X < screenBounds.X) { region.X = screenBounds.X; } if (region.Y < screenBounds.Y) { region.Y = screenBounds.Y; } return(ScreenShot.Capture(region, IncludeCursor)); }
public override IBitmapImage Capture(bool IncludeCursor) { if (Source is ScreenItem screenItem) { return(ScreenShot.Capture(screenItem.Screen.Rectangle, IncludeCursor)); } return(null); }
public override IBitmapImage Capture(bool IncludeCursor) { if (Source is WindowItem windowItem) { return(ScreenShot.Capture(windowItem.Window.Rectangle, IncludeCursor)); } return(null); }
public override IBitmapImage Capture(bool IncludeCursor) { return(ScreenShot.Capture(IncludeCursor)); }
public override IBitmapImage Capture(bool IncludeCursor) { return(ScreenShot.Capture(_regionProvider.SelectedRegion, IncludeCursor)); }