if (!hatch_bitmap)
{
+ int xscreen = DefaultScreen( (Display*) m_display );
+ Window xroot = RootWindow( (Display*) m_display, xscreen );
+
hatch_bitmap = hatches;
- hatch_bitmap[0] = XCreateBitmapFromData( (Display*) m_display, None, bdiag_bits, bdiag_width, bdiag_height );
- hatch_bitmap[1] = XCreateBitmapFromData( (Display*) m_display, None, cdiag_bits, cdiag_width, cdiag_height );
- hatch_bitmap[2] = XCreateBitmapFromData( (Display*) m_display, None, fdiag_bits, fdiag_width, fdiag_height );
- hatch_bitmap[3] = XCreateBitmapFromData( (Display*) m_display, None, cross_bits, cross_width, cross_height );
- hatch_bitmap[4] = XCreateBitmapFromData( (Display*) m_display, None, horiz_bits, horiz_width, horiz_height );
- hatch_bitmap[5] = XCreateBitmapFromData( (Display*) m_display, None, verti_bits, verti_width, verti_height );
+ hatch_bitmap[0] = XCreateBitmapFromData( (Display*) m_display, xroot, bdiag_bits, bdiag_width, bdiag_height );
+ hatch_bitmap[1] = XCreateBitmapFromData( (Display*) m_display, xroot, cdiag_bits, cdiag_width, cdiag_height );
+ hatch_bitmap[2] = XCreateBitmapFromData( (Display*) m_display, xroot, fdiag_bits, fdiag_width, fdiag_height );
+ hatch_bitmap[3] = XCreateBitmapFromData( (Display*) m_display, xroot, cross_bits, cross_width, cross_height );
+ hatch_bitmap[4] = XCreateBitmapFromData( (Display*) m_display, xroot, horiz_bits, horiz_width, horiz_height );
+ hatch_bitmap[5] = XCreateBitmapFromData( (Display*) m_display, xroot, verti_bits, verti_width, verti_height );
}
}
CalcBoundingBox(x1, y1);
CalcBoundingBox(x2, y2);
+
+ wxLogDebug("Drawing line at %d, %d -> %d, %d", XLOG2DEV(x1), YLOG2DEV(y1), XLOG2DEV(x2), YLOG2DEV(y2) );
}
}
CalcBoundingBox( x, y );
CalcBoundingBox( x + width, y + height );
+ wxLogDebug("Drawing rectangle at %d, %d (%dx%d)", x, y, width, height);
}
void wxWindowDC::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius )
x = XLOG2DEV(x);
y = YLOG2DEV(y);
+ XCharStruct overall_return;
+ int direction = 0;
+ int slen = text.Length();
+ int ascent = 0;
+ int descent = 0;
+ (void)XTextExtents((XFontStruct*) xfont, (char*) (const char*) text, slen, &direction,
+ &ascent, &descent, &overall_return);
#if 0
wxCoord width = gdk_string_width( font, text.mbc_str() );
wxCoord height = font->ascent + font->descent;
if ((xfont->min_byte1 == 0) && (xfont->max_byte1 == 0))
{
XDrawString( (Display*) m_display, (Window) m_window,
- (GC) m_textGC, x, y, text.c_str(), text.Len() );
+ (GC) m_textGC, x, y + ascent, text.c_str(), text.Len() );
+ wxLogDebug("Drawing text %s at %d, %d", text.c_str(), x, y);
}
#if 0