+ int view_start;
+ m_owner->GetViewStart( &view_start, NULL );
+
+ if (GetLayoutDirection() == wxLayout_RightToLeft)
+ {
+ // FIXME: we need a better way for RTL scrolling..
+ int scroll_lines = m_owner->GetScrollLines( wxHORIZONTAL );
+ if (scroll_lines)
+ {
+ int client_size = m_owner->GetClientSize().x;
+ view_start = scroll_lines - (client_size / xpix) - view_start;
+ view_start = -view_start;
+ }
+ }
+
+ int org_x = 0;
+ int org_y = 0;
+ dc.GetDeviceOrigin( &org_x, &org_y );