Exemplo n.º 1
0
    public DemoCanvas()
    {
        startTime = DateTime.Now;

        string message = " --- POWERED BY LIBCACA --- OLDSCHOOL TEXT EFFECTS ARE 100% PURE WIN";

        scroll = new Canvas(new Size(message.Length, 1));
        scroll.setColorAnsi(AnsiColor.WHITE, AnsiColor.TRANSPARENT);
        scroll.putStr(new Point(0, 0), message);

        Caca.Font f = new Caca.Font(Caca.Font.getList()[1]);
        int w = f.Size.Width * message.Length;
        int h = f.Size.Height;
        image = new uint[w, h];
        d = new Dither(32, new Size(w, h), w * 4,
                            0xff00, 0xff0000, 0xff000000, 0xff);
        f.Render(scroll, image, image.GetLength(0) * 4);
    }
Exemplo n.º 2
0
    public DemoCanvas()
    {
        startTime = DateTime.Now;

        string message = " --- POWERED BY LIBCACA --- OLDSCHOOL TEXT EFFECTS ARE 100% PURE WIN";

        scroll = new Canvas(new Size(message.Length, 1));
        scroll.setColorAnsi(AnsiColor.WHITE, AnsiColor.TRANSPARENT);
        scroll.putStr(new Point(0, 0), message);

        Caca.Font f = new Caca.Font(Caca.Font.getList()[1]);
        int       w = f.Size.Width * message.Length;
        int       h = f.Size.Height;

        image = new uint[w, h];
        d     = new Dither(32, new Size(w, h), w * 4,
                           0xff00, 0xff0000, 0xff000000, 0xff);
        f.Render(scroll, image, image.GetLength(0) * 4);
    }