mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
feat: uncouple export zoom from display zoom
This commit is contained in:
@@ -36,18 +36,23 @@ private:
|
||||
double angle = 0.0;
|
||||
};
|
||||
Rotation UnzoomedDataViewer::getRotation() const {
|
||||
if (use_zoom_settings) {
|
||||
/*if (use_zoom_settings) {
|
||||
return DataViewer::getRotation();
|
||||
} else {
|
||||
if (!stylesheet) stylesheet = set->stylesheet;
|
||||
return Rotation(angle, stylesheet->getCardRect(), zoom, 1.0, ROTATION_ATTACH_TOP_LEFT);
|
||||
}
|
||||
}*/
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Bitmap export_bitmap(const SetP& set, const CardP& card) {
|
||||
if (!set) throw Error(_("no set"));
|
||||
// create viewer
|
||||
UnzoomedDataViewer viewer(!settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_normal_export());
|
||||
UnzoomedDataViewer viewer(false);
|
||||
//UnzoomedDataViewer viewer(!settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_normal_export());
|
||||
viewer.setSet(set);
|
||||
viewer.setCard(card);
|
||||
// size of cards
|
||||
|
||||
@@ -122,6 +122,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(GameSettings) {
|
||||
|
||||
StyleSheetSettings::StyleSheetSettings()
|
||||
: card_zoom (1.0, true)
|
||||
, export_zoom (2.0, true)
|
||||
, card_angle (0, true)
|
||||
, card_anti_alias (true, true)
|
||||
, card_borders (true, true)
|
||||
@@ -132,6 +133,7 @@ StyleSheetSettings::StyleSheetSettings()
|
||||
|
||||
void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) {
|
||||
if (card_zoom .isDefault()) card_zoom .assignDefault(ss.card_zoom);
|
||||
if (export_zoom.isDefault()) export_zoom.assignDefault(ss.export_zoom);
|
||||
if (card_angle .isDefault()) card_angle .assignDefault(ss.card_angle);
|
||||
if (card_anti_alias .isDefault()) card_anti_alias .assignDefault(ss.card_anti_alias);
|
||||
if (card_borders .isDefault()) card_borders .assignDefault(ss.card_borders);
|
||||
@@ -142,6 +144,7 @@ void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) {
|
||||
|
||||
IMPLEMENT_REFLECTION_NO_SCRIPT(StyleSheetSettings) {
|
||||
REFLECT(card_zoom);
|
||||
REFLECT(export_zoom);
|
||||
REFLECT(card_angle);
|
||||
REFLECT(card_anti_alias);
|
||||
REFLECT(card_borders);
|
||||
|
||||
@@ -98,6 +98,7 @@ public:
|
||||
|
||||
// Rendering/display settings
|
||||
Defaultable<double> card_zoom;
|
||||
Defaultable<double> export_zoom;
|
||||
Defaultable<Degrees> card_angle;
|
||||
Defaultable<bool> card_anti_alias;
|
||||
Defaultable<bool> card_borders;
|
||||
|
||||
Reference in New Issue
Block a user