diff --git a/README.md b/README.md index 2b9f00a..932984f 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,8 @@ The poster offsets are (always top left of the element): - Width: 1654 - Height: 2339 ### QR-Code -- Cooridnates: 276, 276 -- Size: 1100x1100 +- Cooridnates: 414, 414 +- Size: 1650x1650 ### Comp name -- Cooridnates: x: 216, y: 1670 -- Size: 44 per line; 1220 width +- Cooridnates: x: 324, y: 2500 +- Size: 64 per line; 1835 width; 150 max height diff --git a/resources/shared/PosterTemplate.png b/resources/shared/PosterTemplate.png index 8471921..1548bb5 100644 Binary files a/resources/shared/PosterTemplate.png and b/resources/shared/PosterTemplate.png differ diff --git a/resources/shared/PosterTemplate.xcf b/resources/shared/PosterTemplate.xcf index 8ec4d4a..152385b 100644 Binary files a/resources/shared/PosterTemplate.xcf and b/resources/shared/PosterTemplate.xcf differ diff --git a/sources/bluerockbackend.cpp b/sources/bluerockbackend.cpp index 231a84f..8abc6c9 100644 --- a/sources/bluerockbackend.cpp +++ b/sources/bluerockbackend.cpp @@ -124,26 +124,26 @@ void BlueRockBackend::shareResultsAsPoster(QString url, QString compName) { } // dimensions - QRect qrCodeRect = QRect(276, 276, 1100, 1100); + QRect qrCodeRect = QRect(414, 414, 1650, 1650); - int compNameTextLineHeight = 44; + int compNameTextLineHeight = 64; QFont compNameTextFont("OpenSans-Light"); compNameTextFont.setPixelSize(compNameTextLineHeight); QRect compNameTextRect = QRect( - 216, - 1670, - 1220, - 100 + 324, + 2500, + 1835, + 150 ); QPdfWriter writer(&file); - writer.setPageSize(QPageSize(QSizeF(70.02, 99.02), QPageSize::Millimeter)); + writer.setPageSize(QPageSize(QPageSize::A4)); writer.setPageMargins(QMargins(0, 0, 0, 0)); - writer.setResolution(600); + writer.setResolution(300); QPainter painter(&writer); - QPixmap background(":/PosterTemplate.png"); - painter.drawPixmap(0,0, writer.width(), writer.height(), background); + QPixmap posterTemplate(":/PosterTemplate.png"); + painter.drawPixmap(0,0, writer.width(), writer.height(), posterTemplate); QPixmap barcode; QZXingEncoderConfig encoderConfig(QZXing::EncoderFormat_QR_CODE, qrCodeRect.size(), QZXing::EncodeErrorCorrectionLevel_H, false, false);