Ignore:
Timestamp:
Sep 27, 2008, 4:11:36 PM (12 years ago)
Author:
Sam Hocevar
Message:

Continuing the libcucul-libcaca merge.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/csharp/test.cs

    r2307 r2822  
    1919using System.Runtime.InteropServices;
    2020
    21 using Cucul;
    2221using Caca;
    2322
    24 class DemoCanvas : CuculCanvas
     23class DemoCanvas : CacaCanvas
    2524{
    2625    private uint[,] image;
    2726
    2827    private DateTime startTime;
    29     private CuculDither d;
    30     private CuculCanvas scroll;
     28    private CacaDither d;
     29    private CacaCanvas scroll;
    3130
    3231    public DemoCanvas()
     
    3635        string message = " --- POWERED BY LIBCACA --- OLDSCHOOL TEXT EFFECTS ARE 100% PURE WIN";
    3736
    38         scroll = new CuculCanvas(new Size(message.Length, 1));
    39         scroll.setColorAnsi(Libcucul.WHITE, Libcucul.TRANSPARENT);
     37        scroll = new CacaCanvas(new Size(message.Length, 1));
     38        scroll.setColorAnsi(Libcaca.WHITE, Libcaca.TRANSPARENT);
    4039        scroll.putStr(new Point(0, 0), message);
    4140
    42         CuculFont f = new CuculFont(CuculFont.getList()[1]);
     41        CacaFont f = new CacaFont(CacaFont.getList()[1]);
    4342        int w = f.Size.Width * message.Length;
    4443        int h = f.Size.Height;
    4544        image = new uint[w, h];
    46         d = new CuculDither(32, new Size(w, h), w * 4,
     45        d = new CacaDither(32, new Size(w, h), w * 4,
    4746                            0xff00, 0xff0000, 0xff000000, 0xff);
    4847        f.Render(scroll, image, image.GetLength(0) * 4);
     
    5655        Clear();
    5756
    58         setColorAnsi(Libcucul.WHITE, Libcucul.BLACK);
     57        setColorAnsi(Libcaca.WHITE, Libcaca.BLACK);
    5958        for(int i = 0; i < barCount; i++)
    6059        {
     
    6463            Point p2 = new Point(Size.Width - 1, (int)v);
    6564
    66             setColorAnsi((uint)(i + 9), Libcucul.BLACK);
     65            setColorAnsi((uint)(i + 9), Libcaca.BLACK);
    6766            /* drawLine is already clipped, we don't care about overflows */
    6867            drawLine(p1 + new Size(0, -2), p2 + new Size(0, -2), '-');
     
    8079        ditherBitmap(new Rectangle(12 * w - x, h / 2 - y, w * 12, y * 2), d, image);
    8180
    82         setColorAnsi(Libcucul.WHITE, Libcucul.BLUE);
     81        setColorAnsi(Libcaca.WHITE, Libcaca.BLUE);
    8382        putStr(new Point(-30, -2) + Size, " -=[ Powered by libcaca ]=- ");
    84         setColorAnsi(Libcucul.WHITE, Libcucul.BLACK);
     83        setColorAnsi(Libcaca.WHITE, Libcaca.BLACK);
    8584    }
    8685}
     
    122121        Console.WriteLine("(c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.org>");
    123122
    124         /* Instanciate a cucul canvas */
     123        /* Instanciate a caca canvas */
    125124        DemoCanvas cv = new DemoCanvas();
    126125
     
    130129        /* Random number. This is a static method,
    131130           not to be used with previous instance */
    132         Console.WriteLine("A random number: {0}", Libcucul.Rand(0, 1337));
     131        Console.WriteLine("A random number: {0}", Libcaca.Rand(0, 1337));
    133132
    134133        dp.EventLoop();
Note: See TracChangeset for help on using the changeset viewer.