From ed50041589974d31296cb30dc1897f7fba6336c2 Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 20 Nov 2019 08:36:44 -0500 Subject: add upstream 10.18 --- wx+/rtl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'wx+/rtl.h') diff --git a/wx+/rtl.h b/wx+/rtl.h index 0cae9bac..0adb6037 100644 --- a/wx+/rtl.h +++ b/wx+/rtl.h @@ -20,6 +20,7 @@ void drawBitmapRtlNoMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, in //wxDC::DrawIcon DOES mirror by default -> implement RTL support when needed wxBitmap mirrorIfRtl(const wxBitmap& bmp); +wxImage mirrorIfRtl(const wxImage& bmp); //manual text flow correction: https://www.w3.org/International/articles/inline-bidi-markup/ @@ -93,6 +94,15 @@ void drawBitmapRtlNoMirror(wxDC& dc, const wxBitmap& bmp, const wxRect& rect, in } +inline +wxImage mirrorIfRtl(const wxImage& bmp) +{ + if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) + return bmp.Mirror(); + else + return bmp;} + + inline wxBitmap mirrorIfRtl(const wxBitmap& bmp) { -- cgit