Return display PPI from wxDC::GetPPI() in wxGTK3
For wxDC associated with a window, such as wx{Window,Client,Paint}DC, this method should return the window PPI, not the hard coded 72 DPI of Cairo graphics context. This still doesn't work correctly when using multiple monitors with different DPI settings, but is still a (modest) improvement.
This commit is contained in:
@@ -32,9 +32,14 @@ public:
|
||||
virtual bool DoStretchBlit(int xdest, int ydest, int dstWidth, int dstHeight, wxDC* source, int xsrc, int ysrc, int srcWidth, int srcHeight, wxRasterOperationMode rop, bool useMask, int xsrcMask, int ysrcMask) wxOVERRIDE;
|
||||
virtual void* GetCairoContext() const wxOVERRIDE;
|
||||
|
||||
virtual wxSize GetPPI() const wxOVERRIDE;
|
||||
|
||||
protected:
|
||||
int m_width, m_height;
|
||||
|
||||
private:
|
||||
bool TryGetWindowSize(wxSize& size, wxSize& sizeMM) const;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGTKCairoDCImpl);
|
||||
};
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user