Add ToDIP to wxDC and wxGraphicsContext
This commit is contained in:
parent
6637811f32
commit
e8cf1f989b
8 changed files with 70 additions and 0 deletions
|
|
@ -541,6 +541,8 @@ public:
|
|||
|
||||
virtual wxSize FromDIP(const wxSize& sz) const;
|
||||
|
||||
virtual wxSize ToDIP(const wxSize& sz) const;
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Native Windows functions using the underlying HDC don't honour GDI+
|
||||
// transformations which may be applied to it. Using this function we can
|
||||
|
|
@ -839,6 +841,20 @@ public:
|
|||
int FromDIP(int d) const
|
||||
{ return FromDIP(wxSize(d, 0)).x; }
|
||||
|
||||
wxSize ToDIP(const wxSize & sz) const
|
||||
{
|
||||
return m_pimpl->ToDIP(sz);
|
||||
}
|
||||
wxPoint ToDIP(const wxPoint & pt) const
|
||||
{
|
||||
const wxSize sz = ToDIP(wxSize(pt.x, pt.y));
|
||||
return wxPoint(sz.x, sz.y);
|
||||
}
|
||||
int ToDIP(int d) const
|
||||
{
|
||||
return ToDIP(wxSize(d, 0)).x;
|
||||
}
|
||||
|
||||
// Right-To-Left (RTL) modes
|
||||
|
||||
void SetLayoutDirection(wxLayoutDirection dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue