utak3r's fixes for FormExport

This commit is contained in:
zueuk 2006-04-05 11:02:26 +00:00
parent 4f76d9b2a3
commit df7d8bc7f0
2 changed files with 68 additions and 104 deletions

View File

@ -3,7 +3,7 @@ object ExportDialog: TExportDialog
Top = 276
BorderStyle = bsDialog
Caption = 'Export Flame'
ClientHeight = 325
ClientHeight = 292
ClientWidth = 419
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
@ -100,7 +100,6 @@ object ExportDialog: TExportDialog
Width = 281
Height = 21
TabOrder = 0
Text = 'txtFilename'
end
end
object GroupBox3: TGroupBox
@ -216,7 +215,10 @@ object ExportDialog: TExportDialog
'1024'
'1280'
'1600'
'2048')
'1920'
'2048'
'2560'
'3200')
end
object cbHeight: TComboBox
Left = 112
@ -234,32 +236,27 @@ object ExportDialog: TExportDialog
'768'
'1024'
'1200'
'2048')
'2048'
'2400')
end
end
object GroupBox4: TGroupBox
Left = 8
Top = 176
Width = 313
Height = 145
Height = 113
Caption = ' flam3 parameters '
TabOrder = 5
object Label6: TLabel
Left = 10
Top = 23
Width = 42
Height = 13
Caption = 'Batches:'
end
object Label7: TLabel
Left = 152
Left = 8
Top = 23
Width = 61
Height = 13
Width = 31
Height = 26
Caption = 'Buffer depth:'
WordWrap = True
end
object Label8: TLabel
Left = 10
Left = 8
Top = 55
Width = 29
Height = 13
@ -268,14 +265,14 @@ object ExportDialog: TExportDialog
object Label9: TLabel
Left = 8
Top = 80
Width = 49
Height = 25
Width = 46
Height = 26
Caption = 'Estimator radius'
WordWrap = True
end
object Label11: TLabel
Left = 8
Top = 112
Left = 160
Top = 80
Width = 46
Height = 26
Caption = 'Estimator min.'
@ -283,68 +280,41 @@ object ExportDialog: TExportDialog
end
object Label12: TLabel
Left = 160
Top = 80
Top = 48
Width = 46
Height = 26
Caption = 'Estimator curve'
WordWrap = True
end
object Label13: TLabel
Left = 160
Top = 112
Width = 47
Height = 26
Caption = 'Temporal samples'
WordWrap = True
end
object Label14: TLabel
Left = 160
Top = 48
Width = 57
Top = 16
Width = 39
Height = 26
Caption = 'Gamma tresholds'
Caption = 'Gamma treshold'
WordWrap = True
end
object txtBatches: TEdit
Left = 64
Top = 20
Width = 57
Height = 21
TabOrder = 0
Text = '1'
OnChange = txtBatchesChange
end
object udBatches: TUpDown
Left = 121
Top = 20
Width = 12
Height = 21
Associate = txtBatches
Min = 1
Max = 10000
Position = 1
TabOrder = 1
end
object cmbDepth: TComboBox
Left = 224
Left = 64
Top = 20
Width = 73
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 2
TabOrder = 0
OnChange = cmbDepthChange
Items.Strings = (
'16 bits'
'32 bits'
'64 bits')
'16-bit'
'32-bit'
'32-bit float'
'64-bit')
end
object txtStrips: TEdit
Left = 64
Top = 52
Width = 57
Height = 21
TabOrder = 3
TabOrder = 1
Text = '1'
OnChange = txtBatchesChange
end
@ -357,57 +327,48 @@ object ExportDialog: TExportDialog
Min = 1
Max = 512
Position = 1
TabOrder = 4
end
object txtJitters: TEdit
Left = 224
Top = 116
Width = 57
Height = 21
TabOrder = 5
Text = '1'
OnChange = txtJittersChange
TabOrder = 2
end
object txtEstimator: TEdit
Left = 64
Top = 84
Width = 57
Height = 21
TabOrder = 6
TabOrder = 3
Text = '5'
OnChange = txtEstimatorChange
end
object txtEstimatorMin: TEdit
Left = 64
Top = 116
Left = 224
Top = 84
Width = 57
Height = 21
TabOrder = 7
TabOrder = 4
Text = '0'
OnChange = txtEstimatorMinChange
end
object txtEstimatorCurve: TEdit
Left = 224
Top = 84
Width = 57
Height = 21
TabOrder = 8
Text = '0.6'
OnChange = txtEstimatorCurveChange
end
object txtGammaTresholds: TEdit
Left = 224
Top = 52
Width = 57
Height = 21
TabOrder = 9
TabOrder = 5
Text = '0.6'
OnChange = txtEstimatorCurveChange
end
object txtGammaTreshold: TEdit
Left = 224
Top = 20
Width = 57
Height = 21
TabOrder = 6
Text = '0.01'
OnChange = txtGammaTresholdsChange
OnChange = txtGammaTresholdChange
end
end
object chkRender: TCheckBox
Left = 328
Top = 302
Top = 270
Width = 65
Height = 17
Caption = 'Render'
@ -420,7 +381,7 @@ object ExportDialog: TExportDialog
Filter =
'JPEG Image (*.jpg)|*.jpg|PPM Image (*.ppm)|*.ppm|PNG Images (*.p' +
'ng)|*.png'
Left = 392
Top = 24
Left = 376
Top = 48
end
end

