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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user