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:
parent
afe0e776b9
commit
4ad1a3d969
2 changed files with 18 additions and 0 deletions
|
|
@ -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);
|
||||
};
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue