Mercurial > projects > dwt-mac
comparison dwt/graphics/GC.d @ 37:642f460a0908
Fixed a lot of compile errors, a "hello world" app compiles now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Fri, 10 Oct 2008 12:29:48 +0200 |
parents | db5a898b2119 |
children | d8635bb48c7c |
comparison
equal
deleted
inserted
replaced
36:db5a898b2119 | 37:642f460a0908 |
---|---|
649 dict.setObject(color, OS.NSForegroundColorAttributeName()); | 649 dict.setObject(color, OS.NSForegroundColorAttributeName()); |
650 dict.setObject(data.font.handle, OS.NSFontAttributeName()); | 650 dict.setObject(data.font.handle, OS.NSFontAttributeName()); |
651 if ((flags & DWT.DRAW_TRANSPARENT) is 0) { | 651 if ((flags & DWT.DRAW_TRANSPARENT) is 0) { |
652 CGFloat[] background = data.background; | 652 CGFloat[] background = data.background; |
653 color = NSColor.colorWithDeviceRed(background[0], background[1], background[2], data.alpha / 255f); | 653 color = NSColor.colorWithDeviceRed(background[0], background[1], background[2], data.alpha / 255f); |
654 dict.setObject(color, OS.NSBackgroundColorAttributeName()); | 654 dict.setObject(color, OS.FuncNSBackgroundColorAttributeName()); |
655 } | 655 } |
656 size_t length = string.length(); | 656 size_t length = string.length(); |
657 char[] chars = new char[length]; | 657 char[] chars = new char[length]; |
658 string.getChars(0, length, chars, 0); | 658 string.getChars(0, length, chars, 0); |
659 // int breakCount = 0; | 659 // int breakCount = 0; |
2049 rect.width = data.size.width; | 2049 rect.width = data.size.width; |
2050 rect.height = data.size.height; | 2050 rect.height = data.size.height; |
2051 } | 2051 } |
2052 } | 2052 } |
2053 region.add(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height); | 2053 region.add(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height); |
2054 NSRect paintRect = *data.paintRect; | 2054 NSRect* paintRect = data.paintRect; |
2055 if (paintRect !is NSRect.init) { | 2055 if (paintRect !is null) { |
2056 region.intersect(cast(int)paintRect.x, cast(int)paintRect.y, cast(int)paintRect.width, cast(int)paintRect.height); | 2056 region.intersect(cast(int)paintRect.x, cast(int)paintRect.y, cast(int)paintRect.width, cast(int)paintRect.height); |
2057 } | 2057 } |
2058 if (data.clipPath !is null) { | 2058 if (data.clipPath !is null) { |
2059 NSBezierPath clip = data.clipPath.bezierPathByFlatteningPath(); | 2059 NSBezierPath clip = data.clipPath.bezierPathByFlatteningPath(); |
2060 int count = clip.elementCount(); | 2060 int count = clip.elementCount(); |