public void SetUp() { layouter = new SpiralRectangleCloudLayouter( new ArchimedeanSpiral(1, 0.05f)); rectangles = new List <Rectangle>(); random = new Random(25); center = new Point(0, 0); }
private static IEnumerable <TagInfo> GetTags( int count, Func <int, string> wordGenerator, Func <int, int> fontSizeGenerator) { var layouter = new SpiralRectangleCloudLayouter(new ArchimedeanSpiral(1, 0.05f)); for (var i = 1; i <= count; i++) { var font = new Font(FontFamilyName, fontSizeGenerator(i)); var value = wordGenerator(i); var rectSize = TextRenderer.MeasureText(value, font); var rect = layouter.PutNextRectangle(rectSize); yield return(new TagInfo(value, font, rect)); } }