Mercurial > projects > dwt-mac
diff dwt/graphics/TextLayout.d @ 155:e91dcbf77cc7
Fixes runtime problems with dmd and ldc. Changed a couple of floats to CGFloat
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 06 Jul 2009 21:17:03 +0200 |
parents | 535243e6d16a |
children | 969e7de37c3d |
line wrap: on
line diff
--- a/dwt/graphics/TextLayout.d Sat Jun 13 00:25:05 2009 +0200 +++ b/dwt/graphics/TextLayout.d Mon Jul 06 21:17:03 2009 +0200 @@ -405,7 +405,7 @@ NSAutoreleasePool pool = gc.checkGC(GC.CLIPPING | GC.TRANSFORM | GC.FOREGROUND); try { gc.handle.saveGraphicsState(); - float[] fg = gc.data.foreground; + Carbon.CGFloat[] fg = gc.data.foreground; NSColor foreground = NSColor.colorWithDeviceRed(fg[0], fg[1], fg[2], fg[3]); NSPoint pt = NSPoint(); pt.x = x; @@ -470,7 +470,7 @@ float baseline = layoutManager.typesetter().baselineOffsetInLayoutManager(layoutManager, lineStart); float underlineX = pt.x + rect.x; float underlineY = pt.y + rect.y + rect.height - baseline; - float[] color = null; + Carbon.CGFloat[] color = null; if (style.underlineColor !is null) color = style.underlineColor.handle; if (color is null && style.foreground !is null) color = style.foreground.handle; if (color !is null) { @@ -482,7 +482,7 @@ path.setLineWidth(2f); path.setLineCapStyle(OS.NSRoundLineCapStyle); path.setLineJoinStyle(OS.NSRoundLineJoinStyle); - path.setLineDash([1f, 3f].ptr, 2, cast(Carbon.CGFloat) 0); + path.setLineDash([1.0, 3.0].ptr, 2, cast(Carbon.CGFloat) 0); point.x = underlineX; point.y = underlineY + 0.5f; path.moveToPoint(point);