mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 00:55:09 -07:00
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 26 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions
Use the landscape orientation flag to rotate sideways-layout card art upright before cropping, so planes/sieges show their horizontal art as the server profile banner card instead of a rotated full card. - Curve cropCardArt around the card's landscapeOrientation flag with landscape-specific art margins (mirrors CardInfoPictureWidget) - Add shared CardArtUtils::rotateSidewaysLayoutArt helper and apply it to the playmat (game render and settings preview) and card info widget, replacing three duplicate 90-degree rotation blocks Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
18 lines
No EOL
445 B
C++
18 lines
No EOL
445 B
C++
#include "card_art_utils.h"
|
|
|
|
#include <QTransform>
|
|
#include <libcockatrice/card/printing/exact_card.h>
|
|
|
|
namespace CardArtUtils
|
|
{
|
|
QPixmap rotateSidewaysLayoutArt(const QPixmap &art, const ExactCard &card)
|
|
{
|
|
if (!card.getInfo().getUiAttributes().landscapeOrientation) {
|
|
return art;
|
|
}
|
|
|
|
QTransform transform;
|
|
transform.rotate(90);
|
|
return art.transformed(transform, Qt::SmoothTransformation);
|
|
}
|
|
} // namespace CardArtUtils
|