1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Feature: Add option for taking transparent screenshots

This commit is contained in:
Cory Sanin
2021-02-22 15:48:51 -06:00
committed by GitHub
parent 8e414a9d97
commit 57c950958b
6 changed files with 14 additions and 1 deletions

View File

@@ -814,6 +814,11 @@ void CaptureImage(const CaptureOptions& options)
auto backupRotation = gCurrentRotation;
gCurrentRotation = options.Rotation;
if (options.Transparent)
{
viewport.flags |= VIEWPORT_FLAG_TRANSPARENT_BACKGROUND;
}
auto outputPath = ResolveFilenameForCapture(options.Filename);
auto dpi = CreateDPI(viewport);
RenderViewport(nullptr, viewport, dpi);