Really implement wxGCDC::GetPPI()
Return the DPI of the associated window, if any, instead of the hard-coded 72*72.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user