My Project
 
Loading...
Searching...
No Matches
graphics_engine::image Namespace Reference

Functions

DLLEXPORT auto AreIdentical (const ::std::filesystem::path &png0, const ::std::filesystem::path &png1) -> ::graphics_engine::types::Expected< bool >
 Determine if two png files are identical.
 
DLLEXPORT auto CaptureScreenshot (const ::std::optional<::std::filesystem::path > &dest=::std::nullopt) -> ::graphics_engine::types::Expected< void >
 Capture a screenshot of the current rendering context.
 

Function Documentation

◆ AreIdentical()

DLLEXPORT auto graphics_engine::image::AreIdentical ( const ::std::filesystem::path &  png0,
const ::std::filesystem::path &  png1 
) -> ::graphics_engine::types::Expected< bool >

Determine if two png files are identical.

Parameters
png0The first png file to compare.
png1The second png file to compare.
Returns
true if the files are identical, false if they differ, and error if something went wrong while trying to compare them.

◆ CaptureScreenshot()

DLLEXPORT auto graphics_engine::image::CaptureScreenshot ( const ::std::optional<::std::filesystem::path > &  dest = ::std::nullopt) -> ::graphics_engine::types::Expected< void >

Capture a screenshot of the current rendering context.

Parameters
destOptional destination path for the screenshot.
Returns
path to screenshot on success, error on failure.
Note
If dest is not provided, the screenshot will be saved to std::filesystem::temp_directory_path()/"screenshot.png"