Add functions to canvas library