+//-----------------------------------------------------------------------------
+// wxGDIPlusPrintingContext implementation
+//-----------------------------------------------------------------------------
+
+wxGDIPlusPrintingContext::wxGDIPlusPrintingContext( wxGraphicsRenderer* renderer,
+ const wxDC& dc )
+ : wxGDIPlusContext(renderer, dc)
+{
+ Graphics* context = GetGraphics();
+
+ //m_context->SetPageUnit(UnitDocument);
+
+ // Setup page scale, based on DPI ratio.
+ // Antecedent should be 100dpi when the default page unit
+ // (UnitDisplay) is used. Page unit UnitDocument would require 300dpi
+ // instead. Note that calling SetPageScale() does not have effect on
+ // non-printing DCs (that is, any other than wxPrinterDC or
+ // wxEnhMetaFileDC).
+ REAL dpiRatio = 100.0 / context->GetDpiY();
+ context->SetPageScale(dpiRatio);
+
+ // We use this modifier when measuring fonts. It is needed because the
+ // page scale is modified above.
+ m_fontScaleRatio = context->GetDpiY() / 72.0;
+}
+