labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
}\r
\r
- updownDisplayWidth.Value = CalculateAnamorphicSizes().Width;\r
+ //updownDisplayWidth.Value = CalculateAnamorphicSizes().Width;\r
updownParWidth.Value = _sourceTitle.ParVal.Width;\r
updownParHeight.Value = _sourceTitle.ParVal.Height;\r
- _cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;\r
+ //_cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;\r
+\r
+\r
+ Size croppedDar = CalculateAnamorphicSizes();\r
+ _cachedDar = (double) croppedDar.Width/croppedDar.Height;\r
+ updownDisplayWidth.Value = croppedDar.Width;\r
}\r
}\r
\r
// DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)\r
\r
// Calculate new Height Value\r
- int modulus = 16;\r
- int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus);\r
+ int modulus;\r
+ if(!int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus))\r
+ modulus = 16;\r
\r
int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / _cachedDar);\r
int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus);\r
labelDisplaySize.Visible = true;\r
\r
check_KeepAR.Checked = true;\r
+ updownParWidth.Enabled = !check_KeepAR.Checked;\r
+ updownParHeight.Enabled = !check_KeepAR.Checked;\r
break;\r
+\r
}\r
\r
labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
double pixel_aspect_height = width;\r
\r
double disWidthLoose = (width * pixel_aspect_width / pixel_aspect_height);\r
+ if (double.IsNaN(disWidthLoose))\r
+ disWidthLoose = 0;\r
return new Size((int)disWidthLoose, (int)height);\r
case 3:\r
\r
if (remainder == 0) return value;\r
return (value + remainder);\r
}\r
+\r
+ // Hidden UI feature to drop the MaxWidth / Height with the MaxWidth/Height label is double clicked\r
+ private void lbl_max_DoubleClick(object sender, EventArgs e)\r
+ {\r
+ PresetMaximumResolution = new Size(0,0);\r
+ if (PictureSettingsChanged != null)\r
+ PictureSettingsChanged(this, new EventArgs());\r
+ }\r
}\r
}
\ No newline at end of file