Mercurial > projects > dwt-addons
comparison dwtx/draw2d/Polyline.d @ 103:2d6540440fe6
Replace static ctors with lazy init.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 17:01:51 +0200 |
parents | 95307ad235d9 |
children |
comparison
equal
deleted
inserted
replaced
102:0de61c6f08ca | 103:2d6540440fe6 |
---|---|
36 : Shape | 36 : Shape |
37 { | 37 { |
38 | 38 |
39 PointList points; | 39 PointList points; |
40 private int tolerance = 2; | 40 private int tolerance = 2; |
41 private static const Rectangle LINEBOUNDS; | 41 |
42 | 42 private static Rectangle LINEBOUNDS_; |
43 static this(){ | 43 private static Rectangle LINEBOUNDS(){ |
44 LINEBOUNDS = Rectangle.SINGLETON; | 44 if( LINEBOUNDS_ is null ){ |
45 assert( LINEBOUNDS !is null ); | 45 synchronized( Polyline.classinfo ){ |
46 if( LINEBOUNDS_ is null ){ | |
47 LINEBOUNDS_ = Rectangle.SINGLETON; | |
48 assert( LINEBOUNDS !is null ); | |
49 } | |
50 } | |
51 } | |
52 return LINEBOUNDS_; | |
46 } | 53 } |
47 | 54 |
48 this(){ | 55 this(){ |
49 points = new PointList(); | 56 points = new PointList(); |
50 setFill(false); | 57 setFill(false); |