Browse Source

* Put the demo text on top of the copper bar, not the contrary.

tags/v0.99.beta14
Sam Hocevar sam 17 years ago
parent
commit
4acebad20b
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      csharp/test.cs

+ 10
- 10
csharp/test.cs View File

@@ -33,10 +33,10 @@ class DemoCanvas : CuculCanvas
{
startTime = DateTime.Now;

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

scroll = new CuculCanvas(new Size(message.Length, 1));
scroll.setColorAnsi(Libcucul.WHITE, Libcucul.BLACK);
scroll.setColorAnsi(Libcucul.WHITE, Libcucul.TRANSPARENT);
scroll.putStr(new Point(0, 0), message);

CuculFont f = new CuculFont(CuculFont.getList()[1]);
@@ -44,7 +44,7 @@ class DemoCanvas : CuculCanvas
int h = f.Size.Height;
image = new uint[w, h];
d = new CuculDither(32, new Size(w, h), w * 4,
0xff0000, 0xff00, 0xff, 0xff000000);
0xff00, 0xff0000, 0xff000000, 0xff);
f.Render(scroll, image, image.GetLength(0) * 4);
}

@@ -55,13 +55,6 @@ class DemoCanvas : CuculCanvas

Clear();

int w = Size.Width;
int h = Size.Height;
int x = (int)(t / 10) % (12 * w);
int y = (int)(h * (2.0 + Math.Sin(t / 200.0)) / 4);
ditherBitmap(new Rectangle(- x, h / 2 - y, w * 12, y * 2), d, image);
ditherBitmap(new Rectangle(12 * w - x, h / 2 - y, w * 12, y * 2), d, image);

setColorAnsi(Libcucul.WHITE, Libcucul.BLACK);
for(int i = 0; i < barCount; i++)
{
@@ -79,6 +72,13 @@ class DemoCanvas : CuculCanvas
drawLine(p1 + new Size(0, 2), p2 + new Size(0, 2), '-');
}

int w = Size.Width;
int h = Size.Height;
int x = (int)(t / 10) % (12 * w);
int y = (int)(h * (2.0 + Math.Sin(t / 200.0)) / 4);
ditherBitmap(new Rectangle(- x, h / 2 - y, w * 12, y * 2), d, image);
ditherBitmap(new Rectangle(12 * w - x, h / 2 - y, w * 12, y * 2), d, image);

setColorAnsi(Libcucul.WHITE, Libcucul.BLUE);
putStr(new Point(-30, -2) + Size, " -=[ Powered by libcaca ]=- ");
setColorAnsi(Libcucul.WHITE, Libcucul.BLACK);


Loading…
Cancel
Save