feat: restore ability to export using viewer rotation angle

This commit is contained in:
Brendan Hagan
2022-07-07 23:23:35 -04:00
parent 661b4b8328
commit 894d13fbdb
4 changed files with 28 additions and 15 deletions
+8 -2
View File
@@ -34,8 +34,14 @@ private:
Rotation UnzoomedDataViewer::getRotation() const {
if (!stylesheet) stylesheet = set->stylesheet;
int export_zoom = settings.stylesheetSettingsFor(set->stylesheetFor(card)).export_zoom();
return Rotation(angle, stylesheet->getCardRect(), export_zoom, 1.0, ROTATION_ATTACH_TOP_LEFT);
int export_zoom = settings.stylesheetSettingsFor(set->stylesheetFor(card)).export_zoom();
bool use_viewer_rotation = !settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_normal_export();
if (use_viewer_rotation) {
return Rotation(DataViewer::getRotation().getAngle(), stylesheet->getCardRect(), export_zoom, 1.0, ROTATION_ATTACH_TOP_LEFT);
} else {
return Rotation(angle, stylesheet->getCardRect(), export_zoom, 1.0, ROTATION_ATTACH_TOP_LEFT);
}
}
Bitmap export_bitmap(const SetP& set, const CardP& card) {