summaryrefslogtreecommitdiffstats
path: root/libdimensionxx/canvas.cpp
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-07-01 04:45:40 +0000
committerTavian Barnes <tavianator@gmail.com>2009-07-01 04:45:40 +0000
commitc19f7101d21353c8278dd9277dbb20a77389272d (patch)
treef9d1582e01cf754acc483f8877aa7bf217e36f1f /libdimensionxx/canvas.cpp
parent47c128a3106206038e45eb8b8abf6c712f29ac14 (diff)
downloaddimension-c19f7101d21353c8278dd9277dbb20a77389272d.tar.xz
New C++ dmnsn_scene* wrapper and raytracexx test.
Diffstat (limited to 'libdimensionxx/canvas.cpp')
-rw-r--r--libdimensionxx/canvas.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libdimensionxx/canvas.cpp b/libdimensionxx/canvas.cpp
index 35ff2fb..c8b3389 100644
--- a/libdimensionxx/canvas.cpp
+++ b/libdimensionxx/canvas.cpp
@@ -26,6 +26,10 @@ namespace Dimension
Canvas::Canvas(unsigned int width, unsigned int height)
: m_canvas(dmnsn_new_canvas(width, height)) { }
+ // Wrap an existing dmnsn_canvas*
+ Canvas::Canvas(dmnsn_canvas* canvas)
+ : m_canvas(canvas) { }
+
// Virtual destructor: delete the canvas with dmnsn_delete_canvas().
Canvas::~Canvas()
{