Added method to convert dp to pixels.