New canvas drawing function