must derive from wxDC, not wxDCBase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
// wxMirrorDC allows to write the same code for horz/vertical layout
|
// wxMirrorDC allows to write the same code for horz/vertical layout
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class WXDLLEXPORT wxMirrorDC : public wxDCBase
|
class WXDLLEXPORT wxMirrorDC : public wxDC
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// constructs a mirror DC associated with the given real DC
|
// constructs a mirror DC associated with the given real DC
|
||||||
@@ -67,6 +67,12 @@ public:
|
|||||||
virtual void SetLogicalFunction(int function)
|
virtual void SetLogicalFunction(int function)
|
||||||
{ m_dc.SetLogicalFunction(function); }
|
{ m_dc.SetLogicalFunction(function); }
|
||||||
|
|
||||||
|
// helper functions which may be useful for the users of this class
|
||||||
|
wxSize Reflect(const wxSize& sizeOrig)
|
||||||
|
{
|
||||||
|
return m_mirror ? wxSize(sizeOrig.y, sizeOrig.x) : sizeOrig;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// returns x and y if not mirroring or y and x if mirroring
|
// returns x and y if not mirroring or y and x if mirroring
|
||||||
wxCoord GetX(wxCoord x, wxCoord y) const { return m_mirror ? y : x; }
|
wxCoord GetX(wxCoord x, wxCoord y) const { return m_mirror ? y : x; }
|
||||||
|
Reference in New Issue
Block a user