implented convert.shape_to_pixels