Mercurial > projects > dwt-addons
diff dwtx/draw2d/FigureUtilities.d @ 101:1082a0fc2bb8
First Draw2D example running
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 02:17:46 +0200 |
parents | 95307ad235d9 |
children |
line wrap: on
line diff
--- a/dwtx/draw2d/FigureUtilities.d Sun Aug 03 00:54:29 2008 +0200 +++ b/dwtx/draw2d/FigureUtilities.d Sun Aug 03 02:17:46 2008 +0200 @@ -36,10 +36,17 @@ private static GC gc; private static Font appliedFont; private static FontMetrics metrics; -private static Color ghostFillColor; -static this(){ - ghostFillColor = new Color(null, 31, 31, 31); +private static Color ghostFillColor_; +private static Color ghostFillColor(){ + if( ghostFillColor_ is null ){ + synchronized( FigureUtilities.classinfo ){ + if( ghostFillColor_ is null ){ + ghostFillColor_ = new Color(null, 31, 31, 31); + } + } + } + return ghostFillColor_; } /**