wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
CircuitExporter.h
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
7
8#pragma once
9
10class Scene;
11class QString;
12class QImage;
13class QRectF;
14
23namespace CircuitExporter {
24
31inline constexpr double kMaxImageDimension = 4096;
32
37void renderToPdf(Scene *scene, const QString &filePath);
38
44void renderToImage(Scene *scene, const QString &filePath);
45
54QImage renderScaledImage(Scene *scene, const QRectF &paddedRect);
55
56} // namespace CircuitExporter
Main circuit editing scene.
Definition Scene.h:56
Pure render functions for exporting a circuit scene to image formats.
void renderToImage(Scene *scene, const QString &filePath)
Renders scene to a PNG image file at filePath.
QImage renderScaledImage(Scene *scene, const QRectF &paddedRect)
Renders scene into a transparent-filled QImage bounded by kMaxImageDimension.
constexpr double kMaxImageDimension
void renderToPdf(Scene *scene, const QString &filePath)
Renders scene to a PDF file at filePath.