Compare commits

...

4 Commits

Author SHA1 Message Date
ae6cf5c7c2
Merge pull request #32 from iwkjosec/fix-typo
Fix typo
2024-03-26 12:49:13 +01:00
iwkjosec
a53623e136
Attemts->Attempts 2024-03-26 14:08:16 +09:00
iwkjosec
183f02da94
Cature->Capture 2024-03-26 14:05:29 +09:00
iwkjosec
47055de4f2
om->on, seperate->separate 2024-03-26 14:02:06 +09:00
3 changed files with 6 additions and 6 deletions

View File

@ -26,14 +26,14 @@ IEnumerable<Display> displays = screenCaptureService.GetDisplays(graphicsCards.F
// Create a screen-capture for all screens you want to capture // Create a screen-capture for all screens you want to capture
IScreenCapture screenCapture = screenCaptureService.GetScreenCapture(displays.First()); IScreenCapture screenCapture = screenCaptureService.GetScreenCapture(displays.First());
// Register the regions you want to capture om the screen // Register the regions you want to capture on the screen
// Capture the whole screen // Capture the whole screen
ICaptureZone fullscreen = screenCapture.RegisterCaptureZone(0, 0, screenCapture.Display.Width, screenCapture.Display.Height); ICaptureZone fullscreen = screenCapture.RegisterCaptureZone(0, 0, screenCapture.Display.Width, screenCapture.Display.Height);
// Capture a 100x100 region at the top left and scale it down to 50x50 // Capture a 100x100 region at the top left and scale it down to 50x50
ICaptureZone topLeft = screenCapture.RegisterCaptureZone(0, 0, 100, 100, downscaleLevel: 1); ICaptureZone topLeft = screenCapture.RegisterCaptureZone(0, 0, 100, 100, downscaleLevel: 1);
// Capture the screen // Capture the screen
// This should be done in a loop on a seperate thread as CaptureScreen blocks if the screen is not updated (still image). // This should be done in a loop on a separate thread as CaptureScreen blocks if the screen is not updated (still image).
screenCapture.CaptureScreen(); screenCapture.CaptureScreen();
// Do something with the captured image - e.g. access all pixels (same could be done with topLeft) // Do something with the captured image - e.g. access all pixels (same could be done with topLeft)

View File

@ -13,7 +13,7 @@ public abstract class AbstractScreenCapture<TColor> : IScreenCapture
private bool _isDisposed; private bool _isDisposed;
/// <summary> /// <summary>
/// Gets a list of <see cref="CaptureZone{TColol}"/> registered on this ScreenCature. /// Gets a list of <see cref="CaptureZone{TColol}"/> registered on this ScreenCapture.
/// </summary> /// </summary>
protected HashSet<CaptureZone<TColor>> CaptureZones { get; } = new(); protected HashSet<CaptureZone<TColor>> CaptureZones { get; } = new();
@ -244,4 +244,4 @@ public abstract class AbstractScreenCapture<TColor> : IScreenCapture
protected virtual void Dispose(bool disposing) { } protected virtual void Dispose(bool disposing) { }
#endregion #endregion
} }

View File

@ -18,7 +18,7 @@ public interface IScreenCapture : IDisposable
event EventHandler<ScreenCaptureUpdatedEventArgs>? Updated; event EventHandler<ScreenCaptureUpdatedEventArgs>? Updated;
/// <summary> /// <summary>
/// Attemts to capture the current frame showed on the <see cref="Display"/>. /// Attempts to capture the current frame showed on the <see cref="Display"/>.
/// </summary> /// </summary>
/// <returns><c>true</c> if the current frame was captures successfully; otherwise, <c>false</c>.</returns> /// <returns><c>true</c> if the current frame was captures successfully; otherwise, <c>false</c>.</returns>
bool CaptureScreen(); bool CaptureScreen();
@ -59,4 +59,4 @@ public interface IScreenCapture : IDisposable
/// Restarts the <see cref="IScreenCapture"/>. /// Restarts the <see cref="IScreenCapture"/>.
/// </summary> /// </summary>
void Restart(); void Restart();
} }