standard (as e.g. wxStatusBar) */
m_owner = window;
-
+
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
{
// reverse sense
gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() );
gdk_gc_set_fill( m_textGC, GDK_SOLID );
-
+
gdk_gc_set_colormap( m_textGC, m_cmap );
/* m_penGC */
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-2, hh-2 );
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx-1, yy-1, ww, hh );
}
-
+
// reset
gdk_gc_set_line_attributes( m_penGC, 2, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND );
}
int w = bitmap.GetWidth();
int h = bitmap.GetHeight();
-
+
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
xx -= w;
-
+
CalcBoundingBox( x, y );
CalcBoundingBox( x + w, y + h );
wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC);
wxBitmap selected = source->GetSelectedBitmap();
-
+
bool use_bitmap_method = false;
bool is_mono = false;
}
if (memDC && !selected.Ok()) return false;
-
+
if (selected.Ok())
{
is_mono = (selected.GetDepth() == 1);
GdkWindow* window = source->GetGDKWindow();
if ( !window )
return false;
-
+
// copy including child window contents
gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
gdk_draw_drawable( m_window, m_penGC,
gdk_draw_rectangle(m_window, m_textGC, TRUE, x, y, w, h);
gdk_gc_set_foreground(m_textGC, m_textForegroundColour.GetColor());
}
-
+
// Draw layout.
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
gdk_draw_layout( m_window, m_textGC, x-w, y, m_layout );
}
// Reset old font description
- if (theFont)
+ if (theFont->IsOk())
pango_layout_set_font_description( m_layout, m_fontdesc );
}
}
pango_layout_set_text( m_layout, dataUTF8, strlen(dataUTF8) );
-
+
// Calculate the position of each character based on the widths of
// the previous characters
{
pango_layout_iter_get_cluster_extents(iter, NULL, &pos);
int position = PANGO_PIXELS(pos.x);
- size_t curIndex = pango_layout_iter_get_index(iter);
widths[i++] = position;
}
while (i < len)
{
m_deviceOriginX = x;
m_deviceOriginY = y;
-
+
ComputeScaleAndOrigin();
}
{
m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1);
-
+
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
- m_signX = -m_signX;
-
+ m_signX = -m_signX;
+
ComputeScaleAndOrigin();
}