calculate the exakt height of the canvas