Changeset 220:f54496748313
- 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
| r215 |
r220 |
|
| 222 | 222 | int rgb = ((foreground >> 16) & 0xFF) | (foreground & 0xFF00) | ((foreground & 0xFF) << 16); |
|---|
| 223 | 223 | 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); |
|---|
| 225 | 225 | brush = cast(Gdip.Brush) Gdip.SolidBrush_new(color); |
|---|
| 226 | 226 | if (brush is null) DWT.error(DWT.ERROR_NO_HANDLES); |
|---|
| … | … | |
| 410 | 410 | newPen = OS.ExtCreatePen (style | OS.PS_GEOMETRIC, Math.max(1, width), &logBrush, dashes !is null ? dashes.length : 0, dashes.ptr); |
|---|
| 411 | 411 | } |
|---|
| 412 | | OS.SelectObject(handle, &newPen); |
|---|
| | 412 | OS.SelectObject(handle, newPen); |
|---|
| 413 | 413 | data.state |= PEN; |
|---|
| 414 | 414 | data.state &= ~NULL_PEN; |
|---|
| … | … | |
| 1679 | 1679 | } |
|---|
| 1680 | 1680 | 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; |
|---|
| 1682 | 1682 | OS.Polyline (handle, cast(POINT*)points.ptr, points.length / 2); |
|---|
| 1683 | 1683 | } else { |
|---|