protected static final int centimeterAsPixel(double cm,int dpi){
  return (int)Math.round(dpi * cm * 100 / 254);
}

protected static final int centimeterAsPixel ( double cm , int dpi ) { return ( int ) Math . round ( dpi * cm * 100 / 254 ) ; }
converts centimeters and returns pixels using the specified resolution .
