|
|
@@ -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); |
|
|
|