diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index d70113dfcc..292d058220 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -418,6 +418,15 @@ void wxGCDCImpl::SetTextBackground( const wxColour &col ) wxSize wxGCDCImpl::GetPPI() const { + if ( m_graphicContext ) + { + wxDouble x, y; + m_graphicContext->GetDPI(&x, &y); + return wxSize(wxRound(x), wxRound(y)); + } + + // This is the same value that wxGraphicsContext::GetDPI() returns by + // default. return wxSize(72, 72); }