don't use ROPs for drawing the text for wxMSW compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -340,15 +340,15 @@ void wxWindowDC::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoor
|
||||
}
|
||||
|
||||
if (m_window)
|
||||
{
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
gdk_draw_polygon (m_window, m_textGC, TRUE, gdkpoints, n);
|
||||
else
|
||||
{
|
||||
if ((m_brush.GetStyle() != wxTRANSPARENT))
|
||||
gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n);
|
||||
}
|
||||
}
|
||||
{
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
gdk_draw_polygon (m_window, m_textGC, TRUE, gdkpoints, n);
|
||||
else
|
||||
{
|
||||
if ((m_brush.GetStyle() != wxTRANSPARENT))
|
||||
gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n);
|
||||
}
|
||||
}
|
||||
|
||||
// To do: Fillstyle
|
||||
|
||||
@@ -385,19 +385,19 @@ void wxWindowDC::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord h
|
||||
|
||||
if (m_window)
|
||||
{
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
{
|
||||
gdk_draw_rectangle( m_window, m_textGC, TRUE, xx, yy, ww, hh );
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_brush.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh );
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
{
|
||||
gdk_draw_rectangle( m_window, m_textGC, TRUE, xx, yy, ww, hh );
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_brush.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh );
|
||||
|
||||
if (m_pen.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
if (m_pen.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
}
|
||||
|
||||
CalcBoundingBox( x, y );
|
||||
@@ -1099,7 +1099,7 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
}
|
||||
|
||||
case wxTRANSPARENT:
|
||||
case wxSTIPPLE_MASK_OPAQUE:
|
||||
case wxSTIPPLE_MASK_OPAQUE:
|
||||
case wxSTIPPLE:
|
||||
case wxSOLID:
|
||||
default:
|
||||
@@ -1260,7 +1260,12 @@ void wxWindowDC::SetLogicalFunction( int function )
|
||||
{
|
||||
wxCHECK_RET( Ok(), wxT("invalid window dc") );
|
||||
|
||||
if (m_logicalFunction == function) return;
|
||||
if (m_logicalFunction == function)
|
||||
return;
|
||||
|
||||
// VZ: shouldn't this be a CHECK?
|
||||
if (!m_window)
|
||||
return;
|
||||
|
||||
GdkFunction mode = GDK_COPY;
|
||||
switch (function)
|
||||
@@ -1294,11 +1299,12 @@ void wxWindowDC::SetLogicalFunction( int function )
|
||||
|
||||
m_logicalFunction = function;
|
||||
|
||||
if (!m_window) return;
|
||||
|
||||
gdk_gc_set_function( m_penGC, mode );
|
||||
gdk_gc_set_function( m_brushGC, mode );
|
||||
gdk_gc_set_function( m_textGC, mode );
|
||||
|
||||
// to stay compatible with wxMSW, we don't apply ROPs to the text
|
||||
// operations (i.e. DrawText/DrawRotatedText)
|
||||
// gdk_gc_set_function( m_textGC, mode );
|
||||
}
|
||||
|
||||
void wxWindowDC::SetTextForeground( const wxColour &col )
|
||||
|
@@ -340,15 +340,15 @@ void wxWindowDC::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoor
|
||||
}
|
||||
|
||||
if (m_window)
|
||||
{
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
gdk_draw_polygon (m_window, m_textGC, TRUE, gdkpoints, n);
|
||||
else
|
||||
{
|
||||
if ((m_brush.GetStyle() != wxTRANSPARENT))
|
||||
gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n);
|
||||
}
|
||||
}
|
||||
{
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
gdk_draw_polygon (m_window, m_textGC, TRUE, gdkpoints, n);
|
||||
else
|
||||
{
|
||||
if ((m_brush.GetStyle() != wxTRANSPARENT))
|
||||
gdk_draw_polygon (m_window, m_brushGC, TRUE, gdkpoints, n);
|
||||
}
|
||||
}
|
||||
|
||||
// To do: Fillstyle
|
||||
|
||||
@@ -385,19 +385,19 @@ void wxWindowDC::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord h
|
||||
|
||||
if (m_window)
|
||||
{
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
{
|
||||
gdk_draw_rectangle( m_window, m_textGC, TRUE, xx, yy, ww, hh );
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_brush.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh );
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask()))
|
||||
{
|
||||
gdk_draw_rectangle( m_window, m_textGC, TRUE, xx, yy, ww, hh );
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_brush.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh );
|
||||
|
||||
if (m_pen.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
if (m_pen.GetStyle() != wxTRANSPARENT)
|
||||
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 );
|
||||
}
|
||||
}
|
||||
|
||||
CalcBoundingBox( x, y );
|
||||
@@ -1099,7 +1099,7 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
}
|
||||
|
||||
case wxTRANSPARENT:
|
||||
case wxSTIPPLE_MASK_OPAQUE:
|
||||
case wxSTIPPLE_MASK_OPAQUE:
|
||||
case wxSTIPPLE:
|
||||
case wxSOLID:
|
||||
default:
|
||||
@@ -1260,7 +1260,12 @@ void wxWindowDC::SetLogicalFunction( int function )
|
||||
{
|
||||
wxCHECK_RET( Ok(), wxT("invalid window dc") );
|
||||
|
||||
if (m_logicalFunction == function) return;
|
||||
if (m_logicalFunction == function)
|
||||
return;
|
||||
|
||||
// VZ: shouldn't this be a CHECK?
|
||||
if (!m_window)
|
||||
return;
|
||||
|
||||
GdkFunction mode = GDK_COPY;
|
||||
switch (function)
|
||||
@@ -1294,11 +1299,12 @@ void wxWindowDC::SetLogicalFunction( int function )
|
||||
|
||||
m_logicalFunction = function;
|
||||
|
||||
if (!m_window) return;
|
||||
|
||||
gdk_gc_set_function( m_penGC, mode );
|
||||
gdk_gc_set_function( m_brushGC, mode );
|
||||
gdk_gc_set_function( m_textGC, mode );
|
||||
|
||||
// to stay compatible with wxMSW, we don't apply ROPs to the text
|
||||
// operations (i.e. DrawText/DrawRotatedText)
|
||||
// gdk_gc_set_function( m_textGC, mode );
|
||||
}
|
||||
|
||||
void wxWindowDC::SetTextForeground( const wxColour &col )
|
||||
|
Reference in New Issue
Block a user