Changeset 2090


Ignore:
Timestamp:
Nov 28, 2007, 8:15:07 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Put the demo text on top of the copper bar, not the contrary.
File:
1 edited

Legend:

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

    r2089 r2090  
    3434        startTime = DateTime.Now;
    3535
    36         string message = "POWERED BY LIBCACA --- OLDSCHOOL TEXT EFFECTS ARE 100% PURE WIN --- ";
     36        string message = " --- POWERED BY LIBCACA --- OLDSCHOOL TEXT EFFECTS ARE 100% PURE WIN";
    3737
    3838        scroll = new CuculCanvas(new Size(message.Length, 1));
    39         scroll.setColorAnsi(Libcucul.WHITE, Libcucul.BLACK);
     39        scroll.setColorAnsi(Libcucul.WHITE, Libcucul.TRANSPARENT);
    4040        scroll.putStr(new Point(0, 0), message);
    4141
     
    4545        image = new uint[w, h];
    4646        d = new CuculDither(32, new Size(w, h), w * 4,
    47                             0xff0000, 0xff00, 0xff, 0xff000000);
     47                            0xff00, 0xff0000, 0xff000000, 0xff);
    4848        f.Render(scroll, image, image.GetLength(0) * 4);
    4949    }
     
    5555
    5656        Clear();
    57 
    58         int w = Size.Width;
    59         int h = Size.Height;
    60         int x = (int)(t / 10) % (12 * w);
    61         int y = (int)(h * (2.0 + Math.Sin(t / 200.0)) / 4);
    62         ditherBitmap(new Rectangle(- x, h / 2 - y, w * 12, y * 2), d, image);
    63         ditherBitmap(new Rectangle(12 * w - x, h / 2 - y, w * 12, y * 2), d, image);
    6457
    6558        setColorAnsi(Libcucul.WHITE, Libcucul.BLACK);
     
    7972            drawLine(p1 + new Size(0,  2), p2 + new Size(0,  2), '-');
    8073        }
     74
     75        int w = Size.Width;
     76        int h = Size.Height;
     77        int x = (int)(t / 10) % (12 * w);
     78        int y = (int)(h * (2.0 + Math.Sin(t / 200.0)) / 4);
     79        ditherBitmap(new Rectangle(- x, h / 2 - y, w * 12, y * 2), d, image);
     80        ditherBitmap(new Rectangle(12 * w - x, h / 2 - y, w * 12, y * 2), d, image);
    8181
    8282        setColorAnsi(Libcucul.WHITE, Libcucul.BLUE);
Note: See TracChangeset for help on using the changeset viewer.