summaryrefslogtreecommitdiffstats
path: root/tests/raytracexx.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-06 16:36:47 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-06 16:36:47 +0000
commite2c40b8d6cabc68eda634e103d0824fb58d5908b (patch)
tree8b59b2f92b38821a2b130b971a775ccb1500a28c /tests/raytracexx.cpp
parent6feb3007b1abd0a59940a9d10adac2ff7de34a50 (diff)
downloaddimension-e2c40b8d6cabc68eda634e103d0824fb58d5908b.tar.xz
Change C++ canvas import/export semantics.
Diffstat (limited to 'tests/raytracexx.cpp')
-rw-r--r--tests/raytracexx.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/raytracexx.cpp b/tests/raytracexx.cpp
index 2c1d3c9..e3d55cf 100644
--- a/tests/raytracexx.cpp
+++ b/tests/raytracexx.cpp
@@ -33,8 +33,7 @@ main() {
background.filter(0.1);
// Canvas
- std::ofstream file("raytracexx.png");
- PNG_Canvas canvas(768, 480, file);
+ Canvas canvas(768, 480);
// Camera
Perspective_Camera camera(
@@ -65,8 +64,10 @@ main() {
}
// Write the canvas
- Progress wprogress = canvas.write_async();
- std::cout << "Writing PNG file: " << wprogress << std::endl;
+ std::ofstream file("raytracexx.png");
+ PNG_Writer writer(canvas, file);
+ Progress progress = writer.write_async();
+ std::cout << "Writing PNG file: " << progress << std::endl;
return EXIT_SUCCESS;
}