Added a quick method for converting dimensions to pixels.