ASAPCabinetFE
 
Loading...
Searching...
No Matches
ScreenshotCapture Class Reference

Captures screenshots of specific windows. More...

#include <screenshot_capture.h>

+ Collaboration diagram for ScreenshotCapture:

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ScreenshotCapture()

ScreenshotCapture::ScreenshotCapture ( const std::string &  exeDir)

Constructs a ScreenshotCapture instance.

Initializes the capture handler with the executable directory for output paths.

Parameters
exeDirThe executable directory for resolving output file paths.

Member Function Documentation

◆ captureAllScreenshots()

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.

Parameters
playfieldImageThe output path for the playfield screenshot.
backglassImageThe output path for the backglass screenshot.
dmdImageThe output path for the DMD screenshot.
windowThe SDL window associated with the capture process.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isWindowVisible()

bool ScreenshotCapture::isWindowVisible ( const std::string &  title)

Checks if a window is visible.

Determines if the window with the specified title is currently visible.

Parameters
titleThe title of the window to check.
Returns
True if the window is visible, false otherwise.
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: