From e2c40b8d6cabc68eda634e103d0824fb58d5908b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 6 Jul 2009 16:36:47 +0000 Subject: Change C++ canvas import/export semantics. --- tests/raytracexx.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/raytracexx.cpp') 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; } -- cgit v1.2.3