get ready :-) mega commit approaching!
well, enough changes to release 2.03c... I think ;)
This commit is contained in:
		@ -1866,7 +1866,7 @@ object AboutForm: TAboutForm
 | 
				
			|||||||
  object Label1: TLabel
 | 
					  object Label1: TLabel
 | 
				
			||||||
    Left = 120
 | 
					    Left = 120
 | 
				
			||||||
    Top = 8
 | 
					    Top = 8
 | 
				
			||||||
    Width = 137
 | 
					    Width = 131
 | 
				
			||||||
    Height = 36
 | 
					    Height = 36
 | 
				
			||||||
    Caption = 'Apophysis'
 | 
					    Caption = 'Apophysis'
 | 
				
			||||||
    Font.Charset = ANSI_CHARSET
 | 
					    Font.Charset = ANSI_CHARSET
 | 
				
			||||||
@ -1877,11 +1877,11 @@ object AboutForm: TAboutForm
 | 
				
			|||||||
    ParentFont = False
 | 
					    ParentFont = False
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  object Label2: TLabel
 | 
					  object Label2: TLabel
 | 
				
			||||||
    Left = 260
 | 
					    Left = 268
 | 
				
			||||||
    Top = 24
 | 
					    Top = 24
 | 
				
			||||||
    Width = 65
 | 
					    Width = 58
 | 
				
			||||||
    Height = 13
 | 
					    Height = 13
 | 
				
			||||||
    Caption = 'Version 2.03b'
 | 
					    Caption = 'version 2.03'
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  object Label3: TLabel
 | 
					  object Label3: TLabel
 | 
				
			||||||
    Left = 120
 | 
					    Left = 120
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
  BorderIcons = [biSystemMenu, biMinimize]
 | 
					  BorderIcons = [biSystemMenu, biMinimize]
 | 
				
			||||||
  BorderStyle = bsSingle
 | 
					  BorderStyle = bsSingle
 | 
				
			||||||
  Caption = 'Adjust'
 | 
					  Caption = 'Adjust'
 | 
				
			||||||
  ClientHeight = 264
 | 
					  ClientHeight = 263
 | 
				
			||||||
  ClientWidth = 390
 | 
					  ClientWidth = 390
 | 
				
			||||||
  Color = clBtnFace
 | 
					  Color = clBtnFace
 | 
				
			||||||
  Font.Charset = DEFAULT_CHARSET
 | 
					  Font.Charset = DEFAULT_CHARSET
 | 
				
			||||||
@ -172,7 +172,7 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 133
 | 
					    Top = 133
 | 
				
			||||||
    Width = 390
 | 
					    Width = 390
 | 
				
			||||||
    Height = 131
 | 
					    Height = 130
 | 
				
			||||||
    ActivePage = TabSheet1
 | 
					    ActivePage = TabSheet1
 | 
				
			||||||
    Align = alBottom
 | 
					    Align = alBottom
 | 
				
			||||||
    TabOrder = 1
 | 
					    TabOrder = 1
 | 
				
			||||||
@ -331,13 +331,12 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
      Caption = 'Rendering'
 | 
					      Caption = 'Rendering'
 | 
				
			||||||
      ImageIndex = 1
 | 
					      ImageIndex = 1
 | 
				
			||||||
      object lblContrast: TLabel
 | 
					      object lblContrast: TLabel
 | 
				
			||||||
        Left = 8
 | 
					        Left = 4
 | 
				
			||||||
        Top = 80
 | 
					        Top = 80
 | 
				
			||||||
        Width = 93
 | 
					        Width = 69
 | 
				
			||||||
        Height = 13
 | 
					        Height = 13
 | 
				
			||||||
        Alignment = taRightJustify
 | 
					 | 
				
			||||||
        AutoSize = False
 | 
					        AutoSize = False
 | 
				
			||||||
        Caption = 'Background color:'
 | 
					        Caption = 'Background'
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object btnGamma: TSpeedButton
 | 
					      object btnGamma: TSpeedButton
 | 
				
			||||||
        Left = 4
 | 
					        Left = 4
 | 
				
			||||||
@ -375,6 +374,13 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
        ShowHint = True
 | 
					        ShowHint = True
 | 
				
			||||||
        OnClick = btnVibrancyClick
 | 
					        OnClick = btnVibrancyClick
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					      object Label1: TLabel
 | 
				
			||||||
 | 
					        Left = 236
 | 
				
			||||||
 | 
					        Top = 80
 | 
				
			||||||
 | 
					        Width = 62
 | 
				
			||||||
 | 
					        Height = 13
 | 
				
			||||||
 | 
					        Caption = 'Master Scale'
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
      object scrollGamma: TScrollBar
 | 
					      object scrollGamma: TScrollBar
 | 
				
			||||||
        Left = 72
 | 
					        Left = 72
 | 
				
			||||||
        Top = 7
 | 
					        Top = 7
 | 
				
			||||||
@ -446,9 +452,9 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
        OnKeyPress = txtVibrancyKeyPress
 | 
					        OnKeyPress = txtVibrancyKeyPress
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object ColorPanel: TPanel
 | 
					      object ColorPanel: TPanel
 | 
				
			||||||
        Left = 112
 | 
					        Left = 72
 | 
				
			||||||
        Top = 78
 | 
					        Top = 78
 | 
				
			||||||
        Width = 113
 | 
					        Width = 65
 | 
				
			||||||
        Height = 21
 | 
					        Height = 21
 | 
				
			||||||
        Cursor = crHandPoint
 | 
					        Cursor = crHandPoint
 | 
				
			||||||
        BevelOuter = bvLowered
 | 
					        BevelOuter = bvLowered
 | 
				
			||||||
@ -456,31 +462,24 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
        TabOrder = 6
 | 
					        TabOrder = 6
 | 
				
			||||||
        OnClick = ColorPanelClick
 | 
					        OnClick = ColorPanelClick
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object cbColor: TComboBox
 | 
					 | 
				
			||||||
        Left = 232
 | 
					 | 
				
			||||||
        Top = 78
 | 
					 | 
				
			||||||
        Width = 59
 | 
					 | 
				
			||||||
        Height = 21
 | 
					 | 
				
			||||||
        Enabled = False
 | 
					 | 
				
			||||||
        ItemHeight = 13
 | 
					 | 
				
			||||||
        ItemIndex = 0
 | 
					 | 
				
			||||||
        TabOrder = 7
 | 
					 | 
				
			||||||
        Text = '000000'
 | 
					 | 
				
			||||||
        Visible = False
 | 
					 | 
				
			||||||
        Items.Strings = (
 | 
					 | 
				
			||||||
          '000000'
 | 
					 | 
				
			||||||
          'FFFFFF')
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
      object chkTransparent: TCheckBox
 | 
					      object chkTransparent: TCheckBox
 | 
				
			||||||
        Left = 296
 | 
					        Left = 144
 | 
				
			||||||
        Top = 80
 | 
					        Top = 80
 | 
				
			||||||
        Width = 81
 | 
					        Width = 81
 | 
				
			||||||
        Height = 17
 | 
					        Height = 17
 | 
				
			||||||
        Caption = 'Transparent'
 | 
					        Caption = 'Transparent'
 | 
				
			||||||
        Enabled = False
 | 
					        Enabled = False
 | 
				
			||||||
        TabOrder = 8
 | 
					        TabOrder = 7
 | 
				
			||||||
        Visible = False
 | 
					        Visible = False
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					      object editPPU: TEdit
 | 
				
			||||||
 | 
					        Left = 304
 | 
				
			||||||
 | 
					        Top = 76
 | 
				
			||||||
 | 
					        Width = 75
 | 
				
			||||||
 | 
					        Height = 21
 | 
				
			||||||
 | 
					        TabOrder = 8
 | 
				
			||||||
 | 
					        OnKeyPress = editPPUKeyPress
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object TabSheet3: TTabSheet
 | 
					    object TabSheet3: TTabSheet
 | 
				
			||||||
      Caption = 'Gradient'
 | 
					      Caption = 'Gradient'
 | 
				
			||||||
@ -674,7 +673,7 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
        Left = 0
 | 
					        Left = 0
 | 
				
			||||||
        Top = 0
 | 
					        Top = 0
 | 
				
			||||||
        Width = 382
 | 
					        Width = 382
 | 
				
			||||||
        Height = 45
 | 
					        Height = 49
 | 
				
			||||||
        Align = alTop
 | 
					        Align = alTop
 | 
				
			||||||
        BevelOuter = bvLowered
 | 
					        BevelOuter = bvLowered
 | 
				
			||||||
        Color = clAppWorkSpace
 | 
					        Color = clAppWorkSpace
 | 
				
			||||||
@ -683,7 +682,7 @@ object AdjustForm: TAdjustForm
 | 
				
			|||||||
          Left = 1
 | 
					          Left = 1
 | 
				
			||||||
          Top = 1
 | 
					          Top = 1
 | 
				
			||||||
          Width = 380
 | 
					          Width = 380
 | 
				
			||||||
          Height = 43
 | 
					          Height = 47
 | 
				
			||||||
          Cursor = crHandPoint
 | 
					          Cursor = crHandPoint
 | 
				
			||||||
          Align = alClient
 | 
					          Align = alClient
 | 
				
			||||||
          PopupMenu = GradientPopup
 | 
					          PopupMenu = GradientPopup
 | 
				
			||||||
 | 
				
			|||||||
@ -61,7 +61,6 @@ type
 | 
				
			|||||||
    txtVibrancy: TEdit;
 | 
					    txtVibrancy: TEdit;
 | 
				
			||||||
    ColorPanel: TPanel;
 | 
					    ColorPanel: TPanel;
 | 
				
			||||||
    TabSheet3: TTabSheet;
 | 
					    TabSheet3: TTabSheet;
 | 
				
			||||||
    cbColor: TComboBox;
 | 
					 | 
				
			||||||
    scrollAngle: TScrollBar;
 | 
					    scrollAngle: TScrollBar;
 | 
				
			||||||
    txtAngle: TEdit;
 | 
					    txtAngle: TEdit;
 | 
				
			||||||
    btnZoom: TSpeedButton;
 | 
					    btnZoom: TSpeedButton;
 | 
				
			||||||
@ -131,6 +130,8 @@ type
 | 
				
			|||||||
    Bevel2: TBevel;
 | 
					    Bevel2: TBevel;
 | 
				
			||||||
    N8: TMenuItem;
 | 
					    N8: TMenuItem;
 | 
				
			||||||
    mnuInstantPreview: TMenuItem;
 | 
					    mnuInstantPreview: TMenuItem;
 | 
				
			||||||
 | 
					    Label1: TLabel;
 | 
				
			||||||
 | 
					    editPPU: TEdit;
 | 
				
			||||||
    procedure FormCreate(Sender: TObject);
 | 
					    procedure FormCreate(Sender: TObject);
 | 
				
			||||||
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
					    procedure FormClose(Sender: TObject; var Action: TCloseAction);
 | 
				
			||||||
    procedure FormDestroy(Sender: TObject);
 | 
					    procedure FormDestroy(Sender: TObject);
 | 
				
			||||||
@ -248,6 +249,7 @@ type
 | 
				
			|||||||
    procedure btnColorPresetClick(Sender: TObject);
 | 
					    procedure btnColorPresetClick(Sender: TObject);
 | 
				
			||||||
    procedure btnApplySizeClick(Sender: TObject);
 | 
					    procedure btnApplySizeClick(Sender: TObject);
 | 
				
			||||||
    procedure mnuInstantPreviewClick(Sender: TObject);
 | 
					    procedure mnuInstantPreviewClick(Sender: TObject);
 | 
				
			||||||
 | 
					    procedure editPPUKeyPress(Sender: TObject; var Key: Char);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private
 | 
					  private
 | 
				
			||||||
    Resetting: boolean;
 | 
					    Resetting: boolean;
 | 
				
			||||||
