private void PlaceVectors(NumberVector start) { //float angleSpan = 137.507f; float angleSpan = 360 / 72.0f; for (int i = 2; i <= 72; i++) { var vector = NumberVector.CreateForNumber(i); var distance = (vector - start).GetLength(); var position = new Vector2DF(1, 1); position.Degree = angleSpan * i; position.Length = distance * DistanceUnit; position += new Vector2DF(320, 320); var obj = new TextObject2D() { Text = i.ToString(), Font = font, Position = position, Color = vector.IsPrime() ? Helper.AccentColor1 : Helper.PlaneColor, DrawingPriority = 2, }; var size = font.CalcTextureSize(i.ToString(), WritingDirection.Horizontal); obj.CenterPosition = size.To2DF() / 2; layer.AddObject(obj); } }
public void Draw(int baseNumber) { var start = NumberVector.CreateForNumber(baseNumber); PlaceVectors(start); DrawCircle(start); }