Store clipping box in device units only if it's set with wxDCImpl::DoSetClippingRegion
If derived class sets clipping region in a legitimate way by call to DoSetClippingRegion() instead of directly storing logical coordinates of the box in the internal variables we can store coordinates in device units to determine final logical coordinates more reliably even in case when coordinate transformations were applied to DC in the meantime.
This commit is contained in:
@@ -742,8 +742,7 @@ protected:
|
||||
|
||||
// bounding and clipping boxes
|
||||
wxCoord m_minX, m_minY, m_maxX, m_maxY; // Bounding box is stored in device units.
|
||||
wxCoord m_clipX1, m_clipY1, m_clipX2, m_clipY2; // Clipping box is stored in device units.
|
||||
// Derived classes may store it in logical units.
|
||||
wxCoord m_clipX1, m_clipY1, m_clipX2, m_clipY2; // Some derived classes operate directly on clipping box given in logical units.
|
||||
|
||||
wxRasterOperationMode m_logicalFunction;
|
||||
int m_backgroundMode;
|
||||
@@ -765,6 +764,9 @@ private:
|
||||
// Return the full DC area in logical coordinates.
|
||||
wxRect GetLogicalArea() const;
|
||||
|
||||
wxCoord m_devClipX1, m_devClipY1, m_devClipX2, m_devClipY2; // For proper calculations of clipping box we need to store it in device units.
|
||||
bool m_useDevClipCoords;
|
||||
|
||||
wxDECLARE_ABSTRACT_CLASS(wxDCImpl);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user