Improve RTL support in wxStyledTextCtrl.

Use the correct HDC, inheriting the right text orientation, when creating
wxMemoryDC in SurfaceImpl code.

There may still be problems with the actual RTL languages, but at the very
least English text displayed in RTL locale is not mirrored any more.

Closes #16230.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-05-10 16:16:01 +00:00
parent 490814f21f
commit 1558349361
2 changed files with 6 additions and 2 deletions

View File

@@ -211,9 +211,12 @@ void SurfaceImpl::Init(SurfaceID hdc_, WindowID) {
hdc = (wxDC*)hdc_;
}
void SurfaceImpl::InitPixMap(int width, int height, Surface *WXUNUSED(surface_), WindowID winid) {
void SurfaceImpl::InitPixMap(int width, int height, Surface *surface, WindowID winid) {
Release();
hdc = new wxMemoryDC();
if (surface)
hdc = new wxMemoryDC(static_cast<SurfaceImpl*>(surface)->hdc);
else
hdc = new wxMemoryDC();
hdcOwned = true;
if (width < 1) width = 1;
if (height < 1) height = 1;