public double optenerCentimetrosHeight(double pxHeigth, FormatoA formatoA4) { double res = 0; double valorPixel = (1 * formatoA4.height) / originalHeight; res = valorPixel * (pxHeigth + (pxHeigth * porcentajeDisminuido)); return(res); }
public double optenerCentimetrosWidth(double pxWidth, FormatoA formatoA4) { double res = 0; double valorPixel = (1 * formatoA4.width) / originalWidth; res = valorPixel * (pxWidth + (pxWidth * porcentajeDisminuido)); return(res); }
public double optenerCentimetrosIA(double IApixeles, FormatoA formatoA4) { System.Diagnostics.Debug.WriteLine(" IA pixel:" + IApixeles); double res = 0; /* double areaPixeles = originalHeight * originalWidth; * double valorPixelCm = (1 * formatoA4.getArea()) / areaPixeles; * System.Diagnostics.Debug.WriteLine(" valor px:" + valorPixelCm); * System.Diagnostics.Debug.WriteLine(" porcentajeDisminuido :" + porcentajeDisminuido); * res = valorPixelCm * (IApixeles + (IApixeles * porcentajeDisminuido)); */ double dis = (IApixeles * porcentajeDisminuido); res = IApixeles; if (dis > 0) { res += dis; } System.Diagnostics.Debug.WriteLine(" IA:" + res); return(res); }