X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b129eaa3772fc5c73e6e95cd94010a828ebf42c3..be19c556083cc197be55acbd05db76ec6dc2e0c4:/include/wx/graphics.h diff --git a/include/wx/graphics.h b/include/wx/graphics.h index 98d8a376f3..b79ba6144c 100644 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -642,7 +642,14 @@ public: // helper to determine if a 0.5 offset should be applied for the drawing operation virtual bool ShouldOffset() const { return false; } - + + // indicates whether the context should try to offset for pixel boundaries, this only makes sense on + // bitmap devices like screen, by default this is turned off + virtual void EnableOffset(bool enable = true); + + void DisableOffset() { EnableOffset(false); } + bool OffsetEnabled() { return m_enableOffset; } + protected: // These fields must be initialized in the derived class ctors. wxDouble m_width, @@ -653,6 +660,7 @@ protected: wxGraphicsFont m_font; wxAntialiasMode m_antialias; wxCompositionMode m_composition; + bool m_enableOffset; protected: // implementations of overloaded public functions: we use different names