Beispiel #1
0
    public void RenderComposition(ToskaComposition c)
    {
        // for each element
        // create lines
        // render into existence
        var color = RandomColor();

        foreach (var sub in c.subs)
        {
            foreach (var line in sub.lines)
            {
                RenderLine(line, color);
            }
        }
    }
Beispiel #2
0
    public ToskaComposition CreateComposition()
    {
        // 3-5 lines
        // in order layer
        // max lines -
        // variance
        var c = new ToskaComposition();

        foreach (var i in Times(5))
        {
            var sc = CreateSubCompositionCandidate();
            sc.color = black;
            sc.layer = 0;
            c.subs.Add(sc);
        }
        return(c);
    }