From 0743c3f4a24b3a6d8df39bc08412444f9ae25921 Mon Sep 17 00:00:00 2001 From: scuri Date: Sat, 13 Jun 2009 20:38:51 +0000 Subject: *** empty log message *** --- html/en/samples.html | 4 ++++ test/lua/render_cd.lua | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/html/en/samples.html b/html/en/samples.html index f5fad96..e58835c 100644 --- a/html/en/samples.html +++ b/html/en/samples.html @@ -145,7 +145,11 @@ local image = im.ImageCreate(500, 500, im.RGB, im.BYTE) local canvas = image:cdCreateCanvas() -- Creates a CD_IMAGERGB canvas canvas:Activate() +canvas:Background(cd.EncodeColor(255, 255, 255)) canvas:Clear() +fgcolor = cd.EncodeColor(255, 0, 0) -- red +fgcolor = cd.EncodeAlpha(fgcolor, 50) -- semi transparent +canvas:Foreground(fgcolor) canvas:Font("Times", cd.BOLD, 24) canvas:Text(100, 100, "Test") canvas:Line(0,0,100,100) diff --git a/test/lua/render_cd.lua b/test/lua/render_cd.lua index c0fa68c..4af8a16 100644 --- a/test/lua/render_cd.lua +++ b/test/lua/render_cd.lua @@ -6,7 +6,11 @@ local image = im.ImageCreate(500, 500, im.RGB, im.BYTE) local canvas = image:cdCreateCanvas() -- Creates a CD_IMAGERGB canvas canvas:Activate() +canvas:Background(cd.EncodeColor(255, 255, 255)) canvas:Clear() +fgcolor = cd.EncodeColor(255, 0, 0) -- red +fgcolor = cd.EncodeAlpha(fgcolor, 50) -- semi transparent +canvas:Foreground(fgcolor) canvas:Font("Times", cd.BOLD, 24) canvas:Text(100, 100, "Test") canvas:Line(0,0,100,100) -- cgit v1.2.3