@ -337,7 +339,7 @@ begin
 | 
				
			|||||||
    PreviewImage.Top := 1;
 | 
					    PreviewImage.Top := 1;
 | 
				
			||||||
    PreviewImage.Left := (pw - PreviewImage.Width) div 2;
 | 
					    PreviewImage.Left := (pw - PreviewImage.Width) div 2;
 | 
				
			||||||
  end;
 | 
					  end;
 | 
				
			||||||
  AdjustScale(cp, PreviewImage.Width, PreviewImage.Height);
 | 
					  cp.AdjustScale(PreviewImage.Width, PreviewImage.Height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  cp.cmap := MainCp.cmap;
 | 
					  cp.cmap := MainCp.cmap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -361,7 +363,7 @@ begin
 | 
				
			|||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ColorPanel.color := cp.background[2] shl 16 + cp.background[1] shl 8 + cp.background[0];
 | 
					  ColorPanel.color := cp.background[2] shl 16 + cp.background[1] shl 8 + cp.background[0];
 | 
				
			||||||
  cbColor.text := IntToHex(integer(ColorPanel.Color), 6);
 | 
					  //cbColor.text := IntToHex(integer(ColorPanel.Color), 6);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GetMainWindowSize;
 | 
					  GetMainWindowSize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -373,7 +375,7 @@ begin
 | 
				
			|||||||
  BackupPal := cp.cmap;
 | 
					  BackupPal := cp.cmap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Resetting := False;
 | 
					  Resetting := False;
 | 
				
			||||||
 | 
					editPPU.Text := FloatToStr(cp.pixels_per_unit);
 | 
				
			||||||
  end; //***
 | 
					  end; //***
 | 
				
			||||||
  DrawPreview;
 | 
					  DrawPreview;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
@ -532,6 +534,13 @@ begin
 | 
				
			|||||||
        Preset[i].Width := 512;
 | 
					        Preset[i].Width := 512;
 | 
				
			||||||
        Preset[i].Height := 384;
 | 
					        Preset[i].Height := 384;
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      for i:=1 to 3 do begin
 | 
				
			||||||
 | 
					        Preset[i].Left := MainForm.Left;
 | 
				
			||||||
 | 
					        Preset[i].Top := MainForm.Top;
 | 
				
			||||||
 | 
					        Preset[i].Width := 512;
 | 
				
			||||||
 | 
					        Preset[i].Height := 384;
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
    Registry.CloseKey;
 | 
					    Registry.CloseKey;
 | 
				
			||||||
  finally
 | 
					  finally
 | 
				
			||||||
@ -898,7 +907,7 @@ begin
 | 
				
			|||||||
  if ColorDialog.Execute then
 | 
					  if ColorDialog.Execute then
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
    ColorPanel.Color := ColorDialog.Color;
 | 
					    ColorPanel.Color := ColorDialog.Color;
 | 
				
			||||||
    cbColor.text := IntToHex(integer(ColorDialog.Color), 6);   
 | 
					    //cbColor.text := IntToHex(integer(ColorDialog.Color), 6);   
 | 
				
			||||||
    col := ColorToRGB(ColorDialog.Color);
 | 
					    col := ColorToRGB(ColorDialog.Color);
 | 
				
			||||||
    cp.background[0] := col and 255;
 | 
					    cp.background[0] := col and 255;
 | 
				
			||||||
    cp.background[1] := col shr 8 and 255;
 | 
					    cp.background[1] := col shr 8 and 255;
 | 
				
			||||||
@ -1862,7 +1871,7 @@ end;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
procedure TAdjustForm.btnColorPresetClick(Sender: TObject);
 | 
					procedure TAdjustForm.btnColorPresetClick(Sender: TObject);
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  cmbPalette.ItemIndex := random(701);
 | 
					  cmbPalette.ItemIndex := Random(NRCMAPS);
 | 
				
			||||||
  cmbPaletteChange(Sender);
 | 
					  cmbPaletteChange(Sender);
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1876,5 +1885,23 @@ begin
 | 
				
			|||||||
  mnuInstantPreview.Checked := not mnuInstantPreview.Checked;
 | 
					  mnuInstantPreview.Checked := not mnuInstantPreview.Checked;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TAdjustForm.editPPUKeyPress(Sender: TObject; var Key: Char);
 | 
				
			||||||
 | 
					var
 | 
				
			||||||
 | 
					  t: double;
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  if key=#13 then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    key := #0;
 | 
				
			||||||
 | 
					    try
 | 
				
			||||||
 | 
					      t:=strtofloat(editPPU.Text);
 | 
				
			||||||
 | 
					    except
 | 
				
			||||||
 | 
					      exit;
 | 
				
			||||||
 | 
					    end;
 | 
				
			||||||
 | 
					    MainForm.UpdateUndo;
 | 
				
			||||||
 | 
					    cp.pixels_per_unit:=t;
 | 
				
			||||||
 | 
					    UpdateFlame;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end.
 | 
					end.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -56,7 +56,7 @@ begin
 | 
				
			|||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
///////////////////////////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
procedure TBaseVariation.prepare;
 | 
					procedure TBaseVariation.Prepare;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -156,11 +156,12 @@ type
 | 
				
			|||||||
    // CP-specific functions moved from unit Main 
 | 
					    // CP-specific functions moved from unit Main 
 | 
				
			||||||
    function NumXForms: integer;
 | 
					    function NumXForms: integer;
 | 
				
			||||||
    function TrianglesFromCP(var Triangles: TTriangles): integer;
 | 
					    function TrianglesFromCP(var Triangles: TTriangles): integer;
 | 
				
			||||||
 | 
					    procedure GetFromTriangles(const Triangles: TTriangles; const t: integer);
 | 
				
			||||||
    procedure EqualizeWeights;
 | 
					    procedure EqualizeWeights;
 | 
				
			||||||
    procedure NormalizeWeights;
 | 
					    procedure NormalizeWeights;
 | 
				
			||||||
    procedure RandomizeWeights;
 | 
					    procedure RandomizeWeights;
 | 
				
			||||||
    procedure ComputeWeights(Triangles: TTriangles; t: integer);
 | 
					    procedure ComputeWeights(Triangles: TTriangles; t: integer);
 | 
				
			||||||
    procedure GetFromTriangles(const Triangles: TTriangles; const t: integer);
 | 
					    procedure AdjustScale(w, h: integer);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    constructor Create;
 | 
					    constructor Create;
 | 
				
			||||||
    destructor Destroy; override;
 | 
					    destructor Destroy; override;
 | 
				
			||||||
@ -272,7 +273,7 @@ begin
 | 
				
			|||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  LoopValue := 0;
 | 
					  LoopValue := 0;
 | 
				
			||||||
  for i := 0 to 1023 do begin
 | 
					  for i := 0 to PROP_TABLE_SIZE-1 do begin
 | 
				
			||||||
    propsum := 0;
 | 
					    propsum := 0;
 | 
				
			||||||
    j := -1;
 | 
					    j := -1;
 | 
				
			||||||
    repeat
 | 
					    repeat
 | 
				
			||||||
@ -726,6 +727,7 @@ var
 | 
				
			|||||||
  CurrentXForm: integer;
 | 
					  CurrentXForm: integer;
 | 
				
			||||||
  i: integer;
 | 
					  i: integer;
 | 
				
			||||||
  OldDecimalSperator: Char;
 | 
					  OldDecimalSperator: Char;
 | 
				
			||||||
 | 
					  v: double;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  ParseValues := TStringList.Create;
 | 
					  ParseValues := TStringList.Create;
 | 
				
			||||||
  ParseValues.CommaText := AString;
 | 
					  ParseValues.CommaText := AString;
 | 
				
			||||||
@ -871,7 +873,20 @@ begin
 | 
				
			|||||||
      xform[CurrentXForm].c[2, 0] := StrToFloat(ParseValues[ParsePos]);
 | 
					      xform[CurrentXForm].c[2, 0] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
      Inc(ParsePos);
 | 
					      Inc(ParsePos);
 | 
				
			||||||
      xform[CurrentXForm].c[2, 1] := StrToFloat(ParseValues[ParsePos]);
 | 
					      xform[CurrentXForm].c[2, 1] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
    end else if AnsiCompareText(CurrentToken, 'var') = 0 then begin
 | 
					    end else if AnsiCompareText(CurrentToken, 'post') = 0 then begin
 | 
				
			||||||
 | 
					      Inc(ParsePos);
 | 
				
			||||||
 | 
					      xform[CurrentXForm].p[0, 0] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
 | 
					      Inc(ParsePos);
 | 
				
			||||||
 | 
					      xform[CurrentXForm].p[0, 1] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
 | 
					      Inc(ParsePos);
 | 
				
			||||||
 | 
					      xform[CurrentXForm].p[1, 0] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
 | 
					      Inc(ParsePos);
 | 
				
			||||||
 | 
					      xform[CurrentXForm].p[1, 1] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
 | 
					      Inc(ParsePos);
 | 
				
			||||||
 | 
					      xform[CurrentXForm].p[2, 0] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
 | 
					      Inc(ParsePos);
 | 
				
			||||||
 | 
					      xform[CurrentXForm].p[2, 1] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
 | 
					    end else if AnsiCompareText(CurrentToken, 'vars') = 0 then begin
 | 
				
			||||||
      for i := 0 to NRVAR - 1 do begin
 | 
					      for i := 0 to NRVAR - 1 do begin
 | 
				
			||||||
        xform[CurrentXForm].vars[i] := 0;
 | 
					        xform[CurrentXForm].vars[i] := 0;
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
@ -887,6 +902,24 @@ begin
 | 
				
			|||||||
        xform[CurrentXForm].vars[i] := StrToFloat(ParseValues[ParsePos]);
 | 
					        xform[CurrentXForm].vars[i] := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
        Inc(i);
 | 
					        Inc(i);
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
 | 
					    end else if AnsiCompareText(CurrentToken, 'variables') = 0 then begin
 | 
				
			||||||
 | 
					      v := 0;
 | 
				
			||||||
 | 
					      for i:= 0 to GetNrVariableNames-1 do begin
 | 
				
			||||||
 | 
					        xform[CurrentXForm].SetVariable(GetVariableNameAt(i), v);
 | 
				
			||||||
 | 
					      end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      i := 0;
 | 
				
			||||||
 | 
					      while true do begin
 | 
				
			||||||
 | 
					        if (ParsePos + 1) >= ParseValues.Count then
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        if ParseValues[ParsePos + 1][1] in ['a'..'z', 'A'..'Z'] then
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Inc(ParsePos);
 | 
				
			||||||
 | 
					        v := StrToFloat(ParseValues[ParsePos]);
 | 
				
			||||||
 | 
					        xform[CurrentXForm].SetVariable(GetVariableNameAt(i), v);
 | 
				
			||||||
 | 
					        Inc(i);
 | 
				
			||||||
 | 
					      end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    end else begin
 | 
					    end else begin
 | 
				
			||||||
      OutputDebugString(Pchar('Unknown Token: ' + CurrentToken));
 | 
					      OutputDebugString(Pchar('Unknown Token: ' + CurrentToken));
 | 
				
			||||||
@ -1251,13 +1284,14 @@ begin
 | 
				
			|||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class function TControlPoint.interpolate(cp1, cp2: TControlPoint; Time: double): TControlPoint;
 | 
					class function TControlPoint.Interpolate(cp1, cp2: TControlPoint; Time: double): TControlPoint;
 | 
				
			||||||
var
 | 
					var
 | 
				
			||||||
  c0, c1: double;
 | 
					  c0, c1: double;
 | 
				
			||||||
  i, j: integer;
 | 
					  i, j: integer;
 | 
				
			||||||
  r, s, t: array[0..2] of double;
 | 
					  r, s, t: array[0..2] of double;
 | 
				
			||||||
//  totvar: double;
 | 
					//  totvar: double;
 | 
				
			||||||
  {z,rhtime: double;}
 | 
					  {z,rhtime: double;}
 | 
				
			||||||
 | 
					  v1, v2: double;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  if (cp2.time - cp1.time) > 1E-6 then begin
 | 
					  if (cp2.time - cp1.time) > 1E-6 then begin
 | 
				
			||||||
    c0 := (cp2.time - time) / (cp2.time - cp1.time);
 | 
					    c0 := (cp2.time - time) / (cp2.time - cp1.time);
 | 
				
			||||||
@ -1319,9 +1353,18 @@ begin
 | 
				
			|||||||
  for i := 0 to NXFORMS - 1 do begin
 | 
					  for i := 0 to NXFORMS - 1 do begin
 | 
				
			||||||
    Result.xform[i].density := c0 * cp1.xform[i].density + c1 * cp2.xform[i].density;
 | 
					    Result.xform[i].density := c0 * cp1.xform[i].density + c1 * cp2.xform[i].density;
 | 
				
			||||||
    Result.xform[i].color := c0 * cp1.xform[i].color + c1 * cp2.xform[i].color;
 | 
					    Result.xform[i].color := c0 * cp1.xform[i].color + c1 * cp2.xform[i].color;
 | 
				
			||||||
    for j := 0 to NRVAR - 1 do begin
 | 
					//    for j := 0 to NRVAR - 1 do
 | 
				
			||||||
 | 
					//      Result.xform[i].vars[j] := c0 * cp1.xform[i].vars[j] + c1 * cp2.xform[i].vars[j];
 | 
				
			||||||
 | 
					    for j := 0 to NrVar-1 do
 | 
				
			||||||
 | 
					    begin
 | 
				
			||||||
      Result.xform[i].vars[j] := c0 * cp1.xform[i].vars[j] + c1 * cp2.xform[i].vars[j];
 | 
					      Result.xform[i].vars[j] := c0 * cp1.xform[i].vars[j] + c1 * cp2.xform[i].vars[j];
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
 | 
					    for j:= 0 to GetNrVariableNames-1 do begin
 | 
				
			||||||
 | 
					      cp1.xform[i].GetVariable(GetVariableNameAt(j), v1);
 | 
				
			||||||
 | 
					      cp2.xform[i].GetVariable(GetVariableNameAt(j), v2);
 | 
				
			||||||
 | 
					      v1 := c0 * v1 + c1 * v2;
 | 
				
			||||||
 | 
					      Result.xform[i].SetVariable(GetVariableNameAt(j), v1);
 | 
				
			||||||
 | 
					    end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(*
 | 
					(*
 | 
				
			||||||
    totvar := 0;
 | 
					    totvar := 0;
 | 
				
			||||||
@ -1371,6 +1414,7 @@ var
 | 
				
			|||||||
  c0, c1: double;
 | 
					  c0, c1: double;
 | 
				
			||||||
  i, j: integer;
 | 
					  i, j: integer;
 | 
				
			||||||
  r, s, t: array[0..2] of double;
 | 
					  r, s, t: array[0..2] of double;
 | 
				
			||||||
 | 
					  v1, v2: double;
 | 
				
			||||||
//  totvar: double;
 | 
					//  totvar: double;
 | 
				
			||||||
  {z,rhtime: double;}
 | 
					  {z,rhtime: double;}
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
@ -1434,8 +1478,15 @@ begin
 | 
				
			|||||||
    Result.xform[i].density := c0 * cp1.xform[i].density + c1 * cp2.xform[i].density;
 | 
					    Result.xform[i].density := c0 * cp1.xform[i].density + c1 * cp2.xform[i].density;
 | 
				
			||||||
    Result.xform[i].color := c0 * cp1.xform[i].color + c1 * cp2.xform[i].color;
 | 
					    Result.xform[i].color := c0 * cp1.xform[i].color + c1 * cp2.xform[i].color;
 | 
				
			||||||
    Result.xform[i].symmetry := c0 * cp1.xform[i].symmetry + c1 * cp2.xform[i].symmetry;
 | 
					    Result.xform[i].symmetry := c0 * cp1.xform[i].symmetry + c1 * cp2.xform[i].symmetry;
 | 
				
			||||||
    for j := 0 to NRVAR - 1 do begin
 | 
					//    for j := 0 to NrVar - 1 do
 | 
				
			||||||
 | 
					//      Result.xform[i].vars[j] := c0 * cp1.xform[i].vars[j] + c1 * cp2.xform[i].vars[j];
 | 
				
			||||||
 | 
					    for j := 0 to NrVar-1 do
 | 
				
			||||||
      Result.xform[i].vars[j] := c0 * cp1.xform[i].vars[j] + c1 * cp2.xform[i].vars[j];
 | 
					      Result.xform[i].vars[j] := c0 * cp1.xform[i].vars[j] + c1 * cp2.xform[i].vars[j];
 | 
				
			||||||
 | 
					    for j:= 0 to GetNrVariableNames-1 do begin
 | 
				
			||||||
 | 
					      cp1.xform[i].GetVariable(GetVariableNameAt(j), v1);
 | 
				
			||||||
 | 
					      cp2.xform[i].GetVariable(GetVariableNameAt(j), v2);
 | 
				
			||||||
 | 
					      v1 := c0 * v1 + c1 * v2;
 | 
				
			||||||
 | 
					      Result.xform[i].SetVariable(GetVariableNameAt(j), v1);
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
(*
 | 
					(*
 | 
				
			||||||
    totvar := 0;
 | 
					    totvar := 0;
 | 
				
			||||||
@ -1472,9 +1523,10 @@ end;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
procedure TControlPoint.SaveToStringlist(sl: TStringlist);
 | 
					procedure TControlPoint.SaveToStringlist(sl: TStringlist);
 | 
				
			||||||
var
 | 
					var
 | 
				
			||||||
  i, j: Integer;
 | 
					  i, j, k: Integer;
 | 
				
			||||||
  s: string;
 | 
					  s: string;
 | 
				
			||||||
  OldDecimalSperator: Char;
 | 
					  OldDecimalSperator: Char;
 | 
				
			||||||
 | 
					  v: double;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  OldDecimalSperator := DecimalSeparator;
 | 
					  OldDecimalSperator := DecimalSeparator;
 | 
				
			||||||
  DecimalSeparator := '.';
 | 
					  DecimalSeparator := '.';
 | 
				
			||||||
@ -1495,21 +1547,26 @@ begin
 | 
				
			|||||||
  sl.add(format('brightness %f gamma %f vibrancy %f hue_rotation %f cmap_inter %d',
 | 
					  sl.add(format('brightness %f gamma %f vibrancy %f hue_rotation %f cmap_inter %d',
 | 
				
			||||||
    [brightness * BRIGHT_ADJUST, gamma, vibrancy, hue_rotation, cmap_inter]));
 | 
					    [brightness * BRIGHT_ADJUST, gamma, vibrancy, hue_rotation, cmap_inter]));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for i := 0 to NXFORMS - 1 do begin
 | 
					  for i := 0 to NXFORMS - 1 do
 | 
				
			||||||
    if xform[i].density = 0 then
 | 
					    with xform[i] do begin
 | 
				
			||||||
      Continue;
 | 
					      if density = 0 then continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sl.add(format('xform %d density %g color %g symmetry %g', [i, xform[i].density, xform[i].color, xform[i].symmetry]));
 | 
					      sl.add(format('xform %d density %g color %g symmetry %g', [i, density, color, symmetry]));
 | 
				
			||||||
    s := 'var';
 | 
					      s := 'vars';
 | 
				
			||||||
      for j := 0 to NRVAR - 1 do begin
 | 
					      for j := 0 to NRVAR - 1 do begin
 | 
				
			||||||
      s := format('%s %g', [s, xform[i].vars[j]]);
 | 
					        s := format('%s %g', [s, vars[j]]);
 | 
				
			||||||
 | 
					      end;
 | 
				
			||||||
 | 
					      sl.add(s);
 | 
				
			||||||
 | 
					      s := 'variables';
 | 
				
			||||||
 | 
					      for j:= 0 to GetNrVariableNames-1 do begin
 | 
				
			||||||
 | 
					        GetVariable(GetVariableNameAt(j), v);
 | 
				
			||||||
 | 
					        s := format('%s %g', [s, v]);
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
      sl.add(s);
 | 
					      sl.add(s);
 | 
				
			||||||
//    sl.Add(format('coefs %f %f %f %f %f %f',
 | 
					 | 
				
			||||||
      sl.Add(format('coefs %.6f %.6f %.6f %.6f %.6f %.6f',
 | 
					      sl.Add(format('coefs %.6f %.6f %.6f %.6f %.6f %.6f',
 | 
				
			||||||
      [xform[i].c[0][0], xform[i].c[0][1],
 | 
					        [c[0][0], c[0][1], c[1][0], c[1][1], c[2][0], c[2][1]]));
 | 
				
			||||||
      xform[i].c[1][0], xform[i].c[1][1],
 | 
					      sl.Add(format('post %.6f %.6f %.6f %.6f %.6f %.6f',
 | 
				
			||||||
        xform[i].c[2][0], xform[i].c[2][1]]));
 | 
					        [p[0][0], p[0][1], p[1][0], p[1][1], p[2][0], p[2][1]]));
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  DecimalSeparator := OldDecimalSperator;
 | 
					  DecimalSeparator := OldDecimalSperator;
 | 
				
			||||||
@ -1697,7 +1754,7 @@ begin
 | 
				
			|||||||
    if xform[i].density = 0 then
 | 
					    if xform[i].density = 0 then
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for v := 23 to NrVar - 1 do
 | 
					    for v := NRLOCVAR to NrVar - 1 do
 | 
				
			||||||
      result := Result or (xform[i].vars[v] > 0);
 | 
					      result := Result or (xform[i].vars[v] > 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if result then
 | 
					    if result then
 | 
				
			||||||
@ -2007,5 +2064,15 @@ begin
 | 
				
			|||||||
  end;
 | 
					  end;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TControlPoint.AdjustScale(w, h: integer);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					//  if width >= height then
 | 
				
			||||||
 | 
					  pixels_per_unit := pixels_per_unit * w/width;
 | 
				
			||||||
 | 
					//  else
 | 
				
			||||||
 | 
					//    pixels_per_unit := pixels_per_unit * h/height;
 | 
				
			||||||
 | 
					  width := w;
 | 
				
			||||||
 | 
					  height := h;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end.
 | 
					end.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
object EditForm: TEditForm
 | 
					object EditForm: TEditForm
 | 
				
			||||||
  Left = 279
 | 
					  Left = 302
 | 
				
			||||||
  Top = 234
 | 
					  Top = 226
 | 
				
			||||||
  Width = 586
 | 
					  Width = 586
 | 
				
			||||||
  Height = 582
 | 
					  Height = 573
 | 
				
			||||||
  Caption = 'Transform Editor'
 | 
					  Caption = 'Transform Editor'
 | 
				
			||||||
  Color = clBtnFace
 | 
					  Color = clBtnFace
 | 
				
			||||||
  Constraints.MinHeight = 400
 | 
					  Constraints.MinHeight = 400
 | 
				
			||||||
@ -54,7 +54,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
  TextHeight = 13
 | 
					  TextHeight = 13
 | 
				
			||||||
  object StatusBar: TStatusBar
 | 
					  object StatusBar: TStatusBar
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 539
 | 
					    Top = 530
 | 
				
			||||||
    Width = 578
 | 
					    Width = 578
 | 
				
			||||||
    Height = 15
 | 
					    Height = 15
 | 
				
			||||||
    Panels = <
 | 
					    Panels = <
 | 
				
			||||||
@ -244,28 +244,8 @@ object EditForm: TEditForm
 | 
				
			|||||||
        ShowHint = True
 | 
					        ShowHint = True
 | 
				
			||||||
        OnClick = mnuFlipVerticalClick
 | 
					        OnClick = mnuFlipVerticalClick
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object tbFlipAllHorz: TToolButton
 | 
					 | 
				
			||||||
        Left = 324
 | 
					 | 
				
			||||||
        Top = 0
 | 
					 | 
				
			||||||
        Hint = 'Flip all triangles horizontal'
 | 
					 | 
				
			||||||
        Caption = 'Flip All Horizontal'
 | 
					 | 
				
			||||||
        ImageIndex = 12
 | 
					 | 
				
			||||||
        MenuItem = mnuHorizintalFlipAll
 | 
					 | 
				
			||||||
        ParentShowHint = False
 | 
					 | 
				
			||||||
        ShowHint = True
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
      object tbFlipAllVert: TToolButton
 | 
					 | 
				
			||||||
        Left = 349
 | 
					 | 
				
			||||||
        Top = 0
 | 
					 | 
				
			||||||
        Hint = 'Flip all triangles vertical'
 | 
					 | 
				
			||||||
        Caption = 'Flip All Vertical '
 | 
					 | 
				
			||||||
        ImageIndex = 13
 | 
					 | 
				
			||||||
        MenuItem = mnuVerticalFlipAll
 | 
					 | 
				
			||||||
        ParentShowHint = False
 | 
					 | 
				
			||||||
        ShowHint = True
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
      object ToolButton2: TToolButton
 | 
					      object ToolButton2: TToolButton
 | 
				
			||||||
        Left = 374
 | 
					        Left = 324
 | 
				
			||||||
        Top = 0
 | 
					        Top = 0
 | 
				
			||||||
        Width = 8
 | 
					        Width = 8
 | 
				
			||||||
        Caption = 'ToolButton2'
 | 
					        Caption = 'ToolButton2'
 | 
				
			||||||
@ -273,7 +253,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
        Style = tbsSeparator
 | 
					        Style = tbsSeparator
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object tbVarPreview: TToolButton
 | 
					      object tbVarPreview: TToolButton
 | 
				
			||||||
        Left = 382
 | 
					        Left = 332
 | 
				
			||||||
        Top = 0
 | 
					        Top = 0
 | 
				
			||||||
        Hint = 'Show/hide variation preview'
 | 
					        Hint = 'Show/hide variation preview'
 | 
				
			||||||
        Caption = 'Variation Preview'
 | 
					        Caption = 'Variation Preview'
 | 
				
			||||||
@ -289,14 +269,14 @@ object EditForm: TEditForm
 | 
				
			|||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 24
 | 
					    Top = 24
 | 
				
			||||||
    Width = 578
 | 
					    Width = 578
 | 
				
			||||||
    Height = 515
 | 
					    Height = 506
 | 
				
			||||||
    Align = alClient
 | 
					    Align = alClient
 | 
				
			||||||
    TabOrder = 1
 | 
					    TabOrder = 1
 | 
				
			||||||
    object Splitter1: TSplitter
 | 
					    object Splitter1: TSplitter
 | 
				
			||||||
      Left = 396
 | 
					      Left = 396
 | 
				
			||||||
      Top = 1
 | 
					      Top = 1
 | 
				
			||||||
      Width = 9
 | 
					      Width = 9
 | 
				
			||||||
      Height = 513
 | 
					      Height = 504
 | 
				
			||||||
      Align = alRight
 | 
					      Align = alRight
 | 
				
			||||||
      AutoSnap = False
 | 
					      AutoSnap = False
 | 
				
			||||||
      Beveled = True
 | 
					      Beveled = True
 | 
				
			||||||
@ -307,7 +287,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
      Left = 1
 | 
					      Left = 1
 | 
				
			||||||
      Top = 1
 | 
					      Top = 1
 | 
				
			||||||
      Width = 395
 | 
					      Width = 395
 | 
				
			||||||
      Height = 513
 | 
					      Height = 504
 | 
				
			||||||
      Align = alClient
 | 
					      Align = alClient
 | 
				
			||||||
      BevelOuter = bvNone
 | 
					      BevelOuter = bvNone
 | 
				
			||||||
      Color = clAppWorkSpace
 | 
					      Color = clAppWorkSpace
 | 
				
			||||||
@ -317,7 +297,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
      Left = 405
 | 
					      Left = 405
 | 
				
			||||||
      Top = 1
 | 
					      Top = 1
 | 
				
			||||||
      Width = 172
 | 
					      Width = 172
 | 
				
			||||||
      Height = 513
 | 
					      Height = 504
 | 
				
			||||||
      Align = alRight
 | 
					      Align = alRight
 | 
				
			||||||
      Alignment = taLeftJustify
 | 
					      Alignment = taLeftJustify
 | 
				
			||||||
      BevelOuter = bvNone
 | 
					      BevelOuter = bvNone
 | 
				
			||||||
@ -356,7 +336,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
        Left = 0
 | 
					        Left = 0
 | 
				
			||||||
        Top = 138
 | 
					        Top = 138
 | 
				
			||||||
        Width = 172
 | 
					        Width = 172
 | 
				
			||||||
        Height = 375
 | 
					        Height = 366
 | 
				
			||||||
        Align = alClient
 | 
					        Align = alClient
 | 
				
			||||||
        TabOrder = 0
 | 
					        TabOrder = 0
 | 
				
			||||||
        object lblTransform: TLabel
 | 
					        object lblTransform: TLabel
 | 
				
			||||||
@ -389,7 +369,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
          Left = 1
 | 
					          Left = 1
 | 
				
			||||||
          Top = 30
 | 
					          Top = 30
 | 
				
			||||||
          Width = 170
 | 
					          Width = 170
 | 
				
			||||||
          Height = 344
 | 
					          Height = 335
 | 
				
			||||||
          ActivePage = TriangleTab
 | 
					          ActivePage = TriangleTab
 | 
				
			||||||
          Align = alBottom
 | 
					          Align = alBottom
 | 
				
			||||||
          Anchors = [akLeft, akTop, akRight, akBottom]
 | 
					          Anchors = [akLeft, akTop, akRight, akBottom]
 | 
				
			||||||
@ -402,7 +382,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
              Left = 0
 | 
					              Left = 0
 | 
				
			||||||
              Top = 0
 | 
					              Top = 0
 | 
				
			||||||
              Width = 162
 | 
					              Width = 162
 | 
				
			||||||
              Height = 298
 | 
					              Height = 289
 | 
				
			||||||
              HorzScrollBar.Visible = False
 | 
					              HorzScrollBar.Visible = False
 | 
				
			||||||
              VertScrollBar.Smooth = True
 | 
					              VertScrollBar.Smooth = True
 | 
				
			||||||
              VertScrollBar.Style = ssFlat
 | 
					              VertScrollBar.Style = ssFlat
 | 
				
			||||||
@ -416,29 +396,29 @@ object EditForm: TEditForm
 | 
				
			|||||||
                Left = 0
 | 
					                Left = 0
 | 
				
			||||||
                Top = 0
 | 
					                Top = 0
 | 
				
			||||||
                Width = 162
 | 
					                Width = 162
 | 
				
			||||||
                Height = 277
 | 
					                Height = 281
 | 
				
			||||||
                BevelOuter = bvNone
 | 
					                BevelOuter = bvNone
 | 
				
			||||||
                TabOrder = 0
 | 
					                TabOrder = 0
 | 
				
			||||||
                object Label9: TLabel
 | 
					                object LabelB: TLabel
 | 
				
			||||||
                  Left = 4
 | 
					                  Left = 4
 | 
				
			||||||
                  Top = 32
 | 
					                  Top = 32
 | 
				
			||||||
                  Width = 10
 | 
					                  Width = 12
 | 
				
			||||||
                  Height = 13
 | 
					                  Height = 13
 | 
				
			||||||
                  Caption = 'B:'
 | 
					                  Caption = 'O:'
 | 
				
			||||||
                end
 | 
					                end
 | 
				
			||||||
                object Label7: TLabel
 | 
					                object LabelA: TLabel
 | 
				
			||||||
                  Left = 4
 | 
					                  Left = 4
 | 
				
			||||||
                  Top = 8
 | 
					                  Top = 8
 | 
				
			||||||
                  Width = 11
 | 
					                  Width = 10
 | 
				
			||||||
                  Height = 13
 | 
					                  Height = 13
 | 
				
			||||||
                  Caption = 'A:'
 | 
					                  Caption = 'X:'
 | 
				
			||||||
                end
 | 
					                end
 | 
				
			||||||
                object Label11: TLabel
 | 
					                object LabelC: TLabel
 | 
				
			||||||
                  Left = 4
 | 
					                  Left = 4
 | 
				
			||||||
                  Top = 56
 | 
					                  Top = 56
 | 
				
			||||||
                  Width = 11
 | 
					                  Width = 10
 | 
				
			||||||
                  Height = 13
 | 
					                  Height = 13
 | 
				
			||||||
                  Caption = 'C:'
 | 
					                  Caption = 'Y:'
 | 
				
			||||||
                end
 | 
					                end
 | 
				
			||||||
                object btTrgRotateRight: TSpeedButton
 | 
					                object btTrgRotateRight: TSpeedButton
 | 
				
			||||||
                  Left = 106
 | 
					                  Left = 106
 | 
				
			||||||
@ -1016,27 +996,6 @@ object EditForm: TEditForm
 | 
				
			|||||||
                  OnExit = CornerEditExit
 | 
					                  OnExit = CornerEditExit
 | 
				
			||||||
                  OnKeyPress = CornerEditKeyPress
 | 
					                  OnKeyPress = CornerEditKeyPress
 | 
				
			||||||
                end
 | 
					                end
 | 
				
			||||||
                object rgPivot: TRadioGroup
 | 
					 | 
				
			||||||
                  Left = 16
 | 
					 | 
				
			||||||
                  Top = 210
 | 
					 | 
				
			||||||
                  Width = 129
 | 
					 | 
				
			||||||
                  Height = 65
 | 
					 | 
				
			||||||
                  BiDiMode = bdLeftToRight
 | 
					 | 
				
			||||||
                  Caption = 'Triangle Pivot'
 | 
					 | 
				
			||||||
                  Columns = 2
 | 
					 | 
				
			||||||
                  Ctl3D = True
 | 
					 | 
				
			||||||
                  ItemIndex = 1
 | 
					 | 
				
			||||||
                  Items.Strings = (
 | 
					 | 
				
			||||||
                    'A'
 | 
					 | 
				
			||||||
                    'B'
 | 
					 | 
				
			||||||
                    'C'
 | 
					 | 
				
			||||||
                    'Center'
 | 
					 | 
				
			||||||
                    '( 0; 0 )')
 | 
					 | 
				
			||||||
                  ParentBiDiMode = False
 | 
					 | 
				
			||||||
                  ParentCtl3D = False
 | 
					 | 
				
			||||||
                  TabOrder = 6
 | 
					 | 
				
			||||||
                  OnClick = rgPivotClicked
 | 
					 | 
				
			||||||
                end
 | 
					 | 
				
			||||||
                object txtTrgMoveValue: TComboBox
 | 
					                object txtTrgMoveValue: TComboBox
 | 
				
			||||||
                  Left = 56
 | 
					                  Left = 56
 | 
				
			||||||
                  Top = 132
 | 
					                  Top = 132
 | 
				
			||||||
@ -1045,7 +1004,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
                  AutoComplete = False
 | 
					                  AutoComplete = False
 | 
				
			||||||
                  ItemHeight = 13
 | 
					                  ItemHeight = 13
 | 
				
			||||||
                  ItemIndex = 3
 | 
					                  ItemIndex = 3
 | 
				
			||||||
                  TabOrder = 8
 | 
					                  TabOrder = 7
 | 
				
			||||||
                  Text = '0.1'
 | 
					                  Text = '0.1'
 | 
				
			||||||
                  OnExit = txtValidateValue
 | 
					                  OnExit = txtValidateValue
 | 
				
			||||||
                  OnKeyPress = txtValKeyPress
 | 
					                  OnKeyPress = txtValKeyPress
 | 
				
			||||||
@ -1065,7 +1024,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
                  Height = 21
 | 
					                  Height = 21
 | 
				
			||||||
                  AutoComplete = False
 | 
					                  AutoComplete = False
 | 
				
			||||||
                  ItemHeight = 13
 | 
					                  ItemHeight = 13
 | 
				
			||||||
                  TabOrder = 7
 | 
					                  TabOrder = 6
 | 
				
			||||||
                  Text = '15'
 | 
					                  Text = '15'
 | 
				
			||||||
                  OnExit = txtValidateValue
 | 
					                  OnExit = txtValidateValue
 | 
				
			||||||
                  OnKeyPress = txtValKeyPress
 | 
					                  OnKeyPress = txtValKeyPress
 | 
				
			||||||
@ -1087,7 +1046,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
                  AutoComplete = False
 | 
					                  AutoComplete = False
 | 
				
			||||||
                  ItemHeight = 13
 | 
					                  ItemHeight = 13
 | 
				
			||||||
                  ItemIndex = 1
 | 
					                  ItemIndex = 1
 | 
				
			||||||
                  TabOrder = 9
 | 
					                  TabOrder = 8
 | 
				
			||||||
                  Text = '125'
 | 
					                  Text = '125'
 | 
				
			||||||
                  OnExit = txtValidateValue
 | 
					                  OnExit = txtValidateValue
 | 
				
			||||||
                  OnKeyPress = txtValKeyPress
 | 
					                  OnKeyPress = txtValKeyPress
 | 
				
			||||||
@ -1099,43 +1058,98 @@ object EditForm: TEditForm
 | 
				
			|||||||
                    '200')
 | 
					                    '200')
 | 
				
			||||||
                end
 | 
					                end
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
              object chkPreserve: TCheckBox
 | 
					              object GroupBox3: TGroupBox
 | 
				
			||||||
                Left = 30
 | 
					                Left = 8
 | 
				
			||||||
                Top = 280
 | 
					                Top = 208
 | 
				
			||||||
                Width = 105
 | 
					                Width = 146
 | 
				
			||||||
                Height = 17
 | 
					                Height = 65
 | 
				
			||||||
                Caption = 'Preserve weights'
 | 
					                Caption = 'Pivot Point'
 | 
				
			||||||
                Checked = True
 | 
					 | 
				
			||||||
                State = cbChecked
 | 
					 | 
				
			||||||
                TabOrder = 1
 | 
					                TabOrder = 1
 | 
				
			||||||
 | 
					                object btnResetPivot: TSpeedButton
 | 
				
			||||||
 | 
					                  Left = 6
 | 
				
			||||||
 | 
					                  Top = 40
 | 
				
			||||||
 | 
					                  Width = 17
 | 
				
			||||||
 | 
					                  Height = 17
 | 
				
			||||||
 | 
					                  Hint = 'Reset pivot point to (0, 0)'
 | 
				
			||||||
 | 
					                  Caption = 'R'
 | 
				
			||||||
 | 
					                  ParentShowHint = False
 | 
				
			||||||
 | 
					                  ShowHint = True
 | 
				
			||||||
 | 
					                  OnClick = btnResetPivotClick
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					                object btnPickPivot: TSpeedButton
 | 
				
			||||||
 | 
					                  Left = 122
 | 
				
			||||||
 | 
					                  Top = 40
 | 
				
			||||||
 | 
					                  Width = 17
 | 
				
			||||||
 | 
					                  Height = 17
 | 
				
			||||||
 | 
					                  Hint = 'Pick pivot point using mouse'
 | 
				
			||||||
 | 
					                  Caption = 'P'
 | 
				
			||||||
 | 
					                  ParentShowHint = False
 | 
				
			||||||
 | 
					                  ShowHint = True
 | 
				
			||||||
 | 
					                  OnClick = btnPickPivotClick
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					                object btnPivotMode: TSpeedButton
 | 
				
			||||||
 | 
					                  Left = 24
 | 
				
			||||||
 | 
					                  Top = 40
 | 
				
			||||||
 | 
					                  Width = 97
 | 
				
			||||||
 | 
					                  Height = 17
 | 
				
			||||||
 | 
					                  Hint = 'Toggle pivot point mode'
 | 
				
			||||||
 | 
					                  Caption = 'Local Pivot'
 | 
				
			||||||
 | 
					                  ParentShowHint = False
 | 
				
			||||||
 | 
					                  ShowHint = True
 | 
				
			||||||
 | 
					                  OnClick = btnPivotModeClick
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					                object editPivotY: TEdit
 | 
				
			||||||
 | 
					                  Left = 74
 | 
				
			||||||
 | 
					                  Top = 16
 | 
				
			||||||
 | 
					                  Width = 65
 | 
				
			||||||
 | 
					                  Height = 21
 | 
				
			||||||
 | 
					                  Hint = 'Pivot point coordinates in chosen coordinate system'
 | 
				
			||||||
 | 
					                  AutoSelect = False
 | 
				
			||||||
 | 
					                  ParentShowHint = False
 | 
				
			||||||
 | 
					                  ShowHint = True
 | 
				
			||||||
 | 
					                  TabOrder = 1
 | 
				
			||||||
 | 
					                  Text = '0'
 | 
				
			||||||
 | 
					                  OnExit = PivotValidate
 | 
				
			||||||
 | 
					                  OnKeyPress = PivotKeyPress
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
 | 
					                object editPivotX: TEdit
 | 
				
			||||||
 | 
					                  Left = 6
 | 
				
			||||||
 | 
					                  Top = 16
 | 
				
			||||||
 | 
					                  Width = 65
 | 
				
			||||||
 | 
					                  Height = 21
 | 
				
			||||||
 | 
					                  Hint = 'Pivot point coordinates in chosen coordinate system'
 | 
				
			||||||
 | 
					                  AutoSelect = False
 | 
				
			||||||
 | 
					                  ParentShowHint = False
 | 
				
			||||||
 | 
					                  ShowHint = True
 | 
				
			||||||
 | 
					                  TabOrder = 0
 | 
				
			||||||
 | 
					                  Text = '0'
 | 
				
			||||||
 | 
					                  OnExit = PivotValidate
 | 
				
			||||||
 | 
					                  OnKeyPress = PivotKeyPress
 | 
				
			||||||
 | 
					                end
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
          end
 | 
					          end
 | 
				
			||||||
          object tabXForm: TTabSheet
 | 
					          object tabXForm: TTabSheet
 | 
				
			||||||
            Caption = 'Transform'
 | 
					            Caption = 'Transform'
 | 
				
			||||||
            object Label6: TLabel
 | 
					            object Label6: TLabel
 | 
				
			||||||
              Left = 36
 | 
					              Left = 10
 | 
				
			||||||
              Top = 100
 | 
					              Top = 126
 | 
				
			||||||
              Width = 38
 | 
					              Width = 38
 | 
				
			||||||
              Height = 13
 | 
					              Height = 13
 | 
				
			||||||
 | 
					              Hint = '"weight" is the probability of this transform to be applied'
 | 
				
			||||||
              Caption = 'Weight:'
 | 
					              Caption = 'Weight:'
 | 
				
			||||||
            end
 | 
					              ParentShowHint = False
 | 
				
			||||||
            object Label29: TLabel
 | 
					              ShowHint = True
 | 
				
			||||||
              Left = 36
 | 
					 | 
				
			||||||
              Top = 124
 | 
					 | 
				
			||||||
              Width = 52
 | 
					 | 
				
			||||||
              Height = 13
 | 
					 | 
				
			||||||
              Caption = 'Symmetry:'
 | 
					 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object btnResetCoefs: TSpeedButton
 | 
					            object btnResetCoefs: TSpeedButton
 | 
				
			||||||
              Left = 8
 | 
					              Left = 8
 | 
				
			||||||
              Top = 148
 | 
					              Top = 76
 | 
				
			||||||
              Width = 145
 | 
					              Width = 145
 | 
				
			||||||
              Height = 22
 | 
					              Height = 22
 | 
				
			||||||
              Hint = 'Reset all vectors to default'
 | 
					              Hint = 'Reset all vectors to default position'
 | 
				
			||||||
              Caption = 'Reset Coefs'
 | 
					              Caption = 'Reset transform'
 | 
				
			||||||
              ParentShowHint = False
 | 
					              ParentShowHint = False
 | 
				
			||||||
              ShowHint = False
 | 
					              ShowHint = True
 | 
				
			||||||
              OnClick = mnuResetClick
 | 
					              OnClick = mnuResetClick
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object btnXcoefs: TSpeedButton
 | 
					            object btnXcoefs: TSpeedButton
 | 
				
			||||||
@ -1143,10 +1157,10 @@ object EditForm: TEditForm
 | 
				
			|||||||
              Top = 4
 | 
					              Top = 4
 | 
				
			||||||
              Width = 25
 | 
					              Width = 25
 | 
				
			||||||
              Height = 21
 | 
					              Height = 21
 | 
				
			||||||
              Hint = 'Reset point A'
 | 
					              Hint = 'Reset vector X'
 | 
				
			||||||
              Caption = 'X'
 | 
					              Caption = 'X'
 | 
				
			||||||
              ParentShowHint = False
 | 
					              ParentShowHint = False
 | 
				
			||||||
              ShowHint = False
 | 
					              ShowHint = True
 | 
				
			||||||
              OnClick = btnXcoefsClick
 | 
					              OnClick = btnXcoefsClick
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object btnYcoefs: TSpeedButton
 | 
					            object btnYcoefs: TSpeedButton
 | 
				
			||||||
@ -1154,10 +1168,10 @@ object EditForm: TEditForm
 | 
				
			|||||||
              Top = 28
 | 
					              Top = 28
 | 
				
			||||||
              Width = 25
 | 
					              Width = 25
 | 
				
			||||||
              Height = 21
 | 
					              Height = 21
 | 
				
			||||||
              Hint = 'Reset point C'
 | 
					              Hint = 'Reset vector Y'
 | 
				
			||||||
              Caption = 'Y'
 | 
					              Caption = 'Y'
 | 
				
			||||||
              ParentShowHint = False
 | 
					              ParentShowHint = False
 | 
				
			||||||
              ShowHint = False
 | 
					              ShowHint = True
 | 
				
			||||||
              OnClick = btnYcoefsClick
 | 
					              OnClick = btnYcoefsClick
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object btnOcoefs: TSpeedButton
 | 
					            object btnOcoefs: TSpeedButton
 | 
				
			||||||
@ -1165,33 +1179,99 @@ object EditForm: TEditForm
 | 
				
			|||||||
              Top = 52
 | 
					              Top = 52
 | 
				
			||||||
              Width = 25
 | 
					              Width = 25
 | 
				
			||||||
              Height = 21
 | 
					              Height = 21
 | 
				
			||||||
              Hint = 'Reset point B'
 | 
					              Hint = 'Reset vector O'
 | 
				
			||||||
              Caption = 'O'
 | 
					              Caption = 'O'
 | 
				
			||||||
              ParentShowHint = False
 | 
					              ParentShowHint = False
 | 
				
			||||||
              ShowHint = False
 | 
					              ShowHint = True
 | 
				
			||||||
              OnClick = btnOcoefsClick
 | 
					              OnClick = btnOcoefsClick
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object btnCoefsRect: TSpeedButton
 | 
					            object btnCoefsRect: TSpeedButton
 | 
				
			||||||
              Left = 8
 | 
					              Left = 8
 | 
				
			||||||
              Top = 76
 | 
					              Top = 101
 | 
				
			||||||
              Width = 71
 | 
					              Width = 71
 | 
				
			||||||
              Height = 17
 | 
					              Height = 17
 | 
				
			||||||
 | 
					              Hint = 'Show vectors in rectangular (cartesian) coordinates'
 | 
				
			||||||
              GroupIndex = 1
 | 
					              GroupIndex = 1
 | 
				
			||||||
              Down = True
 | 
					              Down = True
 | 
				
			||||||
              Caption = 'Rectangular'
 | 
					              Caption = 'Rectangular'
 | 
				
			||||||
              Flat = True
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
              OnClick = btnCoefsModeClick
 | 
					              OnClick = btnCoefsModeClick
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object btnCoefsPolar: TSpeedButton
 | 
					            object btnCoefsPolar: TSpeedButton
 | 
				
			||||||
              Left = 82
 | 
					              Left = 82
 | 
				
			||||||
              Top = 76
 | 
					              Top = 101
 | 
				
			||||||
              Width = 71
 | 
					              Width = 71
 | 
				
			||||||
              Height = 17
 | 
					              Height = 17
 | 
				
			||||||
 | 
					              Hint = 'Show vectors in polar coordinates'
 | 
				
			||||||
              GroupIndex = 1
 | 
					              GroupIndex = 1
 | 
				
			||||||
              Caption = 'Polar (deg)'
 | 
					              Caption = 'Polar (deg)'
 | 
				
			||||||
              Flat = True
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
              OnClick = btnCoefsModeClick
 | 
					              OnClick = btnCoefsModeClick
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
 | 
					            object btnXpost: TSpeedButton
 | 
				
			||||||
 | 
					              Left = 8
 | 
				
			||||||
 | 
					              Top = 188
 | 
				
			||||||
 | 
					              Width = 25
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              Hint = 'Reset vector X'
 | 
				
			||||||
 | 
					              Caption = 'X'
 | 
				
			||||||
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
 | 
					              OnClick = btnXpostClick
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object btnYpost: TSpeedButton
 | 
				
			||||||
 | 
					              Left = 8
 | 
				
			||||||
 | 
					              Top = 212
 | 
				
			||||||
 | 
					              Width = 25
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              Hint = 'Reset vector Y'
 | 
				
			||||||
 | 
					              Caption = 'Y'
 | 
				
			||||||
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
 | 
					              OnClick = btnYpostClick
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object btnOpost: TSpeedButton
 | 
				
			||||||
 | 
					              Left = 8
 | 
				
			||||||
 | 
					              Top = 236
 | 
				
			||||||
 | 
					              Width = 25
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              Hint = 'Reset vector O'
 | 
				
			||||||
 | 
					              Caption = 'O'
 | 
				
			||||||
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
 | 
					              OnClick = btnOpostClick
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object btnResetPostXForm: TSpeedButton
 | 
				
			||||||
 | 
					              Left = 8
 | 
				
			||||||
 | 
					              Top = 164
 | 
				
			||||||
 | 
					              Width = 145
 | 
				
			||||||
 | 
					              Height = 22
 | 
				
			||||||
 | 
					              Hint = 'Reset post-transform vectors to defaults'
 | 
				
			||||||
 | 
					              Caption = 'Reset post-transform'
 | 
				
			||||||
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
 | 
					              OnClick = btnResetPostXFormClick
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object btnSwapXforms: TSpeedButton
 | 
				
			||||||
 | 
					              Left = 8
 | 
				
			||||||
 | 
					              Top = 260
 | 
				
			||||||
 | 
					              Width = 145
 | 
				
			||||||
 | 
					              Height = 22
 | 
				
			||||||
 | 
					              Hint = 'Swap Xform with PostXform'
 | 
				
			||||||
 | 
					              Caption = '[ Xform <-> PostXform ]'
 | 
				
			||||||
 | 
					              Flat = True
 | 
				
			||||||
 | 
					              Font.Charset = ANSI_CHARSET
 | 
				
			||||||
 | 
					              Font.Color = clWindowText
 | 
				
			||||||
 | 
					              Font.Height = -11
 | 
				
			||||||
 | 
					              Font.Name = 'Tahoma'
 | 
				
			||||||
 | 
					              Font.Style = []
 | 
				
			||||||
 | 
					              ParentFont = False
 | 
				
			||||||
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
 | 
					              OnClick = btnSwapXformsClick
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
            object txtA: TEdit
 | 
					            object txtA: TEdit
 | 
				
			||||||
              Left = 36
 | 
					              Left = 36
 | 
				
			||||||
              Top = 4
 | 
					              Top = 4
 | 
				
			||||||
@ -1254,7 +1334,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
            end
 | 
					            end
 | 
				
			||||||
            object txtP: TEdit
 | 
					            object txtP: TEdit
 | 
				
			||||||
              Left = 96
 | 
					              Left = 96
 | 
				
			||||||
              Top = 96
 | 
					              Top = 122
 | 
				
			||||||
              Width = 57
 | 
					              Width = 57
 | 
				
			||||||
              Height = 21
 | 
					              Height = 21
 | 
				
			||||||
              TabOrder = 6
 | 
					              TabOrder = 6
 | 
				
			||||||
@ -1262,15 +1342,81 @@ object EditForm: TEditForm
 | 
				
			|||||||
              OnExit = txtPExit
 | 
					              OnExit = txtPExit
 | 
				
			||||||
              OnKeyPress = txtPKeyPress
 | 
					              OnKeyPress = txtPKeyPress
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object txtSymmetry: TEdit
 | 
					            object chkPreserve: TCheckBox
 | 
				
			||||||
              Left = 96
 | 
					              Left = 8
 | 
				
			||||||
              Top = 120
 | 
					              Top = 145
 | 
				
			||||||
 | 
					              Width = 145
 | 
				
			||||||
 | 
					              Height = 17
 | 
				
			||||||
 | 
					              Hint = 
 | 
				
			||||||
 | 
					                'Keep this checked if you don'#39't want all weights to be recalculat' +
 | 
				
			||||||
 | 
					                'ed to screw up all your flame :-)'
 | 
				
			||||||
 | 
					              Alignment = taLeftJustify
 | 
				
			||||||
 | 
					              Caption = 'Preserve weights'
 | 
				
			||||||
 | 
					              Checked = True
 | 
				
			||||||
 | 
					              ParentShowHint = False
 | 
				
			||||||
 | 
					              ShowHint = True
 | 
				
			||||||
 | 
					              State = cbChecked
 | 
				
			||||||
 | 
					              TabOrder = 7
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object txtPost00: TEdit
 | 
				
			||||||
 | 
					              Left = 36
 | 
				
			||||||
 | 
					              Top = 188
 | 
				
			||||||
              Width = 57
 | 
					              Width = 57
 | 
				
			||||||
              Height = 21
 | 
					              Height = 21
 | 
				
			||||||
              TabOrder = 7
 | 
					              TabOrder = 8
 | 
				
			||||||
              Text = '0'
 | 
					              Text = '0'
 | 
				
			||||||
              OnExit = txtSymmetryExit
 | 
					              OnExit = PostCoefValidate
 | 
				
			||||||
              OnKeyPress = txtSymmetryKeyPress
 | 
					              OnKeyPress = PostCoefKeypress
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object txtPost01: TEdit
 | 
				
			||||||
 | 
					              Left = 96
 | 
				
			||||||
 | 
					              Top = 188
 | 
				
			||||||
 | 
					              Width = 57
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              TabOrder = 9
 | 
				
			||||||
 | 
					              Text = '0'
 | 
				
			||||||
 | 
					              OnExit = PostCoefValidate
 | 
				
			||||||
 | 
					              OnKeyPress = PostCoefKeypress
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object txtPost10: TEdit
 | 
				
			||||||
 | 
					              Left = 36
 | 
				
			||||||
 | 
					              Top = 212
 | 
				
			||||||
 | 
					              Width = 57
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              TabOrder = 10
 | 
				
			||||||
 | 
					              Text = '0'
 | 
				
			||||||
 | 
					              OnExit = PostCoefValidate
 | 
				
			||||||
 | 
					              OnKeyPress = PostCoefKeypress
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object txtPost11: TEdit
 | 
				
			||||||
 | 
					              Left = 96
 | 
				
			||||||
 | 
					              Top = 212
 | 
				
			||||||
 | 
					              Width = 57
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              TabOrder = 11
 | 
				
			||||||
 | 
					              Text = '0'
 | 
				
			||||||
 | 
					              OnExit = PostCoefValidate
 | 
				
			||||||
 | 
					              OnKeyPress = PostCoefKeypress
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object txtPost20: TEdit
 | 
				
			||||||
 | 
					              Left = 36
 | 
				
			||||||
 | 
					              Top = 236
 | 
				
			||||||
 | 
					              Width = 57
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              TabOrder = 12
 | 
				
			||||||
 | 
					              Text = '0'
 | 
				
			||||||
 | 
					              OnExit = PostCoefValidate
 | 
				
			||||||
 | 
					              OnKeyPress = PostCoefKeypress
 | 
				
			||||||
 | 
					            end
 | 
				
			||||||
 | 
					            object txtPost21: TEdit
 | 
				
			||||||
 | 
					              Left = 96
 | 
				
			||||||
 | 
					              Top = 236
 | 
				
			||||||
 | 
					              Width = 57
 | 
				
			||||||
 | 
					              Height = 21
 | 
				
			||||||
 | 
					              TabOrder = 13
 | 
				
			||||||
 | 
					              Text = '0'
 | 
				
			||||||
 | 
					              OnExit = PostCoefValidate
 | 
				
			||||||
 | 
					              OnKeyPress = PostCoefKeypress
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
          end
 | 
					          end
 | 
				
			||||||
          object tabVariations: TTabSheet
 | 
					          object tabVariations: TTabSheet
 | 
				
			||||||
@ -1279,7 +1425,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
              Left = 0
 | 
					              Left = 0
 | 
				
			||||||
              Top = 0
 | 
					              Top = 0
 | 
				
			||||||
              Width = 162
 | 
					              Width = 162
 | 
				
			||||||
              Height = 298
 | 
					              Height = 289
 | 
				
			||||||
              Align = alClient
 | 
					              Align = alClient
 | 
				
			||||||
              ScrollBars = ssVertical
 | 
					              ScrollBars = ssVertical
 | 
				
			||||||
              TabOrder = 0
 | 
					              TabOrder = 0
 | 
				
			||||||
@ -1305,7 +1451,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
              Left = 0
 | 
					              Left = 0
 | 
				
			||||||
              Top = 0
 | 
					              Top = 0
 | 
				
			||||||
              Width = 162
 | 
					              Width = 162
 | 
				
			||||||
              Height = 298
 | 
					              Height = 289
 | 
				
			||||||
              Align = alClient
 | 
					              Align = alClient
 | 
				
			||||||
              ScrollBars = ssVertical
 | 
					              ScrollBars = ssVertical
 | 
				
			||||||
              TabOrder = 0
 | 
					              TabOrder = 0
 | 
				
			||||||
@ -1331,9 +1477,16 @@ object EditForm: TEditForm
 | 
				
			|||||||
              Left = 8
 | 
					              Left = 8
 | 
				
			||||||
              Top = 2
 | 
					              Top = 2
 | 
				
			||||||
              Width = 145
 | 
					              Width = 145
 | 
				
			||||||
              Height = 71
 | 
					              Height = 100
 | 
				
			||||||
              Caption = 'Transform color'
 | 
					              Caption = 'Transform color'
 | 
				
			||||||
              TabOrder = 0
 | 
					              TabOrder = 0
 | 
				
			||||||
 | 
					              object Label29: TLabel
 | 
				
			||||||
 | 
					                Left = 10
 | 
				
			||||||
 | 
					                Top = 72
 | 
				
			||||||
 | 
					                Width = 52
 | 
				
			||||||
 | 
					                Height = 13
 | 
				
			||||||
 | 
					                Caption = 'Symmetry:'
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
              object scrlXFormColor: TScrollBar
 | 
					              object scrlXFormColor: TScrollBar
 | 
				
			||||||
                Left = 8
 | 
					                Left = 8
 | 
				
			||||||
                Top = 46
 | 
					                Top = 46
 | 
				
			||||||
@ -1363,67 +1516,43 @@ object EditForm: TEditForm
 | 
				
			|||||||
                OnExit = txtXFormColorExit
 | 
					                OnExit = txtXFormColorExit
 | 
				
			||||||
                OnKeyPress = txtXFormColorKeyPress
 | 
					                OnKeyPress = txtXFormColorKeyPress
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
 | 
					              object txtSymmetry: TComboBox
 | 
				
			||||||
 | 
					                Left = 80
 | 
				
			||||||
 | 
					                Top = 70
 | 
				
			||||||
 | 
					                Width = 57
 | 
				
			||||||
 | 
					                Height = 21
 | 
				
			||||||
 | 
					                ItemHeight = 13
 | 
				
			||||||
 | 
					                ItemIndex = 0
 | 
				
			||||||
 | 
					                TabOrder = 3
 | 
				
			||||||
 | 
					                Text = '0'
 | 
				
			||||||
 | 
					                OnExit = txtSymmetryExit
 | 
				
			||||||
 | 
					                OnKeyPress = txtSymmetryKeyPress
 | 
				
			||||||
 | 
					                Items.Strings = (
 | 
				
			||||||
 | 
					                  '0'
 | 
				
			||||||
 | 
					                  '1')
 | 
				
			||||||
 | 
					              end
 | 
				
			||||||
            end
 | 
					            end
 | 
				
			||||||
            object GroupBox2: TGroupBox
 | 
					            object GroupBox2: TGroupBox
 | 
				
			||||||
              Left = 8
 | 
					              Left = 8
 | 
				
			||||||
              Top = 77
 | 
					              Top = 108
 | 
				
			||||||
              Width = 145
 | 
					              Width = 145
 | 
				
			||||||
              Height = 212
 | 
					              Height = 137
 | 
				
			||||||
              Caption = 'Graph'
 | 
					              Caption = 'Graph'
 | 
				
			||||||
              TabOrder = 1
 | 
					              TabOrder = 1
 | 
				
			||||||
              object Label20: TLabel
 | 
					 | 
				
			||||||
                Left = 8
 | 
					 | 
				
			||||||
                Top = 56
 | 
					 | 
				
			||||||
                Width = 56
 | 
					 | 
				
			||||||
                Height = 13
 | 
					 | 
				
			||||||
                Caption = 'Background'
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object Label21: TLabel
 | 
					 | 
				
			||||||
                Left = 8
 | 
					 | 
				
			||||||
                Top = 96
 | 
					 | 
				
			||||||
                Width = 50
 | 
					 | 
				
			||||||
                Height = 13
 | 
					 | 
				
			||||||
                Caption = 'Reference'
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object Label8: TLabel
 | 
					 | 
				
			||||||
                Left = 75
 | 
					 | 
				
			||||||
                Top = 56
 | 
					 | 
				
			||||||
                Width = 50
 | 
					 | 
				
			||||||
                Height = 13
 | 
					 | 
				
			||||||
                Caption = 'Grid colors'
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object Label10: TLabel
 | 
					 | 
				
			||||||
                Left = 75
 | 
					 | 
				
			||||||
                Top = 96
 | 
					 | 
				
			||||||
                Width = 36
 | 
					 | 
				
			||||||
                Height = 13
 | 
					 | 
				
			||||||
                Caption = 'Helpers'
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object Label1: TLabel
 | 
					              object Label1: TLabel
 | 
				
			||||||
                Left = 8
 | 
					                Left = 8
 | 
				
			||||||
                Top = 136
 | 
					                Top = 56
 | 
				
			||||||
                Width = 83
 | 
					                Width = 83
 | 
				
			||||||
                Height = 13
 | 
					                Height = 13
 | 
				
			||||||
                Caption = 'Variation preview'
 | 
					                Caption = 'Variation preview'
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
              object pnlBackColor: TPanel
 | 
					 | 
				
			||||||
                Left = 8
 | 
					 | 
				
			||||||
                Top = 72
 | 
					 | 
				
			||||||
                Width = 62
 | 
					 | 
				
			||||||
                Height = 17
 | 
					 | 
				
			||||||
                Cursor = crHandPoint
 | 
					 | 
				
			||||||
                BevelOuter = bvLowered
 | 
					 | 
				
			||||||
                Color = clBlack
 | 
					 | 
				
			||||||
                TabOrder = 0
 | 
					 | 
				
			||||||
                OnClick = pnlBackColorClick
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object chkUseXFormColor: TCheckBox
 | 
					              object chkUseXFormColor: TCheckBox
 | 
				
			||||||
                Left = 8
 | 
					                Left = 8
 | 
				
			||||||
                Top = 16
 | 
					                Top = 16
 | 
				
			||||||
                Width = 129
 | 
					                Width = 129
 | 
				
			||||||
                Height = 17
 | 
					                Height = 17
 | 
				
			||||||
                Caption = 'Use transform color'
 | 
					                Caption = 'Use transform color'
 | 
				
			||||||
                TabOrder = 1
 | 
					                TabOrder = 0
 | 
				
			||||||
                OnClick = chkUseXFormColorClick
 | 
					                OnClick = chkUseXFormColorClick
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
              object chkHelpers: TCheckBox
 | 
					              object chkHelpers: TCheckBox
 | 
				
			||||||
@ -1434,56 +1563,12 @@ object EditForm: TEditForm
 | 
				
			|||||||
                Caption = 'Helper lines'
 | 
					                Caption = 'Helper lines'
 | 
				
			||||||
                Checked = True
 | 
					                Checked = True
 | 
				
			||||||
                State = cbChecked
 | 
					                State = cbChecked
 | 
				
			||||||
                TabOrder = 2
 | 
					                TabOrder = 1
 | 
				
			||||||
                OnClick = chkHelpersClick
 | 
					                OnClick = chkHelpersClick
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
              object pnlReference: TPanel
 | 
					 | 
				
			||||||
                Left = 8
 | 
					 | 
				
			||||||
                Top = 112
 | 
					 | 
				
			||||||
                Width = 62
 | 
					 | 
				
			||||||
                Height = 17
 | 
					 | 
				
			||||||
                Cursor = crHandPoint
 | 
					 | 
				
			||||||
                BevelOuter = bvLowered
 | 
					 | 
				
			||||||
                Color = clGray
 | 
					 | 
				
			||||||
                TabOrder = 3
 | 
					 | 
				
			||||||
                OnClick = pnlReferenceClick
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object pnlGridColor1: TPanel
 | 
					 | 
				
			||||||
                Left = 75
 | 
					 | 
				
			||||||
                Top = 72
 | 
					 | 
				
			||||||
                Width = 29
 | 
					 | 
				
			||||||
                Height = 17
 | 
					 | 
				
			||||||
                Cursor = crHandPoint
 | 
					 | 
				
			||||||
                BevelOuter = bvLowered
 | 
					 | 
				
			||||||
                Color = clBlack
 | 
					 | 
				
			||||||
                TabOrder = 4
 | 
					 | 
				
			||||||
                OnClick = pnlGridColor1Click
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object pnlGridColor2: TPanel
 | 
					 | 
				
			||||||
                Left = 108
 | 
					 | 
				
			||||||
                Top = 72
 | 
					 | 
				
			||||||
                Width = 29
 | 
					 | 
				
			||||||
                Height = 17
 | 
					 | 
				
			||||||
                Cursor = crHandPoint
 | 
					 | 
				
			||||||
                BevelOuter = bvLowered
 | 
					 | 
				
			||||||
                Color = clBlack
 | 
					 | 
				
			||||||
                TabOrder = 5
 | 
					 | 
				
			||||||
                OnClick = pnlGridColor2Click
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object pnlHelpersColor: TPanel
 | 
					 | 
				
			||||||
                Left = 75
 | 
					 | 
				
			||||||
                Top = 112
 | 
					 | 
				
			||||||
                Width = 62
 | 
					 | 
				
			||||||
                Height = 17
 | 
					 | 
				
			||||||
                Cursor = crHandPoint
 | 
					 | 
				
			||||||
                BevelOuter = bvLowered
 | 
					 | 
				
			||||||
                Color = clGray
 | 
					 | 
				
			||||||
                TabOrder = 6
 | 
					 | 
				
			||||||
                OnClick = pnlHelpersColorClick
 | 
					 | 
				
			||||||
              end
 | 
					 | 
				
			||||||
              object trkVarPreviewDensity: TTrackBar
 | 
					              object trkVarPreviewDensity: TTrackBar
 | 
				
			||||||
                Left = 8
 | 
					                Left = 8
 | 
				
			||||||
                Top = 184
 | 
					                Top = 104
 | 
				
			||||||
                Width = 65
 | 
					                Width = 65
 | 
				
			||||||
                Height = 25
 | 
					                Height = 25
 | 
				
			||||||
                Max = 5
 | 
					                Max = 5
 | 
				
			||||||
@ -1492,14 +1577,14 @@ object EditForm: TEditForm
 | 
				
			|||||||
                PageSize = 1
 | 
					                PageSize = 1
 | 
				
			||||||
                Position = 2
 | 
					                Position = 2
 | 
				
			||||||
                ShowHint = True
 | 
					                ShowHint = True
 | 
				
			||||||
                TabOrder = 7
 | 
					                TabOrder = 2
 | 
				
			||||||
                TabStop = False
 | 
					                TabStop = False
 | 
				
			||||||
                ThumbLength = 15
 | 
					                ThumbLength = 15
 | 
				
			||||||
                OnChange = trkVarPreviewDensityChange
 | 
					                OnChange = trkVarPreviewDensityChange
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
              object trkVarPreviewRange: TTrackBar
 | 
					              object trkVarPreviewRange: TTrackBar
 | 
				
			||||||
                Left = 8
 | 
					                Left = 8
 | 
				
			||||||
                Top = 152
 | 
					                Top = 72
 | 
				
			||||||
                Width = 129
 | 
					                Width = 129
 | 
				
			||||||
                Height = 25
 | 
					                Height = 25
 | 
				
			||||||
                Min = 1
 | 
					                Min = 1
 | 
				
			||||||
@ -1507,14 +1592,14 @@ object EditForm: TEditForm
 | 
				
			|||||||
                PageSize = 1
 | 
					                PageSize = 1
 | 
				
			||||||
                Position = 2
 | 
					                Position = 2
 | 
				
			||||||
                ShowHint = True
 | 
					                ShowHint = True
 | 
				
			||||||
                TabOrder = 8
 | 
					                TabOrder = 3
 | 
				
			||||||
                TabStop = False
 | 
					                TabStop = False
 | 
				
			||||||
                ThumbLength = 15
 | 
					                ThumbLength = 15
 | 
				
			||||||
                OnChange = trkVarPreviewRangeChange
 | 
					                OnChange = trkVarPreviewRangeChange
 | 
				
			||||||
              end
 | 
					              end
 | 
				
			||||||
              object trkVarPreviewDepth: TTrackBar
 | 
					              object trkVarPreviewDepth: TTrackBar
 | 
				
			||||||
                Left = 72
 | 
					                Left = 72
 | 
				
			||||||
                Top = 184
 | 
					                Top = 104
 | 
				
			||||||
                Width = 65
 | 
					                Width = 65
 | 
				
			||||||
                Height = 25
 | 
					                Height = 25
 | 
				
			||||||
                Max = 5
 | 
					                Max = 5
 | 
				
			||||||
@ -1523,7 +1608,7 @@ object EditForm: TEditForm
 | 
				
			|||||||
                PageSize = 1
 | 
					                PageSize = 1
 | 
				
			||||||
                Position = 1
 | 
					                Position = 1
 | 
				
			||||||
                ShowHint = True
 | 
					                ShowHint = True
 | 
				
			||||||
                TabOrder = 9
 | 
					                TabOrder = 4
 | 
				
			||||||
                TabStop = False
 | 
					                TabStop = False
 | 
				
			||||||
                ThumbLength = 15
 | 
					                ThumbLength = 15
 | 
				
			||||||
                OnChange = trkVarPreviewDepthChange
 | 
					                OnChange = trkVarPreviewDepthChange
 | 
				
			||||||
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -4,7 +4,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  BorderIcons = [biSystemMenu, biMinimize]
 | 
					  BorderIcons = [biSystemMenu, biMinimize]
 | 
				
			||||||
  BorderStyle = bsSingle
 | 
					  BorderStyle = bsSingle
 | 
				
			||||||
  Caption = 'RenderForm'
 | 
					  Caption = 'RenderForm'
 | 
				
			||||||
  ClientHeight = 424
 | 
					  ClientHeight = 416
 | 
				
			||||||
  ClientWidth = 424
 | 
					  ClientWidth = 424
 | 
				
			||||||
  Color = clBtnFace
 | 
					  Color = clBtnFace
 | 
				
			||||||
  Font.Charset = DEFAULT_CHARSET
 | 
					  Font.Charset = DEFAULT_CHARSET
 | 
				
			||||||
@ -51,7 +51,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  TextHeight = 13
 | 
					  TextHeight = 13
 | 
				
			||||||
  object ProgressBar: TProgressBar
 | 
					  object ProgressBar: TProgressBar
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 392
 | 
					    Top = 384
 | 
				
			||||||
    Width = 424
 | 
					    Width = 424
 | 
				
			||||||
    Height = 13
 | 
					    Height = 13
 | 
				
			||||||
    Align = alBottom
 | 
					    Align = alBottom
 | 
				
			||||||
@ -59,7 +59,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object btnRender: TButton
 | 
					  object btnRender: TButton
 | 
				
			||||||
    Left = 256
 | 
					    Left = 256
 | 
				
			||||||
    Top = 364
 | 
					    Top = 356
 | 
				
			||||||
    Width = 75
 | 
					    Width = 75
 | 
				
			||||||
    Height = 23
 | 
					    Height = 23
 | 
				
			||||||
    Caption = 'Render'
 | 
					    Caption = 'Render'
 | 
				
			||||||
@ -69,7 +69,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object btnCancel: TButton
 | 
					  object btnCancel: TButton
 | 
				
			||||||
    Left = 344
 | 
					    Left = 344
 | 
				
			||||||
    Top = 362
 | 
					    Top = 354
 | 
				
			||||||
    Width = 75
 | 
					    Width = 75
 | 
				
			||||||
    Height = 25
 | 
					    Height = 25
 | 
				
			||||||
    Caption = 'Close'
 | 
					    Caption = 'Close'
 | 
				
			||||||
@ -140,7 +140,6 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
      Width = 281
 | 
					      Width = 281
 | 
				
			||||||
      Height = 21
 | 
					      Height = 21
 | 
				
			||||||
      TabOrder = 0
 | 
					      TabOrder = 0
 | 
				
			||||||
      Text = 'txtFilename'
 | 
					 | 
				
			||||||
      OnChange = txtFilenameChange
 | 
					      OnChange = txtFilenameChange
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
@ -368,7 +367,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object btnPause: TButton
 | 
					  object btnPause: TButton
 | 
				
			||||||
    Left = 168
 | 
					    Left = 168
 | 
				
			||||||
    Top = 362
 | 
					    Top = 354
 | 
				
			||||||
    Width = 75
 | 
					    Width = 75
 | 
				
			||||||
    Height = 25
 | 
					    Height = 25
 | 
				
			||||||
    Caption = 'Pause'
 | 
					    Caption = 'Pause'
 | 
				
			||||||
@ -377,7 +376,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object chkSave: TCheckBox
 | 
					  object chkSave: TCheckBox
 | 
				
			||||||
    Left = 8
 | 
					    Left = 8
 | 
				
			||||||
    Top = 330
 | 
					    Top = 322
 | 
				
			||||||
    Width = 113
 | 
					    Width = 113
 | 
				
			||||||
    Height = 17
 | 
					    Height = 17
 | 
				
			||||||
    Caption = 'Save parameters'
 | 
					    Caption = 'Save parameters'
 | 
				
			||||||
@ -439,7 +438,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object StatusBar: TStatusBar
 | 
					  object StatusBar: TStatusBar
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 405
 | 
					    Top = 397
 | 
				
			||||||
    Width = 424
 | 
					    Width = 424
 | 
				
			||||||
    Height = 19
 | 
					    Height = 19
 | 
				
			||||||
    Panels = <
 | 
					    Panels = <
 | 
				
			||||||
@ -455,7 +454,7 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object chkShutdown: TCheckBox
 | 
					  object chkShutdown: TCheckBox
 | 
				
			||||||
    Left = 8
 | 
					    Left = 8
 | 
				
			||||||
    Top = 368
 | 
					    Top = 360
 | 
				
			||||||
    Width = 137
 | 
					    Width = 137
 | 
				
			||||||
    Height = 17
 | 
					    Height = 17
 | 
				
			||||||
    Caption = 'Shutdown on complete'
 | 
					    Caption = 'Shutdown on complete'
 | 
				
			||||||
@ -463,14 +462,14 @@ object RenderForm: TRenderForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object cbPostProcess: TCheckBox
 | 
					  object cbPostProcess: TCheckBox
 | 
				
			||||||
    Left = 8
 | 
					    Left = 8
 | 
				
			||||||
    Top = 348
 | 
					    Top = 340
 | 
				
			||||||
    Width = 97
 | 
					    Width = 97
 | 
				
			||||||
    Height = 17
 | 
					    Height = 17
 | 
				
			||||||
    Caption = 'Post render'
 | 
					    Caption = 'Post render'
 | 
				
			||||||
    TabOrder = 9
 | 
					    TabOrder = 9
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  object SaveDialog: TSaveDialog
 | 
					  object SaveDialog: TSaveDialog
 | 
				
			||||||
    Left = 368
 | 
					    Left = 376
 | 
				
			||||||
    Top = 328
 | 
					    Top = 320
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
@ -89,8 +89,8 @@ type
 | 
				
			|||||||
    procedure cmbPresetChange(Sender: TObject);
 | 
					    procedure cmbPresetChange(Sender: TObject);
 | 
				
			||||||
    procedure chkMaintainClick(Sender: TObject);
 | 
					    procedure chkMaintainClick(Sender: TObject);
 | 
				
			||||||
  private
 | 
					  private
 | 
				
			||||||
    StartTime: TDateTime;
 | 
					    StartTime, oldElapsed, edt: TDateTime;
 | 
				
			||||||
    Remainder: TDateTime;
 | 
					    oldProg: double;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    procedure DoPostProcess;
 | 
					    procedure DoPostProcess;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -171,7 +171,7 @@ begin
 | 
				
			|||||||
  if not chkLimitMem.Checked and cbPostProcess.checked then
 | 
					  if not chkLimitMem.Checked and cbPostProcess.checked then
 | 
				
			||||||
    DoPostProcess;
 | 
					    DoPostProcess;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Renderer.SaveImage(RenderForm.FileName);
 | 
					  Renderer.SaveImage(FileName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Renderer.Free;
 | 
					  Renderer.Free;
 | 
				
			||||||
  Renderer := nil;
 | 
					  Renderer := nil;
 | 
				
			||||||
@ -192,32 +192,49 @@ end;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
procedure TRenderForm.OnProgress(prog: double);
 | 
					procedure TRenderForm.OnProgress(prog: double);
 | 
				
			||||||
var
 | 
					var
 | 
				
			||||||
  Elapsed: TDateTime;
 | 
					  Elapsed, Remaining, dt: TDateTime;
 | 
				
			||||||
  e, r: string;
 | 
					 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
 | 
					  Elapsed := Now - StartTime;
 | 
				
			||||||
 | 
					  dt := Elapsed - oldElapsed;
 | 
				
			||||||
 | 
					  if (prog = 1.0) then begin
 | 
				
			||||||
 | 
					    StatusBar.Panels[0].text := Format('Elapsed %2.2d:%2.2d:%2.2d.%2.2d',
 | 
				
			||||||
 | 
					      [Trunc(Elapsed * 24),
 | 
				
			||||||
 | 
					       Trunc(Elapsed * 24 * 60) mod 60,
 | 
				
			||||||
 | 
					       Trunc(Elapsed * 24 * 60 * 60) mod 60,
 | 
				
			||||||
 | 
					       Trunc(Elapsed * 24 * 60 * 60 * 100) mod 100]);
 | 
				
			||||||
 | 
					    StatusBar.Panels[1].text := 'Remaining 00:00:00.00';
 | 
				
			||||||
 | 
					    exit;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (dt < 1/24/60/60/10) then exit;
 | 
				
			||||||
 | 
					  oldElapsed := Elapsed;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
 | 
					  prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
 | 
				
			||||||
 | 
					 | 
				
			||||||
  if ShowProgress then ProgressBar.Position := round(100 * prog);
 | 
					  if ShowProgress then ProgressBar.Position := round(100 * prog);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Elapsed := Now - StartTime;
 | 
					  StatusBar.Panels[0].text := Format('Elapsed %2.2d:%2.2d:%2.2d.%2.2d',
 | 
				
			||||||
  e := Format('Elapsed %2.2d:%2.2d:%2.2d.%2.2d',
 | 
					 | 
				
			||||||
    [Trunc(Elapsed * 24),
 | 
					    [Trunc(Elapsed * 24),
 | 
				
			||||||
    Trunc((Elapsed * 24 - Trunc(Elapsed * 24)) * 60),
 | 
					     Trunc(Elapsed * 24 * 60) mod 60,
 | 
				
			||||||
      Trunc((Elapsed * 24 * 60 - Trunc(Elapsed * 24 * 60)) * 60),
 | 
					     Trunc(Elapsed * 24 * 60 * 60) mod 60,
 | 
				
			||||||
      Trunc((Elapsed * 24 * 60 * 60 - Trunc(Elapsed * 24 * 60 * 60)) * 100)]);
 | 
					     Trunc(Elapsed * 24 * 60 * 60 * 100) mod 100]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if prog > 0 then
 | 
					  edt := edt + dt;
 | 
				
			||||||
    Remainder := Min(Remainder, Elapsed * (power(1 / prog, 1.2) - 1));
 | 
					  if (edt > 1/24/60/60/2) and (prog > 0) then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					//  Remainder := Min(Remainder, Elapsed * (power(1 / prog, 1.2) - 1)); // --Z-- this power() is weird
 | 
				
			||||||
 | 
					//  Remaining := Elapsed/prog - Elapsed; // --Z-- should've been like this maybe? ;) too easy anyway...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  r := Format('Remaining %2.2d:%2.2d:%2.2d.%2.2d',
 | 
					    Remaining := (1 - prog) * edt / (prog - oldProg);
 | 
				
			||||||
    [Trunc(Remainder * 24),
 | 
					    edt := 0;
 | 
				
			||||||
    Trunc((Remainder * 24 - Trunc(Remainder * 24)) * 60),
 | 
					    oldProg := prog;
 | 
				
			||||||
      Trunc((Remainder * 24 * 60 - Trunc(Remainder * 24 * 60)) * 60),
 | 
					
 | 
				
			||||||
      Trunc((Remainder * 24 * 60 * 60 - Trunc(Remainder * 24 * 60 * 60)) * 100)]);
 | 
					    StatusBar.Panels[1].text := Format('Remaining %2.2d:%2.2d:%2.2d.%2.2d',
 | 
				
			||||||
 | 
					      [Trunc(Remaining * 24),
 | 
				
			||||||
 | 
					       Trunc(Remaining * 24 * 60) mod 60,
 | 
				
			||||||
 | 
					       Trunc(Remaining * 24 * 60 * 60) mod 60,
 | 
				
			||||||
 | 
					       Trunc(Remaining * 24 * 60 * 60 * 100) mod 100]);
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    StatusBar.Panels[0].text := e;
 | 
					 | 
				
			||||||
    StatusBar.Panels[1].text := r;
 | 
					 | 
				
			||||||
  StatusBar.Panels[2].text := 'Slice ' + IntToStr(Renderer.Slice + 1) + ' of ' + IntToStr(Renderer.nrSlices);
 | 
					  StatusBar.Panels[2].text := 'Slice ' + IntToStr(Renderer.Slice + 1) + ' of ' + IntToStr(Renderer.nrSlices);
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -232,9 +249,14 @@ end;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
procedure TRenderForm.FormDestroy(Sender: TObject);
 | 
					procedure TRenderForm.FormDestroy(Sender: TObject);
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  if assigned(Renderer) then Renderer.Terminate;
 | 
					//  if assigned(Renderer) then Renderer.Terminate;
 | 
				
			||||||
  if assigned(Renderer) then Renderer.WaitFor;
 | 
					//  if assigned(Renderer) then Renderer.WaitFor;
 | 
				
			||||||
  if assigned(Renderer) then Renderer.Free;
 | 
					//  if assigned(Renderer) then Renderer.Free;
 | 
				
			||||||
 | 
					  if assigned(Renderer) then begin
 | 
				
			||||||
 | 
					    Renderer.Terminate;
 | 
				
			||||||
 | 
					    Renderer.WaitFor;
 | 
				
			||||||
 | 
					    Renderer.Free;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
  cp.free;
 | 
					  cp.free;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -312,7 +334,7 @@ begin
 | 
				
			|||||||
  btnPause.enabled := true;
 | 
					  btnPause.enabled := true;
 | 
				
			||||||
  btnCancel.Caption := 'Stop';
 | 
					  btnCancel.Caption := 'Stop';
 | 
				
			||||||
  StartTime := Now;
 | 
					  StartTime := Now;
 | 
				
			||||||
  Remainder := 365;
 | 
					//  Remaining := 365;
 | 
				
			||||||
  if Assigned(Renderer) then Renderer.Terminate;
 | 
					  if Assigned(Renderer) then Renderer.Terminate;
 | 
				
			||||||
  if Assigned(Renderer) then Renderer.WaitFor;
 | 
					  if Assigned(Renderer) then Renderer.WaitFor;
 | 
				
			||||||
  if not Assigned(Renderer) then
 | 
					  if not Assigned(Renderer) then
 | 
				
			||||||
@ -323,15 +345,20 @@ begin
 | 
				
			|||||||
    cp.sample_density := Sample_density;
 | 
					    cp.sample_density := Sample_density;
 | 
				
			||||||
    cp.spatial_oversample := Oversample;
 | 
					    cp.spatial_oversample := Oversample;
 | 
				
			||||||
    cp.spatial_filter_radius := Filter_Radius;
 | 
					    cp.spatial_filter_radius := Filter_Radius;
 | 
				
			||||||
    AdjustScale(cp, ImageWidth, ImageHeight);
 | 
					    cp.AdjustScale(ImageWidth, ImageHeight);
 | 
				
			||||||
    renderPath := ExtractFilePath(Filename);
 | 
					    renderPath := ExtractFilePath(Filename);
 | 
				
			||||||
    if chkSave.checked then
 | 
					    if chkSave.checked then
 | 
				
			||||||
      MainForm.SaveXMLFlame(cp, ExtractFileName(FileName), renderPath + 'renders.flame');
 | 
					      MainForm.SaveXMLFlame(cp, ExtractFileName(FileName), renderPath + 'renders.flame');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    oldProg:=0;
 | 
				
			||||||
 | 
					    oldElapsed:=0;
 | 
				
			||||||
 | 
					    edt:=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Renderer := TRenderThread.Create;
 | 
					    Renderer := TRenderThread.Create;
 | 
				
			||||||
    if chkLimitMem.checked then
 | 
					    if chkLimitMem.checked then
 | 
				
			||||||
      Renderer.MaxMem := StrToInt(cbMaxMemory.text);
 | 
					      Renderer.MaxMem := StrToInt(cbMaxMemory.text);
 | 
				
			||||||
    Renderer.OnProgress := OnProgress;
 | 
					    Renderer.OnProgress := OnProgress;
 | 
				
			||||||
    Renderer.TargetHandle := RenderForm.Handle;
 | 
					    Renderer.TargetHandle := self.Handle;
 | 
				
			||||||
    Renderer.Compatibility := compatibility;
 | 
					    Renderer.Compatibility := compatibility;
 | 
				
			||||||
    Renderer.SetCP(cp);
 | 
					    Renderer.SetCP(cp);
 | 
				
			||||||
    Renderer.Priority := tpLower;
 | 
					    Renderer.Priority := tpLower;
 | 
				
			||||||
@ -354,9 +381,9 @@ begin
 | 
				
			|||||||
    if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Render', False) then
 | 
					    if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Render', False) then
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      if Registry.ValueExists('Left') then
 | 
					      if Registry.ValueExists('Left') then
 | 
				
			||||||
        RenderForm.Left := Registry.ReadInteger('Left');
 | 
					        self.Left := Registry.ReadInteger('Left');
 | 
				
			||||||
      if Registry.ValueExists('Top') then
 | 
					      if Registry.ValueExists('Top') then
 | 
				
			||||||
        RenderForm.Top := Registry.ReadInteger('Top');
 | 
					        self.Top := Registry.ReadInteger('Top');
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
    Registry.CloseKey;
 | 
					    Registry.CloseKey;
 | 
				
			||||||
  finally
 | 
					  finally
 | 
				
			||||||
@ -409,15 +436,26 @@ begin
 | 
				
			|||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TRenderForm.txtOversampleChange(Sender: TObject);
 | 
					procedure TRenderForm.txtOversampleChange(Sender: TObject);
 | 
				
			||||||
 | 
					var
 | 
				
			||||||
 | 
					  o: integer;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  if StrToInt(txtOversample.Text) > udOversample.Max then
 | 
					 | 
				
			||||||
    txtOversample.Text := IntToStr(udOversample.Max);
 | 
					 | 
				
			||||||
  if StrToInt(txtOversample.Text) < udOversample.Min then
 | 
					 | 
				
			||||||
    txtOversample.Text := IntToStr(udOversample.Min);
 | 
					 | 
				
			||||||
  try
 | 
					  try
 | 
				
			||||||
    Oversample := StrToInt(txtOversample.Text);
 | 
					    o := StrToInt(txtOversample.Text);
 | 
				
			||||||
  except
 | 
					  except
 | 
				
			||||||
 | 
					    txtOversample.Text := IntToStr(Oversample);
 | 
				
			||||||
 | 
					    exit;
 | 
				
			||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					  if o > udOversample.Max then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    o := udOversample.Max;
 | 
				
			||||||
 | 
					    txtOversample.Text := IntToStr(o);
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  else if o < udOversample.Min then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    o := udOversample.Min;
 | 
				
			||||||
 | 
					    txtOversample.Text := IntToStr(o);
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					  Oversample := o;
 | 
				
			||||||
  ShowMemoryStatus;
 | 
					  ShowMemoryStatus;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -435,9 +473,11 @@ end;
 | 
				
			|||||||
procedure TRenderForm.btnCancelClick(Sender: TObject);
 | 
					procedure TRenderForm.btnCancelClick(Sender: TObject);
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  if Assigned(Renderer) then
 | 
					  if Assigned(Renderer) then
 | 
				
			||||||
    Renderer.Terminate
 | 
					  begin
 | 
				
			||||||
  else
 | 
					    Renderer.Terminate;
 | 
				
			||||||
    close;
 | 
					    Renderer.WaitFor; // --?--
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  else close;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TRenderForm.txtDensityChange(Sender: TObject);
 | 
					procedure TRenderForm.txtDensityChange(Sender: TObject);
 | 
				
			||||||
@ -476,8 +516,8 @@ begin
 | 
				
			|||||||
    Registry.RootKey := HKEY_CURRENT_USER;
 | 
					    Registry.RootKey := HKEY_CURRENT_USER;
 | 
				
			||||||
    if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Render', True) then
 | 
					    if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Render', True) then
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      Registry.WriteInteger('Top', RenderForm.Top);
 | 
					      Registry.WriteInteger('Top', Top);
 | 
				
			||||||
      Registry.WriteInteger('Left', RenderForm.Left);
 | 
					      Registry.WriteInteger('Left', Left);
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
  finally
 | 
					  finally
 | 
				
			||||||
    Registry.Free;
 | 
					    Registry.Free;
 | 
				
			||||||
@ -504,7 +544,10 @@ begin
 | 
				
			|||||||
      CanClose := False
 | 
					      CanClose := False
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      if Assigned(Renderer) then Renderer.Terminate;
 | 
					      if Assigned(Renderer) then begin
 | 
				
			||||||
 | 
					        Renderer.Terminate;
 | 
				
			||||||
 | 
					        Renderer.WaitFor;
 | 
				
			||||||
 | 
					      end;
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -677,7 +720,7 @@ procedure TRenderForm.DoPostProcess;
 | 
				
			|||||||
begin
 | 
					begin
 | 
				
			||||||
  frmPostProcess.SetRenderer(Renderer.GetRenderer);
 | 
					  frmPostProcess.SetRenderer(Renderer.GetRenderer);
 | 
				
			||||||
  frmPostProcess.SetControlPoint(CP);
 | 
					  frmPostProcess.SetControlPoint(CP);
 | 
				
			||||||
  frmPostProcess.SetImageName(RenderForm.FileName);
 | 
					  frmPostProcess.SetImageName(FileName);
 | 
				
			||||||
  frmPostProcess.Show;
 | 
					  frmPostProcess.Show;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -62,7 +62,7 @@ uses Main, Math, Global;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
procedure TFullscreenForm.DrawFlame;
 | 
					procedure TFullscreenForm.DrawFlame;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  AdjustScale(cp, Image.Width, Image.Height);
 | 
					  cp.AdjustScale(Image.Width, Image.Height);
 | 
				
			||||||
//  cp.Zoom := MainForm.Zoom;
 | 
					//  cp.Zoom := MainForm.Zoom;
 | 
				
			||||||
//  cp.center[0] := MainForm.center[0];
 | 
					//  cp.center[0] := MainForm.center[0];
 | 
				
			||||||
//  cp.center[1] := MainForm.center[1];
 | 
					//  cp.center[1] := MainForm.center[1];
 | 
				
			||||||
 | 
				
			|||||||
@ -80,6 +80,10 @@ var
 | 
				
			|||||||
  Variation: TVariation; // Current variation
 | 
					  Variation: TVariation; // Current variation
 | 
				
			||||||
  NumTries, TryLength: integer; // Settings for smooth palette
 | 
					  NumTries, TryLength: integer; // Settings for smooth palette
 | 
				
			||||||
  SmoothPaletteFile: string;
 | 
					  SmoothPaletteFile: string;
 | 
				
			||||||
 | 
					{ Editor }
 | 
				
			||||||
 | 
					  UseFlameBackground, UseTransformColors: boolean;
 | 
				
			||||||
 | 
					  EditorBkgColor, ReferenceTriangleColor: integer;
 | 
				
			||||||
 | 
					  GridColor1, GridColor2, HelpersColor: integer;
 | 
				
			||||||
{ Display }
 | 
					{ Display }
 | 
				
			||||||
  defSampleDensity, defPreviewDensity: Double;
 | 
					  defSampleDensity, defPreviewDensity: Double;
 | 
				
			||||||
  defGamma, defBrightness, defVibrancy, defFilterRadius: Double;
 | 
					  defGamma, defBrightness, defVibrancy, defFilterRadius: Double;
 | 
				
			||||||
 | 
				
			|||||||
@ -1,10 +1,12 @@
 | 
				
			|||||||
object MainForm: TMainForm
 | 
					object MainForm: TMainForm
 | 
				
			||||||
  Left = 387
 | 
					  Left = 400
 | 
				
			||||||
  Top = 166
 | 
					  Top = 157
 | 
				
			||||||
  Width = 605
 | 
					  Width = 731
 | 
				
			||||||
  Height = 635
 | 
					  Height = 530
 | 
				
			||||||
  Caption = 'Apophysis'
 | 
					  Caption = 'Apophysis'
 | 
				
			||||||
  Color = clBtnFace
 | 
					  Color = clBtnFace
 | 
				
			||||||
 | 
					  Constraints.MinHeight = 240
 | 
				
			||||||
 | 
					  Constraints.MinWidth = 320
 | 
				
			||||||
  Font.Charset = ANSI_CHARSET
 | 
					  Font.Charset = ANSI_CHARSET
 | 
				
			||||||
  Font.Color = clWindowText
 | 
					  Font.Color = clWindowText
 | 
				
			||||||
  Font.Height = -11
 | 
					  Font.Height = -11
 | 
				
			||||||
@ -27,12 +29,12 @@ object MainForm: TMainForm
 | 
				
			|||||||
    Left = 160
 | 
					    Left = 160
 | 
				
			||||||
    Top = 28
 | 
					    Top = 28
 | 
				
			||||||
    Width = 4
 | 
					    Width = 4
 | 
				
			||||||
    Height = 540
 | 
					    Height = 435
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  object ToolBar: TToolBar
 | 
					  object ToolBar: TToolBar
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 0
 | 
					    Top = 0
 | 
				
			||||||
    Width = 597
 | 
					    Width = 723
 | 
				
			||||||
    Height = 28
 | 
					    Height = 28
 | 
				
			||||||
    BorderWidth = 1
 | 
					    BorderWidth = 1
 | 
				
			||||||
    Flat = True
 | 
					    Flat = True
 | 
				
			||||||
@ -43,7 +45,7 @@ object MainForm: TMainForm
 | 
				
			|||||||
    object btnOpen: TToolButton
 | 
					    object btnOpen: TToolButton
 | 
				
			||||||
      Left = 0
 | 
					      Left = 0
 | 
				
			||||||
      Top = 0
 | 
					      Top = 0
 | 
				
			||||||
      Hint = 'Open (Ctrl+O)|Opens parameter files for browsing'
 | 
					      Hint = 'Open (Ctrl+O)|Open a parameter file for browsing'
 | 
				
			||||||
      Caption = 'btnOpen'
 | 
					      Caption = 'btnOpen'
 | 
				
			||||||
      ImageIndex = 1
 | 
					      ImageIndex = 1
 | 
				
			||||||
      OnClick = mnuOpenClick
 | 
					      OnClick = mnuOpenClick
 | 
				
			||||||
@ -131,7 +133,7 @@ object MainForm: TMainForm
 | 
				
			|||||||
    object btnFullScreen: TToolButton
 | 
					    object btnFullScreen: TToolButton
 | 
				
			||||||
      Left = 194
 | 
					      Left = 194
 | 
				
			||||||
      Top = 0
 | 
					      Top = 0
 | 
				
			||||||
      Hint = 'Fullscreen View (F3)|Shows full-screen view of the flame'
 | 
					      Hint = 'Fullscreen View (F3)|Show full-screen view of the flame'
 | 
				
			||||||
      Caption = 'btnFullScreen'
 | 
					      Caption = 'btnFullScreen'
 | 
				
			||||||
      ImageIndex = 52
 | 
					      ImageIndex = 52
 | 
				
			||||||
      OnClick = mnuFullScreenClick
 | 
					      OnClick = mnuFullScreenClick
 | 
				
			||||||
@ -147,7 +149,7 @@ object MainForm: TMainForm
 | 
				
			|||||||
    object btnEditor: TToolButton
 | 
					    object btnEditor: TToolButton
 | 
				
			||||||
      Left = 225
 | 
					      Left = 225
 | 
				
			||||||
      Top = 0
 | 
					      Top = 0
 | 
				
			||||||
      Hint = 'Editor (F4)|Shows the Transform Editor'
 | 
					      Hint = 'Editor (F4)|Show Transform Editor'
 | 
				
			||||||
      Caption = 'btnEditor'
 | 
					      Caption = 'btnEditor'
 | 
				
			||||||
      ImageIndex = 19
 | 
					      ImageIndex = 19
 | 
				
			||||||
      OnClick = mnuEditorClick
 | 
					      OnClick = mnuEditorClick
 | 
				
			||||||
@ -155,7 +157,7 @@ object MainForm: TMainForm
 | 
				
			|||||||
    object btnAdjust: TToolButton
 | 
					    object btnAdjust: TToolButton
 | 
				
			||||||
      Left = 248
 | 
					      Left = 248
 | 
				
			||||||
      Top = 0
 | 
					      Top = 0
 | 
				
			||||||
      Hint = 'Adjust (F5)|Shows the Adjust window'
 | 
					      Hint = 'Adjust (F5)|Adjust render-settings'
 | 
				
			||||||
      Caption = 'btnAdjust'
 | 
					      Caption = 'btnAdjust'
 | 
				
			||||||
      ImageIndex = 18
 | 
					      ImageIndex = 18
 | 
				
			||||||
      OnClick = mnuAdjustClick
 | 
					      OnClick = mnuAdjustClick
 | 
				
			||||||
@ -179,7 +181,7 @@ object MainForm: TMainForm
 | 
				
			|||||||
    object btnSize: TToolButton
 | 
					    object btnSize: TToolButton
 | 
				
			||||||
      Left = 317
 | 
					      Left = 317
 | 
				
			||||||
      Top = 0
 | 
					      Top = 0
 | 
				
			||||||
      Hint = 'Image Size (F2)|Shows the Image Size window'
 | 
					      Hint = 'Image Size|Adjust image size'
 | 
				
			||||||
      Caption = 'ma'
 | 
					      Caption = 'ma'
 | 
				
			||||||
      ImageIndex = 51
 | 
					      ImageIndex = 51
 | 
				
			||||||
      OnClick = mnuImageSizeClick
 | 
					      OnClick = mnuImageSizeClick
 | 
				
			||||||
@ -192,27 +194,29 @@ object MainForm: TMainForm
 | 
				
			|||||||
      ImageIndex = 14
 | 
					      ImageIndex = 14
 | 
				
			||||||
      Style = tbsSeparator
 | 
					      Style = tbsSeparator
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object btnRun: TToolButton
 | 
					    object btnDefine: TToolButton
 | 
				
			||||||
      Left = 348
 | 
					      Left = 348
 | 
				
			||||||
      Top = 0
 | 
					      Top = 0
 | 
				
			||||||
      Hint = 'Run Script|Runs the Default Animation script'
 | 
					      Hint = 'Edit Script (F8)|Open the Script Editor'
 | 
				
			||||||
 | 
					      Caption = 'btnDefine'
 | 
				
			||||||
 | 
					      ImageIndex = 42
 | 
				
			||||||
 | 
					      OnClick = mnuEditScriptClick
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    object btnRun: TToolButton
 | 
				
			||||||
 | 
					      Left = 371
 | 
				
			||||||
 | 
					      Top = 0
 | 
				
			||||||
 | 
					      Hint = 'Run Script|Run Script'
 | 
				
			||||||
 | 
					      Caption = 'Run'
 | 
				
			||||||
      ImageIndex = 43
 | 
					      ImageIndex = 43
 | 
				
			||||||
      OnClick = btnRunClick
 | 
					      OnClick = btnRunClick
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object btnStop: TToolButton
 | 
					    object btnStop: TToolButton
 | 
				
			||||||
      Left = 371
 | 
					 | 
				
			||||||
      Top = 0
 | 
					 | 
				
			||||||
      Caption = 'btnStop'
 | 
					 | 
				
			||||||
      ImageIndex = 36
 | 
					 | 
				
			||||||
      OnClick = mnuStopClick
 | 
					 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
    object btnDefine: TToolButton
 | 
					 | 
				
			||||||
      Left = 394
 | 
					      Left = 394
 | 
				
			||||||
      Top = 0
 | 
					      Top = 0
 | 
				
			||||||
      Hint = 'Edit Script (F8)|Opens the Script Editor'
 | 
					      Hint = 'Stop Script|Stop Script'
 | 
				
			||||||
      Caption = 'btnDefine'
 | 
					      Caption = 'Stop'
 | 
				
			||||||
      ImageIndex = 42
 | 
					      ImageIndex = 36
 | 
				
			||||||
      OnClick = mnuEditScriptClick
 | 
					      OnClick = mnuStopClick
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object ToolButton5: TToolButton
 | 
					    object ToolButton5: TToolButton
 | 
				
			||||||
      Left = 417
 | 
					      Left = 417
 | 
				
			||||||
@ -284,7 +288,7 @@ object MainForm: TMainForm
 | 
				
			|||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 28
 | 
					    Top = 28
 | 
				
			||||||
    Width = 160
 | 
					    Width = 160
 | 
				
			||||||
    Height = 540
 | 
					    Height = 435
 | 
				
			||||||
    Align = alLeft
 | 
					    Align = alLeft
 | 
				
			||||||
    Columns = <
 | 
					    Columns = <
 | 
				
			||||||
      item
 | 
					      item
 | 
				
			||||||
@ -302,8 +306,8 @@ object MainForm: TMainForm
 | 
				
			|||||||
  object BackPanel: TPanel
 | 
					  object BackPanel: TPanel
 | 
				
			||||||
    Left = 164
 | 
					    Left = 164
 | 
				
			||||||
    Top = 28
 | 
					    Top = 28
 | 
				
			||||||
    Width = 433
 | 
					    Width = 559
 | 
				
			||||||
    Height = 540
 | 
					    Height = 435
 | 
				
			||||||
    Align = alClient
 | 
					    Align = alClient
 | 
				
			||||||
    BevelInner = bvLowered
 | 
					    BevelInner = bvLowered
 | 
				
			||||||
    BevelOuter = bvNone
 | 
					    BevelOuter = bvNone
 | 
				
			||||||
@ -313,8 +317,8 @@ object MainForm: TMainForm
 | 
				
			|||||||
    object Image: TImage
 | 
					    object Image: TImage
 | 
				
			||||||
      Left = 1
 | 
					      Left = 1
 | 
				
			||||||
      Top = 1
 | 
					      Top = 1
 | 
				
			||||||
      Width = 431
 | 
					      Width = 557
 | 
				
			||||||
      Height = 538
 | 
					      Height = 433
 | 
				
			||||||
      Align = alClient
 | 
					      Align = alClient
 | 
				
			||||||
      AutoSize = True
 | 
					      AutoSize = True
 | 
				
			||||||
      PopupMenu = DisplayPopup
 | 
					      PopupMenu = DisplayPopup
 | 
				
			||||||
@ -327,8 +331,8 @@ object MainForm: TMainForm
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object StatusBar: TStatusBar
 | 
					  object StatusBar: TStatusBar
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 568
 | 
					    Top = 463
 | 
				
			||||||
    Width = 597
 | 
					    Width = 723
 | 
				
			||||||
    Height = 19
 | 
					    Height = 19
 | 
				
			||||||
    Panels = <
 | 
					    Panels = <
 | 
				
			||||||
      item
 | 
					      item
 | 
				
			||||||
@ -2668,7 +2672,6 @@ object MainForm: TMainForm
 | 
				
			|||||||
      object mnuImageSize: TMenuItem
 | 
					      object mnuImageSize: TMenuItem
 | 
				
			||||||
        Caption = 'Image Size'
 | 
					        Caption = 'Image Size'
 | 
				
			||||||
        ImageIndex = 51
 | 
					        ImageIndex = 51
 | 
				
			||||||
        ShortCut = 119
 | 
					 | 
				
			||||||
        OnClick = mnuImageSizeClick
 | 
					        OnClick = mnuImageSizeClick
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object mnuimage: TMenuItem
 | 
					      object mnuimage: TMenuItem
 | 
				
			||||||
 | 
				
			|||||||
@ -38,7 +38,7 @@ const
 | 
				
			|||||||
  RS_XO = 2;
 | 
					  RS_XO = 2;
 | 
				
			||||||
  RS_VO = 3;
 | 
					  RS_VO = 3;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  AppVersionString = 'Apophysis 2.03b';
 | 
					  AppVersionString = 'Apophysis 2.03c pre-release 5';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type
 | 
					type
 | 
				
			||||||
  TMouseMoveState = (msUsual, msZoomWindow, msZoomOutWindow, msZoomWindowMove, msZoomOutWindowMove, msDrag, msDragMove, msRotate, msRotateMove);
 | 
					  TMouseMoveState = (msUsual, msZoomWindow, msZoomOutWindow, msZoomWindowMove, msZoomOutWindowMove, msDrag, msDragMove, msRotate, msRotateMove);
 | 
				
			||||||
@ -352,7 +352,7 @@ function NumXForms(const cp: TControlPoint): integer;
 | 
				
			|||||||
procedure MultMatrix(var s: TMatrix; const m: TMatrix);
 | 
					procedure MultMatrix(var s: TMatrix; const m: TMatrix);
 | 
				
			||||||
procedure ListFlames(FileName: string; sel: integer);
 | 
					procedure ListFlames(FileName: string; sel: integer);
 | 
				
			||||||
procedure ListIFS(FileName: string; sel: integer);
 | 
					procedure ListIFS(FileName: string; sel: integer);
 | 
				
			||||||
procedure AdjustScale(var cp1: TControlPoint; width, height: integer);
 | 
					//procedure AdjustScale(var cp1: TControlPoint; width, height: integer);
 | 
				
			||||||
procedure NormalizeVariations(var cp1: TControlPoint);
 | 
					procedure NormalizeVariations(var cp1: TControlPoint);
 | 
				
			||||||
function GetWinVersion: TWin32Version;
 | 
					function GetWinVersion: TWin32Version;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -418,16 +418,6 @@ begin
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure AdjustScale(var cp1: TControlPoint; width, height: integer);
 | 
					 | 
				
			||||||
begin
 | 
					 | 
				
			||||||
//  if width >= height then
 | 
					 | 
				
			||||||
  cp1.pixels_per_unit := cp1.pixels_per_unit / (cp1.width / width);
 | 
					 | 
				
			||||||
//  else
 | 
					 | 
				
			||||||
//    cp1.pixels_per_unit := cp1.pixels_per_unit / (cp1.height / height);
 | 
					 | 
				
			||||||
  cp1.width := width;
 | 
					 | 
				
			||||||
  cp1.height := height;
 | 
					 | 
				
			||||||
end;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
procedure MultMatrix(var s: TMatrix; const m: TMatrix);
 | 
					procedure MultMatrix(var s: TMatrix; const m: TMatrix);
 | 
				
			||||||
var
 | 
					var
 | 
				
			||||||
  a, b, c, d, e, f, g, h: double;
 | 
					  a, b, c, d, e, f, g, h: double;
 | 
				
			||||||
@ -1803,7 +1793,7 @@ begin
 | 
				
			|||||||
  begin
 | 
					  begin
 | 
				
			||||||
    if (MainCp.width <> Image.Width) or (MainCp.height <> Image.height) then
 | 
					    if (MainCp.width <> Image.Width) or (MainCp.height <> Image.height) then
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      AdjustScale(MainCp, Image.width, Image.height);
 | 
					      MainCp.AdjustScale(Image.width, Image.height);
 | 
				
			||||||
      if EditForm.Visible then EditForm.UpdateDisplay(true); // preview only?
 | 
					      if EditForm.Visible then EditForm.UpdateDisplay(true); // preview only?
 | 
				
			||||||
    end;
 | 
					    end;
 | 
				
			||||||
    if AdjustForm.Visible then AdjustForm.UpdateDisplay(true); // preview only!
 | 
					    if AdjustForm.Visible then AdjustForm.UpdateDisplay(true); // preview only!
 | 
				
			||||||
@ -3728,7 +3718,8 @@ begin
 | 
				
			|||||||
      cp1.spatial_oversample := ExportOversample;
 | 
					      cp1.spatial_oversample := ExportOversample;
 | 
				
			||||||
      cp1.spatial_filter_radius := ExportFilter;
 | 
					      cp1.spatial_filter_radius := ExportFilter;
 | 
				
			||||||
      cp1.nbatches := ExportBatches;
 | 
					      cp1.nbatches := ExportBatches;
 | 
				
			||||||
      if (cp1.width <> ExportWidth) or (cp1.Height <> ExportHeight) then AdjustScale(cp1, ExportWidth, ExportHeight);
 | 
					      if (cp1.width <> ExportWidth) or (cp1.Height <> ExportHeight) then
 | 
				
			||||||
 | 
					        cp1.AdjustScale(ExportWidth, ExportHeight);
 | 
				
			||||||
      FileList.Text := FlameToXML(cp1, false);
 | 
					      FileList.Text := FlameToXML(cp1, false);
 | 
				
			||||||
      FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame'));
 | 
					      FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame'));
 | 
				
			||||||
      FileList.Clear;
 | 
					      FileList.Clear;
 | 
				
			||||||
@ -3992,6 +3983,7 @@ begin
 | 
				
			|||||||
  try
 | 
					  try
 | 
				
			||||||
    if TagName = 'xform' then
 | 
					    if TagName = 'xform' then
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
 | 
					      Parsecp.xform[nxform].Clear;
 | 
				
			||||||
      v := Attributes.Value('weight');
 | 
					      v := Attributes.Value('weight');
 | 
				
			||||||
      if v <> '' then ParseCp.xform[nxform].density := StrToFloat(v);
 | 
					      if v <> '' then ParseCp.xform[nxform].density := StrToFloat(v);
 | 
				
			||||||
      v := Attributes.Value('color');
 | 
					      v := Attributes.Value('color');
 | 
				
			||||||
@ -4010,6 +4002,20 @@ begin
 | 
				
			|||||||
        c[2][0] := StrToFloat(Tokens[4]);
 | 
					        c[2][0] := StrToFloat(Tokens[4]);
 | 
				
			||||||
        c[2][1] := StrToFloat(Tokens[5]);
 | 
					        c[2][1] := StrToFloat(Tokens[5]);
 | 
				
			||||||
      end;
 | 
					      end;
 | 
				
			||||||
 | 
					      v := Attributes.Value('post');
 | 
				
			||||||
 | 
					      if v <> '' then begin
 | 
				
			||||||
 | 
					        GetTokens(v, tokens);
 | 
				
			||||||
 | 
					        if Tokens.Count < 6 then ShowMessage('Not enough post-cooeficients...crash?');
 | 
				
			||||||
 | 
					        with Parsecp.xform[nxform] do
 | 
				
			||||||
 | 
					        begin
 | 
				
			||||||
 | 
					          p[0][0] := StrToFloat(Tokens[0]);
 | 
				
			||||||
 | 
					          p[0][1] := StrToFloat(Tokens[1]);
 | 
				
			||||||
 | 
					          p[1][0] := StrToFloat(Tokens[2]);
 | 
				
			||||||
 | 
					          p[1][1] := StrToFloat(Tokens[3]);
 | 
				
			||||||
 | 
					          p[2][0] := StrToFloat(Tokens[4]);
 | 
				
			||||||
 | 
					          p[2][1] := StrToFloat(Tokens[5]);
 | 
				
			||||||
 | 
					        end;
 | 
				
			||||||
 | 
					      end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      for i := 0 to NRVAR - 1 do
 | 
					      for i := 0 to NRVAR - 1 do
 | 
				
			||||||
      begin
 | 
					      begin
 | 
				
			||||||
@ -4450,4 +4456,5 @@ end;
 | 
				
			|||||||
{$ENDIF}
 | 
					{$ENDIF}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
///////////////////////////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end.
 | 
					end.
 | 
				
			||||||
 | 
				
			|||||||
@ -138,7 +138,7 @@ end;
 | 
				
			|||||||
procedure TMutateForm.UpdateDisplay;
 | 
					procedure TMutateForm.UpdateDisplay;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  cps[0].copy(MainCp);
 | 
					  cps[0].copy(MainCp);
 | 
				
			||||||
  AdjustScale(cps[0], Image0.Width, Image0.Height);
 | 
					  cps[0].AdjustScale(Image0.Width, Image0.Height);
 | 
				
			||||||
  cps[0].cmap := MainCp.cmap;
 | 
					  cps[0].cmap := MainCp.cmap;
 | 
				
			||||||
  cmap := MainCp.cmap;
 | 
					  cmap := MainCp.cmap;
 | 
				
			||||||
  name := Maincp.name;
 | 
					  name := Maincp.name;
 | 
				
			||||||
@ -600,7 +600,7 @@ begin
 | 
				
			|||||||
    cps[0].width := MainCp.width;
 | 
					    cps[0].width := MainCp.width;
 | 
				
			||||||
    cps[0].height := MainCp.height;
 | 
					    cps[0].height := MainCp.height;
 | 
				
			||||||
    cps[0].pixels_per_unit := MainCp.pixels_per_unit;
 | 
					    cps[0].pixels_per_unit := MainCp.pixels_per_unit;
 | 
				
			||||||
    AdjustScale(cps[0], Image0.width, Image0.Height);
 | 
					    cps[0].AdjustScale(Image0.width, Image0.Height);
 | 
				
			||||||
    cps[0].zoom := MainCp.zoom;
 | 
					    cps[0].zoom := MainCp.zoom;
 | 
				
			||||||
    cps[0].center[0] := MainCp.center[0];
 | 
					    cps[0].center[0] := MainCp.center[0];
 | 
				
			||||||
    cps[0].center[1] := MainCp.center[1];
 | 
					    cps[0].center[1] := MainCp.center[1];
 | 
				
			||||||
 | 
				
			|||||||
@ -51,19 +51,19 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
      HelpContext = 1
 | 
					      HelpContext = 1
 | 
				
			||||||
      Caption = 'General'
 | 
					      Caption = 'General'
 | 
				
			||||||
      object chkConfirmDel: TCheckBox
 | 
					      object chkConfirmDel: TCheckBox
 | 
				
			||||||
        Left = 144
 | 
					        Left = 8
 | 
				
			||||||
        Top = 135
 | 
					        Top = 175
 | 
				
			||||||
        Width = 97
 | 
					        Width = 121
 | 
				
			||||||
        Height = 17
 | 
					        Height = 17
 | 
				
			||||||
        HelpContext = 1005
 | 
					        HelpContext = 1005
 | 
				
			||||||
        Caption = 'Confirm delete'
 | 
					        Caption = 'Confirm delete'
 | 
				
			||||||
        TabOrder = 4
 | 
					        TabOrder = 2
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object JPEG: TGroupBox
 | 
					      object JPEG: TGroupBox
 | 
				
			||||||
        Left = 8
 | 
					        Left = 8
 | 
				
			||||||
        Top = 132
 | 
					        Top = 116
 | 
				
			||||||
        Width = 121
 | 
					        Width = 121
 | 
				
			||||||
        Height = 53
 | 
					        Height = 55
 | 
				
			||||||
        Caption = 'JPEG Quality'
 | 
					        Caption = 'JPEG Quality'
 | 
				
			||||||
        TabOrder = 0
 | 
					        TabOrder = 0
 | 
				
			||||||
        object txtJPEGquality: TComboBox
 | 
					        object txtJPEGquality: TComboBox
 | 
				
			||||||
@ -83,23 +83,23 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object chkResize: TCheckBox
 | 
					      object chkResize: TCheckBox
 | 
				
			||||||
        Left = 144
 | 
					        Left = 8
 | 
				
			||||||
        Top = 153
 | 
					        Top = 193
 | 
				
			||||||
        Width = 169
 | 
					        Width = 121
 | 
				
			||||||
        Height = 17
 | 
					        Height = 17
 | 
				
			||||||
        Caption = 'Resize on load'
 | 
					        Caption = 'Resize on load'
 | 
				
			||||||
        TabOrder = 5
 | 
					        TabOrder = 3
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object GroupBox16: TGroupBox
 | 
					      object GroupBox16: TGroupBox
 | 
				
			||||||
        Left = 8
 | 
					        Left = 8
 | 
				
			||||||
        Top = 4
 | 
					        Top = 4
 | 
				
			||||||
        Width = 121
 | 
					        Width = 121
 | 
				
			||||||
        Height = 69
 | 
					        Height = 55
 | 
				
			||||||
        Caption = 'Multithreading'
 | 
					        Caption = 'Multithreading'
 | 
				
			||||||
        TabOrder = 1
 | 
					        TabOrder = 1
 | 
				
			||||||
        object cbNrTheads: TComboBox
 | 
					        object cbNrTheads: TComboBox
 | 
				
			||||||
          Left = 16
 | 
					          Left = 16
 | 
				
			||||||
          Top = 24
 | 
					          Top = 20
 | 
				
			||||||
          Width = 89
 | 
					          Width = 89
 | 
				
			||||||
          Height = 21
 | 
					          Height = 21
 | 
				
			||||||
          ItemHeight = 13
 | 
					          ItemHeight = 13
 | 
				
			||||||
@ -113,18 +113,21 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
            '8')
 | 
					            '8')
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object chkShowTransparency: TCheckBox
 | 
					      object rgRotationMode: TRadioGroup
 | 
				
			||||||
        Left = 144
 | 
					        Left = 8
 | 
				
			||||||
        Top = 171
 | 
					        Top = 60
 | 
				
			||||||
        Width = 169
 | 
					        Width = 121
 | 
				
			||||||
        Height = 17
 | 
					        Height = 55
 | 
				
			||||||
        Caption = 'Show Transparency'
 | 
					        Caption = 'Rotation Mode'
 | 
				
			||||||
        TabOrder = 6
 | 
					        Items.Strings = (
 | 
				
			||||||
 | 
					          'Rotate image'
 | 
				
			||||||
 | 
					          'Rotate frame')
 | 
				
			||||||
 | 
					        TabOrder = 4
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object rgReferenceMode: TRadioGroup
 | 
					      object rgReferenceMode: TRadioGroup
 | 
				
			||||||
        Left = 280
 | 
					        Left = 288
 | 
				
			||||||
        Top = 4
 | 
					        Top = 4
 | 
				
			||||||
        Width = 153
 | 
					        Width = 145
 | 
				
			||||||
        Height = 69
 | 
					        Height = 69
 | 
				
			||||||
        Caption = 'Reference Triangle'
 | 
					        Caption = 'Reference Triangle'
 | 
				
			||||||
        ItemIndex = 0
 | 
					        ItemIndex = 0
 | 
				
			||||||
@ -132,30 +135,116 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
          'Normal'
 | 
					          'Normal'
 | 
				
			||||||
          'Proportional'
 | 
					          'Proportional'
 | 
				
			||||||
          'Wandering (old-style)')
 | 
					          'Wandering (old-style)')
 | 
				
			||||||
        TabOrder = 3
 | 
					        TabOrder = 5
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      object rgTransparency: TRadioGroup
 | 
					      object GroupBox1: TGroupBox
 | 
				
			||||||
        Left = 136
 | 
					        Left = 136
 | 
				
			||||||
        Top = 4
 | 
					        Top = 4
 | 
				
			||||||
        Width = 137
 | 
					        Width = 145
 | 
				
			||||||
        Height = 69
 | 
					        Height = 138
 | 
				
			||||||
        Caption = 'PNG Transparency'
 | 
					        Caption = 'Editor Graph'
 | 
				
			||||||
        Items.Strings = (
 | 
					        TabOrder = 6
 | 
				
			||||||
          'No transparency'
 | 
					        object Label40: TLabel
 | 
				
			||||||
          'Flam3-style'
 | 
					          Left = 8
 | 
				
			||||||
          'Flamesong-style')
 | 
					          Top = 56
 | 
				
			||||||
 | 
					          Width = 56
 | 
				
			||||||
 | 
					          Height = 13
 | 
				
			||||||
 | 
					          Caption = 'Background'
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object Label41: TLabel
 | 
				
			||||||
 | 
					          Left = 8
 | 
				
			||||||
 | 
					          Top = 96
 | 
				
			||||||
 | 
					          Width = 50
 | 
				
			||||||
 | 
					          Height = 13
 | 
				
			||||||
 | 
					          Caption = 'Reference'
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object Label42: TLabel
 | 
				
			||||||
 | 
					          Left = 75
 | 
				
			||||||
 | 
					          Top = 56
 | 
				
			||||||
 | 
					          Width = 50
 | 
				
			||||||
 | 
					          Height = 13
 | 
				
			||||||
 | 
					          Caption = 'Grid colors'
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object Label43: TLabel
 | 
				
			||||||
 | 
					          Left = 75
 | 
				
			||||||
 | 
					          Top = 96
 | 
				
			||||||
 | 
					          Width = 36
 | 
				
			||||||
 | 
					          Height = 13
 | 
				
			||||||
 | 
					          Caption = 'Helpers'
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object pnlBackColor: TPanel
 | 
				
			||||||
 | 
					          Left = 8
 | 
				
			||||||
 | 
					          Top = 72
 | 
				
			||||||
 | 
					          Width = 62
 | 
				
			||||||
 | 
					          Height = 17
 | 
				
			||||||
 | 
					          Cursor = crHandPoint
 | 
				
			||||||
 | 
					          BevelOuter = bvLowered
 | 
				
			||||||
 | 
					          Color = clBlack
 | 
				
			||||||
 | 
					          TabOrder = 0
 | 
				
			||||||
 | 
					          OnClick = pnlBackColorClick
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object chkUseXFormColor: TCheckBox
 | 
				
			||||||
 | 
					          Left = 8
 | 
				
			||||||
 | 
					          Top = 16
 | 
				
			||||||
 | 
					          Width = 129
 | 
				
			||||||
 | 
					          Height = 17
 | 
				
			||||||
 | 
					          Caption = 'Use transform color'
 | 
				
			||||||
 | 
					          TabOrder = 1
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object chkHelpers: TCheckBox
 | 
				
			||||||
 | 
					          Left = 8
 | 
				
			||||||
 | 
					          Top = 36
 | 
				
			||||||
 | 
					          Width = 129
 | 
				
			||||||
 | 
					          Height = 17
 | 
				
			||||||
 | 
					          Caption = 'Helper lines'
 | 
				
			||||||
 | 
					          Checked = True
 | 
				
			||||||
 | 
					          State = cbChecked
 | 
				
			||||||
          TabOrder = 2
 | 
					          TabOrder = 2
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
      object rgRotationMode: TRadioGroup
 | 
					        object pnlReference: TPanel
 | 
				
			||||||
          Left = 8
 | 
					          Left = 8
 | 
				
			||||||
        Top = 76
 | 
					          Top = 112
 | 
				
			||||||
        Width = 121
 | 
					          Width = 62
 | 
				
			||||||
        Height = 53
 | 
					          Height = 17
 | 
				
			||||||
        Caption = 'Rotation Mode'
 | 
					          Cursor = crHandPoint
 | 
				
			||||||
        Items.Strings = (
 | 
					          BevelOuter = bvLowered
 | 
				
			||||||
          'Rotate image'
 | 
					          Color = clGray
 | 
				
			||||||
          'Rotate frame')
 | 
					          TabOrder = 3
 | 
				
			||||||
        TabOrder = 7
 | 
					          OnClick = pnlReferenceClick
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object pnlGridColor1: TPanel
 | 
				
			||||||
 | 
					          Left = 75
 | 
				
			||||||
 | 
					          Top = 72
 | 
				
			||||||
 | 
					          Width = 29
 | 
				
			||||||
 | 
					          Height = 17
 | 
				
			||||||
 | 
					          Cursor = crHandPoint
 | 
				
			||||||
 | 
					          BevelOuter = bvLowered
 | 
				
			||||||
 | 
					          Color = clBlack
 | 
				
			||||||
 | 
					          TabOrder = 4
 | 
				
			||||||
 | 
					          OnClick = pnlGridColor1Click
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object pnlGridColor2: TPanel
 | 
				
			||||||
 | 
					          Left = 108
 | 
				
			||||||
 | 
					          Top = 72
 | 
				
			||||||
 | 
					          Width = 29
 | 
				
			||||||
 | 
					          Height = 17
 | 
				
			||||||
 | 
					          Cursor = crHandPoint
 | 
				
			||||||
 | 
					          BevelOuter = bvLowered
 | 
				
			||||||
 | 
					          Color = clBlack
 | 
				
			||||||
 | 
					          TabOrder = 5
 | 
				
			||||||
 | 
					          OnClick = pnlGridColor2Click
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					        object pnlHelpersColor: TPanel
 | 
				
			||||||
 | 
					          Left = 75
 | 
				
			||||||
 | 
					          Top = 112
 | 
				
			||||||
 | 
					          Width = 62
 | 
				
			||||||
 | 
					          Height = 17
 | 
				
			||||||
 | 
					          Cursor = crHandPoint
 | 
				
			||||||
 | 
					          BevelOuter = bvLowered
 | 
				
			||||||
 | 
					          Color = clGray
 | 
				
			||||||
 | 
					          TabOrder = 6
 | 
				
			||||||
 | 
					          OnClick = pnlHelpersColorClick
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object DisplayPage: TTabSheet
 | 
					    object DisplayPage: TTabSheet
 | 
				
			||||||
@ -311,6 +400,27 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
          TabOrder = 5
 | 
					          TabOrder = 5
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					      object chkShowTransparency: TCheckBox
 | 
				
			||||||
 | 
					        Left = 192
 | 
				
			||||||
 | 
					        Top = 179
 | 
				
			||||||
 | 
					        Width = 129
 | 
				
			||||||
 | 
					        Height = 17
 | 
				
			||||||
 | 
					        Caption = 'Show Transparency'
 | 
				
			||||||
 | 
					        TabOrder = 2
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					      object rgTransparency: TRadioGroup
 | 
				
			||||||
 | 
					        Left = 184
 | 
				
			||||||
 | 
					        Top = 104
 | 
				
			||||||
 | 
					        Width = 193
 | 
				
			||||||
 | 
					        Height = 69
 | 
				
			||||||
 | 
					        Caption = 'PNG Transparency'
 | 
				
			||||||
 | 
					        ItemIndex = 0
 | 
				
			||||||
 | 
					        Items.Strings = (
 | 
				
			||||||
 | 
					          'No transparency'
 | 
				
			||||||
 | 
					          'Flam3-style'
 | 
				
			||||||
 | 
					          'Flamesong-style')
 | 
				
			||||||
 | 
					        TabOrder = 3
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object RandomPage: TTabSheet
 | 
					    object RandomPage: TTabSheet
 | 
				
			||||||
      Caption = 'Random'
 | 
					      Caption = 'Random'
 | 
				
			||||||
@ -424,7 +534,7 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
          Height = 21
 | 
					          Height = 21
 | 
				
			||||||
          HelpContext = 1004
 | 
					          HelpContext = 1004
 | 
				
			||||||
          TabOrder = 1
 | 
					          TabOrder = 1
 | 
				
			||||||
          Text = '100'
 | 
					          Text = '10'
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
        object udBatchSize: TUpDown
 | 
					        object udBatchSize: TUpDown
 | 
				
			||||||
          Left = 169
 | 
					          Left = 169
 | 
				
			||||||
@ -434,7 +544,7 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
          Associate = txtBatchSize
 | 
					          Associate = txtBatchSize
 | 
				
			||||||
          Min = 1
 | 
					          Min = 1
 | 
				
			||||||
          Max = 300
 | 
					          Max = 300
 | 
				
			||||||
          Position = 100
 | 
					          Position = 10
 | 
				
			||||||
          TabOrder = 2
 | 
					          TabOrder = 2
 | 
				
			||||||
          Thousands = False
 | 
					          Thousands = False
 | 
				
			||||||
        end
 | 
					        end
 | 
				
			||||||
@ -609,8 +719,8 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
        object clbVarEnabled: TCheckListBox
 | 
					        object clbVarEnabled: TCheckListBox
 | 
				
			||||||
          Left = 12
 | 
					          Left = 12
 | 
				
			||||||
          Top = 16
 | 
					          Top = 16
 | 
				
			||||||
          Width = 309
 | 
					          Width = 317
 | 
				
			||||||
          Height = 201
 | 
					          Height = 206
 | 
				
			||||||
          Columns = 2
 | 
					          Columns = 2
 | 
				
			||||||
          ItemHeight = 13
 | 
					          ItemHeight = 13
 | 
				
			||||||
          TabOrder = 0
 | 
					          TabOrder = 0
 | 
				
			||||||
@ -1196,7 +1306,7 @@ object OptionsForm: TOptionsForm
 | 
				
			|||||||
        end
 | 
					        end
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object Paths: TTabSheet
 | 
					    object PathsPage: TTabSheet
 | 
				
			||||||
      Caption = 'Paths'
 | 
					      Caption = 'Paths'
 | 
				
			||||||
      ImageIndex = 7
 | 
					      ImageIndex = 7
 | 
				
			||||||
      object GroupBox10: TGroupBox
 | 
					      object GroupBox10: TGroupBox
 | 
				
			||||||
 | 
				
			|||||||
@ -146,7 +146,7 @@ type
 | 
				
			|||||||
    Label17: TLabel;
 | 
					    Label17: TLabel;
 | 
				
			||||||
    txtServer: TEdit;
 | 
					    txtServer: TEdit;
 | 
				
			||||||
    chkResize: TCheckBox;
 | 
					    chkResize: TCheckBox;
 | 
				
			||||||
    Paths: TTabSheet;
 | 
					    PathsPage: TTabSheet;
 | 
				
			||||||
    GroupBox10: TGroupBox;
 | 
					    GroupBox10: TGroupBox;
 | 
				
			||||||
    btnDefGradient: TSpeedButton;
 | 
					    btnDefGradient: TSpeedButton;
 | 
				
			||||||
    Label25: TLabel;
 | 
					    Label25: TLabel;
 | 
				
			||||||
@ -166,15 +166,12 @@ type
 | 
				
			|||||||
    clbVarEnabled: TCheckListBox;
 | 
					    clbVarEnabled: TCheckListBox;
 | 
				
			||||||
    GroupBox16: TGroupBox;
 | 
					    GroupBox16: TGroupBox;
 | 
				
			||||||
    cbNrTheads: TComboBox;
 | 
					    cbNrTheads: TComboBox;
 | 
				
			||||||
    chkShowTransparency: TCheckBox;
 | 
					 | 
				
			||||||
    rgReferenceMode: TRadioGroup;
 | 
					 | 
				
			||||||
    GroupBox13: TGroupBox;
 | 
					    GroupBox13: TGroupBox;
 | 
				
			||||||
    Label8: TLabel;
 | 
					    Label8: TLabel;
 | 
				
			||||||
    Label10: TLabel;
 | 
					    Label10: TLabel;
 | 
				
			||||||
    txtNumtries: TEdit;
 | 
					    txtNumtries: TEdit;
 | 
				
			||||||
    txtTryLength: TEdit;
 | 
					    txtTryLength: TEdit;
 | 
				
			||||||
    txtJPEGquality: TComboBox;
 | 
					    txtJPEGquality: TComboBox;
 | 
				
			||||||
    rgTransparency: TRadioGroup;
 | 
					 | 
				
			||||||
    Label24: TLabel;
 | 
					    Label24: TLabel;
 | 
				
			||||||
    txtSymNVars: TEdit;
 | 
					    txtSymNVars: TEdit;
 | 
				
			||||||
    udSymNVars: TUpDown;
 | 
					    udSymNVars: TUpDown;
 | 
				
			||||||
@ -183,6 +180,21 @@ type
 | 
				
			|||||||
    udBatchSize: TUpDown;
 | 
					    udBatchSize: TUpDown;
 | 
				
			||||||
    Label38: TLabel;
 | 
					    Label38: TLabel;
 | 
				
			||||||
    Label39: TLabel;
 | 
					    Label39: TLabel;
 | 
				
			||||||
 | 
					    chkShowTransparency: TCheckBox;
 | 
				
			||||||
 | 
					    rgTransparency: TRadioGroup;
 | 
				
			||||||
 | 
					    rgReferenceMode: TRadioGroup;
 | 
				
			||||||
 | 
					    GroupBox1: TGroupBox;
 | 
				
			||||||
 | 
					    Label40: TLabel;
 | 
				
			||||||
 | 
					    Label41: TLabel;
 | 
				
			||||||
 | 
					    Label42: TLabel;
 | 
				
			||||||
 | 
					    Label43: TLabel;
 | 
				
			||||||
 | 
					    pnlBackColor: TPanel;
 | 
				
			||||||
 | 
					    chkUseXFormColor: TCheckBox;
 | 
				
			||||||
 | 
					    chkHelpers: TCheckBox;
 | 
				
			||||||
 | 
					    pnlReference: TPanel;
 | 
				
			||||||
 | 
					    pnlGridColor1: TPanel;
 | 
				
			||||||
 | 
					    pnlGridColor2: TPanel;
 | 
				
			||||||
 | 
					    pnlHelpersColor: TPanel;
 | 
				
			||||||
    procedure btnCancelClick(Sender: TObject);
 | 
					    procedure btnCancelClick(Sender: TObject);
 | 
				
			||||||
    procedure FormShow(Sender: TObject);
 | 
					    procedure FormShow(Sender: TObject);
 | 
				
			||||||
    procedure btnOKClick(Sender: TObject);
 | 
					    procedure btnOKClick(Sender: TObject);
 | 
				
			||||||
@ -207,6 +219,11 @@ type
 | 
				
			|||||||
    procedure btnRendererClick(Sender: TObject);
 | 
					    procedure btnRendererClick(Sender: TObject);
 | 
				
			||||||
    procedure SpeedButton2Click(Sender: TObject);
 | 
					    procedure SpeedButton2Click(Sender: TObject);
 | 
				
			||||||
    procedure FormCreate(Sender: TObject);
 | 
					    procedure FormCreate(Sender: TObject);
 | 
				
			||||||
 | 
					    procedure pnlBackColorClick(Sender: TObject);
 | 
				
			||||||
 | 
					    procedure pnlReferenceClick(Sender: TObject);
 | 
				
			||||||
 | 
					    procedure pnlGridColor1Click(Sender: TObject);
 | 
				
			||||||
 | 
					    procedure pnlGridColor2Click(Sender: TObject);
 | 
				
			||||||
 | 
					    procedure pnlHelpersColorClick(Sender: TObject);
 | 
				
			||||||
  private
 | 
					  private
 | 
				
			||||||
    { Private declarations }
 | 
					    { Private declarations }
 | 
				
			||||||
  public
 | 
					  public
 | 
				
			||||||
@ -221,7 +238,7 @@ implementation
 | 
				
			|||||||
{$R *.DFM}
 | 
					{$R *.DFM}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uses
 | 
					uses
 | 
				
			||||||
  Main, Global, Editor, ControlPoint, XFormMan;
 | 
					  Main, Global, Editor, ControlPoint, XFormMan, Adjust;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TOptionsForm.btnCancelClick(Sender: TObject);
 | 
					procedure TOptionsForm.btnCancelClick(Sender: TObject);
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
@ -278,6 +295,11 @@ begin
 | 
				
			|||||||
  txtMediumQuality.Text := FloatToStr(prevMediumQuality);
 | 
					  txtMediumQuality.Text := FloatToStr(prevMediumQuality);
 | 
				
			||||||
  txtHighQuality.Text := FloatToStr(prevHighQuality);
 | 
					  txtHighQuality.Text := FloatToStr(prevHighQuality);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  pnlBackColor.Color := TColor(EditorBkgColor);
 | 
				
			||||||
 | 
					  pnlGridColor1.Color := GridColor1;
 | 
				
			||||||
 | 
					  pnlGridColor2.Color := GridColor2;
 | 
				
			||||||
 | 
					  pnlReference.color := TColor(ReferenceTriangleColor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { Random tab }
 | 
					  { Random tab }
 | 
				
			||||||
  udMinXforms.Position := randMinTransforms;
 | 
					  udMinXforms.Position := randMinTransforms;
 | 
				
			||||||
  udMaxXforms.Position := randMaxTransforms;
 | 
					  udMaxXforms.Position := randMaxTransforms;
 | 
				
			||||||
@ -620,5 +642,61 @@ begin
 | 
				
			|||||||
  end;
 | 
					  end;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TOptionsForm.pnlBackColorClick(Sender: TObject);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  AdjustForm.ColorDialog.Color := pnlBackColor.Color;
 | 
				
			||||||
 | 
					  if AdjustForm.ColorDialog.Execute then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    pnlBackColor.Color := AdjustForm.ColorDialog.Color;
 | 
				
			||||||
 | 
					    EditorBkgColor := Integer(pnlBackColor.color);
 | 
				
			||||||
 | 
					//    GrphPnl.Color := BackgroundColor;
 | 
				
			||||||
 | 
					//    TriangleView.Invalidate;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TOptionsForm.pnlReferenceClick(Sender: TObject);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  AdjustForm.ColorDialog.Color := pnlReference.Color;
 | 
				
			||||||
 | 
					  if AdjustForm.ColorDialog.Execute then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    pnlReference.Color := AdjustForm.ColorDialog.Color;
 | 
				
			||||||
 | 
					    ReferenceTriangleColor := Integer(pnlReference.color);
 | 
				
			||||||
 | 
					//    TriangleView.Invalidate;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TOptionsForm.pnlGridColor1Click(Sender: TObject);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  AdjustForm.ColorDialog.Color := pnlGridColor1.Color;
 | 
				
			||||||
 | 
					  if AdjustForm.ColorDialog.Execute then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    pnlGridColor1.Color := AdjustForm.ColorDialog.Color;
 | 
				
			||||||
 | 
					    GridColor1 := Integer(pnlGridColor1.color);
 | 
				
			||||||
 | 
					//    TriangleView.Invalidate;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TOptionsForm.pnlGridColor2Click(Sender: TObject);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  AdjustForm.ColorDialog.Color := pnlGridColor2.Color;
 | 
				
			||||||
 | 
					  if AdjustForm.ColorDialog.Execute then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    pnlGridColor2.Color := AdjustForm.ColorDialog.Color;
 | 
				
			||||||
 | 
					    GridColor2 := Integer(pnlGridColor2.color);
 | 
				
			||||||
 | 
					//    TriangleView.Invalidate;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TOptionsForm.pnlHelpersColorClick(Sender: TObject);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  AdjustForm.ColorDialog.Color := pnlHelpersColor.Color;
 | 
				
			||||||
 | 
					  if AdjustForm.ColorDialog.Execute then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    pnlHelpersColor.Color := AdjustForm.ColorDialog.Color;
 | 
				
			||||||
 | 
					    HelpersColor := Integer(pnlHelpersColor.color);
 | 
				
			||||||
 | 
					//    TriangleView.Invalidate;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end.
 | 
					end.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -3,7 +3,7 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
  Top = 383
 | 
					  Top = 383
 | 
				
			||||||
  Width = 539
 | 
					  Width = 539
 | 
				
			||||||
  Height = 390
 | 
					  Height = 390
 | 
				
			||||||
  Caption = 'Default Animation'
 | 
					  Caption = 'Script Editor'
 | 
				
			||||||
  Color = clBtnFace
 | 
					  Color = clBtnFace
 | 
				
			||||||
  Font.Charset = DEFAULT_CHARSET
 | 
					  Font.Charset = DEFAULT_CHARSET
 | 
				
			||||||
  Font.Color = clWindowText
 | 
					  Font.Color = clWindowText
 | 
				
			||||||
@ -20,7 +20,7 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
  TextHeight = 13
 | 
					  TextHeight = 13
 | 
				
			||||||
  object Splitter1: TSplitter
 | 
					  object Splitter1: TSplitter
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 244
 | 
					    Top = 250
 | 
				
			||||||
    Width = 531
 | 
					    Width = 531
 | 
				
			||||||
    Height = 4
 | 
					    Height = 4
 | 
				
			||||||
    Cursor = crVSplit
 | 
					    Cursor = crVSplit
 | 
				
			||||||
@ -30,7 +30,7 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
    Left = 508
 | 
					    Left = 508
 | 
				
			||||||
    Top = 0
 | 
					    Top = 0
 | 
				
			||||||
    Width = 23
 | 
					    Width = 23
 | 
				
			||||||
    Height = 244
 | 
					    Height = 250
 | 
				
			||||||
    Align = alRight
 | 
					    Align = alRight
 | 
				
			||||||
    AutoSize = True
 | 
					    AutoSize = True
 | 
				
			||||||
    Caption = 'ToolBar'
 | 
					    Caption = 'ToolBar'
 | 
				
			||||||
@ -96,7 +96,7 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
  object StatusBar: TStatusBar
 | 
					  object StatusBar: TStatusBar
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 337
 | 
					    Top = 343
 | 
				
			||||||
    Width = 531
 | 
					    Width = 531
 | 
				
			||||||
    Height = 19
 | 
					    Height = 19
 | 
				
			||||||
    Anchors = [akLeft, akRight]
 | 
					    Anchors = [akLeft, akRight]
 | 
				
			||||||
@ -106,7 +106,7 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 0
 | 
					    Top = 0
 | 
				
			||||||
    Width = 508
 | 
					    Width = 508
 | 
				
			||||||
    Height = 244
 | 
					    Height = 250
 | 
				
			||||||
    Align = alClient
 | 
					    Align = alClient
 | 
				
			||||||
    BevelInner = bvLowered
 | 
					    BevelInner = bvLowered
 | 
				
			||||||
    BevelOuter = bvLowered
 | 
					    BevelOuter = bvLowered
 | 
				
			||||||
@ -116,7 +116,7 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
      Left = 2
 | 
					      Left = 2
 | 
				
			||||||
      Top = 2
 | 
					      Top = 2
 | 
				
			||||||
      Width = 504
 | 
					      Width = 504
 | 
				
			||||||
      Height = 240
 | 
					      Height = 246
 | 
				
			||||||
      Cursor = crIBeam
 | 
					      Cursor = crIBeam
 | 
				
			||||||
      PopupMenu = PopupMenu
 | 
					      PopupMenu = PopupMenu
 | 
				
			||||||
      ActiveLineSettings.ShowActiveLine = False
 | 
					      ActiveLineSettings.ShowActiveLine = False
 | 
				
			||||||
@ -190,14 +190,14 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
      UrlStyle.BkColor = clWhite
 | 
					      UrlStyle.BkColor = clWhite
 | 
				
			||||||
      UrlStyle.Style = [fsUnderline]
 | 
					      UrlStyle.Style = [fsUnderline]
 | 
				
			||||||
      UseStyler = True
 | 
					      UseStyler = True
 | 
				
			||||||
      Version = '1.6.0.8'
 | 
					      Version = '1.6.0.17'
 | 
				
			||||||
      WordWrap = wwNone
 | 
					      WordWrap = wwNone
 | 
				
			||||||
      OnChange = EditorChange
 | 
					      OnChange = EditorChange
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  object Console: TMemo
 | 
					  object Console: TMemo
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 248
 | 
					    Top = 254
 | 
				
			||||||
    Width = 531
 | 
					    Width = 531
 | 
				
			||||||
    Height = 89
 | 
					    Height = 89
 | 
				
			||||||
    Align = alBottom
 | 
					    Align = alBottom
 | 
				
			||||||
@ -389,6 +389,13 @@ object ScriptEditor: TScriptEditor
 | 
				
			|||||||
    EventSupport = False
 | 
					    EventSupport = False
 | 
				
			||||||
    OnCompileError = ScripterCompileError
 | 
					    OnCompileError = ScripterCompileError
 | 
				
			||||||
    ShortBooleanEval = False
 | 
					    ShortBooleanEval = False
 | 
				
			||||||
 | 
					    LibOptions.SearchPath.Strings = (
 | 
				
			||||||
 | 
					      '$(CURDIR)'
 | 
				
			||||||
 | 
					      '$(APPDIR)')
 | 
				
			||||||
 | 
					    LibOptions.SourceFileExt = '.psc'
 | 
				
			||||||
 | 
					    LibOptions.CompiledFileExt = '.pcu'
 | 
				
			||||||
 | 
					    LibOptions.UseScriptFiles = False
 | 
				
			||||||
 | 
					    CallExecHookEvent = False
 | 
				
			||||||
    Left = 360
 | 
					    Left = 360
 | 
				
			||||||
    Top = 32
 | 
					    Top = 32
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
				
			|||||||
@ -1475,7 +1475,7 @@ begin
 | 
				
			|||||||
  if nxform < NXFORMS then
 | 
					  if nxform < NXFORMS then
 | 
				
			||||||
    for i := nxform to NXFORMS - 1 do
 | 
					    for i := nxform to NXFORMS - 1 do
 | 
				
			||||||
      cp1.xform[i].density := 0;
 | 
					      cp1.xform[i].density := 0;
 | 
				
			||||||
  cp1.NormalizeWeights;
 | 
					  // --?-- cp1.NormalizeWeights;
 | 
				
			||||||
  // Check for symmetry parameter
 | 
					  // Check for symmetry parameter
 | 
				
			||||||
  if cp1.symmetry <> 0 then
 | 
					  if cp1.symmetry <> 0 then
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
@ -1517,7 +1517,7 @@ begin
 | 
				
			|||||||
    for i := 0 to NXFORMS - 1 do
 | 
					    for i := 0 to NXFORMS - 1 do
 | 
				
			||||||
      if ScriptEditor.cp.xform[i].density = 0 then break;
 | 
					      if ScriptEditor.cp.xform[i].density = 0 then break;
 | 
				
			||||||
    NumTransforms := i;
 | 
					    NumTransforms := i;
 | 
				
			||||||
    ScriptEditor.cp.NormalizeWeights;
 | 
					    // --?-- ScriptEditor.cp.NormalizeWeights;
 | 
				
			||||||
//    FlameName := FileList[index];
 | 
					//    FlameName := FileList[index];
 | 
				
			||||||
  finally
 | 
					  finally
 | 
				
			||||||
    IFSStrings.Free;
 | 
					    IFSStrings.Free;
 | 
				
			||||||
@ -1589,7 +1589,7 @@ begin
 | 
				
			|||||||
    for i := 0 to NXFORMS - 1 do
 | 
					    for i := 0 to NXFORMS - 1 do
 | 
				
			||||||
      if ScriptEditor.cp.xform[i].density = 0 then break;
 | 
					      if ScriptEditor.cp.xform[i].density = 0 then break;
 | 
				
			||||||
    NumTransforms := i;
 | 
					    NumTransforms := i;
 | 
				
			||||||
    ScriptEditor.cp.NormalizeWeights;
 | 
					    // --?-- ScriptEditor.cp.NormalizeWeights;
 | 
				
			||||||
    if SavedPal then ScriptEditor.cp.cmap := Palette;
 | 
					    if SavedPal then ScriptEditor.cp.cmap := Palette;
 | 
				
			||||||
    ScriptEditor.cp.name := FileList[index];
 | 
					    ScriptEditor.cp.name := FileList[index];
 | 
				
			||||||
  finally
 | 
					  finally
 | 
				
			||||||
@ -1749,9 +1749,9 @@ begin
 | 
				
			|||||||
  if NumTransforms > 1 then
 | 
					  if NumTransforms > 1 then
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
    AMachine.Paused := True;
 | 
					    AMachine.Paused := True;
 | 
				
			||||||
    ScriptEditor.cp.NormalizeWeights;
 | 
					    // --?-- ScriptEditor.cp.NormalizeWeights;
 | 
				
			||||||
    PreviewForm.cp.Copy(ScriptEditor.cp);
 | 
					    PreviewForm.cp.Copy(ScriptEditor.cp);
 | 
				
			||||||
    AdjustScale(PreviewForm.cp, PreviewForm.Image.Width, PreviewForm.Image.Height);
 | 
					    PreviewForm.cp.AdjustScale(PreviewForm.Image.Width, PreviewForm.Image.Height);
 | 
				
			||||||
    PreviewForm.Show;
 | 
					    PreviewForm.Show;
 | 
				
			||||||
    PreviewForm.DrawFlame;
 | 
					    PreviewForm.DrawFlame;
 | 
				
			||||||
    AMachine.Paused := False;
 | 
					    AMachine.Paused := False;
 | 
				
			||||||
@ -1764,7 +1764,7 @@ procedure TOperationLibrary.RenderProc(AMachine: TatVirtualMachine);
 | 
				
			|||||||
begin
 | 
					begin
 | 
				
			||||||
  if NumTransforms > 1 then
 | 
					  if NumTransforms > 1 then
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
    ScriptEditor.cp.NormalizeWeights;
 | 
					    // --?-- ScriptEditor.cp.NormalizeWeights;
 | 
				
			||||||
    ScriptRenderForm.cp.Copy(ScriptEditor.cp);
 | 
					    ScriptRenderForm.cp.Copy(ScriptEditor.cp);
 | 
				
			||||||
    ScriptRenderForm.Caption := 'Rendering ' + ScriptEditor.Renderer.Filename; ;
 | 
					    ScriptRenderForm.Caption := 'Rendering ' + ScriptEditor.Renderer.Filename; ;
 | 
				
			||||||
    ScriptRenderForm.Show;
 | 
					    ScriptRenderForm.Show;
 | 
				
			||||||
@ -2913,7 +2913,7 @@ begin
 | 
				
			|||||||
  else
 | 
					  else
 | 
				
			||||||
    if (LastError = '') and UpdateIt then
 | 
					    if (LastError = '') and UpdateIt then
 | 
				
			||||||
    begin
 | 
					    begin
 | 
				
			||||||
      cp.NormalizeWeights;
 | 
					      // --?-- cp.NormalizeWeights;
 | 
				
			||||||
      MainForm.UpdateUndo;
 | 
					      MainForm.UpdateUndo;
 | 
				
			||||||
      MainCp.Copy(cp);
 | 
					      MainCp.Copy(cp);
 | 
				
			||||||
      UpdateFlame;
 | 
					      UpdateFlame;
 | 
				
			||||||
@ -2945,11 +2945,11 @@ procedure TScriptEditor.UpdateFlame;
 | 
				
			|||||||
begin
 | 
					begin
 | 
				
			||||||
  MainForm.StopThread;
 | 
					  MainForm.StopThread;
 | 
				
			||||||
  MainForm.UpdateUndo;
 | 
					  MainForm.UpdateUndo;
 | 
				
			||||||
  cp.NormalizeWeights;
 | 
					  // --?-- cp.NormalizeWeights;
 | 
				
			||||||
  MainCp.Copy(cp);
 | 
					  MainCp.Copy(cp);
 | 
				
			||||||
//  MainCp.name := FlameName;
 | 
					//  MainCp.name := FlameName;
 | 
				
			||||||
  Transforms := MainCp.TrianglesFromCP(MainTriangles);
 | 
					  Transforms := MainCp.TrianglesFromCP(MainTriangles);
 | 
				
			||||||
  AdjustScale(MainCp, MainForm.Image.Width, MainForm.Image.Height);
 | 
					  MainCp.AdjustScale(MainForm.Image.Width, MainForm.Image.Height);
 | 
				
			||||||
  if ResetLocation then MainCp.CalcBoundBox else
 | 
					  if ResetLocation then MainCp.CalcBoundBox else
 | 
				
			||||||
  begin;
 | 
					  begin;
 | 
				
			||||||
    MainCp.Zoom := cp.zoom;
 | 
					    MainCp.Zoom := cp.zoom;
 | 
				
			||||||
 | 
				
			|||||||
@ -21,12 +21,7 @@ interface
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
uses
 | 
					uses
 | 
				
			||||||
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 | 
					  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 | 
				
			||||||
  ComCtrls, StdCtrls, Render, cmap, ControlPoint;
 | 
					  ComCtrls, StdCtrls, RenderThread, cmap, ControlPoint;
 | 
				
			||||||
 | 
					 | 
				
			||||||
const
 | 
					 | 
				
			||||||
  WM_THREAD_COMPLETE = WM_APP + 5437;
 | 
					 | 
				
			||||||
  WM_THREAD_TERMINATE = WM_APP + 5438;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
type
 | 
					type
 | 
				
			||||||
  TScriptRenderForm = class(TForm)
 | 
					  TScriptRenderForm = class(TForm)
 | 
				
			||||||
@ -36,11 +31,16 @@ type
 | 
				
			|||||||
    procedure FormCreate(Sender: TObject);
 | 
					    procedure FormCreate(Sender: TObject);
 | 
				
			||||||
    procedure btnCancelClick(Sender: TObject);
 | 
					    procedure btnCancelClick(Sender: TObject);
 | 
				
			||||||
  private
 | 
					  private
 | 
				
			||||||
    PixelsPerUnit: double;
 | 
					//    PixelsPerUnit: double;
 | 
				
			||||||
    StartTime: TDateTime;
 | 
					    StartTime: TDateTime;
 | 
				
			||||||
    Remainder: TDateTime;
 | 
					    Remainder: TDateTime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    procedure HandleThreadCompletion(var Message: TMessage);
 | 
				
			||||||
 | 
					      message WM_THREAD_COMPLETE;
 | 
				
			||||||
 | 
					    procedure HandleThreadTermination(var Message: TMessage);
 | 
				
			||||||
 | 
					      message WM_THREAD_TERMINATE;
 | 
				
			||||||
  public
 | 
					  public
 | 
				
			||||||
    Renderer: TRenderer;
 | 
					    Renderer: TRenderThread;
 | 
				
			||||||
    ColorMap: TColorMap;
 | 
					    ColorMap: TColorMap;
 | 
				
			||||||
    cp: TControlPoint;
 | 
					    cp: TControlPoint;
 | 
				
			||||||
    Filename: string;
 | 
					    Filename: string;
 | 
				
			||||||
@ -64,34 +64,44 @@ uses Global, Math, FormRender, ScriptForm;
 | 
				
			|||||||
procedure TScriptRenderForm.SetRenderBounds;
 | 
					procedure TScriptRenderForm.SetRenderBounds;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  cp.copy(ScriptEditor.cp);
 | 
					  cp.copy(ScriptEditor.cp);
 | 
				
			||||||
  cp.Width := ScriptEditor.Renderer.Width;
 | 
					  //cp.Width := ScriptEditor.Renderer.Width;
 | 
				
			||||||
  cp.Height := ScriptEditor.Renderer.Height;
 | 
					  //cp.Height := ScriptEditor.Renderer.Height;
 | 
				
			||||||
  cp.CalcBoundBox;
 | 
					  cp.AdjustScale(ScriptEditor.Renderer.Width, ScriptEditor.Renderer.Height);
 | 
				
			||||||
 | 
					  // --?-- cp.CalcBoundBox;
 | 
				
			||||||
  cp.center[0] := ScriptEditor.cp.center[0];
 | 
					  cp.center[0] := ScriptEditor.cp.center[0];
 | 
				
			||||||
  cp.center[1] := ScriptEditor.cp.center[1];
 | 
					  cp.center[1] := ScriptEditor.cp.center[1];
 | 
				
			||||||
  cp.zoom := ScriptEditor.cp.zoom;
 | 
					  cp.zoom := ScriptEditor.cp.zoom;
 | 
				
			||||||
  PixelsPerUnit := cp.Pixels_per_unit;
 | 
					  //PixelsPerUnit := cp.Pixels_per_unit;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TScriptRenderForm.Render;
 | 
					procedure TScriptRenderForm.Render;
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
 | 
					  assert(not Assigned(Renderer));
 | 
				
			||||||
 | 
					  Renderer := TRenderThread.Create;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Cancelled := False;
 | 
					  Cancelled := False;
 | 
				
			||||||
  ScriptEditor.Scripter.Paused := True;
 | 
					  ScriptEditor.Scripter.Paused := True;
 | 
				
			||||||
  StartTime := Now;
 | 
					  StartTime := Now;
 | 
				
			||||||
  Remainder := 1;
 | 
					  Remainder := 1;
 | 
				
			||||||
  cp.copy(ScriptEditor.cp);
 | 
					  cp.copy(ScriptEditor.cp);
 | 
				
			||||||
  Filename := ScriptEditor.Renderer.Filename;
 | 
					  Filename := ScriptEditor.Renderer.Filename;
 | 
				
			||||||
  cp.Width := ScriptEditor.Renderer.Width;
 | 
					  //cp.Width := ScriptEditor.Renderer.Width;
 | 
				
			||||||
  cp.Height := ScriptEditor.Renderer.Height;
 | 
					  //cp.Height := ScriptEditor.Renderer.Height;
 | 
				
			||||||
  cp.pixels_per_unit := PixelsPerUnit;
 | 
					  //cp.pixels_per_unit := PixelsPerUnit;
 | 
				
			||||||
 | 
					  cp.AdjustScale(ScriptEditor.Renderer.Width, ScriptEditor.Renderer.Height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Renderer.OnProgress := OnProgress;
 | 
					  Renderer.OnProgress := OnProgress;
 | 
				
			||||||
  Renderer.Compatibility := Compatibility;
 | 
					  Renderer.Compatibility := Compatibility;
 | 
				
			||||||
  Renderer.SetCP(cp);
 | 
					  Renderer.SetCP(cp);
 | 
				
			||||||
  if (ScriptEditor.Renderer.MaxMemory > 0) then
 | 
					  if (ScriptEditor.Renderer.MaxMemory > 0) then Renderer.MaxMem := ScriptEditor.Renderer.MaxMemory;
 | 
				
			||||||
    Renderer.RenderMaxMem(ScriptEditor.Renderer.MaxMemory)
 | 
					  Renderer.TargetHandle := Handle;
 | 
				
			||||||
  else Renderer.Render;
 | 
					  renderPath := ExtractFilePath(ScriptEditor.Renderer.Filename);
 | 
				
			||||||
  Renderer.SaveImage(FileName);
 | 
					  Renderer.Priority := tpLower;
 | 
				
			||||||
  ScriptEditor.Scripter.Paused := False;
 | 
					  Renderer.NrThreads := NrTreads;
 | 
				
			||||||
 | 
					  Renderer.Resume;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//  Renderer.SaveImage(FileName);
 | 
				
			||||||
 | 
					//  ScriptEditor.Scripter.Paused := False;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TScriptRenderForm.OnProgress(prog: double);
 | 
					procedure TScriptRenderForm.OnProgress(prog: double);
 | 
				
			||||||
@ -101,20 +111,19 @@ begin
 | 
				
			|||||||
  prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
 | 
					  prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
 | 
				
			||||||
  ProgressBar.Position := round(100 * prog);
 | 
					  ProgressBar.Position := round(100 * prog);
 | 
				
			||||||
  Elapsed := Now - StartTime;
 | 
					  Elapsed := Now - StartTime;
 | 
				
			||||||
  if prog > 0 then
 | 
					//  if prog > 0 then Remainder := Elapsed * (1/prog - 1);
 | 
				
			||||||
    Remainder := Min(Remainder, Elapsed * (power(1 / prog, 1.2) - 1));
 | 
					 | 
				
			||||||
  Application.ProcessMessages;
 | 
					  Application.ProcessMessages;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TScriptRenderForm.FormDestroy(Sender: TObject);
 | 
					procedure TScriptRenderForm.FormDestroy(Sender: TObject);
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  cp.free;
 | 
					  cp.free;
 | 
				
			||||||
  Renderer.free;
 | 
					  assert(not Assigned(Renderer)); //if Assigned(Renderer) then Renderer.free;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
procedure TScriptRenderForm.FormCreate(Sender: TObject);
 | 
					procedure TScriptRenderForm.FormCreate(Sender: TObject);
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  Renderer := TRenderer.Create;
 | 
					  //Renderer := TRenderThread.Create;
 | 
				
			||||||
  cp := TControlPoint.Create;
 | 
					  cp := TControlPoint.Create;
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -122,9 +131,34 @@ procedure TScriptRenderForm.btnCancelClick(Sender: TObject);
 | 
				
			|||||||
begin
 | 
					begin
 | 
				
			||||||
  ScriptEditor.Scripter.Halt;
 | 
					  ScriptEditor.Scripter.Halt;
 | 
				
			||||||
  Cancelled := True;
 | 
					  Cancelled := True;
 | 
				
			||||||
  Renderer.Stop;
 | 
					//  Renderer.Stop;
 | 
				
			||||||
 | 
					  if Assigned(Renderer) then begin
 | 
				
			||||||
 | 
					    Renderer.Terminate;
 | 
				
			||||||
 | 
					    Renderer.WaitFor;
 | 
				
			||||||
 | 
					    Renderer.Free;
 | 
				
			||||||
 | 
					    Renderer := nil;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
  LastError := 'Render cancelled';
 | 
					  LastError := 'Render cancelled';
 | 
				
			||||||
end;
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TScriptRenderForm.HandleThreadCompletion(var Message: TMessage);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  Renderer.SaveImage(FileName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Renderer.Free;
 | 
				
			||||||
 | 
					  Renderer := nil;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ScriptEditor.Scripter.Paused := False;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					procedure TScriptRenderForm.HandleThreadTermination(var Message: TMessage);
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  if Assigned(Renderer) then
 | 
				
			||||||
 | 
					  begin
 | 
				
			||||||
 | 
					    Renderer.Free;
 | 
				
			||||||
 | 
					    Renderer := nil;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
end.
 | 
					end.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -6,7 +6,7 @@ uses
 | 
				
			|||||||
  BaseVariation;
 | 
					  BaseVariation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const
 | 
					const
 | 
				
			||||||
  NRLOCVAR = 23;
 | 
					  NRLOCVAR = 27;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function NrVar: integer;
 | 
					function NrVar: integer;
 | 
				
			||||||
function Varnames(const index: integer): String;
 | 
					function Varnames(const index: integer): String;
 | 
				
			||||||
@ -57,7 +57,11 @@ const
 | 
				
			|||||||
    'power',
 | 
					    'power',
 | 
				
			||||||
    'cosine',
 | 
					    'cosine',
 | 
				
			||||||
    'rings',
 | 
					    'rings',
 | 
				
			||||||
    'fan'
 | 
					    'fan',
 | 
				
			||||||
 | 
					    'eyefish',
 | 
				
			||||||
 | 
					    'bubble',
 | 
				
			||||||
 | 
					    'cylinder',
 | 
				
			||||||
 | 
					    'smoke'
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
begin
 | 
					begin
 | 
				
			||||||
  if Index < NRLOCVAR then
 | 
					  if Index < NRLOCVAR then
 | 
				
			||||||
 | 
				
			|||||||
@ -1,8 +1,8 @@
 | 
				
			|||||||
object frmPostProcess: TfrmPostProcess
 | 
					object frmPostProcess: TfrmPostProcess
 | 
				
			||||||
  Left = 0
 | 
					  Left = 38
 | 
				
			||||||
  Top = 0
 | 
					  Top = 43
 | 
				
			||||||
  Width = 434
 | 
					  Width = 640
 | 
				
			||||||
  Height = 320
 | 
					  Height = 534
 | 
				
			||||||
  Caption = 'Post Render'
 | 
					  Caption = 'Post Render'
 | 
				
			||||||
  Color = clBtnFace
 | 
					  Color = clBtnFace
 | 
				
			||||||
  Font.Charset = DEFAULT_CHARSET
 | 
					  Font.Charset = DEFAULT_CHARSET
 | 
				
			||||||
@ -19,14 +19,14 @@ object frmPostProcess: TfrmPostProcess
 | 
				
			|||||||
  object Panel1: TPanel
 | 
					  object Panel1: TPanel
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 0
 | 
					    Top = 0
 | 
				
			||||||
    Width = 426
 | 
					    Width = 632
 | 
				
			||||||
    Height = 149
 | 
					    Height = 71
 | 
				
			||||||
    Align = alTop
 | 
					    Align = alTop
 | 
				
			||||||
    BevelOuter = bvLowered
 | 
					    BevelOuter = bvLowered
 | 
				
			||||||
    TabOrder = 0
 | 
					    TabOrder = 0
 | 
				
			||||||
    DesignSize = (
 | 
					    DesignSize = (
 | 
				
			||||||
      426
 | 
					      632
 | 
				
			||||||
      149)
 | 
					      71)
 | 
				
			||||||
    object Label1: TLabel
 | 
					    object Label1: TLabel
 | 
				
			||||||
      Left = 12
 | 
					      Left = 12
 | 
				
			||||||
      Top = 12
 | 
					      Top = 12
 | 
				
			||||||
@ -42,36 +42,36 @@ object frmPostProcess: TfrmPostProcess
 | 
				
			|||||||
      Caption = 'Filter'
 | 
					      Caption = 'Filter'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object Label3: TLabel
 | 
					    object Label3: TLabel
 | 
				
			||||||
      Left = 12
 | 
					      Left = 172
 | 
				
			||||||
      Top = 52
 | 
					      Top = 12
 | 
				
			||||||
      Width = 35
 | 
					      Width = 35
 | 
				
			||||||
      Height = 13
 | 
					      Height = 13
 | 
				
			||||||
      Caption = 'Gamma'
 | 
					      Caption = 'Gamma'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object Label4: TLabel
 | 
					    object Label4: TLabel
 | 
				
			||||||
      Left = 12
 | 
					      Left = 332
 | 
				
			||||||
      Top = 72
 | 
					      Top = 32
 | 
				
			||||||
      Width = 45
 | 
					      Width = 45
 | 
				
			||||||
      Height = 13
 | 
					      Height = 13
 | 
				
			||||||
      Caption = 'Vibrancy:'
 | 
					      Caption = 'Vibrancy:'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object Label5: TLabel
 | 
					    object Label5: TLabel
 | 
				
			||||||
      Left = 12
 | 
					      Left = 332
 | 
				
			||||||
      Top = 92
 | 
					      Top = 12
 | 
				
			||||||
      Width = 42
 | 
					      Width = 42
 | 
				
			||||||
      Height = 13
 | 
					      Height = 13
 | 
				
			||||||
      Caption = 'Contrast'
 | 
					      Caption = 'Contrast'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object Label6: TLabel
 | 
					    object Label6: TLabel
 | 
				
			||||||
      Left = 12
 | 
					      Left = 172
 | 
				
			||||||
      Top = 112
 | 
					      Top = 32
 | 
				
			||||||
      Width = 50
 | 
					      Width = 50
 | 
				
			||||||
      Height = 13
 | 
					      Height = 13
 | 
				
			||||||
      Caption = 'Brightness'
 | 
					      Caption = 'Brightness'
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object btnSave: TButton
 | 
					    object btnSave: TButton
 | 
				
			||||||
      Left = 340
 | 
					      Left = 552
 | 
				
			||||||
      Top = 36
 | 
					      Top = 30
 | 
				
			||||||
      Width = 75
 | 
					      Width = 75
 | 
				
			||||||
      Height = 25
 | 
					      Height = 25
 | 
				
			||||||
      Anchors = [akTop, akRight]
 | 
					      Anchors = [akTop, akRight]
 | 
				
			||||||
@ -82,7 +82,7 @@ object frmPostProcess: TfrmPostProcess
 | 
				
			|||||||
    object pnlBackColor: TPanel
 | 
					    object pnlBackColor: TPanel
 | 
				
			||||||
      Left = 104
 | 
					      Left = 104
 | 
				
			||||||
      Top = 8
 | 
					      Top = 8
 | 
				
			||||||
      Width = 97
 | 
					      Width = 57
 | 
				
			||||||
      Height = 21
 | 
					      Height = 21
 | 
				
			||||||
      BevelOuter = bvLowered
 | 
					      BevelOuter = bvLowered
 | 
				
			||||||
      TabOrder = 0
 | 
					      TabOrder = 0
 | 
				
			||||||
@ -90,15 +90,15 @@ object frmPostProcess: TfrmPostProcess
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
    object ProgressBar1: TProgressBar
 | 
					    object ProgressBar1: TProgressBar
 | 
				
			||||||
      Left = 1
 | 
					      Left = 1
 | 
				
			||||||
      Top = 136
 | 
					      Top = 58
 | 
				
			||||||
      Width = 424
 | 
					      Width = 630
 | 
				
			||||||
      Height = 12
 | 
					      Height = 12
 | 
				
			||||||
      Align = alBottom
 | 
					      Align = alBottom
 | 
				
			||||||
      TabOrder = 1
 | 
					      TabOrder = 1
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object btnApply: TButton
 | 
					    object btnApply: TButton
 | 
				
			||||||
      Left = 340
 | 
					      Left = 552
 | 
				
			||||||
      Top = 8
 | 
					      Top = 4
 | 
				
			||||||
      Width = 75
 | 
					      Width = 75
 | 
				
			||||||
      Height = 25
 | 
					      Height = 25
 | 
				
			||||||
      Anchors = [akTop, akRight]
 | 
					      Anchors = [akTop, akRight]
 | 
				
			||||||
@ -110,44 +110,44 @@ object frmPostProcess: TfrmPostProcess
 | 
				
			|||||||
    object txtFilterRadius: TEdit
 | 
					    object txtFilterRadius: TEdit
 | 
				
			||||||
      Left = 104
 | 
					      Left = 104
 | 
				
			||||||
      Top = 28
 | 
					      Top = 28
 | 
				
			||||||
      Width = 97
 | 
					      Width = 57
 | 
				
			||||||
      Height = 21
 | 
					      Height = 21
 | 
				
			||||||
      TabOrder = 2
 | 
					      TabOrder = 2
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object txtGamma: TEdit
 | 
					    object txtGamma: TEdit
 | 
				
			||||||
      Left = 104
 | 
					      Left = 264
 | 
				
			||||||
      Top = 48
 | 
					      Top = 8
 | 
				
			||||||
      Width = 97
 | 
					      Width = 57
 | 
				
			||||||
      Height = 21
 | 
					      Height = 21
 | 
				
			||||||
      TabOrder = 3
 | 
					      TabOrder = 3
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object txtVib: TEdit
 | 
					    object txtVib: TEdit
 | 
				
			||||||
      Left = 104
 | 
					      Left = 424
 | 
				
			||||||
      Top = 68
 | 
					      Top = 28
 | 
				
			||||||
      Width = 97
 | 
					      Width = 57
 | 
				
			||||||
      Height = 21
 | 
					      Height = 21
 | 
				
			||||||
      TabOrder = 4
 | 
					      TabOrder = 4
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object txtContrast: TEdit
 | 
					    object txtContrast: TEdit
 | 
				
			||||||
      Left = 104
 | 
					      Left = 424
 | 
				
			||||||
      Top = 88
 | 
					      Top = 8
 | 
				
			||||||
      Width = 97
 | 
					      Width = 57
 | 
				
			||||||
      Height = 21
 | 
					      Height = 21
 | 
				
			||||||
      TabOrder = 5
 | 
					      TabOrder = 5
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    object txtBrightness: TEdit
 | 
					    object txtBrightness: TEdit
 | 
				
			||||||
      Left = 104
 | 
					      Left = 264
 | 
				
			||||||
      Top = 108
 | 
					      Top = 28
 | 
				
			||||||
      Width = 97
 | 
					      Width = 57
 | 
				
			||||||
      Height = 21
 | 
					      Height = 21
 | 
				
			||||||
      TabOrder = 6
 | 
					      TabOrder = 6
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  object ScrollBox1: TScrollBox
 | 
					  object ScrollBox1: TScrollBox
 | 
				
			||||||
    Left = 0
 | 
					    Left = 0
 | 
				
			||||||
    Top = 149
 | 
					    Top = 71
 | 
				
			||||||
    Width = 426
 | 
					    Width = 632
 | 
				
			||||||
    Height = 137
 | 
					    Height = 435
 | 
				
			||||||
    Align = alClient
 | 
					    Align = alClient
 | 
				
			||||||
    TabOrder = 1
 | 
					    TabOrder = 1
 | 
				
			||||||
    object Image: TImage
 | 
					    object Image: TImage
 | 
				
			||||||
@ -159,7 +159,7 @@ object frmPostProcess: TfrmPostProcess
 | 
				
			|||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  object ColorDialog: TColorDialog
 | 
					  object ColorDialog: TColorDialog
 | 
				
			||||||
    Left = 284
 | 
					    Left = 508
 | 
				
			||||||
    Top = 4
 | 
					    Top = 20
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user