summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-desktop>2010-03-08 20:46:54 +0100
committerAndreas Rumpf <andreas@andreas-desktop>2010-03-08 20:46:54 +0100
commitdab64b5c0e45bfcbe914e461565dc3b1e7168e26 (patch)
tree67a47e4986722050d482aa67ad3698b0c4b5abad /tests/accept/compile
parenta2d78c562c3cba6c635f44cd0205dc68d85f2672 (diff)
downloadNim-dab64b5c0e45bfcbe914e461565dc3b1e7168e26.tar.gz
bugfix: bug499771
Diffstat (limited to 'tests/accept/compile')
-rwxr-xr-xtests/accept/compile/tconvert.nim36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/accept/compile/tconvert.nim b/tests/accept/compile/tconvert.nim
index b23afde74..f96cf2688 100755
--- a/tests/accept/compile/tconvert.nim
+++ b/tests/accept/compile/tconvert.nim
@@ -9,30 +9,30 @@ const width = 500
 const height = 500
 const outFile = "CairoTest.png"
 
-var surface = Cairo_ImageSurfaceCreate(CAIRO_FORMAT_RGB24, width, height)
-var ç = Cairo_Create(surface)
+var surface = Cairo.ImageSurfaceCreate(CAIRO.FORMAT_RGB24, width, height)
+var ç = Cairo.Create(surface)
 
-ç.Cairo_SetSourceRGB(1, 1, 1)
-ç.Cairo_Paint()
+ç.SetSourceRGB(1, 1, 1)
+ç.Paint()
 
-ç.Cairo_SetLineWidth(10)
-ç.Cairo_SetLineCap(CAIRO_LINE_CAP_ROUND)
+ç.SetLineWidth(10)
+ç.SetLineCap(CAIRO.LINE_CAP_ROUND)
 
 const count = 12
 var winc = width / count
 var hinc = width / count
 for i in 1 .. count-1:
   var amount = i / count
-  ç.Cairo_SetSourceRGB(0, 1 - amount, amount)
-  ç.Cairo_MoveTo(i * winc, hinc)
-  ç.Cairo_LineTo(width - i * winc, height - hinc)
-  ç.Cairo_Stroke()
-
-  ç.Cairo_SetSourceRGB(1 - amount, 0, amount)
-  ç.Cairo_MoveTo(winc, i * hinc)
-  ç.Cairo_LineTo(width - winc, height - i * hinc)
-  ç.Cairo_Stroke()
-
-echo(surface.Cairo_SurfaceWriteToPNG(outFile))
-surface.Cairo_SurfaceDestroy()
+  ç.SetSourceRGB(0, 1 - amount, amount)
+  ç.MoveTo(i * winc, hinc)
+  ç.LineTo(width - i * winc, height - hinc)
+  ç.Stroke()
+
+  ç.SetSourceRGB(1 - amount, 0, amount)
+  ç.MoveTo(winc, i * hinc)
+  ç.LineTo(width - winc, height - i * hinc)
+  ç.Stroke()
+
+echo(surface.WriteToPNG(outFile))
+surface.Destroy()