Fix poster size; It is now A4
This commit is contained in:
parent
acd436f000
commit
1ce24be35b
4 changed files with 14 additions and 14 deletions
|
@ -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
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 235 KiB |
Binary file not shown.
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue