Fix setting clipping region for wxDC with RTL enabled (wxMSW)

It turns out that region being added to DC with enabled RTL layout needs
to be defined using mirrored device x-coordinates.
So if we have DC with RTL layout we need to create a temporary mirrored
region and pass it to the DC instead of the original one.

Closes #19325.
This commit is contained in:
Artur Wieczorek
2021-11-28 17:04:26 +01:00
parent b04c1ace47
commit 288b208a0a
2 changed files with 44 additions and 5 deletions

View File

@@ -281,7 +281,7 @@ protected:
void DrawAnyText(const wxString& text, wxCoord x, wxCoord y);
// common part of DoSetClippingRegion() and DoSetDeviceClippingRegion()
void SetClippingHrgn(WXHRGN hrgn);
void SetClippingHrgn(WXHRGN hrgn, bool doRtlOffset = false);
// implementation of DoGetSize() for wxScreen/PrinterDC: this simply
// returns the size of the entire device this DC is associated with