What is the usage of Y coordinate in LayerToCanvasX(layer,X,Y) expression? It seems that the Y coordinate has no effect on the return value of the expression. Same goes to LayerToCanvasY,CanvasToLayerX,CanvasToLayerY.
It is necessary for calculating the correct answer when the layer or layout is rotated, since there is no longer a linear correlation between the axes. If you don't rotate anything though, I think you can ignore it, but you may as well provide it the right value in case you change your mind later.