Captures screenshots of specific windows. More...
#include <screenshot_capture.h>
Public Member Functions | |
ScreenshotCapture (const std::string &exeDir) | |
Constructs a ScreenshotCapture instance. | |
void | captureAllScreenshots (const std::string &playfieldImage, const std::string &backglassImage, const std::string &dmdImage, SDL_Window *window) |
Captures screenshots for all specified windows. | |
bool | isWindowVisible (const std::string &title) |
Checks if a window is visible. | |
Captures screenshots of specific windows.
This class handles the capture of screenshots for designated windows, saving them to specified output paths. It is used by ScreenshotManager to capture playfield, backglass, and DMD images during screenshot mode, using the executable directory for file path resolution.
ScreenshotCapture::ScreenshotCapture | ( | const std::string & | exeDir | ) |
Constructs a ScreenshotCapture instance.
Initializes the capture handler with the executable directory for output paths.
exeDir | The executable directory for resolving output file paths. |
void ScreenshotCapture::captureAllScreenshots | ( | const std::string & | playfieldImage, |
const std::string & | backglassImage, | ||
const std::string & | dmdImage, | ||
SDL_Window * | window | ||
) |
Captures screenshots for all specified windows.
Captures screenshots of the playfield, backglass, and DMD windows, saving them to the provided output paths, using the provided SDL window for context.
playfieldImage | The output path for the playfield screenshot. |
backglassImage | The output path for the backglass screenshot. |
dmdImage | The output path for the DMD screenshot. |
window | The SDL window associated with the capture process. |
bool ScreenshotCapture::isWindowVisible | ( | const std::string & | title | ) |
Checks if a window is visible.
Determines if the window with the specified title is currently visible.
title | The title of the window to check. |