View File

@ -1,5 +1,6 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -47,9 +48,6 @@ type
cbWidth: TComboBox;
cbHeight: TComboBox;
GroupBox4: TGroupBox;
Label6: TLabel;
txtBatches: TEdit;
udBatches: TUpDown;
Label7: TLabel;
cmbDepth: TComboBox;
chkRender: TCheckBox;
@ -59,13 +57,11 @@ type
Label9: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
txtJitters: TEdit;
txtEstimator: TEdit;
txtEstimatorMin: TEdit;
txtEstimatorCurve: TEdit;
Label14: TLabel;
txtGammaTresholds: TEdit;
txtGammaTreshold: TEdit;
procedure btnBrowseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnOKClick(Sender: TObject);
@ -81,7 +77,7 @@ type
procedure txtEstimatorMinChange(Sender: TObject);
procedure txtEstimatorCurveChange(Sender: TObject);
procedure txtJittersChange(Sender: TObject);
procedure txtGammaTresholdsChange(Sender: TObject);
procedure txtGammaTresholdChange(Sender: TObject);
private
FloatFormatSettings: TFormatSettings;
public
@ -89,7 +85,7 @@ type
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
Sample_Density, Filter_Radius: double;
Estimator, EstimatorMin, EstimatorCurve: double;
GammaTresholds: double;
GammaTreshold: double;
Jitters: integer;
end;
@ -133,23 +129,24 @@ begin
ImageWidth := MainCp.Width;
ImageHeight := MainCp.Height;
txtDensity.text := FloatToStr(Sample_density);
if cmbDepth.ItemIndex <> 2 then
txtBatches.text := IntToStr(Round(Sample_density / 4));
// if cmbDepth.ItemIndex <> 2 then
// txtBatches.text := IntToStr(Round(Sample_density / 4));
txtFilterRadius.text := FloatToStr(Filter_Radius);
txtOversample.text := IntToSTr(Oversample);
udOversample.Position := Oversample;
Ratio := ImageWidth / ImageHeight;
Batches := 1;
Estimator := 5.0;
EstimatorMin := 0.0;
EstimatorCurve := 0.6;
Jitters := 1;
GammaTresholds := 0.01;
GammaTreshold := 0.01;
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
txtEstimator.Text := FloatToStr(Estimator, FloatFormatSettings);
txtEstimatorMin.Text := FloatToStr(EstimatorMin, FloatFormatSettings);
txtEstimatorCurve.Text := FloatToStr(EstimatorCurve, FloatFormatSettings);
txtJitters.Text := IntToStr(Jitters);
txtGammaTresholds.Text := FloatToStr(GammaTresholds, FloatFormatSettings);
// txtJitters.Text := IntToStr(Jitters);
txtGammaTreshold.Text := FloatToStr(GammaTreshold, FloatFormatSettings);
end;
procedure TExportDialog.btnOKClick(Sender: TObject);
@ -194,8 +191,8 @@ procedure TExportDialog.txtDensityChange(Sender: TObject);
begin
try
Sample_Density := StrToFloat(txtDensity.Text);
if cmbDepth.ItemIndex <> 2 then
txtBatches.text := IntToStr(Round(Sample_density / 4));
// if cmbDepth.ItemIndex <> 2 then
// txtBatches.text := IntToStr(Round(Sample_density / 4));
except
end;
end;
@ -222,6 +219,7 @@ end;
procedure TExportDialog.txtBatchesChange(Sender: TObject);
begin
{
if StrToInt(txtBatches.Text) > udBatches.Max then
txtBatches.Text := IntToStr(udBatches.Max);
if StrToInt(txtBatches.Text) < udBatches.Min then
@ -230,14 +228,17 @@ begin
Batches := StrToInt(txtBatches.Text);
except
end;
}
end;
procedure TExportDialog.cmbDepthChange(Sender: TObject);
begin
{
if cmbDepth.ItemIndex <> 2 then
txtBatches.text := IntToStr(Round(Sample_density / 4))
else
txtBatches.text := IntToStr(1);
}
end;
procedure TExportDialog.txtEstimatorChange(Sender: TObject);
@ -269,18 +270,20 @@ end;
procedure TExportDialog.txtJittersChange(Sender: TObject);
begin
{
Jitters := 0;
try
Jitters := StrToInt(txtJitters.Text);
except
end;
}
end;
procedure TExportDialog.txtGammaTresholdsChange(Sender: TObject);
procedure TExportDialog.txtGammaTresholdChange(Sender: TObject);
begin
GammaTresholds := 0.01;
GammaTreshold := 0.01;
try
GammaTresholds := StrToFloat(txtGammaTresholds.Text, FloatFormatSettings);
GammaTreshold := StrToFloat(txtGammaTreshold.Text, FloatFormatSettings);
except
end;
end;