- Timestamp:
- Nov 28, 2007, 8:15:07 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/csharp/test.cs
r2089 r2090 34 34 startTime = DateTime.Now; 35 35 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"; 37 37 38 38 scroll = new CuculCanvas(new Size(message.Length, 1)); 39 scroll.setColorAnsi(Libcucul.WHITE, Libcucul. BLACK);39 scroll.setColorAnsi(Libcucul.WHITE, Libcucul.TRANSPARENT); 40 40 scroll.putStr(new Point(0, 0), message); 41 41 … … 45 45 image = new uint[w, h]; 46 46 d = new CuculDither(32, new Size(w, h), w * 4, 47 0xff00 00, 0xff00, 0xff, 0xff000000);47 0xff00, 0xff0000, 0xff000000, 0xff); 48 48 f.Render(scroll, image, image.GetLength(0) * 4); 49 49 } … … 55 55 56 56 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);64 57 65 58 setColorAnsi(Libcucul.WHITE, Libcucul.BLACK); … … 79 72 drawLine(p1 + new Size(0, 2), p2 + new Size(0, 2), '-'); 80 73 } 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); 81 81 82 82 setColorAnsi(Libcucul.WHITE, Libcucul.BLUE);
Note: See TracChangeset
for help on using the changeset viewer.