long x2 = XLOG2DEV(points[i+1].x + xoffset);
long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste
long y2 = YLOG2DEV(points[i+1].y + yoffset);
+
if (m_window)
gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 );
CalcBoundingBox( points[i].x + xoffset, points[i].y + yoffset );
}
- if (m_brush.GetStyle() != wxTRANSPARENT)
+ if ((m_brush.GetStyle() != wxTRANSPARENT) && m_window)
gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n);
// To do: Fillstyle
m_brush.GetColour().CalcPixel( m_cmap );
gdk_gc_set_foreground( m_brushGC, m_brush.GetColour().GetColor() );
- GdkFill fillStyle = GDK_SOLID;
- switch (m_brush.GetStyle())
- {
- case wxSOLID:
- case wxTRANSPARENT:
- break;
- default:
- fillStyle = GDK_STIPPLED;
- }
-
- gdk_gc_set_fill( m_brushGC, fillStyle );
+ gdk_gc_set_fill( m_brushGC, GDK_SOLID );
if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok()))
{
if (m_brush.GetStipple()->GetPixmap())
+ {
+ gdk_gc_set_fill( m_brushGC, GDK_TILED );
gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() );
+ }
else
+ {
+ gdk_gc_set_fill( m_brushGC, GDK_STIPPLED );
gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() );
+ }
}
if (IS_HATCH(m_brush.GetStyle()))
{
+ gdk_gc_set_fill( m_brushGC, GDK_STIPPLED );
int num = m_brush.GetStyle() - wxBDIAGONAL_HATCH;
gdk_gc_set_stipple( m_brushGC, hatches[num] );
}
gdk_gc_set_background( m_penGC, m_backgroundBrush.GetColour().GetColor() );
gdk_gc_set_background( m_bgGC, m_backgroundBrush.GetColour().GetColor() );
gdk_gc_set_foreground( m_bgGC, m_backgroundBrush.GetColour().GetColor() );
-
- GdkFill fillStyle = GDK_SOLID;
- switch (m_backgroundBrush.GetStyle())
- {
- case wxSOLID:
- case wxTRANSPARENT:
- break;
- default:
- fillStyle = GDK_STIPPLED;
- }
-
- gdk_gc_set_fill( m_bgGC, fillStyle );
+
+ gdk_gc_set_fill( m_bgGC, GDK_SOLID );
if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok()))
{
- if (m_brush.GetStipple()->GetPixmap())
- gdk_gc_set_tile( m_bgGC, m_brush.GetStipple()->GetPixmap() );
+ if (m_backgroundBrush.GetStipple()->GetPixmap())
+ {
+ gdk_gc_set_fill( m_bgGC, GDK_TILED );
+ gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() );
+ }
else
- gdk_gc_set_stipple( m_bgGC, m_brush.GetStipple()->GetBitmap() );
+ {
+ gdk_gc_set_fill( m_bgGC, GDK_STIPPLED );
+ gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() );
+ }
}
if (IS_HATCH(m_backgroundBrush.GetStyle()))
{
+ gdk_gc_set_fill( m_bgGC, GDK_STIPPLED );
int num = m_backgroundBrush.GetStyle() - wxBDIAGONAL_HATCH;
gdk_gc_set_stipple( m_bgGC, hatches[num] );
}