Changeset 220:f54496748313

Show
Ignore:
Timestamp:
05/18/08 14:52:15 (4 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix foreground color in GC on non-gdip platforms

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/graphics/GC.d

    r215 r220  
    222222                int rgb = ((foreground >> 16) & 0xFF) | (foreground & 0xFF00) | ((foreground & 0xFF) << 16); 
    223223                auto color = Gdip.Color_new(data.alpha << 24 | rgb); 
    224                 // if (color is null) DWT.error(DWT.ERROR_NO_HANDLES); 
     224                if (color is 0) DWT.error(DWT.ERROR_NO_HANDLES); 
    225225                brush = cast(Gdip.Brush) Gdip.SolidBrush_new(color); 
    226226                if (brush is null) DWT.error(DWT.ERROR_NO_HANDLES); 
     
    410410            newPen = OS.ExtCreatePen (style | OS.PS_GEOMETRIC, Math.max(1, width), &logBrush, dashes !is null ? dashes.length : 0, dashes.ptr); 
    411411        } 
    412         OS.SelectObject(handle, &newPen); 
     412        OS.SelectObject(handle, newPen); 
    413413        data.state |= PEN; 
    414414        data.state &= ~NULL_PEN; 
     
    16791679    } 
    16801680    static if (OS.IsWinCE) { 
    1681         int [] points = [x1, y1, x2, y2]
     1681        int [4] points; points[0] = x1; points[1] = y1; points[2] = x2; points[3] = y2
    16821682        OS.Polyline (handle, cast(POINT*)points.ptr, points.length / 2); 
    16831683    } else {