-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindowsScreenCapture.cs
More file actions
29 lines (22 loc) · 955 Bytes
/
WindowsScreenCapture.cs
File metadata and controls
29 lines (22 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using AmpUp.Core.Interfaces;
using AmpUp.Core.Models;
namespace AmpUp;
/// <summary>
/// Windows-specific IScreenCapture implementation that delegates to the
/// GDI-based ScreenCapture class.
/// </summary>
public class WindowsScreenCapture : IScreenCapture
{
private readonly ScreenCapture _capture = new();
public (byte R, byte G, byte B)[]? CaptureZones(int monitorIndex, int zoneCount)
=> _capture.CaptureZones(monitorIndex, zoneCount);
public (byte R, byte G, byte B)[]? CaptureZones(int monitorIndex, int zoneCount, bool cropBlackBars)
=> _capture.CaptureZones(monitorIndex, zoneCount, cropBlackBars);
public (byte R, byte G, byte B)[,]? CaptureZoneGrid(int monitorIndex, int cols, int rows, ContentBounds? crop)
=> _capture.CaptureZoneGrid(monitorIndex, cols, rows, crop);
public int MonitorCount => ScreenCapture.MonitorCount;
public void Dispose()
{
_capture.Dispose();
}
}