mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Update print_window.cpp
This commit is contained in:
@@ -142,8 +142,9 @@ void CardsPrintout::drawCard(DC& dc, const CardP& card, int card_nr) {
|
|||||||
// create buffers
|
// create buffers
|
||||||
int w = int(stylesheet.card_width), h = int(stylesheet.card_height); // in pixels
|
int w = int(stylesheet.card_width), h = int(stylesheet.card_height); // in pixels
|
||||||
if (is_rad90(rotation)) swap(w,h);
|
if (is_rad90(rotation)) swap(w,h);
|
||||||
// Draw using text buffer
|
// Draw using text buffer
|
||||||
double zoom = IsPreview() ? 1 : 4;
|
bool isPreview = IsPreview();
|
||||||
|
double zoom = isPreview ? 1 : 4;
|
||||||
wxBitmap buffer(w*zoom,h*zoom,32);
|
wxBitmap buffer(w*zoom,h*zoom,32);
|
||||||
wxMemoryDC bufferDC;
|
wxMemoryDC bufferDC;
|
||||||
bufferDC.SelectObject(buffer);
|
bufferDC.SelectObject(buffer);
|
||||||
@@ -157,7 +158,7 @@ void CardsPrintout::drawCard(DC& dc, const CardP& card, int card_nr) {
|
|||||||
dc.SetUserScale(scale_x / px_per_mm, scale_y / px_per_mm);
|
dc.SetUserScale(scale_x / px_per_mm, scale_y / px_per_mm);
|
||||||
dc.SetDeviceOrigin(int(scale_x * pos.x), int(scale_y * pos.y));
|
dc.SetDeviceOrigin(int(scale_x * pos.x), int(scale_y * pos.y));
|
||||||
bufferDC.SelectObject(wxNullBitmap);
|
bufferDC.SelectObject(wxNullBitmap);
|
||||||
dc.DrawBitmap(buffer, 0, 0);
|
dc.DrawBitmap(buffer, isPreview ? 0 : int(scale_x * pos.x), isPreview ? 0 : int(scale_y * pos.y));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------- : PrintWindow
|
// ----------------------------------------------------------------------------- : PrintWindow
|
||||||
|
|||||||
Reference in New Issue
Block a user