Merged Canvas.cpp.