ADMIN: migration complete

git-svn-id: https://svn.code.sf.net/p/apophysis7x/svn/trunk@1 a5d1c0f9-a0e9-45c6-87dd-9d276e40c949
This commit is contained in:
xyrus02
2013-07-28 08:58:33 +00:00
commit 95a2f54683
258 changed files with 175238 additions and 0 deletions

1756
Forms/About.dfm Normal file

File diff suppressed because it is too large Load Diff

113
Forms/About.pas Normal file
View File

@ -0,0 +1,113 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit About;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Global, Translation;
type
TAboutForm = class(TForm)
btnOK: TButton;
Label3: TLabel;
Label4: TLabel;
Label10: TLabel;
Label11: TLabel;
lblFlamecom: TLabel;
Bevel1: TBevel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Bevel3: TBevel;
Label17: TLabel;
Label16: TLabel;
Label2: TLabel;
Bevel2: TBevel;
Label19: TLabel;
Label5: TLabel;
Image1: TImage;
procedure btnOKClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure lblCreditClick(Sender: TObject);
procedure DevelopersClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
URL :String;
public
{ Public declarations }
end;
var
AboutForm: TAboutForm;
implementation
uses Main, ShellAPI;
{$R *.DFM}
procedure TAboutForm.btnOKClick(Sender: TObject);
begin
ModalResult := mrOK;
end;
procedure TAboutForm.FormShow(Sender: TObject);
begin
//lblCredit.Caption := MainCp.Nick;
//URL := MainCp.URL;
//if URL <> '' then lblCredit.Font.color := clBlue else lblCredit.Font.color := clBlack;
end;
procedure TAboutForm.lblCreditClick(Sender: TObject);
begin
if URL <> '' then
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar(URL),
nil, nil, SW_SHOWNORMAL);
end;
procedure TAboutForm.DevelopersClick(Sender: TObject);
begin
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar(TLabel(Sender).Hint),
nil, nil, SW_SHOWNORMAL);
end;
procedure TAboutForm.FormCreate(Sender: TObject);
var s1, s2, s3:string;
begin
btnOK.Caption := TextByKey('common-close');
if (LanguageFile <> AvailableLanguages.Strings[0]) and (LanguageFile <> '') then
begin
LanguageInfo(LanguageFile, s1, s2);
s3 := LanguageAuthor(LanguageFile);
Label5.Visible := (s1 <> '') and (s3 <> '');
Label5.Caption := s1 + ' translation contributed by: ' + s3;
end;
end;
end.

1765
Forms/Adjust.dfm Normal file

File diff suppressed because it is too large Load Diff

2733
Forms/Adjust.pas Normal file

File diff suppressed because it is too large Load Diff

872
Forms/Browser.dfm Normal file
View File

@ -0,0 +1,872 @@
object GradientBrowser: TGradientBrowser
Left = 494
Top = 299
Width = 544
Height = 335
BorderIcons = [biSystemMenu, biMinimize]
Caption = 'Gradient Browser'
Color = clBtnFace
Constraints.MinHeight = 120
Constraints.MinWidth = 380
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000001002000680400001600000028000000100000002000
0000010020000000000040040000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000045C6F00100000000000000002DA5D654247EACE51F89B8FD1F7D
A8FC2385AFFA209DD2A01DA9DF53000000000000000000000000000000000000
00000000000000000000000000003AB6E247228CC1F143C2EAFF48C3E7FF4EC9
ECFF44C1E2F538A3C7FB1A7CABF9199BD1830000000000000000000000000000
000063D2F201000000000000000020B5E9FF34B0DBCE59D2F0FF5CD4F0FF5CD7
F2FF5AD6F2FD51CFECFB37AED7F4187BA9FD1A94C98F00000000000000000000
000070D8F302000000000000000022B3E7FE1C97C9E751CAE9FF5FD7F2FF0AB3
67FF006F00FF008825FF53D1EEFA2E9FCCEE187DACFE0B87BD020000000082DF
F4027CDCF40700000000000000006AD4F36C1181B2FD52CAE8FE62DAF3FF23D9
71FF00912BFF006000FF62D9F3FF49C3E5EF1280B0FE1B9BCE73000000000000
000089E2F42084DFF4421D99C2FD37A4C9FF46C2EBFF65D4F0FB66DAF3FE3EDB
8CFF00BA50FF00AB67FF63D9F3FF51CBEBF41E8BB9F81D95C8A7000000000000
000076DCF4693BB4DCF78BE2F4B59AE7F7E895E6F6FE95E8F6FE8CE3F5FF85E3
F4FF70DEF4FF68DCF4FF6ADBF4FF5CD4EFF4208BB9F72297C9AB000000000000
000054CBF3F98EE3F5CFB6F1F8FFB6F1F8FF9EEAF6FE93E9F6FF94E8F6FFB359
23FFB30F00FFAB2B00FF73DEF4FB63D7EFEE1D84B4F8279DCE94000000000000
000070D4F5FFA4EDF6E6B6F1F8FF2959F3FF00007AFF001FDBFF93E9F6FFB08C
64FFB03A00FF610000FF73DEF4F45CC3E3DE2781AEEF64D3F23E000000000000
000070D4F5FFACF0F7EBB6F1F8FF5490FFFF0022D9FF000058FFB2F0F8FFB4B6
97FFB38D64FFB6AB8CFF78D3ECE8359AC9EC51B6DB8F00000000000000000000
00007AD8F5F89EEAF6E6B6F1F8FF6DAFFFFF5590FFFF6DB0FFFFB6F1F8FFA5EC
F7FEA7ECF7FE98E7F5F14DB0D9F55DBBDDAB84DFF44000000000000000000000
0000A9EFF7786BD4F4FB9DEAF6EEAFF1F7F4B6F1F8FFB6F1F8FFB6F1F8FFA6EE
F6F9A0EAF6EF70D2EDE354C6EDF895E7F5580000000000000000000000000000
000000000000AAEFF78F5ACFF3F998E8F6E0B6F1F8FFB6F1F8FFB6F1F8FF92E7
F6E46CD4F4FA65D2F4E984D4E874000000000000000000000000000000000000
00000000000000000000A9EFF7737CD9F6F476D6F5FA72D4F5FD75D6F5FB5ECF
F4F190E6F5930000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000D80F0000F0070000B0030000B00100003001000080010000800100008001
000080010000800300008003000080070000C00F0000E03F0000FFFF0000}
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnResize = FormResize
OnShow = FormShow
DesignSize = (
536
306)
PixelsPerInch = 96
TextHeight = 13
object btnDefGradient: TSpeedButton
Left = 411
Top = 7
Width = 23
Height = 21
Hint = 'Open...'
Anchors = [akTop, akRight]
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnDefGradientClick
end
object ListView: TListView
Left = 7
Top = 7
Width = 398
Height = 234
Anchors = [akLeft, akTop, akRight, akBottom]
Columns = <
item
Caption = 'Title'
Width = 150
end>
HideSelection = False
LargeImages = LargeImages
ReadOnly = True
RowSelect = True
ParentShowHint = False
PopupMenu = PopupMenu
ShowHint = True
SmallImages = SmallImages
SortType = stText
TabOrder = 1
ViewStyle = vsList
OnChange = ListViewChange
OnDblClick = SpeedButton1Click
OnEdited = ListViewEdited
OnInfoTip = ListViewInfoTip
OnKeyPress = ListViewKeyPress
end
object pnlMain: TPanel
Left = 0
Top = 0
Width = 536
Height = 4
Align = alTop
BevelOuter = bvNone
TabOrder = 0
end
object pnlPreview: TPanel
Left = 0
Top = 268
Width = 487
Height = 25
Anchors = [akLeft, akRight, akBottom]
BevelOuter = bvLowered
TabOrder = 2
object Image: TImage
Left = 1
Top = 1
Width = 485
Height = 23
Align = alClient
Stretch = True
end
end
object SmallImages: TImageList
Left = 8
Top = 16
Bitmap = {
494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000001000000001002000000000000010
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808080008080
8000808080008080800080808000FFFFFF000000000000808000008080000080
8000000000007F7F7F0000000000000000007F7F7F0000000000000000007F7F
7F000000000000000000BBCCD500BBCCD5000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000007F7F
7F0000000000000000007F7F7F00000000000080800000808000000000000000
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFF5F000FFF1
E900FFEFE600FFEFE600FFF0E700FFF1E800FFF1E900FFF3EB00FFF3EC00FFF4
ED00FFF6F0000000000000000000000000000000000000808000008080000080
8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFF4ED00FFEE
E400FFEBDF00FFEBDF00FFEBE000FFECE200FFEDE200FFEEE400FFEFE500FFEF
E600FFF1EA00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFF1E900CD52
0800CD520800CD520800CD520800CD520800CD520800CD520800CD520800CD52
0800FFEDE300000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00000000007F7F
7F000000000000000000BBCCD500BBCCD5000000000000000000FFEFE600CD52
0800E2651800EB7A3700FFA77200FFD1B200FFF7ED00C2E9FF0042ADF700CD52
0800FFE9DC00000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFEDE200CD52
0800E1651900E9783500FFA77000FFD1B200FFF7EC00C2E9FF0040ADF700CD52
0800FFE5D6000000000000000000000000000000000000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000688DA200688D
A200688DA200688DA200688DA200688DA200FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFEBDF00CD52
0800E1651800EB783600FFA77000FFD1B200FFF7EC00C2E9FF0042ADF700CD52
0800FFE1D000000000000000000000000000FFF1EA0000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000000000000000
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF0000000000FFF5F000FFF1E900FFEFE600FFEFE600FFF0E700FFF1
E800FFF1E900FFF3EB00FFF3EC00FFF4ED00FFF6F00000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000000000000000
0000000000000000000000000000000000000000000000000000FFE9DB00CD52
0800E1651900EC793500FFA77000FFD0B200FFF7EC00C2E9FF0040AEF700CD52
0800FFDFCD00000000000000000000000000FFE9DC0000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF0000000000FFF1E900CD520800CD520800CD520800CD520800CD52
0800CD520800CD520800CD520800CD520800FFEDE30000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00688DA200688DA200688D
A200688DA200688DA200688DA200688DA2000000000000000000FFE7D800CD52
0800E1651900EB793500FFA57000FFD1B200FFF7EC00C2E9FF0040ADF700CD52
0800FFE1D000000000000000000000000000FFE1D00000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00688D
A200FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF0000000000FFEDE200CD520800E1651900E9783500FFA77000FFD1
B200FFF7EC00C2E9FF0040ADF700CD520800FFE5D60000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00BBCCD500000000000000
0000000000000000000000000000000000000000000000000000FFE4D500CD52
0800E3651A00EB7A3900FFA87400FFD1B300FFF7EC00C4E9FF0044AEF700CD52
0800FFE9DC00000000000000000000000000FFE1D00000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF0000000000FFE9DB00CD520800E1651900EC793500FFA77000FFD0
B200FFF7EC00C2E9FF0040AEF700CD520800FFDFCD0000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000FFE3D100CD52
0800ED793500F9945700FFBC8D00FFE1C500FFFFF90000000000000000000000
0000000000000000000000000000000000000000000000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00688D
A200FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF0000000000FFE4D500CD520800E3651A00EB7A3900FFA87400FFD1
B300FFF7EC00C4E9FF0044AEF700CD520800FFE9DC0000000000FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000FFE1CF00CD52
0800CD520800CD520800CD520800CD520800CD52080000000000E17D4100EB92
5E0000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF0000000000FFE1CF00CD520800CD520800CD520800CD520800CD52
0800CD52080000000000E17D4100EB925E0000000000FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00BBCCD500BBCCD5000000000000000000FFE2D100FFD7
BF00FFD0B400FFCEB100FFCFB300FFD0B400FFD3B80000000000F5A779000000
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF0000000000FFE7DA00FFE2D000FFDECB00FFDECA00FFDDC900FFDE
CA00FFDFCD000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFE7DA00FFE2
D000FFDECB00FFDECA00FFDDC900FFDECA00FFDFCD0000000000000000000000
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00BBCCD500BBCCD500424D3E000000000000003E000000
2800000040000000100000000100010000000000800000000000000000000000
000000000000000000000000FFFFFF00FFFFCD00000000008003C900FFDECA00
8003CB00FFDECA008003DA00FFE2D0008003EA00000000008003EA00DDE6EA00
8003EA00DDE6EA008003EA00DDE6EA0080030000000000008003000000000000
800300000000000080030000000000008007EA0000000000800F000000000000
801F000020000000803F8F1F0000000000000000000000000000000000000000
000000000000}
end
object PopupMenu: TPopupMenu
Left = 40
Top = 16
object DeleteItem: TMenuItem
Caption = 'Delete'
ShortCut = 16430
OnClick = DeleteItemClick
end
object RenameItem: TMenuItem
Caption = 'Rename'
ShortCut = 113
OnClick = RenameItemClick
end
end
object OpenDialog: TOpenDialog
DefaultExt = 'ugr'
Filter = 'Gradient files (*.ugr)|*.ugr|Fractint map files (*.map)|*.map'
Left = 72
Top = 16
end
object LargeImages: TImageList
Height = 32
Width = 32
Left = 104
Top = 16
Bitmap = {
494C010101000400040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000800000002000000001002000000000000040
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000DDE6EA00DDE6EA0000000000FDEB
E000FDE2D300FCCFB300B3644B00C06D5300BB695000BC6A4F00BC6A5100BC6A
5100A35B4500B9886F00FCC8A800FCC9AA00FCCAAC00FCD0B600FDD6BC00FDD9
C100FEDFCC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEB
E000FDE2D300FCCFB300FBC8AA00FAC6A500FAC5A400FBC5A400FBC5A400FBC6
A500FBC7A600FBC7A600FCC8A800FCC9AA00FCCAAC00FCD0B600FDD6BC00FDD9
C100FEDFCC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F4DA
CA00F2D2BD00ECBC9F00EAB59400E9B29000E8AF8D00E9AF8D00E9B08C00E9AF
8D00E8AF8D00E9B08D00E8B08D00E8B18E00EAB28F00EAB79900EDBDA000EDC1
A600F0C8B00000000000DDE6EA00DDE6EA0023232300BAEBFF00B3EAFF00B0E8
FF00ACE7FF00A8E6FF00A5E6FF00A4E4FF009FE1FF009DE1FF009BE2FF0097E0
FF0095DFFF0092DDFF008FDDFF008DDDFF008BDBFF0087D9FF0084D8FF0083D8
FF007ED6FF007ED3FF0078D1FF00262626000000000000000000000000000000
0000FFFEFB00FFFEFA00FFFEF800FFFEF700FFFDF700FFFDF600FFFEF600FFFE
F700FFFFF700FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFA00FFFFFB00FFFF
FC00FFFFFC00FFFFFC00FFFFFD00FFFFFE000000000000000000000000000000
000000000000000000000000000000000000E7A88300EBB69600EDC1A700F0C9
B300F3D4C10000000000DDE6EA00DDE6EA002323230023232300232323002323
2300232323002323230023232300232323002323230023232300232323002323
2300232323002323230023232300232323002323230023232300232323002323
2300232323002323230023232300DDE6EA00DDE6EA00DDE6EA0000000000FDEA
DF00FCE1D000FBCCB000ED886800F38C6B00E8856500E9856600E9856600EB86
6600D97C5F00DCA18300FBC5A400FBC7A700FBC9AA00FCD3B800FDDAC400FDDF
CD00FEE7D80000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEA
DF00FCE1D000FBCCB000FAC6A700F9C3A200FAC19F00FAC2A000FBC3A100FBC3
A300FAC4A300FBC4A300FBC5A400FBC7A700FBC9AA00FCD3B800FDDAC400FDDF
CD00FEE7D80000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F4D7
C600F1CDB800EBB69600E8AE8C00E7AB8600E7A98200E6A88300E7A98300E7A8
8300E6A98200E7A88300E7A98300E7AA86000000000000000000000000000000
0000FFFDFA00FFFCF800FFFBF500FFFBF400FFFBF300FFFAF200FFFBF300FFFB
F300FFFCF400FFFCF400FFFDF500FFFEF500FFFDF500FFFEF600FFFEF600FFFF
F700FFFFF800FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFB00FFFFFC00FFFF
FC0000000000000000000000000000000000F9BE9D00F8BF9E00F9C09E00F9C0
9F00F9C19F00F9C1A000F9C2A200F9C5A500F9C8AB00F9833C00FF985A00FFAC
770000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F1CF
BB00EEC5AB00E8AA8500E6A37B00E49F7400E39B7000E39C7100E49B7000E39C
7100E39C7100E39B7000E39C7200E49F7500E5A37A00F9833C00FF985A00FFAC
770000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00BAEEFC00B7ED
FD00B6ECFC00B2E9FB00B0E8FC00ADE8FB00AAE7FC00A7E6FC00A6E5FC003740
4500DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDE9
DE00FCE0CF00FACAAD00FAC3A400F9C09E00F9BF9C00F9C09D00F9C09D00FAC1
A000FAC1A000F9C1A100FAC3A200FAC5A500FBC7A900FCD4BC00FDDDCA00FDE4
D500FEECE20000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDE9
DE00FCE0CF00FACAAD00FAC3A400F9C09E000000000000000000000000000000
0000FFFCF800FFFBF600FFFAF200FFF9F000FFF8EF00FFF7EE00FFF9EE00FFF9
EF00FFF9EF00FFF9F000FFFAF000FFFAF200FFFBF200FFFCF300FFFCF300FFFC
F400FFFCF400FFFDF500FFFEF500FFFFF600FFFFF700FFFFF700FFFFF700FFFF
FA0000000000000000000000000000000000DDE6EA00DDE6EA0000000000FCEA
DF00FBE2D200F9CEB400F8C8AB00F9C6A700F9C5A500F9C5A500F9C6A500F8C6
A700F9C6A800F9C6A700F9C8A900FAC9AC00FACDB100FF9F6400FFB38100FFC8
9F00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FCEA
DF00FBE2D200F9CEB400F8C8AB00F9C6A700F9C5A500F9C5A500F9C6A500F8C6
A700F9C6A800F9C6A700F9C8A900FAC9AC00FACDB100FF9F6400FFB38100FFC8
9F00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F1CE
B900EEC4AB00E7AC8800E5A57F00E4A17900E49F7600E49F7600E49F7500E59F
7600E49F7700E49F7600E49F7700E5A17900E5A57E00FF9F6400FFB38100FFC8
9F00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0023232300C1F1
FD00BFEFFD00BAEEFC00B9EDFC00B6ECFC00B2EAFB00AFE9FB00ADE8FB00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
0000FFFBF700FFFAF300FFF8EF00FFF6EC00FFF6EB00FFF5EB00FFF5EA00FFF6
EB00FFF6EB00FFF7EB00FFF7ED00FFF8ED00FFF8EE00FFF9EE00FFF9F000FFFA
F000FFFAF000FFFAF200FFFBF200FFFBF200FFFCF300FFFCF300FFFDF400FFFD
F60000000000000000000000000000000000EEC3A90000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEB
E200FCE5D700FAD5BF00F9D1B800F9CEB400F9CDB300F9CDB300F9CEB300F9CF
B500F9CFB500FACFB500F9D0B600FAD1B800FAD4BC00FFBA8B00FFCFA9000000
0000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEB
E200FCE5D700FAD5BF00F9D1B800F9CEB400F9CDB300F9CDB300F9CEB300F9CF
B500F9CFB500FACFB500F9D0B600FAD1B800FAD4BC00FFBA8B00FFCFA9000000
0000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F1CE
B900EEC6AE00E9B29200E7AD8800E6A98400E6A78100E7A88100E6A78100E7A7
8200E7A78200E6A78200E6A78200E6A984000000000000000000000000000000
0000FFFAF600FFF8F200FFF6ED00FFF4E900FFF4E600FFF3E600FFF3E600FFF4
E700FFF4E700FFF5E800FFF5E800FFF5E900FFF5E900FFF5EB00FFF6EB00FFF7
EB00FFF7EC00FFF8ED00FFF8EE00FFF8EE00FFF9EF00FFF9F000FFFAF000FFFA
F200000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDF1
E900FDEEE500FCE8DC00FCE6D900FCE5D800FCE5D700FCE5D700FCE5D700FCE6
D800FCE6D800FCE6D900FCE6D900FCE7DA00FCE8DC0000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDF1
E900FDEEE500FCE8DC00FCE6D900FCE5D8000000000000000000000000000000
0000FFFAF400FFF7F000FFF4EA00FFF2E600FFF1E300FFF0E200FFF0E200FFF1
E200FFF2E300FFF2E400FFF2E500FFF3E500FFF3E500FFF4E600FFF5E700FFF4
E700FFF5E800FFF5E900FFF5E900FFF5EA00FFF5EA00FFF6EB00FFF7ED00FFF8
EF0000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000DDE6EA00DDE6EA000000000000000000000000000000
0000FFF9F300FFF6EE00FFF2E800FFF0E300FFEEE000FFEEDF00FFEEDE00FFEE
DF00FFEEE000FFEFE000FFEFE000FFEFE100FFF0E100FFF1E200FFF1E200FFF2
E400FFF2E400FFF2E400FFF3E600FFF3E600FFF4E600FFF5E700FFF5E900FFF6
EB0000000000000000000000000000000000FFFFF000FFFFF200FFFFF200FFFF
F400FFFFF500FFFFF500FFFFF60000000000DDE6EA00DDE6EA0000000000FFFC
F800FFFBF600FFF9F000FFF8EF00FFF7EE00FFF9EF00FFF9EF00FFF9F000FFFA
F200FFFBF200FFFCF300FFFCF400FFFCF400FFFDF500FFFFF600FFFFF700FFFF
F700FFFFFA0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FFFD
FA00FFFCF800FFFBF400FFFBF300FFFAF200FFFBF300FFFCF400FFFCF400FFFE
F500FFFDF500FFFEF600FFFFF700FFFFF800FFFFF800FFFFF900FFFFFA00FFFF
FB00FFFFFC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FFFD
FA00FFFCF800FFFBF400FFFBF300FFFAF200FFFBF300FFFCF400FFFCF400FFFE
F500FFFDF500FFFEF600FFFFF700FFFFF800FFFFF800FFFFF900FFFFFA00FFFF
FB00FFFFFC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFF800FFFEF600FFFFF400FFFF
F200FFFFF300FFFFF300FFFFF400FFFFF4000000000000000000000000000000
0000FFF8F200FFF5EC00FFF0E500FFEDDF00CD520800CD520800CD520800CD52
0800CD520800CD520800CD520800CD520800CD520800CD520800CD520800CD52
0800CD520800CD520800CD520800CD520800FFF1E300FFF2E300FFF2E400FFF3
E60000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
0000FFF7F100FFF3EA00FFEEE300FFECDD00CD520800DA804A00DC7E4400E285
4C00EB956200F5AA7D00FEBE9700FFCCB000FFDCC800FFEFE300F7F8F800CEEA
FD0092CEF70060B8F3003CA3F000CD520800FFEEDF00FFEEDF00FFF0E100FFF0
E30000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
0000FFFEFB00FFFEFA00FFFEF800FFFEF700FFFDF700FFFDF600FFFEF600FFFE
F700FFFFF700FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFA00FFFFFB00FFFF
FC00FFFFFC00FFFFFC00FFFFFD00FFFFFE00DDE6EA00DDE6EA00DDE6EA00DDE6
EA0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
0000BADDF900ABD5F80097CBF60089C4F5007EBFF40077BCF30076BBF30075BA
F30074BAF30075BAF20075BAF30075BAF30074BAF40075BBF40075BAF40074BB
F40074BAF40075BBF40075BAF40074BBF40074BBF40076BBF40078BCF4007EBF
F50000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
0000FFF6EF00FFF1E900FFECDF00FFE9D900CD520800DD855200DB7C4000E282
4800EA925E00F4A77900FDBC9400FFCCAE00FFDCC700FFEFE400F7F8F900CDEA
FD008FCDF7005CB5F30038A1F000CD520800FFEBDB00FFECDC00FFEDDD00FFEF
E00000000000000000000000000000000000BBCCD500BBCCD500DDE6EA000000
0000FFFDFA00FFFCF800FFFBF500FFFBF400FFFBF300FFFAF200FFFBF300FFFB
F300FFFCF400FFFCF400FFFDF500FFFEF500FFFDF500FFFEF600FFFEF600FFFF
F700FFFFF800FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFB00FFFFFC00FFFF
FC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
0000C1DFF900B2D8F9009FCFF70091C8F60087C3F40080C0F4007FBFF4007EBF
F3007DBFF4007DBFF3007EBFF3007DBFF3007EBFF3007EBFF3007DBFF4007EBF
F4007EBFF4007DBFF4007DBEF3007EBFF4007DBEF3007EBFF40080C0F50086C2
F60000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00214F4A00214F4A00214F
4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F
4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F
4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F
4A00214F4A00214F4A00214F4A00DDE6EA000000000000000000000000000000
0000FFF5EE00FFF1E700FFEADD00FFE7D600CD520800DC855000DB7B4100E180
4700EA905C00F4A67800FDBC9400FFCBAE00FFDBC700FFEFE300F7F8F800CDEA
FD008FCDF7005BB5F40037A1EF00CD520800FFE9D700FFE9D700FFEAD900FFEC
DC0000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
0000FFFCF800FFFBF60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF7F100FFF3EA00FFF3EA00FFEEE300FFEEE300FFECDD00FFECDD00CD52
0800CD520800FBE6DA00FBE6DA00FBDED100FBDED100FBD0B900FBD0B900FBD3
C000FBC4A300FBC4A300FBB99100FBB99100FBFAFB00FBFAFB00FBF6F600FBF6
F600FBE6DA00FBE6DA00FB996400FB996400FBA87B00FBA87B00FB823F00FBDC
CB00FBDCCB00F7C2A500F7C2A500CD520800CD520800FFEEDF00FFEEDF00FFEE
DF00FFEEDF00FFF0E100FFF0E100FFF0E300FFF0E30000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500DDE6
EA00BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000000000000000
0000FFF4ED00FFEFE500FFE9DB00FFE5D300CD520800DC855000DB7C4100E181
4800EA905C00F4A67800FDBC9400FFCCAE00FFDCC700FFEFE300F7F8F800CDEA
FD008FCDF7005BB5F30037A1EF00CD520800FFE5D300FFE6D400FFE7D500FFE9
D80000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
0000FFF6EF00FFF1E900FFF1E900FFECDF00FFECDF00FFE9D900FFE9D900CD52
0800CD520800FEE6DB00FEE6DB00FEDBC800FEDBC800FED9C200FED9C200FED1
B700FEAF8100FEAF8100FEF9F800FEF9F800FEF3EE00FEF3EE00FEFEFE00FEFE
FE00FEAB7B00FEAB7B00FEAB7A00FEAB7A00FE975F00FE975F00FE9C6200FEF3
F100FEF3F100FBB08600FBB08600CD520800CD520800FFEBDB00FFEBDB00FFEC
DC00FFECDC00FFEDDD00FFEDDD00FFEFE000FFEFE00000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
A200688DA200688DA200BBCCD500DDE6EA000000000000000000000000000000
0000FFF3EC00FFEEE300FFE7D800FFE3D000CD520800DC855000DB7C4000E281
4800EA905C00F4A67800FEBC9400FFCCAE00FFDCC700FFEFE300F7F8F800CDEA
FD008FCDF7005CB5F30037A1EF00CD520800FFE3CF00FFE3CF00FFE5D100FFE6
D50000000000000000000000000000000000FEDBC800FED9C200FED9C200FED1
B700FEAF8100FEAF8100FEF9F800FEF9F800FEF3EE00FEF3EE00FEFEFE00FEFE
FE00FEAB7B00FEAB7B00FEAB7A00FEAB7A00FE975F00FE975F00FE9C6200FEF3
F100FEF3F100FBB08600FBB08600CD520800CD520800FFEBDB00FFEBDB00FFEC
DC00FFECDC00FFEDDD00FFEDDD00FFEFE000FFEFE00000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
D500BBCCD500BBCCD500688DA200BBCCD500688DA200DDE6EA00BBCCD500BBCC
D500688DA200DDE6EA00688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCC
D500688DA200DDE6EA00688DA200DDE6EA000000000000000000000000000000
0000FFF2EA00FFEDE200FFE5D500FFE0CD00CD520800DC865100DB7C4000E281
4700EA905C00F4A67800FEBC9400FFCBAE00FFDCC700FFEFE300F7F8F800CDEA
FD008FCDF7005CB5F30036A1EF00CD520800FFE0CC00FFE0CC00FFE1CE00FFE3
D10000000000000000000000000000000000FE823900FE823900FEDAC200FED8
C300FED8C300FBA27300FBA27300CD520800CD520800FFE9D700FFE9D700FFE9
D700FFE9D700FFEAD900FFEAD900FFECDC00FFECDC0000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCCD500BBCC
D500688DA200DDE6EA00688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCC
D500688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD50053C7
FF0051C6FF004FC5FF004CC4FF0049C4FF0047C2FF0044C1FF0042C0FF003FC0
FF003DBDFF003AB9FF0038B6FF00214F4A000000000000000000000000000000
0000FFF1E900FFEBDF00FFE3D200FFDEC900CD520800DC865100DB7B4100E281
4800EB915C00F5A67800FEBB9400FFCCAE00FFDCC700FFEFE400F7F8F900CDEA
FD008FCDF7005CB5F40036A1EF00CD520800FFDDC700FFDEC800FFDFCB00FFE2
CE0000000000000000000000000000000000FFE9D80000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
EA00DDE6EA00DDE6EA00DDE6EA00BBCCD500688DA200DDE6EA00688DA200DDE6
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCCD500BBCC
D500688DA200DDE6EA00688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCC
D500688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD5008BDB
FF0082D9FF007BD7FF0077D5FF0073D4FF0071D2FF006ED1FF006AD0FF0068CF
FF0065CFFF0063CDFF0061CDFF005FCCFF005DCAFF005AC9FF0058C9FF0055C8
FF0053C7FF0050C5FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
0000FFF1E800FFEADE00FFE2D000FFDBC600CD520800DC855100DB7C4100E281
4800EB915C00F5A77800FDBC9400FFCBAE00FFDBC700FFEFE300F6F8F800CCEA
FD008FCDF7005BB6F30037A1EF00CD520800FFDBC300FFDBC400FFDDC700FFDF
CA0000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
A200688DA200688DA200BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500688DA200BBCCD500DDE6EA00DDE6
EA00688DA200BBCCD500688DA200DDE6EA00688DA200BBCCD500DDE6EA00DDE6
EA00688DA200BBCCD500688DA200DDE6EA00DDE6EA00BBCCD500DDE6EA00D9EB
FA00D9EAF900D9EAFA00D9EAFA00D9EAFA00D9EBFA00D9EBFA00DAEBF900DBEC
FA0000000000DDE6EA00DDE6EA00DDE6EA00232323009FE2FF0098E0FF008DDD
FF0084D9FF007ED6FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF4ED00FFEFE500FFEFE500FFE9DB00FFE9DB00FFE5D300FFE5D300CD52
0800CD520800FEE1CE00FEE1CE00FEE4D8000000000000000000000000000000
0000FFF0E700FFE9DC00FFE0CD00FED9C300CD520800DC855000DB7C4100E181
4700EA915C00F5A77800FEBB9400FFCCAE00FFDCC800FFEFE300F6F8F800CCEA
FD008FCDF7005BB5F30036A1EF00CD520800FFD7BF00FFD8C000FFDAC200FFDC
C70000000000000000000000000000000000688DA200BBCCD500688DA200DDE6
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688DA200688D
A200BBCCD500BBCCD500688DA200DDE6EA00BBCCD500688DA200688DA200688D
A200BBCCD500BBCCD500688DA200688DA200BBCCD500688DA200BBCCD5000000
0000F4F9FE00F1F8FD00EFF5FC00EBF5FC00EAF3FA00EAF2FA00E9F2FA007478
7D003A3C3F003A3D3F003A3D3F003A3D3F003A3D3F003A3D3F003A3D3F003A3D
3F003A3D3F00E9F3FB0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF4ED00FFEFE500FFEFE500FFE9DB00FFE9DB00FFE5D300FFE5D300CD52
0800CD520800FEE1CE00FEE1CE00FEE4D800FEE4D800FEB89000FEB89000FECA
A900FEFEFE00FEFEFE00FEEBE100FEEBE100FEFDFE00FEFDFE00FEB78C00FEB7
8C00FEA16D00FEA16D00FE975C00FE975C000000000000000000000000000000
0000FFEFE500FFE8DA00FEDDCB00FDD7C000CD520800DD855100DB7B4000E181
4700EB915C00F5A67700FEBB9400FFCCAE00FFDBC700FFEFE400F6F8F900CCEA
FD008FCDF7005BB5F30036A1F000CD520800FFD5BB00FFD5BD00FFD8BF00FFDA
C20000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500688DA200DDE6EA00BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500100F
0E0000000000CFBEB000FFEAD900FFEBDB00FFEBDB00FFECDC00FFEDDD00FFEF
E00000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
0000FCFDFE00FBFCFE0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF3EC00FFEEE300FFEEE300FFE7D800FFE7D800FFE3D000FFE3D000CD52
0800CD520800FEE4D300FEE4D300FEE1D100FEE1D100FEA67500FEA67500FEF6
F100FEEFE900FEEFE900FEEBE200FEEBE200FEFBFA00FEFBFA00FE945900FE94
5900FEA97C00FEA97C00FE925000FE925000FEFEFE00FEFEFE00FEB98D00FEC3
A100FEC3A100FBBC9200FBBC9200CD520800CD520800FFE3CF00FFE3CF00FFE3
CF00FFE3CF00FFE5D100FFE5D100FFE6D5000000000000000000000000000000
0000FEEEE400FEE6D800FEDDC800FDD5BC00CD520800DD865200DB7C4200E183
4900EA925F00F4A77A00FDBD9500FFCCAE00FFDCC800FFEFE400F6F8F800CDEA
FD0090CDF7005DB6F30038A1F000CD520800FFD3B800FFD3BA00FFD6BC00FFD8
C00000000000000000000000000000000000BBCCD500BBCCD500BBCCD5000000
0000FFF5EE00FFF1E700FFEADD00FFE7D600FFE4D100FFE2CF00FFE2CE00FFE2
CF00CFB8A80040393400EFD6C300FFE5D100FFE5D200FFE5D200FFE5D300EFD8
C700403A3500BFADA00000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF3EC00FFEEE300FFEEE300FFE7D800FFE7D800FFE3D000FFE3D000CD52
0800CD520800FEE4D300FEE4D300FEE1D100FEE1D100FEA67500FEA67500FEF6
F100FEEFE900FEEFE900FEEBE200FEEBE200FEFBFA00FEFBFA00FE945900FE94
5900FEA97C00FEA97C00FE925000FE925000FEFEFE00FEFEFE00FEB98D00FEC3
A100FEC3A100FBBC9200FBBC9200CD520800CD520800FFE3CF00FFE3CF00FFE3
CF00FFE3CF00FFE5D100FFE5D100FFE6D500FFE6D50000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD5000000000000000000000000000000
0000FEEDE200FEE5D600FDDBC500FDD3BA00CD520800DD885600DD804800E388
5000EB976600F5AB8100FDBF9B00FFCEB200FFDECB00FFF0E400F6F8F800CFEB
FD0096D0F70064B9F30041A6F000CD520800FED2B700FED3BB00FED5BD00FED8
C1000000000000000000000000000000000000000000FFFFFF00000000000000
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF2EA00FFEDE200FFEDE200FFE5D500FFE5D500FFE0CD00FFE0CD00CD52
0800CD520800FEEADD00FEEADD00FEC7A700FEC7A700FEC09B00FEC09B00FEFB
FB00FEEAE000FEEAE000FEEFE700FEEFE700FEF0EB00FEF0EB00FE844100FE84
4100FEA97800FEA97800FEC8AA00FEC8AA00FEFAFA00FEFAFA00FEAF7F00FEBD
9A00FEBD9A00FBB07B00FBB07B00CD520800CD520800FFE0CC00FFE0CC00FFE0
CC00FFE0CC00FFE1CE00FFE1CE00FFE3D100FFE3D10000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
0000FEECE100FDE3D500FCD9C300FCD1B500CD520800DE8A5700DF885400E593
6000EEA17400F8B38D00FEC6A500FFD3BA00FFE1D000FFF2E700F7F8F900D4ED
FE00A0D5F80073C0F50054B0F100CD520800FED2B800FDD4BC00FDD7C000FEDA
C50000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
0000FFF2EA00FFEDE200FFEDE200FFE5D500FFE5D500FFE0CD00FFE0CD00CD52
0800CD520800FEEADD00FEEADD00FEC7A700FEC7A700FEC09B00FEC09B00FEFB
FB00FEEAE000FEEAE000FEEFE700FEEFE700FEF0EB00FEF0EB00FE844100FE84
4100FEA97800FEA97800FEC8AA00FEC8AA00FEFAFA00FEFAFA00FEAF7F00FEBD
9A00FEBD9A00FBB07B00FBB07B00CD520800CD520800FFE0CC00FFE0CC00FFE0
CC00FFE0CC00FFE1CE00FFE1CE00FFE3D100FFE3D10000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
A200688DA200688DA200688DA200BBCCD500688DA200BBCCD500688DA200BBCC
D500688DA200BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
A200688DA200688DA200BBCCD500BBCCD5000000000000000000000000000000
0000FDEBE000FDE2D300FCD7C100FCCFB300CD520800E2966A00E3976800EA9F
7000F1B28D00F8C1A100FED0B400FFD9C500FFE5D700FFF4EC00F8F6F600DBEC
F600B2DAF5008DC6EE0073BCEF00CD520800FDD6BC00FDD9C100FDDCC700FEDF
CC0000000000000000000000000000000000FEB08600FEDFCB00FEDFCB00FEF7
F300FEE7DA00FEE7DA00FEF0EA00FEF0EA00FEEBE100FEEBE100FE813A00FE81
3A00FEAD7800FEAD7800FEE4D900FEE4D900FEE3DB00FEE3DB00FED1B000EFC5
B400EFC5B400E99B7300E99B7300CD520800CD520800FFDDC700FFDDC700FFDE
C800FFDEC800FFDFCB00FFDFCB00FFE2CE00FFE2CE0000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000000000000000
0000FDEADF00FCE1D000FBD5BE00FBCCB000CD520800CD520800CD520800CD52
0800CD520800CD520800CD520800CD520800CD520800CD520800CD520800CD52
0800CD520800CD520800CD520800CD520800FDDAC400FDDFCD00FDE3D300FEE7
D80000000000000000000000000000000000FEE3DB00FEE3DB00FED1B000EFC5
B400EFC5B400E99B7300E99B7300CD520800CD520800FFDDC700FFDDC700FFDE
C800FFDEC800FFDFCB00FFDFCB00FFE2CE00FFE2CE0000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD5000000
0000000000000000000000000000000000005BCAFF0058C9FF0056C7FF0053C7
FF0051C4FF004DBFFF0049BBFF00214F4A000000000000000000000000000000
0000FDE9DE00FCE0CF00FAD4BB00FACAAD00FAC3A400F9C09E00F9BF9C00F9BF
9C00F9C09D00F9C09D00FAC09F00FAC1A000FAC1A000F9C1A100F9C2A100FAC3
A200FAC5A500FBC7A900FCCCB100FCD4BC00FDDDCA00FDE4D500FDE9DC00FEEC
E20000000000000000000000000000000000FFDFCA0000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD5000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
0000FCE9DD00FBDFCD00FAD2BB00F9C9AB00F9C2A200F8BF9D00F8BE9A00F8BD
9A00F8BE9B00F8BE9C00F9BF9D00F8C09D00F9C09E00F9C09F00F9C09F00F9C2
A100FAC4A400FBC7A80000000000000000000000000000000000000000000000
000000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500FFF7
EB00FFF7EC00FFF8ED00FFF8EE00FFF8EE00FFF9EF00FFF9F000FFFAF000FFFA
F20000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
0000FFFBF700FFFAF30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF1E800FFEADE00FFEADE00FFE2D000FFE2D000FFDBC600FFDBC600CD52
0800CD520800FEE9DD00FEE9DD00FEA56E000000000000000000000000000000
0000FDE9DD00FCE0CF00FAD4BC00F8CAAD00F8C4A400F8C09F00F8BF9D00F9BE
9D00F8BF9E00F9C09E00F9C09F00F9C09F00F9C19F00F9C1A000F9C1A000F9C2
A200F9C5A500F9C8AB0000000000F9833C00FF985A00FFAC7700FFC195000000
000000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD5000000
0000FFF7F100FFF3EA00FFEEE300FFECDD00CD520800FBE6DA00FBDED100FBD0
B900FBD3C000FBC4A300FBB99100FBFAFB00FBF6F600FBE6DA00FB996400FBA8
7B00FB823F00FBDCCB0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF1E800FFEADE00FFEADE00FFE2D000FFE2D000FFDBC600FFDBC600CD52
0800CD520800FEE9DD00FEE9DD00FEA56E00FEA56E00FEE5D900FEE5D900FEF6
F500FEE4D400FEE4D400FEEBE400FEEBE400FEEEE400FEEEE400FE7A3200FE7A
3200FEAB7500FEAB7500FED1B800FED1B8000000000000000000000000000000
0000FCEADF00FBE2D200FAD6C100F9CEB400F8C8AB00F9C6A700F8C4A500F9C5
A500F9C5A500F9C6A500F8C6A600F8C6A700F9C6A800F9C6A700F9C6A800F9C8
A900FAC9AC00FACDB10000000000FF9F6400FFB38100FFC89F00000000000000
000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FEFA
FA00FEAF7F00FEBD9A00FBB07B00CD520800FFE0CC00FFE0CC00FFE1CE00FFE3
D10000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
0000FFF3EC00FFEEE30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF0E700FFE9DC00FFE9DC00FFE0CD00FFE0CD00FED9C300FED9C300CD52
0800CD520800FEE4D600FEE4D600FEA16D00FEA16D00FEE9E100FEE9E100FEF6
F300FEEBDF00FEEBDF00FEF1EB00FEF1EB00FEF9FB00FEF9FB00FE824200FE82
4200FEA96F00FEA96F00FEBC8D00FEBC8D00FEFEFE00FEFEFE00FEFDFE00FEE2
D500FEE2D500FBDED200FBDED200CD520800CD520800FFD7BF00FFD7BF00FFD8
C000FFD8C000FFDAC200FFDAC200FFDCC7000000000000000000000000000000
0000FDEBE200FCE5D700FADCC900FAD5BF00F9D1B800F9CEB400F9CEB300F9CD
B300F9CDB300F9CEB300F9CEB400F9CFB500F9CFB500FACFB500FACFB500F9D0
B600FAD1B800FAD4BC0000000000FFBA8B00FFCFA90000000000000000000000
000000000000000000000000000000000000BBCCD500BBCCD500BBCCD5000000
0000FFEFE500FFE8DA00FEDDCB00FDD7C000CD520800FEE4D700FE9F6600FEE9
DD00FEF0E900FEE7DB00FEE7DF00FEFEFE00FEA37300FE8B3D00FEC69200FEE0
D600FDFEFE00FEE2D30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFF0E700FFE9DC00FFE9DC00FFE0CD00FFE0CD00FED9C300FED9C300CD52
0800CD520800FEE4D600FEE4D600FEA16D00FEA16D00FEE9E100FEE9E100FEF6
F300FEEBDF00FEEBDF00FEF1EB00FEF1EB00FEF9FB00FEF9FB00FE824200FE82
4200FEA96F00FEA96F00FEBC8D00FEBC8D00FEFEFE00FEFEFE00FEFDFE00FEE2
D500FEE2D500FBDED200FBDED200CD520800CD520800FFD7BF00FFD7BF00FFD8
C000FFD8C000FFDAC200FFDAC200FFDCC700FFDCC70000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD5000000000000000000000000000000
0000FDEEE600FCEADF00FCE4D600FBE0CF00FBDDCB00FADBC800FADBC700FADB
C700FADBC800FADBC800FADBC800FADCC900FBDCC900FADCC900FADCC900FADC
CA00FBDDCB00FBE0CE0000000000FFD6B3000000000000000000000000000000
000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
0000FDEBE000FDE2D30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
0000FFEFE500FFE8DA00FFE8DA00FEDDCB00FEDDCB00FDD7C000FDD7C000CD52
0800CD520800FEE4D700FEE4D700FE9F6600FE9F6600FEE9DD00FEE9DD00FEF0
E900FEE7DB00FEE7DB00FEE7DF00FEE7DF00FEFEFE00FEFEFE00FEA37300FEA3
7300FE8B3D00FE8B3D00FEC69200FEC69200FEE0D600FEE0D600FDFEFE00FEE2
D300FEE2D300F1A98A00F1A98A00CD520800CD520800FFD5BB00FFD5BB00FFD5
BD00FFD5BD00FFD8BF00FFD8BF00FFDAC200FFDAC20000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000000000000000
0000FDF1E900FDEEE500FCEAE000FCE8DC00FCE6D900FCE5D800FCE5D700FCE5
D700FCE5D700FCE5D700FCE5D800FCE6D800FCE6D800FCE6D900FCE6D900FCE6
D900FCE7DA00FCE8DC0000000000000000000000000000000000000000000000
000000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
0000FFEFE500FFE8DA00FFE8DA00FEDDCB00FEDDCB00FDD7C000FDD7C000CD52
0800CD520800FEE4D700FEE4D700FE9F6600FE9F6600FEE9DD00FEE9DD00FEF0
E900FEE7DB00FEE7DB00FEE7DF00FEE7DF00FEFEFE00FEFEFE00FEA37300FEA3
7300FE8B3D00FE8B3D00FEC69200FEC69200FEE0D600FEE0D600FDFEFE00FEE2
D300FEE2D300F1A98A00F1A98A00CD520800CD520800FFD5BB00FFD5BB00FFD5
BD00FFD5BD00FFD8BF00FFD8BF00FFDAC200FFDAC20000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA20000000000FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000FE9B6000FEDFCD00FEDFCD00FEF2
EF00FEE3D900FEE3D900FEE0D300FEE0D300FEF8F800FEF8F800FEE8E300FEE8
E300FE833B00FE833B00FEBB7300FEBB7300FEDFC000FEDFC000F9CEC200FED8
CA00FED8CA00FBD2BF00FBD2BF00CD520800CD520800FFD3B800FFD3B800FFD3
BA00FFD3BA00FFD6BC00FFD6BC00FFD8C000FFD8C00000000000DDE6EA00DDE6
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA20000000000FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00424D3E000000000000003E000000
2800000080000000200000000100010000000000000200000000000000000000
000000000000000000000000FFFFFF00E0000007000000000000000000000000
E00000F7000000000000000000000000E0000007000000000000000000000000
E0000007000000000000000000000000E0000007000000000000000000000000
E0000007000000000000000000000000E0000007FFFFFF00FFFFFF00FFFFFF00
E00000070000000000000000FFFFFF00E0000007000000000000000000000000
E0000007000000000000000000000000E0000007000000000000000000000000
E0000007000000000000000000000000E0000007000000000000000000000000
E0000007000000000000000000000000E0000007FFFFFF00FFFFFF00FFFFFF00
E00000070000000000000000FFFFFF00E0000007000000000000000000000000
E0000007000000000000000000000000E0000007000000000000000000000000
E0000007000000000000000000000000E0000007000000000000000000000000
E0000007000000000000000000000000E0000007FFFFFF00FFFFFF00FFFFFF00
E00000070000000000000000FFFFFF00E0000007000000000000000000000000
E0000007000000000000000000000000E000000F000000000000000000000000
E000001F000000000000000000000000E000003F000000000000000000000000
E000007F000000000000000000000000E00000FFFFFFFF00FFFFFF00FFFFFF00
E00001FF10022F031F022F0320FFFF0000000000000000000000000000000000
000000000000}
end
object TooltipTimer: TTimer
OnTimer = TooltipTimerTimer
Left = 8
Top = 52
end
end

621
Forms/Browser.pas Normal file
View File

@ -0,0 +1,621 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit Browser;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, ComCtrls, ControlPoint, ToolWin, ImgList, StdCtrls,
Cmap, Menus, Global, Buttons, Translation,
RenderingInterface;
const
PixelCountMax = 32768;
PaletteTooltipTimeout = 1500;
type
TGradientBrowser = class(TForm)
SmallImages: TImageList;
pnlMain: TPanel;
PopupMenu: TPopupMenu;
DeleteItem: TMenuItem;
RenameItem: TMenuItem;
OpenDialog: TOpenDialog;
LargeImages: TImageList;
TooltipTimer: TTimer;
ListView: TListView;
pnlPreview: TPanel;
Image: TImage;
btnDefGradient: TSpeedButton;
procedure FormResize(Sender: TObject);
procedure ListViewChange(Sender: TObject; Item: TListItem;
Change: TItemChange);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure DeleteItemClick(Sender: TObject);
procedure RenameItemClick(Sender: TObject);
procedure ListViewEdited(Sender: TObject; Item: TListItem;
var S: string);
procedure btnDefGradientClick(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure ListViewKeyPress(Sender: TObject; var Key: Char);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure ListViewInfoTip(Sender: TObject; Item: TListItem;
var InfoTip: String);
procedure TooltipTimerTimer(Sender: TObject);
private
procedure DrawPalette;
procedure Apply;
public
PreviewDensity: double;
FlameIndex, GradientIndex: Integer;
Extension, Identifier, Filename: string;
cp: TControlPoint;
Palette: TColorMap;
zoom: double;
Center: array[0..1] of double;
Render: TRenderer;
procedure ListFileContents;
function LoadFractintMap(filen: string): TColorMap;
end;
type
EFormatInvalid = class(Exception);
pRGBTripleArray = ^TRGBTripleArray;
TRGBTripleArray = array[0..PixelCountMax - 1] of TRGBTriple;
var
GradientBrowser: TGradientBrowser;
FlameString: string;
function CreatePalette(strng: string): TColorMap;
implementation
uses Main, Options, Editor, {Gradient,} Registry, Adjust, Mutate;
{$R *.DFM}
procedure RGBBlend(a, b: integer; var Palette: TColorMap);
{ Linear blend between to indices of a palette }
var
c, v: real;
vrange, range: real;
i: integer;
begin
if a = b then
begin
Exit;
end;
range := b - a;
vrange := Palette[b mod 256][0] - Palette[a mod 256][0];
c := Palette[a mod 256][0];
v := vrange / range;
for i := (a + 1) to (b - 1) do
begin
c := c + v;
Palette[i mod 256][0] := Round(c);
end;
vrange := Palette[b mod 256][1] - Palette[a mod 256][1];
c := Palette[a mod 256][1];
v := vrange / range;
for i := a + 1 to b - 1 do
begin
c := c + v;
Palette[i mod 256][1] := Round(c);
end;
vrange := Palette[b mod 256][2] - Palette[a mod 256][2];
c := Palette[a mod 256][2];
v := vrange / range;
for i := a + 1 to b - 1 do
begin
c := c + v;
Palette[i mod 256][2] := Round(c);
end;
end;
function GetVal(token: string): string;
var
p: integer;
begin
p := Pos('=', token);
Delete(Token, 1, p);
Result := Token;
end;
function ReplaceTabs(str: string): string;
{Changes tab characters in a string to spaces}
var
i: integer;
begin
for i := 1 to Length(str) do
begin
if str[i] = #9 then
begin
Delete(str, i, 1);
Insert(#32, str, i);
end;
end;
Result := str;
end;
function TGradientBrowser.LoadFractintMap(filen: string): TColorMap;
var
i: integer;
s: string;
pal: TColorMap;
MapFile: TextFile;
begin
{ Load a map file }
AssignFile(MapFile, Filen);
try
Reset(MapFile);
for i := 0 to 255 do
begin
Read(MapFile, Pal[i][0]);
Read(MapFile, Pal[i][1]);
Read(MapFile, Pal[i][2]);
Read(MapFile, s);
end;
CloseFile(MapFile);
Result := Pal;
except
on EInOutError do Application.MessageBox(PChar(Format(TextByKey('common-genericopenfailure'), [FileName])), PCHAR('Apophysis'), 16);
end;
end;
function CreatePalette(strng: string): TColorMap;
{ Loads a palette from a gradient string }
var
Strings: TStringList;
index, i: integer;
Tokens: TStringList;
Indices, Colors: TStringList;
a, b: integer;
begin
Strings := TStringList.Create;
Tokens := TStringList.Create;
Indices := TStringList.Create;
Colors := TStringList.Create;
try
try
Strings.Text := strng;
if Pos('}', Strings.Text) = 0 then raise EFormatInvalid.Create('No closing brace');
if Pos('{', Strings[0]) = 0 then raise EFormatInvalid.Create('No opening brace.');
GetTokens(ReplaceTabs(strings.text), tokens);
Tokens.Text := Trim(Tokens.text);
i := 0;
while (Pos('}', Tokens[i]) = 0) and (Pos('opacity:', Lowercase(Tokens[i])) = 0) do
begin
if Pos('index=', LowerCase(Tokens[i])) <> 0 then
Indices.Add(GetVal(Tokens[i]))
else if Pos('color=', LowerCase(Tokens[i])) <> 0 then
Colors.Add(GetVal(Tokens[i]));
inc(i)
end;
for i := 0 to 255 do
begin
Result[i][0] := 0;
Result[i][1] := 0;
Result[i][2] := 0;
end;
if Indices.Count = 0 then raise EFormatInvalid.Create('No color info');
for i := 0 to Indices.Count - 1 do
begin
try
index := StrToInt(Indices[i]);
while index < 0 do inc(index, 400);
index := Round(Index * (255 / 399));
indices[i] := IntToStr(index);
assert(index>=0);
assert(index<256);
Result[index][0] := StrToInt(Colors[i]) mod 256;
Result[index][1] := trunc(StrToInt(Colors[i]) / 256) mod 256;
Result[index][2] := trunc(StrToInt(Colors[i]) / 65536);
except
end;
end;
i := 1;
repeat
a := StrToInt(Trim(Indices[i - 1]));
b := StrToInt(Trim(Indices[i]));
RGBBlend(a, b, Result);
inc(i);
until i = Indices.Count;
if (Indices[0] <> '0') or (Indices[Indices.Count - 1] <> '255') then
begin
a := StrToInt(Trim(Indices[Indices.Count - 1]));
b := StrToInt(Trim(Indices[0])) + 256;
RGBBlend(a, b, Result);
end;
except on EFormatInvalid do
begin
// Result := False;
end;
end;
finally
Tokens.Free;
Strings.Free;
Indices.Free;
Colors.Free;
end;
end;
procedure TGradientBrowser.DrawPalette;
var
i, j: integer;
Row: pRGBTripleArray;
BitMap: TBitMap;
begin
BitMap := TBitMap.Create;
try
Bitmap.PixelFormat := pf24bit;
BitMap.Width := 256;
BitMap.Height := 1;
for j := 0 to Bitmap.Height - 1 do
begin
Row := Bitmap.Scanline[j];
for i := 0 to Bitmap.Width - 1 do
begin
with Row[i] do
begin
rgbtRed := Palette[i][0];
rgbtGreen := Palette[i][1];
rgbtBlue := Palette[i][2];
end
end
end;
Image.Picture.Graphic := Bitmap;
Image.Refresh;
finally
BitMap.Free;
end;
end;
procedure TGradientBrowser.ListFileContents;
{ List identifiers in file }
var
i, p: integer;
Title: string;
ListItem: TListItem;
FStrings: TStringList;
begin
FStrings := TStringList.Create;
FStrings.LoadFromFile(filename);
try
ListView.Items.BeginUpdate;
ListView.Items.Clear;
if Lowercase(ExtractFileExt(filename)) = '.map' then
begin
ListItem := ListView.Items.Add;
Listitem.Caption := Trim(filename);
end
else
if (Pos('{', FStrings.Text) <> 0) then
begin
for i := 0 to FStrings.Count - 1 do
begin
p := Pos('{', FStrings[i]);
if (p <> 0) and (Pos('(3D)', FStrings[i]) = 0) then
begin
Title := Trim(Copy(FStrings[i], 1, p - 1));
if Title <> '' then
begin { Otherwise bad format }
ListItem := ListView.Items.Add;
Listitem.Caption := Trim(Copy(FStrings[i], 1, p - 1));
end;
end;
end;
end;
ListView.Items.EndUpdate;
ListView.Selected := ListView.Items[0];
finally
FStrings.Free;
end;
end;
procedure TGradientBrowser.ListViewChange(Sender: TObject; Item: TListItem;
Change: TItemChange);
var
Tokens, FStrings: TStringList;
EntryStrings: TStringList;
i: integer;
begin
Application.ProcessMessages;
FStrings := TStringList.Create;
EntryStrings := TStringList.Create;
Tokens := TStringList.Create;
try
if Lowercase(ExtractFileExt(filename)) = '.map' then
begin
Palette := LoadFractintMap(filename);
DrawPalette;
end
else
if (ListView.SelCount <> 0) and (ListView.Selected.Caption <> Identifier) then
begin
Identifier := ListView.Selected.Caption;
FStrings.LoadFromFile(Filename);
for i := 0 to FStrings.count - 1 do
if Pos(Lowercase(ListView.Selected.Caption) + ' ', Trim(Lowercase(FStrings[i]))) = 1 then break;
EntryStrings.Add(FStrings[i]);
repeat
inc(i);
EntryStrings.Add(FStrings[i]);
until Pos('}', FStrings[i]) <> 0;
Palette := CreatePalette(EntryStrings.Text);
DrawPalette;
end;
finally
EntryStrings.Free;
FStrings.Free;
Tokens.Free;
end;
end;
procedure TGradientBrowser.FormCreate(Sender: TObject);
begin
self.Caption := TextByKey('gradientbrowser-title');
btnDefGradient.Hint := TextByKey('common-browse');
DeleteItem.Caption := TextByKey('common-delete');
RenameItem.Caption := TextByKey('common-rename');
PreviewDensity := prevMediumQuality;
cp := TControlPoint.Create;
cp.gamma := defGamma;
cp.brightness := defBrightness;
cp.vibrancy := defVibrancy;
cp.spatial_oversample := defOversample;
cp.spatial_filter_radius := defFilterRadius;
Render := TRenderer.Create;
FlameIndex := 0;
GradientIndex := 0;
end;
procedure TGradientBrowser.FormDestroy(Sender: TObject);
begin
Render.Free;
cp.Free;
end;
procedure TGradientBrowser.FormShow(Sender: TObject);
var
Registry: TRegistry;
begin
{ Read posution from registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Browser', False) then
begin
if Registry.ValueExists('Left') then
GradientBrowser.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
GradientBrowser.Top := Registry.ReadInteger('Top');
if Registry.ValueExists('Width') then
GradientBrowser.Width := Registry.ReadInteger('Width');
if Registry.ValueExists('Height') then
GradientBrowser.Height := Registry.ReadInteger('Height');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
if FileExists(filename) then ListFileContents;
end;
procedure TGradientBrowser.DeleteItemClick(Sender: TObject);
var
c: boolean;
begin
if ListView.SelCount <> 0 then
begin
if ConfirmDelete then
c := Application.MessageBox(
PChar(Format(TextByKey('common-confirmdelete'), [ListView.Selected.Caption])), 'Apophysis', 36) = IDYES
else
c := True;
if c then
if ListView.Focused and (ListView.SelCount <> 0) then
begin
Application.ProcessMessages;
if DeleteEntry(ListView.Selected.Caption, Filename) then
begin
ListView.Items.Delete(ListView.Selected.Index);
ListView.Selected := ListView.ItemFocused;
end;
end;
end;
end;
procedure TGradientBrowser.RenameItemClick(Sender: TObject);
begin
if ListView.SelCount <> 0 then
ListView.Items[ListView.Selected.Index].EditCaption;
end;
procedure TGradientBrowser.ListViewEdited(Sender: TObject; Item: TListItem;
var S: string);
begin
// if s <> Item.Caption then
// if not RenameIFS(Item.Caption, s, Filename) then
// s := Item.Caption;
end;
procedure TGradientBrowser.btnDefGradientClick(Sender: TObject);
var
fn:string;
begin
OpenDialog.InitialDir := BrowserPath;
OpenDialog.Filter := Format('%s|*.gradient;*.ugr|%s|*.map|%s|*.*',
[TextByKey('common-filter-gradientfiles'),
TextByKey('common-filter-fractintfiles'),
TextByKey('common-filter-allfiles')]);
OpenDialog.FileName := '';
if OpenSaveFileDialog(GradientBrowser, OpenDialog.DefaultExt, OpenDialog.Filter, OpenDialog.InitialDir, TextByKey('common-browse'), fn, true, false, false, true) then
//if OpenDialog.Execute then
begin
Filename := fn; //OpenDialog.FileName;
GradientFile := Filename;
BrowserPath := ExtractFilePath(fn); //ExtractFilePath(OpenDialog.FileName);
ListFileContents;
end;
end;
procedure TGradientBrowser.Apply;
begin
MainForm.StopThread;
MainForm.UpdateUndo;
MainCp.cmap := Palette;
MainCP.cmapindex := -1;
if EditForm.Visible then EditForm.UpdateDisplay;
if AdjustForm.Visible then AdjustForm.UpdateDisplay;
if MutateForm.Visible then MutateForm.UpdateDisplay;
MainForm.RedrawTimer.enabled := true;
end;
procedure TGradientBrowser.SpeedButton1Click(Sender: TObject);
begin
Apply;
end;
procedure TGradientBrowser.ListViewKeyPress(Sender: TObject;
var Key: Char);
begin
if Key = #13 then Apply;
end;
procedure TGradientBrowser.FormClose(Sender: TObject;
var Action: TCloseAction);
var
Registry: TRegistry;
begin
{ Write position to registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
{ Defaults }
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Browser', True) then
begin
Registry.WriteInteger('Top', GradientBrowser.Top);
Registry.WriteInteger('Left', GradientBrowser.Left);
Registry.WriteInteger('Width', GradientBrowser.Width);
Registry.WriteInteger('Height', GradientBrowser.Height);
end;
finally
Registry.Free;
end;
end;
procedure TGradientBrowser.ListViewInfoTip(Sender: TObject;
Item: TListItem; var InfoTip: String);
var
i, j: integer;
Row: pRGBTripleArray;
Bitmap: TBitmap;
pal: TColorMap;
EntryStrings, FStrings: TStringList;
rect: TRect;
begin
BitMap := TBitMap.create;
Bitmap.PixelFormat := pf24bit;
BitMap.Width := 256;
BitMap.Height := 100;
FStrings := TStringList.Create;
EntryStrings := TStringList.Create;
try
if Lowercase(ExtractFileExt(filename)) = '.map' then
begin
pal := LoadFractintMap(filename);
end
else
begin
Identifier := Item.Caption;
FStrings.LoadFromFile(Filename);
for i := 0 to FStrings.count - 1 do
if Pos(Lowercase(Item.Caption) + ' ', Trim(Lowercase(FStrings[i]))) = 1 then break;
EntryStrings.Add(FStrings[i]);
repeat
inc(i);
EntryStrings.Add(FStrings[i]);
until Pos('}', FStrings[i]) <> 0;
pal := CreatePalette(EntryStrings.Text);
end;
finally
EntryStrings.Free;
FStrings.Free;
end;
for j := 0 to Bitmap.Height - 1 do
begin
Row := Bitmap.Scanline[j];
for i := 0 to Bitmap.Width - 1 do
begin
with Row[i] do
begin
rgbtRed := pal[i][0];
rgbtGreen := pal[i][1];
rgbtBlue := pal[i][2];
end
end
end;
rect.TopLeft := Item.Position;
rect.BottomRight.X := rect.TopLeft.X + 100;
rect.BottomRight.Y := rect.TopLeft.Y + 16;
with ListView do
begin
Canvas.Rectangle(Rect);
//Canvas.TextOut(Rect.Left, Rect.Top, Item.Caption);
//Rect.Left := (Rect.Left + rect.Right) div 3;
Canvas.StretchDraw(Rect, Bitmap);
end;
BitMap.Free;
InfoTip := '';
TooltipTimer.Interval := PaletteTooltipTimeout;
TooltipTimer.Enabled := true;
end;
procedure TGradientBrowser.TooltipTimerTimer(Sender: TObject);
begin
ListView.Repaint;
TooltipTimer.Enabled := false;
end;
procedure TGradientBrowser.FormResize(Sender: TObject);
begin
Listview.Width := self.ClientWidth - 4;
btnDefGradient.Left := self.ClientWidth - 2 - btnDefGradient.Width;
ListView.Height := self.ClientHeight - pnlPreview.Height - 6;
btnDefGradient.Top := self.ClientHeight - pnlPreview.Height - 2 + pnlPreview.Height div 2 - btnDefGradient.Height div 2;
ListView.Top := 2;
ListView.Left := 2;
pnlPreview.Top := self.ClientHeight - pnlPreview.Height - 2;
pnlPreview.Left := 2;
pnlPreview.Width := self.ClientWidth - btnDefGradient.Width - 6;
end;
end.

125
Forms/Curves.dfm Normal file
View File

@ -0,0 +1,125 @@
object CurvesForm: TCurvesForm
Left = 197
Top = 111
BorderStyle = bsDialog
Caption = 'Curves'
ClientHeight = 492
ClientWidth = 489
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = 'System'
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 16
object Label1: TLabel
Left = 8
Top = 16
Width = 75
Height = 13
Caption = 'Selected curve:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
end
object CurvesPanel: TPanel
Left = 8
Top = 68
Width = 473
Height = 414
BevelOuter = bvNone
Color = clBlack
ParentBackground = False
TabOrder = 0
end
object cbChannel: TComboBox
Left = 8
Top = 35
Width = 185
Height = 21
Style = csDropDownList
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ItemIndex = 0
ParentFont = False
TabOrder = 1
Text = 'Overall'
OnChange = cbChannelChange
Items.Strings = (
'Overall'
'Red'
'Green'
'Blue')
end
object tbWeightLeft: TScrollBar
Left = 326
Top = 8
Width = 155
Height = 21
Max = 160
PageSize = 0
Position = 80
TabOrder = 2
OnChange = tbWeightChange
OnScroll = tbWeightScroll
end
object tbWeightRight: TScrollBar
Left = 326
Top = 35
Width = 155
Height = 21
Max = 160
PageSize = 0
Position = 80
TabOrder = 3
OnChange = tbWeightChange
OnScroll = tbWeightScroll
end
object Panel2: TPanel
Left = 199
Top = 8
Width = 121
Height = 21
Cursor = crHandPoint
BevelOuter = bvLowered
Caption = ' First CP weight:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object Panel1: TPanel
Left = 199
Top = 35
Width = 121
Height = 21
Cursor = crHandPoint
BevelOuter = bvLowered
Caption = ' Second CP weight:'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
ParentShowHint = False
ShowHint = True
TabOrder = 5
end
end

123
Forms/Curves.pas Normal file
View File

@ -0,0 +1,123 @@
unit Curves;
interface
uses Windows, Classes, Graphics, Forms, Controls, CurvesControl, Vcl.ExtCtrls,
Vcl.StdCtrls, Vcl.ComCtrls, ControlPoint, Registry, Global;
type
TCurvesForm = class(TForm)
CurvesPanel: TPanel;
cbChannel: TComboBox;
tbWeightLeft: TScrollBar;
tbWeightRight: TScrollBar;
Panel2: TPanel;
Panel1: TPanel;
Label1: TLabel;
procedure FormShow(Sender: TObject);
procedure cbChannelChange(Sender: TObject);
procedure tbWeightChange(Sender: TObject);
procedure tbWeightScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
published
CurvesControl: TCurvesControl;
public
procedure SetCp(cp: TControlPoint);
end;
var
CurvesForm: TCurvesForm;
implementation
uses Main;
{$R *.DFM}
procedure TCurvesForm.tbWeightScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then
CurvesControl.UpdateFlame;
end;
procedure TCurvesForm.SetCp(cp: TControlPoint);
begin
if CurvesControl = nil then Exit;
CurvesControl.SetCp(cp);
end;
procedure TCurvesForm.cbChannelChange(Sender: TObject);
begin
if CurvesControl = nil then Exit;
CurvesControl.ActiveChannel := TCurvesChannel(cbChannel.ItemIndex);
tbWeightLeft.Position := Round(CurvesControl.WeightLeft * 10);
tbWeightRight.Position := Round(CurvesControl.WeightRight * 10);
end;
procedure TCurvesForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
Registry: TRegistry;
begin
{ Write position to registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Curves', True) then
begin
Registry.WriteInteger('Top', self.Top);
Registry.WriteInteger('Left', self.Left);
end;
finally
Registry.Free;
end;
// bStop := True;
end;
procedure TCurvesForm.FormCreate(Sender: TObject);
begin
//
end;
procedure TCurvesForm.FormShow(Sender: TObject);
var Registry: TRegistry;
begin
if not (assigned(curvesControl)) then
begin
CurvesControl := TCurvesControl.Create(self);
CurvesControl.Align := alClient;
CurvesControl.Parent := CurvesPanel;
end;
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Curves', False) then
begin
if Registry.ValueExists('Left') then
self.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
self.Top := Registry.ReadInteger('Top');
Registry.CloseKey;
end;
finally
Registry.Free;
end;
tbWeightLeft.Position := Round(CurvesControl.WeightLeft * 10);
tbWeightRight.Position := Round(CurvesControl.WeightRight * 10);
SetCp(MainCp);
end;
procedure TCurvesForm.tbWeightChange(Sender: TObject);
begin
CurvesControl.WeightLeft := tbWeightLeft.Position / 10.0;
CurvesControl.WeightRight := tbWeightRight.Position / 10.0;
end;
end.

3543
Forms/Editor.dfm Normal file

File diff suppressed because it is too large Load Diff

5995
Forms/Editor.pas Normal file

File diff suppressed because it is too large Load Diff

553
Forms/FormExport.dfm Normal file
View File

@ -0,0 +1,553 @@
object ExportDialog: TExportDialog
Left = 313
Top = 276
BorderStyle = bsDialog
Caption = 'Export Flame'
ClientHeight = 392
ClientWidth = 496
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnShow = FormShow
DesignSize = (
496
392)
PixelsPerInch = 96
TextHeight = 13
object btnOK: TButton
Left = 398
Top = 182
Width = 89
Height = 25
Anchors = [akTop, akRight]
Caption = '&OK'
Default = True
ModalResult = 1
TabOrder = 0
OnClick = btnOKClick
end
object btnCancel: TButton
Left = 398
Top = 210
Width = 89
Height = 25
Anchors = [akTop, akRight]
Caption = 'Cancel'
ModalResult = 2
TabOrder = 1
end
object GroupBox1: TGroupBox
Left = 8
Top = 5
Width = 481
Height = 57
Anchors = [akLeft, akTop, akRight]
Caption = ' Destination '
TabOrder = 2
DesignSize = (
481
57)
object btnBrowse: TSpeedButton
Left = 448
Top = 19
Width = 24
Height = 24
Hint = 'Browse...'
Anchors = [akTop, akRight]
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnBrowseClick
end
object Label10: TPanel
Left = 8
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'File name'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object txtFilename: TEdit
Left = 112
Top = 20
Width = 337
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
end
end
object GroupBox3: TGroupBox
Left = 256
Top = 66
Width = 233
Height = 105
Anchors = [akTop, akRight]
Caption = ' Quality '
TabOrder = 3
DesignSize = (
233
105)
object udOversample: TUpDown
Left = 212
Top = 68
Width = 12
Height = 21
Anchors = [akTop, akRight]
Associate = txtOversample
Min = 1
Max = 4
Position = 2
TabOrder = 3
end
object Label4: TPanel
Left = 8
Top = 20
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Density'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object txtDensity: TEdit
Left = 120
Top = 20
Width = 105
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
OnChange = txtDensityChange
end
object Label5: TPanel
Left = 8
Top = 44
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Filter radius'
ParentShowHint = False
ShowHint = True
TabOrder = 5
end
object txtFilterRadius: TEdit
Left = 120
Top = 44
Width = 105
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
OnChange = txtFilterRadiusChange
end
object Label3: TPanel
Left = 8
Top = 68
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Oversample'
ParentShowHint = False
ShowHint = True
TabOrder = 6
end
object txtOversample: TEdit
Left = 120
Top = 68
Width = 92
Height = 21
Anchors = [akLeft, akTop, akRight]
ReadOnly = True
TabOrder = 2
Text = '2'
OnChange = txtOversampleChange
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 66
Width = 241
Height = 105
Anchors = [akLeft, akTop, akRight]
Caption = ' Size '
TabOrder = 4
DesignSize = (
241
105)
object Label13: TLabel
Left = 184
Top = 36
Width = 26
Height = 13
Anchors = [akLeft, akTop, akRight]
Caption = 'pixels'
Visible = False
end
object Label16: TLabel
Left = 168
Top = 22
Width = 15
Height = 36
Anchors = [akLeft, akTop, akRight]
Caption = '}'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -32
Font.Name = 'Times New Roman'
Font.Style = []
ParentFont = False
Visible = False
end
object chkMaintain: TCheckBox
Left = 8
Top = 76
Width = 225
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Maintain aspect ratio'
Checked = True
State = cbChecked
TabOrder = 0
OnClick = chkMaintainClick
end
object Label1: TPanel
Left = 8
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Width'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object Label2: TPanel
Left = 8
Top = 44
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Height'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object cbHeight: TComboBox
Left = 112
Top = 44
Width = 121
Height = 21
Anchors = [akLeft, akTop, akRight]
ItemHeight = 13
TabOrder = 2
OnChange = txtHeightChange
Items.Strings = (
'200'
'240'
'480'
'600'
'768'
'1024'
'1200'
'2048'
'2400')
end
object cbWidth: TComboBox
Left = 112
Top = 20
Width = 121
Height = 21
Anchors = [akLeft, akTop, akRight]
ItemHeight = 13
TabOrder = 1
OnChange = txtWidthChange
Items.Strings = (
'320'
'640'
'800'
'1024'
'1280'
'1600'
'1920'
'2048'
'2560'
'3200')
end
end
object GroupBox4: TGroupBox
Left = 8
Top = 176
Width = 377
Height = 113
Anchors = [akLeft, akTop, akRight]
Caption = ' Parameters '
TabOrder = 5
DesignSize = (
377
113)
object udStrips: TUpDown
Left = 172
Top = 52
Width = 12
Height = 21
Associate = txtStrips
Min = 1
Max = 512
Position = 1
TabOrder = 2
end
object Label7: TPanel
Left = 8
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Buffer depth'
ParentShowHint = False
ShowHint = True
TabOrder = 7
end
object Label8: TPanel
Left = 8
Top = 52
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Strips'
ParentShowHint = False
ShowHint = True
TabOrder = 8
end
object Label9: TPanel
Left = 8
Top = 84
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'DE Radius'
ParentShowHint = False
ShowHint = True
TabOrder = 9
end
object txtEstimator: TEdit
Left = 112
Top = 84
Width = 73
Height = 21
TabOrder = 3
Text = '5'
OnChange = txtEstimatorChange
end
object txtStrips: TEdit
Left = 112
Top = 52
Width = 60
Height = 21
TabOrder = 1
Text = '1'
OnChange = txtBatchesChange
end
object cmbDepth: TComboBox
Left = 112
Top = 20
Width = 73
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 0
OnChange = cmbDepthChange
Items.Strings = (
'16-bit'
'32-bit'
'32-bit float'
'64-bit')
end
object Label14: TPanel
Left = 192
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Gamma threshold'
ParentShowHint = False
ShowHint = True
TabOrder = 10
end
object Label12: TPanel
Left = 192
Top = 52
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'DE Curve'
ParentShowHint = False
ShowHint = True
TabOrder = 11
end
object Label11: TPanel
Left = 192
Top = 84
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'DE Minimum'
ParentShowHint = False
ShowHint = True
TabOrder = 12
end
object txtGammaTreshold: TEdit
Left = 296
Top = 20
Width = 73
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 6
Text = '0.01'
OnChange = txtGammaTresholdChange
end
object txtEstimatorCurve: TEdit
Left = 296
Top = 52
Width = 73
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 5
Text = '0.6'
OnChange = txtEstimatorCurveChange
end
object txtEstimatorMin: TEdit
Left = 296
Top = 84
Width = 73
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 4
Text = '0'
OnChange = txtEstimatorMinChange
end
end
object chkRender: TCheckBox
Left = 400
Top = 246
Width = 89
Height = 43
Anchors = [akTop, akRight]
Caption = 'Render'
Checked = True
State = cbChecked
TabOrder = 6
end
object Panel1: TPanel
Left = 8
Top = 296
Width = 481
Height = 89
Anchors = [akLeft, akTop, akRight, akBottom]
BevelKind = bkSoft
BevelOuter = bvNone
Color = clInfoBk
TabOrder = 7
OnResize = Panel1Resize
DesignSize = (
477
85)
object Label6: TLabel
Left = 8
Top = 4
Width = 453
Height = 24
Alignment = taCenter
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Caption = 'WARNING!'
Font.Charset = DEFAULT_CHARSET
Font.Color = clInfoText
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label15: TLabel
Left = 8
Top = 25
Width = 447
Height = 26
Alignment = taCenter
Anchors = [akLeft, akRight]
Caption =
'Fractals created with this version of Apophysis are not supporte' +
'd by the external renderer! To render 2D-only fractals, download' +
' the latest version of FLAM3 from http://www.flam3.com'
Color = clInfoBk
Font.Charset = DEFAULT_CHARSET
Font.Color = clInfoText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentColor = False
ParentFont = False
WordWrap = True
end
end
object SaveDialog: TSaveDialog
DefaultExt = 'jpg'
Filter =
'JPEG Image (*.jpg)|*.jpg|PPM Image (*.ppm)|*.ppm|PNG Images (*.p' +
'ng)|*.png'
Left = 464
Top = 264
end
end

346
Forms/FormExport.pas Normal file
View File

@ -0,0 +1,346 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit FormExport;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ComCtrls, ExtCtrls, Translation;
type
TExportDialog = class(TForm)
btnOK: TButton;
btnCancel: TButton;
GroupBox1: TGroupBox;
btnBrowse: TSpeedButton;
txtFilename: TEdit;
SaveDialog: TSaveDialog;
GroupBox3: TGroupBox;
txtOversample: TEdit;
txtFilterRadius: TEdit;
txtDensity: TEdit;
udOversample: TUpDown;
GroupBox2: TGroupBox;
chkMaintain: TCheckBox;
cbWidth: TComboBox;
cbHeight: TComboBox;
GroupBox4: TGroupBox;
cmbDepth: TComboBox;
chkRender: TCheckBox;
txtStrips: TEdit;
udStrips: TUpDown;
txtEstimator: TEdit;
txtEstimatorMin: TEdit;
txtEstimatorCurve: TEdit;
txtGammaTreshold: TEdit;
Panel1: TPanel;
Label6: TLabel;
Label15: TLabel;
Label13: TLabel;
Label16: TLabel;
Label4: TPanel;
Label5: TPanel;
Label3: TPanel;
Label1: TPanel;
Label2: TPanel;
Label7: TPanel;
Label8: TPanel;
Label9: TPanel;
Label14: TPanel;
Label12: TPanel;
Label11: TPanel;
Label10: TPanel;
procedure Panel1Resize(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btnBrowseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure txtWidthChange(Sender: TObject);
procedure chkMaintainClick(Sender: TObject);
procedure txtHeightChange(Sender: TObject);
procedure txtDensityChange(Sender: TObject);
procedure txtFilterRadiusChange(Sender: TObject);
procedure txtOversampleChange(Sender: TObject);
procedure txtBatchesChange(Sender: TObject);
procedure cmbDepthChange(Sender: TObject);
procedure txtEstimatorChange(Sender: TObject);
procedure txtEstimatorMinChange(Sender: TObject);
procedure txtEstimatorCurveChange(Sender: TObject);
procedure txtJittersChange(Sender: TObject);
procedure txtGammaTresholdChange(Sender: TObject);
procedure lblFlam3LinkClick(Sender: TObject);
private
FloatFormatSettings: TFormatSettings;
public
Filename: string;
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
Sample_Density, Filter_Radius: double;
Estimator, EstimatorMin, EstimatorCurve: double;
GammaTreshold: double;
Jitters: integer;
end;
var
ExportDialog: TExportDialog;
Ratio: double;
implementation
uses Global, Main, ShellAPI;
{$R *.DFM}
procedure TExportDialog.btnBrowseClick(Sender: TObject);
begin
SaveDialog.InitialDir := ExtractFileDir(txtFilename.text);
SaveDialog.Filename := txtFilename.Text;
case ExportFileFormat of
0: SaveDialog.DefaultExt := 'jpg';
1: SaveDialog.DefaultExt := 'ppm';
end;
SaveDialog.filterIndex := ExportFileFormat;
SaveDialog.Filter := Format('Portable Pixmap (*.ppm)|*.ppm|%s|*.jpg;*.jpeg|%s|*.png|%s|*.*',
[TextByKey('common-filter-jpeg'), TextByKey('common-filter-png'),
TextByKey('common-filter-allfiles')]);
if SaveDialog.Execute then
begin
case SaveDialog.FilterIndex of
1: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.jpg');
2: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.ppm');
3: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.png');
end;
ExportFileFormat := SaveDialog.FilterIndex;
renderPath := ExtractFilePath(SaveDialog.Filename);
end;
end;
procedure TExportDialog.FormShow(Sender: TObject);
begin
txtFilename.Text := Filename;
cbWidth.Text := IntToStr(MainCp.Width);
cbHeight.Text := IntToStr(MainCp.Height);
ImageWidth := MainCp.Width;
ImageHeight := MainCp.Height;
txtDensity.text := FloatToStr(Sample_density);
// if cmbDepth.ItemIndex <> 2 then
// txtBatches.text := IntToStr(Round(Sample_density / 4));
txtFilterRadius.text := FloatToStr(Filter_Radius);
txtOversample.text := IntToSTr(Oversample);
udOversample.Position := Oversample;
Ratio := ImageWidth / ImageHeight;
Batches := 1;
Estimator := 9.0;
EstimatorMin := 0.0;
EstimatorCurve := 0.4;
Jitters := 1;
GammaTreshold := MainCP.gamma_threshold; //0.01;
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
txtEstimator.Text := FloatToStr(Estimator, FloatFormatSettings);
txtEstimatorMin.Text := FloatToStr(EstimatorMin, FloatFormatSettings);
txtEstimatorCurve.Text := FloatToStr(EstimatorCurve, FloatFormatSettings);
// txtJitters.Text := IntToStr(Jitters);
txtGammaTreshold.Text := FloatToStr(GammaTreshold, FloatFormatSettings);
end;
procedure TExportDialog.btnOKClick(Sender: TObject);
begin
Filename := txtFilename.text;
ImageWidth := StrToInt(cbWidth.Text);
ImageHeight := StrToInt(cbHeight.Text);
end;
procedure TExportDialog.txtWidthChange(Sender: TObject);
begin
try
ImageWidth := StrToInt(cbWidth.Text);
if chkMaintain.checked and cbWidth.Focused then
begin
ImageHeight := Round(ImageWidth / ratio);
cbHeight.Text := IntToStr(ImageHeight)
end;
except
end;
end;
procedure TExportDialog.chkMaintainClick(Sender: TObject);
begin
Ratio := ImageWidth / ImageHeight;
end;
procedure TExportDialog.txtHeightChange(Sender: TObject);
begin
try
ImageHeight := StrToInt(cbHeight.Text);
if chkMaintain.checked and cbHeight.Focused then
begin
ImageWidth := Round(ImageHeight * ratio);
cbWidth.Text := IntToStr(ImageWidth)
end;
except
end;
end;
procedure TExportDialog.txtDensityChange(Sender: TObject);
begin
try
Sample_Density := StrToFloat(txtDensity.Text);
// if cmbDepth.ItemIndex <> 2 then
// txtBatches.text := IntToStr(Round(Sample_density / 4));
except
end;
end;
procedure TExportDialog.txtFilterRadiusChange(Sender: TObject);
begin
try
Filter_Radius := StrToFloat(txtFilterRadius.Text);
except
end;
end;
procedure TExportDialog.txtOversampleChange(Sender: TObject);
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
Oversample := StrToInt(txtOversample.Text);
except
end;
end;
procedure TExportDialog.txtBatchesChange(Sender: TObject);
begin
{
if StrToInt(txtBatches.Text) > udBatches.Max then
txtBatches.Text := IntToStr(udBatches.Max);
if StrToInt(txtBatches.Text) < udBatches.Min then
txtBatches.Text := IntToStr(udBatches.Min);
try
Batches := StrToInt(txtBatches.Text);
except
end;
}
end;
procedure TExportDialog.cmbDepthChange(Sender: TObject);
begin
{
if cmbDepth.ItemIndex <> 2 then
txtBatches.text := IntToStr(Round(Sample_density / 4))
else
txtBatches.text := IntToStr(1);
}
end;
procedure TExportDialog.txtEstimatorChange(Sender: TObject);
begin
Estimator := 0;
try
Estimator := StrToFloat(txtEstimator.Text, FloatFormatSettings);
except
end;
end;
procedure TExportDialog.txtEstimatorMinChange(Sender: TObject);
begin
EstimatorMin := 0;
try
EstimatorMin := StrToFloat(txtEstimatorMin.Text, FloatFormatSettings);
except
end;
end;
procedure TExportDialog.txtEstimatorCurveChange(Sender: TObject);
begin
EstimatorCurve := 0;
try
EstimatorCurve := StrToFloat(txtEstimatorCurve.Text, FloatFormatSettings);
except
end;
end;
procedure TExportDialog.txtJittersChange(Sender: TObject);
begin
{
Jitters := 0;
try
Jitters := StrToInt(txtJitters.Text);
except
end;
}
end;
procedure TExportDialog.txtGammaTresholdChange(Sender: TObject);
begin
//GammaTreshold := 0.01;
try
GammaTreshold := StrToFloat(txtGammaTreshold.Text, FloatFormatSettings);
except
end;
end;
procedure TExportDialog.lblFlam3LinkClick(Sender: TObject);
begin
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar(TLabel(Sender).Hint),
nil, nil, SW_SHOWNORMAL);
end;
procedure TExportDialog.FormCreate(Sender: TObject);
begin
btnOK.Caption := TextByKey('common-ok');
btnCancel.Caption := TextByKey('common-cancel');
Label1.Caption := TextByKey('common-width');
Label2.Caption := TextByKey('common-height');
GroupBox2.Caption := TextByKey('common-size');
Label13.Caption := TextByKey('common-pixels');
chkMaintain.Caption := TextByKey('common-keepaspect');
GroupBox1.Caption := TextByKey('common-destination');
Label10.Caption := TextByKey('common-filename');
btnBrowse.Hint := TextByKey('common-browse');
GroupBox3.Caption := TextByKey('common-quality');
Label5.Caption := TextByKey('common-filterradius');
Label4.Caption := TextByKey('common-density');
Label3.Caption := TextByKey('common-oversample');
Label14.Caption := TextByKey('common-gammathreshold');
self.Caption := TextByKey('main-menu-file-exportflame');
GroupBox4.Caption := TextByKey('export-paramoptions-title');
Label7.Caption := TextByKey('export-paramoptions-bufferdepth');
Label8.Caption := TextByKey('export-paramoptions-strips');
Label9.Caption := TextByKey('export-paramoptions-estimatorradius');
Label12.Caption := TextByKey('export-paramoptions-estimatorcurve');
Label11.Caption := TextByKey('export-paramoptions-estimatormin');
chkRender.Caption := TextByKey('export-paramoptions-dorender');
Label6.Caption := TextByKey('export-paramoptions-warningtitle');
Label15.Caption := TextByKey('export-paramoptions-warningtext');
end;
procedure TExportDialog.Panel1Resize(Sender: TObject);
begin
Label15.Top := (Panel1.Height - 30) div 2 - Label15.Height div 2 + 25;
end;
end.

553
Forms/FormExportC.dfm Normal file
View File

@ -0,0 +1,553 @@
object ExportCDialog: TExportCDialog
Left = 313
Top = 276
BorderStyle = bsDialog
Caption = 'Export Flame'
ClientHeight = 134
ClientWidth = 496
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnShow = FormShow
DesignSize = (
496
134)
PixelsPerInch = 96
TextHeight = 13
object btnOK: TButton
Left = 254
Top = 98
Width = 115
Height = 25
Anchors = [akTop, akRight]
Caption = '&OK'
Default = True
ModalResult = 1
TabOrder = 0
OnClick = btnOKClick
end
object btnCancel: TButton
Left = 376
Top = 98
Width = 111
Height = 25
Anchors = [akTop, akRight]
Caption = 'Cancel'
ModalResult = 2
TabOrder = 1
end
object GroupBox1: TGroupBox
Left = 8
Top = 237
Width = 481
Height = 57
Anchors = [akLeft, akTop, akRight]
Caption = ' Destination '
TabOrder = 2
Visible = False
DesignSize = (
481
57)
object btnBrowse: TSpeedButton
Left = 448
Top = 19
Width = 24
Height = 24
Hint = 'Browse...'
Anchors = [akTop, akRight]
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnBrowseClick
end
object Label10: TPanel
Left = 8
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'File name'
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object txtFilename: TEdit
Left = 112
Top = 20
Width = 337
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
end
end
object GroupBox3: TGroupBox
Left = 256
Top = 10
Width = 233
Height = 79
Anchors = [akTop, akRight]
Caption = ' Quality '
TabOrder = 3
DesignSize = (
233
79)
object udOversample: TUpDown
Left = 212
Top = 44
Width = 12
Height = 21
Anchors = [akTop, akRight]
Associate = txtOversample
Min = 1
Max = 4
Position = 2
TabOrder = 2
end
object Label5: TPanel
Left = 8
Top = 20
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Filter radius'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object txtFilterRadius: TEdit
Left = 120
Top = 20
Width = 105
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
OnChange = txtFilterRadiusChange
end
object Label3: TPanel
Left = 8
Top = 44
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Oversample'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object txtOversample: TEdit
Left = 120
Top = 44
Width = 92
Height = 21
Anchors = [akLeft, akTop, akRight]
ReadOnly = True
TabOrder = 1
Text = '2'
OnChange = txtOversampleChange
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 10
Width = 241
Height = 111
Anchors = [akLeft, akTop, akRight]
Caption = ' Size '
TabOrder = 4
DesignSize = (
241
111)
object Label13: TLabel
Left = 184
Top = 36
Width = 26
Height = 13
Anchors = [akLeft, akTop, akRight]
Caption = 'pixels'
Visible = False
end
object Label16: TLabel
Left = 168
Top = 22
Width = 15
Height = 36
Anchors = [akLeft, akTop, akRight]
Caption = '}'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -32
Font.Name = 'Times New Roman'
Font.Style = []
ParentFont = False
Visible = False
end
object chkMaintain: TCheckBox
Left = 8
Top = 76
Width = 225
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Maintain aspect ratio'
Checked = True
State = cbChecked
TabOrder = 0
OnClick = chkMaintainClick
end
object Label1: TPanel
Left = 8
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Width'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object Label2: TPanel
Left = 8
Top = 44
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Height'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object cbHeight: TComboBox
Left = 112
Top = 44
Width = 121
Height = 21
Anchors = [akLeft, akTop, akRight]
ItemHeight = 13
TabOrder = 2
OnChange = txtHeightChange
Items.Strings = (
'200'
'240'
'480'
'600'
'768'
'1024'
'1200'
'2048'
'2400')
end
object cbWidth: TComboBox
Left = 112
Top = 20
Width = 121
Height = 21
Anchors = [akLeft, akTop, akRight]
ItemHeight = 13
TabOrder = 1
OnChange = txtWidthChange
Items.Strings = (
'320'
'640'
'800'
'1024'
'1280'
'1600'
'1920'
'2048'
'2560'
'3200')
end
end
object GroupBox4: TGroupBox
Left = 8
Top = 392
Width = 377
Height = 113
Anchors = [akLeft, akTop, akRight]
Caption = ' Parameters '
TabOrder = 5
Visible = False
DesignSize = (
377
113)
object udStrips: TUpDown
Left = 172
Top = 52
Width = 12
Height = 21
Associate = txtStrips
Min = 1
Max = 512
Position = 1
TabOrder = 2
end
object Label7: TPanel
Left = 8
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Buffer depth'
ParentShowHint = False
ShowHint = True
TabOrder = 7
end
object Label8: TPanel
Left = 8
Top = 52
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Strips'
ParentShowHint = False
ShowHint = True
TabOrder = 8
end
object Label9: TPanel
Left = 8
Top = 84
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'DE Radius'
ParentShowHint = False
ShowHint = True
TabOrder = 9
end
object txtEstimator: TEdit
Left = 112
Top = 84
Width = 73
Height = 21
TabOrder = 3
Text = '5'
end
object txtStrips: TEdit
Left = 112
Top = 52
Width = 60
Height = 21
TabOrder = 1
Text = '1'
end
object cmbDepth: TComboBox
Left = 112
Top = 20
Width = 73
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 0
Items.Strings = (
'16-bit'
'32-bit'
'32-bit float'
'64-bit')
end
object Label14: TPanel
Left = 192
Top = 20
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Gamma threshold'
ParentShowHint = False
ShowHint = True
TabOrder = 10
end
object Label12: TPanel
Left = 192
Top = 52
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'DE Curve'
ParentShowHint = False
ShowHint = True
TabOrder = 11
end
object Label11: TPanel
Left = 192
Top = 84
Width = 105
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'DE Minimum'
ParentShowHint = False
ShowHint = True
TabOrder = 12
end
object txtGammaTreshold: TEdit
Left = 296
Top = 20
Width = 73
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 6
Text = '0.01'
OnChange = txtGammaTresholdChange
end
object txtEstimatorCurve: TEdit
Left = 296
Top = 52
Width = 73
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 5
Text = '0.6'
end
object txtEstimatorMin: TEdit
Left = 296
Top = 84
Width = 73
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 4
Text = '0'
end
end
object chkRender: TCheckBox
Left = 392
Top = 398
Width = 89
Height = 43
Anchors = [akTop, akRight]
Caption = 'Render'
Checked = True
State = cbChecked
TabOrder = 6
Visible = False
end
object Panel1: TPanel
Left = 8
Top = 296
Width = 481
Height = 89
Anchors = [akLeft, akTop, akRight]
BevelKind = bkSoft
BevelOuter = bvNone
Color = clInfoBk
TabOrder = 7
Visible = False
DesignSize = (
477
85)
object Label6: TLabel
Left = 8
Top = 4
Width = 453
Height = 24
Alignment = taCenter
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Caption = 'WARNING!'
Font.Charset = DEFAULT_CHARSET
Font.Color = clInfoText
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label15: TLabel
Left = 8
Top = 25
Width = 447
Height = 26
Alignment = taCenter
Anchors = [akLeft, akRight]
Caption =
'Fractals created with this version of Apophysis are not supporte' +
'd by the external renderer! To render 2D-only fractals, download' +
' the latest version of FLAM3 from http://www.flam3.com'
Color = clInfoBk
Font.Charset = DEFAULT_CHARSET
Font.Color = clInfoText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentColor = False
ParentFont = False
WordWrap = True
end
end
object txtDensity: TEdit
Left = 120
Top = 212
Width = 105
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 8
Visible = False
OnChange = txtDensityChange
end
object Label4: TPanel
Left = 8
Top = 212
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Density'
ParentShowHint = False
ShowHint = True
TabOrder = 9
Visible = False
end
object SaveDialog: TSaveDialog
DefaultExt = 'jpg'
Filter =
'JPEG Image (*.jpg)|*.jpg|PPM Image (*.ppm)|*.ppm|PNG Images (*.p' +
'ng)|*.png'
Left = 464
Top = 264
end
end

257
Forms/FormExportC.pas Normal file
View File

@ -0,0 +1,257 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit FormExportC;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ComCtrls, ExtCtrls, Translation;
type
TExportCDialog = class(TForm)
btnOK: TButton;
btnCancel: TButton;
GroupBox1: TGroupBox;
btnBrowse: TSpeedButton;
txtFilename: TEdit;
SaveDialog: TSaveDialog;
GroupBox3: TGroupBox;
txtOversample: TEdit;
txtFilterRadius: TEdit;
udOversample: TUpDown;
GroupBox2: TGroupBox;
chkMaintain: TCheckBox;
cbWidth: TComboBox;
cbHeight: TComboBox;
GroupBox4: TGroupBox;
cmbDepth: TComboBox;
chkRender: TCheckBox;
txtStrips: TEdit;
udStrips: TUpDown;
txtEstimator: TEdit;
txtEstimatorMin: TEdit;
txtEstimatorCurve: TEdit;
txtGammaTreshold: TEdit;
Panel1: TPanel;
Label6: TLabel;
Label15: TLabel;
Label13: TLabel;
Label16: TLabel;
Label5: TPanel;
Label3: TPanel;
Label1: TPanel;
Label2: TPanel;
Label7: TPanel;
Label8: TPanel;
Label9: TPanel;
Label14: TPanel;
Label12: TPanel;
Label11: TPanel;
Label10: TPanel;
txtDensity: TEdit;
Label4: TPanel;
procedure FormCreate(Sender: TObject);
procedure btnBrowseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure txtWidthChange(Sender: TObject);
procedure chkMaintainClick(Sender: TObject);
procedure txtHeightChange(Sender: TObject);
procedure txtDensityChange(Sender: TObject);
procedure txtFilterRadiusChange(Sender: TObject);
procedure txtOversampleChange(Sender: TObject);
procedure txtGammaTresholdChange(Sender: TObject);
private
FloatFormatSettings: TFormatSettings;
Estimator, EstimatorMin, EstimatorCurve: double;
Jitters, Batches, Strips: integer;
public
Filename: string;
ImageWidth, ImageHeight, Oversample: Integer;
Sample_Density, Filter_Radius: double;
GammaTreshold: double;
end;
var
ExportCDialog: TExportCDialog;
Ratio: double;
implementation
uses Global, Main, ShellAPI;
{$R *.DFM}
procedure TExportCDialog.btnBrowseClick(Sender: TObject);
begin
SaveDialog.InitialDir := ExtractFileDir(txtFilename.text);
SaveDialog.Filename := txtFilename.Text;
SaveDialog.DefaultExt := 'png';
SaveDialog.filterIndex := ExportFileFormat;
SaveDialog.Filter := Format('%s|*.png|%s|*.*',
[TextByKey('common-filter-png'),
TextByKey('common-filter-allfiles')]);
if SaveDialog.Execute then
begin
ExportFileFormat := SaveDialog.FilterIndex;
renderPath := ExtractFilePath(SaveDialog.Filename);
end;
end;
procedure TExportCDialog.FormShow(Sender: TObject);
begin
txtFilename.Text := Filename;
cbWidth.Text := IntToStr(MainCp.Width);
cbHeight.Text := IntToStr(MainCp.Height);
ImageWidth := MainCp.Width;
ImageHeight := MainCp.Height;
txtDensity.text := FloatToStr(Sample_density);
// if cmbDepth.ItemIndex <> 2 then
// txtBatches.text := IntToStr(Round(Sample_density / 4));
txtFilterRadius.text := FloatToStr(Filter_Radius);
txtOversample.text := IntToSTr(Oversample);
udOversample.Position := Oversample;
Ratio := ImageWidth / ImageHeight;
Batches := 1;
Estimator := 9.0;
EstimatorMin := 0.0;
EstimatorCurve := 0.4;
Jitters := 1;
GammaTreshold := MainCP.gamma_threshold; //0.01;
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
txtEstimator.Text := FloatToStr(Estimator, FloatFormatSettings);
txtEstimatorMin.Text := FloatToStr(EstimatorMin, FloatFormatSettings);
txtEstimatorCurve.Text := FloatToStr(EstimatorCurve, FloatFormatSettings);
// txtJitters.Text := IntToStr(Jitters);
txtGammaTreshold.Text := FloatToStr(GammaTreshold, FloatFormatSettings);
end;
procedure TExportCDialog.btnOKClick(Sender: TObject);
begin
Filename := txtFilename.text;
ImageWidth := StrToInt(cbWidth.Text);
ImageHeight := StrToInt(cbHeight.Text);
end;
procedure TExportCDialog.txtWidthChange(Sender: TObject);
begin
try
ImageWidth := StrToInt(cbWidth.Text);
if chkMaintain.checked and cbWidth.Focused then
begin
ImageHeight := Round(ImageWidth / ratio);
cbHeight.Text := IntToStr(ImageHeight)
end;
except
end;
end;
procedure TExportCDialog.chkMaintainClick(Sender: TObject);
begin
Ratio := ImageWidth / ImageHeight;
end;
procedure TExportCDialog.txtHeightChange(Sender: TObject);
begin
try
ImageHeight := StrToInt(cbHeight.Text);
if chkMaintain.checked and cbHeight.Focused then
begin
ImageWidth := Round(ImageHeight * ratio);
cbWidth.Text := IntToStr(ImageWidth)
end;
except
end;
end;
procedure TExportCDialog.txtDensityChange(Sender: TObject);
begin
try
Sample_Density := StrToFloat(txtDensity.Text);
// if cmbDepth.ItemIndex <> 2 then
// txtBatches.text := IntToStr(Round(Sample_density / 4));
except
end;
end;
procedure TExportCDialog.txtFilterRadiusChange(Sender: TObject);
begin
try
Filter_Radius := StrToFloat(txtFilterRadius.Text);
except
end;
end;
procedure TExportCDialog.txtOversampleChange(Sender: TObject);
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
Oversample := StrToInt(txtOversample.Text);
except
end;
end;
procedure TExportCDialog.txtGammaTresholdChange(Sender: TObject);
begin
//GammaTreshold := 0.01;
try
GammaTreshold := StrToFloat(txtGammaTreshold.Text, FloatFormatSettings);
except
end;
end;
procedure TExportCDialog.FormCreate(Sender: TObject);
begin
btnOK.Caption := TextByKey('common-ok');
btnCancel.Caption := TextByKey('common-cancel');
Label1.Caption := TextByKey('common-width');
Label2.Caption := TextByKey('common-height');
GroupBox2.Caption := TextByKey('common-size');
Label13.Caption := TextByKey('common-pixels');
chkMaintain.Caption := TextByKey('common-keepaspect');
GroupBox1.Caption := TextByKey('common-destination');
Label10.Caption := TextByKey('common-filename');
btnBrowse.Hint := TextByKey('common-browse');
GroupBox3.Caption := TextByKey('common-quality');
Label5.Caption := TextByKey('common-filterradius');
Label4.Caption := TextByKey('common-density');
Label3.Caption := TextByKey('common-oversample');
Label14.Caption := TextByKey('common-gammathreshold');
self.Caption := TextByKey('main-menu-file-exportchaotica');
GroupBox4.Caption := TextByKey('export-paramoptions-title');
Label7.Caption := TextByKey('export-paramoptions-bufferdepth');
Label8.Caption := TextByKey('export-paramoptions-strips');
Label9.Caption := TextByKey('export-paramoptions-estimatorradius');
Label12.Caption := TextByKey('export-paramoptions-estimatorcurve');
Label11.Caption := TextByKey('export-paramoptions-estimatormin');
chkRender.Caption := TextByKey('export-paramoptions-dorender');
Label6.Caption := TextByKey('export-paramoptions-warningtitle');
Label15.Caption := TextByKey('export-paramoptions-warningtext');
end;
end.

115
Forms/FormFavorites.dfm Normal file
View File

@ -0,0 +1,115 @@
object FavoritesForm: TFavoritesForm
Left = 493
Top = 541
BorderStyle = bsDialog
Caption = 'Favorite Scripts'
ClientHeight = 275
ClientWidth = 352
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
DesignSize = (
352
275)
PixelsPerInch = 96
TextHeight = 13
object PageControl1: TPageControl
Left = 8
Top = 8
Width = 338
Height = 231
Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 0
end
object ListView: TListView
Left = 16
Top = 16
Width = 218
Height = 215
Anchors = [akLeft, akTop, akRight, akBottom]
Columns = <
item
AutoSize = True
Caption = 'Name'
end>
HideSelection = False
ReadOnly = True
RowSelect = True
ShowColumnHeaders = False
TabOrder = 1
ViewStyle = vsReport
OnChange = ListViewChange
end
object btnAdd: TButton
Left = 241
Top = 16
Width = 99
Height = 25
Anchors = [akTop, akRight]
Caption = '&Add'
TabOrder = 2
TabStop = False
OnClick = btnAddClick
end
object btnRemove: TButton
Left = 241
Top = 48
Width = 99
Height = 25
Anchors = [akTop, akRight]
Caption = '&Remove'
TabOrder = 3
TabStop = False
OnClick = btnRemoveClick
end
object btnMoveUp: TButton
Left = 241
Top = 80
Width = 99
Height = 25
Anchors = [akTop, akRight]
Caption = 'Move &Up'
TabOrder = 4
TabStop = False
OnClick = btnMoveUpClick
end
object btnMoveDown: TButton
Left = 241
Top = 112
Width = 99
Height = 25
Anchors = [akTop, akRight]
Caption = 'Move &Down'
TabOrder = 5
TabStop = False
OnClick = btnMoveDownClick
end
object btnOK: TButton
Left = 193
Top = 246
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = '&OK'
TabOrder = 6
OnClick = btnOKClick
end
object btnCancel: TButton
Left = 273
Top = 246
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = '&Cancel'
TabOrder = 7
OnClick = btnCancelClick
end
end

224
Forms/FormFavorites.pas Normal file
View File

@ -0,0 +1,224 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit FormFavorites;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, Translation;
type
TFavoritesForm = class(TForm)
PageControl1: TPageControl;
ListView: TListView;
btnAdd: TButton;
btnRemove: TButton;
btnMoveUp: TButton;
btnMoveDown: TButton;
btnOK: TButton;
btnCancel: TButton;
procedure FormShow(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure btnAddClick(Sender: TObject);
procedure btnRemoveClick(Sender: TObject);
procedure ListViewChange(Sender: TObject; Item: TListItem;
Change: TItemChange);
procedure btnMoveUpClick(Sender: TObject);
procedure btnMoveDownClick(Sender: TObject);
private
{ Private declarations }
public
Faves: TStringList;
{ Public declarations }
end;
var
FavoritesForm: TFavoritesForm;
implementation
uses Global, ScriptForm;
{$R *.DFM}
procedure TFavoritesForm.FormShow(Sender: TObject);
var
ListItem: TListItem;
i: integer;
s: string;
begin
Faves.Text := Favorites.text;
ListView.Items.Clear;
for i := 0 to Favorites.Count - 1 do
begin
ListItem := ListView.Items.Add;
s := ExtractFileName(Favorites[i]);
s := Copy(s, 0, length(s) - Length(ExtractFileExt(s)));
Listitem.Caption := s;
end;
if Favorites.Count <> 0 then ListView.Selected := ListView.Items[0]
else
btnRemove.Enabled := False;
if ListView.Items.Count <= 1 then
begin
btnMoveUp.Enabled := False;
btnMoveDown.Enabled := False;
end;
end;
procedure TFavoritesForm.btnCancelClick(Sender: TObject);
begin
Close
end;
procedure TFavoritesForm.btnOKClick(Sender: TObject);
begin
ModalResult := mrOK;
Faves.SaveToFile(AppPath + scriptFavsFilename);
end;
procedure TFavoritesForm.FormCreate(Sender: TObject);
begin
btnOK.Caption := TextByKey('common-ok');
btnCancel.Caption := TextByKey('common-cancel');
self.Caption := TextByKey('favscripts-title');
btnAdd.Caption := TextByKey('favscripts-add');
btnRemove.Caption := TextByKey('favscripts-remove');
btnMoveUp.Caption := TextByKey('favscripts-moveup');
btnMoveDown.Caption := TextByKey('favscripts-movedown');
Faves := TStringList.Create;
end;
procedure TFavoritesForm.FormDestroy(Sender: TObject);
begin
Faves.Free;
end;
procedure TFavoritesForm.btnAddClick(Sender: TObject);
var
ListItem: TListItem;
i : integer;
s: string;
begin
ScriptEditor.MainOpenDialog.InitialDir := ScriptPath;
ScriptEditor.MainOpenDialog.Filter := Format('%s|*.aposcript;*.asc|%s|*.*',
[TextByKey('common-filter-script'),
TextByKey('common-filter-allfiles')]);
if ScriptEditor.mainOpenDialog.Execute then
begin
for i := 0 to Faves.Count - 1 do
begin
if ScriptEditor.MainOpenDialog.Filename = Faves[i] then exit;
end;
Faves.add(ScriptEditor.MainOpenDialog.Filename);
ListItem := ListView.Items.Add;
s := ExtractFileName(ScriptEditor.MainOpenDialog.Filename);
s := Copy(s, 0, length(s) - Length(ExtractFileExt(s)));
Listitem.Caption := s;
ListView.Selected := ListView.Items[ListView.Items.Count - 1];
btnRemove.Enabled := True;
end;
if ListView.Items.Count <= 1 then
begin
btnMoveUp.Enabled := False;
btnMoveDown.Enabled := False;
end;
end;
procedure TFavoritesForm.btnRemoveClick(Sender: TObject);
var
i: integer;
begin
i := ListView.Selected.Index;
Faves.Delete(i);
ListView.Items[i].delete;
if ListView.Items.Count <> 0 then
if i < ListView.Items.Count then
ListView.Selected := ListView.Items[i]
else
ListView.Selected := ListView.Items[ListView.Items.Count - 1]
else
btnRemove.Enabled := False;
if ListView.Items.Count <= 1 then
begin
btnMoveUp.Enabled := False;
btnMoveDown.Enabled := False;
end;
end;
procedure TFavoritesForm.ListViewChange(Sender: TObject; Item: TListItem;
Change: TItemChange);
begin
if (Item.Index = ListView.Items.Count - 1) then
btnMoveDown.Enabled := False
else
btnMoveDown.Enabled := True;
if (Item.Index = 0) then
btnMoveUp.Enabled := False
else
btnMoveUp.Enabled := True;
if (ListView.Items.Count <= 1) then
begin
btnMoveDown.Enabled := False;
btnMoveUp.Enabled := False;
end;
end;
procedure TFavoritesForm.btnMoveUpClick(Sender: TObject);
var
i: integer;
s: string;
begin
i := ListView.Selected.Index;
s := faves[i];
Faves[i] := Faves[i - 1];
Faves[i - 1] := s;
s := ListView.Selected.Caption;
ListView.Selected.Caption := Listview.Items[i - 1].Caption;
ListView.Items[i - 1].Caption := s;
ListView.Selected := ListView.Items[i - 1];
end;
procedure TFavoritesForm.btnMoveDownClick(Sender: TObject);
var
i: integer;
s: string;
begin
i := ListView.Selected.Index;
s := faves[i];
Faves[i] := Faves[i + 1];
Faves[i + 1] := s;
s := ListView.Selected.Caption;
ListView.Selected.Caption := Listview.Items[i + 1].Caption;
ListView.Items[i + 1].Caption := s;
ListView.Selected := ListView.Items[i + 1];
end;
end.

723
Forms/FormRender.dfm Normal file
View File

@ -0,0 +1,723 @@
object RenderForm: TRenderForm
Left = 851
Top = 205
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Render to Disk'
ClientHeight = 469
ClientWidth = 497
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
DesignSize = (
497
469)
PixelsPerInch = 96
TextHeight = 13
object btnRender: TButton
Left = 256
Top = 420
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Start'
Default = True
TabOrder = 0
OnClick = btnRenderClick
end
object btnCancel: TButton
Left = 416
Top = 420
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Close'
TabOrder = 1
OnClick = btnCancelClick
end
object btnPause: TButton
Left = 336
Top = 420
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Pause'
TabOrder = 2
OnClick = btnPauseClick
end
object PageCtrl: TPageControl
Left = 8
Top = 8
Width = 481
Height = 373
ActivePage = TabSettings
Anchors = [akLeft, akTop, akRight, akBottom]
Images = MainForm.Buttons
TabOrder = 3
object TabSettings: TTabSheet
Caption = 'Settings'
ImageIndex = 18
DesignSize = (
473
344)
object btnBrowse: TSpeedButton
Left = 416
Top = 11
Width = 24
Height = 24
Hint = 'Browse...'
Anchors = [akTop, akRight]
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnBrowseClick
end
object btnGoTo: TSpeedButton
Left = 440
Top = 11
Width = 24
Height = 24
Hint = 'Browse...'
Anchors = [akTop, akRight]
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FF964924EADBD3FF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF9D
4D259D4E28EADBD3FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFCF835D9247239A4B25A24F27AB5429BF6A3FA0502AEADBD3FF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFD78B65FDB089F7905CEC8856DE
7F4FD17648C46E42A25631EADBD3FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFDE926CFCB997FDA578FC935EF28C59E58453D87B4CC66E41AE582BFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFE49872FBC3A6FDBE9EFEAE85FF
A87DF89D6FE58351AE582BF4E7E1FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFE89C76E29670DA8E68D1855FDB906AF79A6BAE582BF4E7E1FF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFE5
9973C5764EF3E6DFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFE89C76F8EDE8FF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnGoToClick
end
object GroupBox5: TGroupBox
Left = 464
Top = 16
Width = 425
Height = 57
Caption = 'Preset'
TabOrder = 0
Visible = False
object btnSavePreset: TSpeedButton
Left = 368
Top = 18
Width = 24
Height = 24
Hint = 'Save Preset'
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnSavePresetClick
end
object btnDeletePreset: TSpeedButton
Left = 392
Top = 18
Width = 24
Height = 24
Hint = 'Delete Preset'
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnDeletePresetClick
end
object cmbPreset: TComboBox
Left = 10
Top = 20
Width = 351
Height = 21
Style = csDropDownList
TabOrder = 0
OnChange = cmbPresetChange
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 42
Width = 233
Height = 95
Anchors = [akLeft, akTop, akRight]
Caption = 'Size'
TabOrder = 1
DesignSize = (
233
95)
object Label6: TLabel
Left = 144
Top = 22
Width = 15
Height = 36
Caption = '}'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -32
Font.Name = 'Times New Roman'
Font.Style = []
ParentFont = False
Visible = False
end
object Label7: TLabel
Left = 160
Top = 36
Width = 26
Height = 13
Caption = 'pixels'
Visible = False
end
object chkMaintain: TCheckBox
Left = 8
Top = 70
Width = 217
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Keep aspect ratio'
Checked = True
State = cbChecked
TabOrder = 0
OnClick = chkMaintainClick
end
object pnlWidth: TPanel
Left = 8
Top = 20
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Width'
TabOrder = 3
end
object pnlHeight: TPanel
Left = 8
Top = 44
Width = 113
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Height'
TabOrder = 4
end
object cbHeight: TComboBox
Left = 120
Top = 44
Width = 105
Height = 21
Anchors = [akLeft, akTop, akRight]
BiDiMode = bdLeftToRight
Enabled = False
ParentBiDiMode = False
TabOrder = 2
OnChange = txtHeightChange
Items.Strings = (
'200'
'240'
'480'
'600'
'768'
'1024'
'1200'
'1920'
'2048'
'2400')
end
object cbWidth: TComboBox
Left = 120
Top = 20
Width = 105
Height = 21
Anchors = [akLeft, akTop, akRight]
BiDiMode = bdLeftToRight
Enabled = False
ParentBiDiMode = False
TabOrder = 1
OnChange = txtWidthChange
Items.Strings = (
'320'
'640'
'800'
'1024'
'1280'
'1600'
'1920'
'2048'
'2560'
'3200')
end
end
object GroupBox3: TGroupBox
Left = 248
Top = 42
Width = 218
Height = 95
Anchors = [akTop, akRight]
Caption = 'Quality settings'
TabOrder = 2
DesignSize = (
218
95)
object udOversample: TUpDown
Left = 196
Top = 68
Width = 13
Height = 21
Anchors = [akTop, akRight]
Associate = txtOversample
Min = 1
Max = 16
Position = 1
TabOrder = 3
end
object pnlDensity: TPanel
Left = 8
Top = 20
Width = 121
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Density'
TabOrder = 4
end
object pnlFilter: TPanel
Left = 8
Top = 44
Width = 121
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Filter radius'
TabOrder = 5
end
object pnlOversample: TPanel
Left = 8
Top = 68
Width = 121
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Oversample'
TabOrder = 6
end
object txtDensity: TComboBox
Left = 128
Top = 20
Width = 82
Height = 21
AutoComplete = False
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
OnChange = txtDensityChange
OnCloseUp = txtDensityChange
Items.Strings = (
'200'
'500'
'1000'
'2000'
'4000')
end
object txtFilterRadius: TEdit
Left = 128
Top = 44
Width = 82
Height = 21
Anchors = [akLeft, akTop, akRight]
BiDiMode = bdRightToLeft
ParentBiDiMode = False
TabOrder = 1
Text = '0.1'
OnChange = txtFilterRadiusChange
end
object txtOversample: TEdit
Left = 128
Top = 68
Width = 68
Height = 21
Anchors = [akLeft, akTop, akRight]
BiDiMode = bdRightToLeft
Enabled = False
ParentBiDiMode = False
ReadOnly = True
TabOrder = 2
Text = '1'
OnChange = txtOversampleChange
end
end
object GroupBox4: TGroupBox
Left = 8
Top = 142
Width = 458
Height = 99
Anchors = [akLeft, akTop, akRight]
Caption = 'Resource usage'
TabOrder = 3
DesignSize = (
458
99)
object lblApproxMem: TLabel
Left = 439
Top = 100
Width = 42
Height = 13
Alignment = taRightJustify
Caption = '0000 Mb'
Visible = False
end
object lblPhysical: TLabel
Left = 439
Top = 96
Width = 42
Height = 13
Alignment = taRightJustify
Caption = '0000 Mb'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
Visible = False
end
object lblMaxbits: TLabel
Left = 440
Top = 116
Width = 33
Height = 13
Hint = '- No render stats -'
Alignment = taRightJustify
Caption = '99.999'
ParentShowHint = False
ShowHint = True
Visible = False
end
object Label9: TLabel
Left = 440
Top = 108
Width = 96
Height = 13
Hint = '- No render stats -'
Caption = 'Max bits per sample:'
ParentShowHint = False
ShowHint = True
Visible = False
end
object lblMemory: TLabel
Left = 11
Top = 18
Width = 442
Height = 24
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Caption =
'The render process will use 0000 Mb of 0000MB available physical' +
' memory'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
Layout = tlCenter
WordWrap = True
end
object lblCPUCores: TLabel
Left = 11
Top = 43
Width = 442
Height = 14
Anchors = [akLeft, akTop, akRight]
AutoSize = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
Layout = tlCenter
WordWrap = True
end
object chkLimitMem: TCheckBox
Left = 444
Top = 134
Width = 125
Height = 17
Caption = 'Limit memory usage to:'
TabOrder = 0
Visible = False
end
object pnlLimit: TPanel
Left = 8
Top = 68
Width = 121
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Memory limit'
TabOrder = 2
end
object cbMaxMemory: TComboBox
Left = 128
Top = 68
Width = 97
Height = 21
Style = csDropDownList
BiDiMode = bdLeftToRight
ItemIndex = 0
ParentBiDiMode = False
TabOrder = 1
Text = 'No limit'
OnChange = cbMaxMemoryChange
Items.Strings = (
'No limit'
'32'
'64'
'128'
'256'
'512'
'1024'
'1536')
end
object PBMem: TProgressBar
Left = 232
Top = 68
Width = 217
Height = 21
TabOrder = 3
end
end
object GroupBox1: TGroupBox
Left = 8
Top = 253
Width = 217
Height = 81
Caption = 'Output options'
TabOrder = 5
DesignSize = (
217
81)
object chkSave: TCheckBox
Left = 8
Top = 24
Width = 201
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Save parameters'
Checked = True
State = cbChecked
TabOrder = 0
end
object chkSaveIncompleteRenders: TCheckBox
Left = 8
Top = 48
Width = 201
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Save incomplete renders'
TabOrder = 1
OnClick = chkSaveIncompleteRendersClick
end
end
object GroupBox6: TGroupBox
Left = 232
Top = 253
Width = 234
Height = 81
Anchors = [akLeft, akTop, akRight]
Caption = 'Completion options'
TabOrder = 6
DesignSize = (
234
81)
object chkPostProcess: TCheckBox
Left = 8
Top = 24
Width = 217
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Post-process after completion'
TabOrder = 0
end
object chkShutdown: TCheckBox
Left = 8
Top = 48
Width = 217
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Shut down computer when complete'
TabOrder = 1
end
end
object pnlTarget: TPanel
Left = 8
Top = 12
Width = 121
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Destination'
TabOrder = 7
end
object txtFilename: TEdit
Left = 128
Top = 12
Width = 288
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 4
OnChange = txtFilenameChange
end
object chkBinary: TCheckBox
Left = 8
Top = 349
Width = 457
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption =
'Write raw data (WARNING: this is experimental and slows down the' +
' rendering!!!)'
Enabled = False
TabOrder = 8
Visible = False
end
end
object TabOutput: TTabSheet
Caption = 'Output'
ImageIndex = 38
object Output: TMemo
Left = 0
Top = 0
Width = 473
Height = 344
Align = alClient
BorderStyle = bsNone
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clBtnText
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 0
end
end
end
object StatusBar: TStatusBar
Left = 0
Top = 450
Width = 497
Height = 19
Panels = <
item
Width = 161
end
item
Width = 150
end
item
Width = 50
end>
end
object btnSaveLog: TButton
Left = 8
Top = 419
Width = 73
Height = 25
Anchors = [akLeft, akBottom]
Caption = 'Save log'
Enabled = False
TabOrder = 5
Visible = False
OnClick = btnSaveLogClick
end
object ProgressBar2: TProgressBar
Left = 8
Top = 388
Width = 481
Height = 25
Anchors = [akLeft, akRight, akBottom]
TabOrder = 6
end
object SaveDialog: TSaveDialog
Left = 168
Top = 464
end
end

1311
Forms/FormRender.pas Normal file

File diff suppressed because it is too large Load Diff

59
Forms/Fullscreen.dfm Normal file
View File

@ -0,0 +1,59 @@
object FullscreenForm: TFullscreenForm
Left = 439
Top = 325
BorderStyle = bsNone
Caption = 'FullscreenForm'
ClientHeight = 131
ClientWidth = 186
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PopupMenu = FullscreenPopup
OnClose = FormClose
OnCreate = FormCreate
OnDblClick = ImageDblClick
OnDestroy = FormDestroy
OnKeyPress = FormKeyPress
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Image: TImage
Left = 0
Top = 0
Width = 186
Height = 131
PopupMenu = FullscreenPopup
OnDblClick = ImageDblClick
end
object Timelimiter: TTimer
Enabled = False
Interval = 2000
OnTimer = TimelimiterOnTimer
Left = 8
Top = 8
end
object FullscreenPopup: TPopupMenu
Left = 40
Top = 8
object RenderStop: TMenuItem
Caption = '&Stop Render'
OnClick = RenderStopClick
end
object RenderMore: TMenuItem
Caption = 'Render &More'
ShortCut = 114
OnClick = RenderMoreClick
end
object N1: TMenuItem
Caption = '-'
end
object Exit1: TMenuItem
Caption = '&Close'
OnClick = ImageDblClick
end
end
end

343
Forms/Fullscreen.pas Normal file
View File

@ -0,0 +1,343 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit Fullscreen;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus, ExtCtrls, ControlPoint, RenderThread, Translation;
type
TFullscreenForm = class(TForm)
Image: TImage;
Timelimiter: TTimer;
FullscreenPopup: TPopupMenu;
RenderStop: TMenuItem;
N1: TMenuItem;
Exit1: TMenuItem;
RenderMore: TMenuItem;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure ImageDblClick(Sender: TObject);
procedure TimelimiterOnTimer(Sender: TObject);
procedure RenderStopClick(Sender: TObject);
procedure RenderMoreClick(Sender: TObject);
private
Remainder, StartTime, t: double;
imgLeft, imgTop,
imgWidth, imgHeight: integer;
Closing: boolean;
Renderer: TRenderThread;
procedure showTaskbar;
procedure hideTaskbar;
procedure DrawFlame;
procedure OnProgress(prog: double);
procedure HandleThreadCompletion(var Message: TMessage);
message WM_THREAD_COMPLETE;
procedure HandleThreadTermination(var Message: TMessage);
message WM_THREAD_TERMINATE;
public
Calculate : boolean;
cp: TControlPoint;
Zoom: double;
center: array[0..1] of double;
ActiveForm: TForm;
end;
var
FullscreenForm: TFullscreenForm;
implementation
uses
Main, Math, Global,
Tracer;
{$R *.DFM}
procedure Trace1(const str: string);
begin
if TraceLevel >= 1 then
TraceForm.FullscreenTrace.Lines.Add('. ' + str);
end;
procedure Trace2(const str: string);
begin
if TraceLevel >= 2 then
TraceForm.FullscreenTrace.Lines.Add('. . ' + str);
end;
procedure TFullscreenForm.DrawFlame;
var
r: double;
begin
if (cp.width / cp.height) > (ClientWidth / ClientHeight) then
begin
imgWidth := ClientWidth;
r := cp.width / imgWidth;
imgHeight := round(cp.height / r);
imgLeft := 1;
imgTop := (ClientHeight - imgHeight) div 2;
end
else begin
imgHeight := ClientHeight;
r := cp.height / imgHeight;
imgWidth := round(cp.Width / r);
imgTop := 1;
imgLeft := (ClientWidth - ImgWidth) div 2;
end;
cp.AdjustScale(imgWidth, imgHeight);
// cp.Zoom := MainForm.Zoom;
// cp.center[0] := MainForm.center[0];
// cp.center[1] := MainForm.center[1];
cp.sample_density := defSampleDensity;
StartTime := Now;
t := now;
Remainder := 1;
if Assigned(Renderer) then begin // hmm...
Trace2('Killing previous RenderThread #' + inttostr(Renderer.ThreadID));
Renderer.Terminate;
Renderer.WaitFor;
while Renderer <> nil do
Application.ProcessMessages; // HandleThreadTermination kinda should be called here...(?)
end;
assert(not assigned(renderer), 'Render thread is still running!?');
Renderer := TRenderThread.Create; // Hmm... Why do we use RenderThread here, anyway? :-\
Renderer.TargetHandle := Handle;
Renderer.OnProgress := OnProgress;
Renderer.NrThreads := NrTreads;
if TraceLevel > 0 then Renderer.Output := TraceForm.FullscreenTrace.Lines;
Renderer.SetCP(cp);
Renderer.WaitForMore := true;
RenderStop.Enabled := true;
RenderMore.Enabled := false;
Renderer.Resume;
end;
procedure TFullscreenForm.HandleThreadCompletion(var Message: TMessage);
var
bm: TBitmap;
begin
Trace2(MsgComplete + IntToStr(message.LParam));
if not Assigned(Renderer) then begin
Trace2(MsgNotAssigned);
exit;
end;
if Renderer.ThreadID <> message.LParam then begin
Trace2(MsgAnotherRunning);
exit;
end;
if Assigned(Renderer) then
begin
bm := TBitmap.Create;
bm.assign(Renderer.GetImage);
Image.SetBounds(imgLeft, imgTop, imgWidth, imgHeight);
Image.Picture.Graphic := bm;
bm.Free;
end;
RenderStop.Enabled := false;
RenderMore.Enabled := true;
TimeLimiter.Enabled := false;
end;
procedure TFullscreenForm.HandleThreadTermination(var Message: TMessage);
var
bm: TBitmap;
begin
Trace2(MsgTerminated + IntToStr(message.LParam));
if not Assigned(Renderer) then begin
Trace2(MsgNotAssigned);
exit;
end;
if Renderer.ThreadID <> message.LParam then begin
Trace2(MsgAnotherRunning);
exit;
end;
RenderStop.Enabled := false;
RenderMore.Enabled := false;
TimeLimiter.Enabled := false;
end;
procedure TFullscreenForm.OnProgress(prog: double);
begin
prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
Canvas.Lock;
try
if prog >= 1 then
begin
Canvas.Brush.Color := clBlack;
Canvas.FillRect(Rect(5, ClientHeight - 15, ClientWidth - 5, ClientHeight - 5));
end
else if prog >= 0 then begin
Canvas.Brush.Color := clTeal;
Canvas.FrameRect(Rect(5, ClientHeight - 15, ClientWidth - 5, ClientHeight - 5));
Canvas.Brush.Color := clTeal;
Canvas.Fillrect(Rect(7, ClientHeight - 13, 7 + Round(prog * (ClientWidth - 14)), ClientHeight - 7));
Canvas.Brush.Color := clBlack;
Canvas.Fillrect(Rect(7 + Round(prog * (ClientWidth - 14)), ClientHeight - 13, ClientWidth - 7, ClientHeight - 7));
end;
finally
Canvas.Unlock;
end;
//Application.ProcessMessages;
end;
procedure TFullscreenForm.hideTaskbar;
var wndHandle: THandle;
wndClass: array[0..50] of Char;
begin
StrPCopy(@wndClass[0], 'Shell_TrayWnd');
wndHandle := FindWindow(@wndClass[0], nil);
ShowWindow(wndHandle, SW_HIDE);
end;
procedure TFullscreenForm.showTaskbar;
var wndHandle: THandle;
wndClass: array[0..50] of Char;
begin
StrPCopy(@wndClass[0], 'Shell_TrayWnd');
wndHandle := FindWindow(@wndClass[0], nil);
ShowWindow(wndHandle, SW_RESTORE);
end;
procedure TFullscreenForm.FormShow(Sender: TObject);
begin
Trace1('--- Opening Fullscreen View ---');
if Image.Width < ClientWidth then
Image.Left := (ClientWidth - Image.Width) div 2;
if Image.Height < ClientHeight then
Image.Top := (ClientHeight - Image.Height) div 2;
Closing := false;
TimeLimiter.Enabled := false;
RenderStop.Enabled := false;
RenderMore.Enabled := false;
MainForm.mnuFullScreen.enabled := true;
HideTaskbar;
if calculate then
DrawFlame;
end;
procedure TFullscreenForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Closing := true;
if Assigned(Renderer) then begin
if Renderer.Suspended then begin
Renderer.WaitForMore := false;
Renderer.Resume;
end;
Trace2('Form closing: killing RenderThread #' + inttostr(Renderer.ThreadID));
Renderer.Terminate;
Renderer.WaitFor;
Trace2('Destroying RenderThread #' + IntToStr(Renderer.ThreadID));
Renderer.Free;
Renderer := nil;
end;
Trace1('--- Closing Fullscreen View ---');
Trace1('');
ShowTaskbar;
ActiveForm.SetFocus;
end;
procedure TFullscreenForm.FormCreate(Sender: TObject);
begin
Exit1.Caption := TextByKey('common-close');
RenderMore.Caption := TextByKey('fullscreen-popup-rendermore');
RenderStop.Caption := TextByKey('fullscreen-popup-stoprender');
cp := TControlPoint.Create;
end;
procedure TFullscreenForm.FormDestroy(Sender: TObject);
begin
if assigned(Renderer) then begin
Renderer.Terminate;
Renderer.WaitFor;
Renderer.Free;
end;
cp.Free;
end;
procedure TFullscreenForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key = ' ' then begin
if RenderStop.Enabled then RenderStop.Click
else if RenderMore.Enabled then RenderMore.Click;
end
else Close;
end;
procedure TFullscreenForm.ImageDblClick(Sender: TObject);
begin
Close;
end;
procedure TFullscreenForm.TimelimiterOnTimer(Sender: TObject);
begin
//if assigned(Renderer) then Renderer.Break;
TimeLimiter.Enabled := false;
end;
procedure TFullscreenForm.RenderStopClick(Sender: TObject);
begin
if assigned(Renderer) then Renderer.BreakRender;
end;
procedure TFullscreenForm.RenderMoreClick(Sender: TObject);
begin
if assigned(Renderer) and Renderer.Suspended then begin
Renderer.Resume;
RenderStop.Enabled := true;
RenderMore.Enabled := false;
end;
end;
end.

315
Forms/ImageColoring.dfm Normal file
View File

@ -0,0 +1,315 @@
object frmImageColoring: TfrmImageColoring
Left = 419
Top = 408
Width = 581
Height = 365
Caption = 'Image coloring'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 16
Top = 40
Width = 54
Height = 13
Caption = 'First Palete'
end
object Label2: TLabel
Left = 16
Top = 168
Width = 72
Height = 13
Caption = 'Second palette'
end
object Label3: TLabel
Left = 296
Top = 36
Width = 30
Height = 13
Caption = 'Image'
end
object Label4: TLabel
Left = 16
Top = 107
Width = 57
Height = 13
Alignment = taCenter
AutoSize = False
Caption = 'Preset'
end
object Label5: TLabel
Left = 16
Top = 235
Width = 57
Height = 13
Alignment = taCenter
AutoSize = False
Caption = 'Preset'
end
object cbEnable: TCheckBox
Left = 16
Top = 8
Width = 133
Height = 17
Caption = 'Enable image coloring'
TabOrder = 0
end
object Panel1: TPanel
Left = 16
Top = 56
Width = 258
Height = 40
BevelOuter = bvLowered
TabOrder = 1
object imgPal1: TImage
Left = 1
Top = 1
Width = 256
Height = 38
Align = alClient
Stretch = True
end
end
object Panel2: TPanel
Left = 16
Top = 188
Width = 258
Height = 40
BevelOuter = bvLowered
TabOrder = 2
object imgpal2: TImage
Left = 1
Top = 1
Width = 256
Height = 38
Align = alClient
Stretch = True
end
end
object Panel3: TPanel
Left = 292
Top = 60
Width = 258
Height = 258
BevelOuter = bvLowered
TabOrder = 3
end
object cmbPalette1: TComboBox
Left = 80
Top = 106
Width = 177
Height = 19
Style = csOwnerDrawFixed
Color = clBlack
DropDownCount = 20
Font.Charset = ANSI_CHARSET
Font.Color = clWhite
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ItemHeight = 13
ParentFont = False
ParentShowHint = False
ShowHint = False
TabOrder = 4
OnChange = cmbPalette1Change
OnDrawItem = cmbPalette1DrawItem
Items.Strings = (
'south-sea-bather'
'sky-flesh'
'blue-bather'
'no-name'
'pillows'
'mauve-splat'
'facial-treescape 6'
'fasion-bug'
'leafy-face'
'mouldy-sun'
'sunny-harvest'
'peach-tree'
'fire-dragon'
'ice-dragon'
'german-landscape'
'no-name'
'living-mud-bomb'
'cars'
'unhealthy-tan'
'daffodil'
'rose'
'healthy-skin'
'orange'
'white-ivy'
'summer-makeup'
'glow-buzz'
'deep-water'
'afternoon-beach'
'dim-beach'
'cloudy-brick'
'burning-wood'
'aquatic-garden'
'no-name'
'fall-quilt'
'night-blue-sky'
'shadow-iris'
'solid-sky'
'misty-field'
'wooden-highlight'
'jet-tundra'
'pastel-lime'
'hell'
'indian-coast'
'dentist-decor'
'greenland'
'purple-dress'
'no-name'
'spring-flora'
'andi'
'gig-o835'
'rie02'
'rie05'
'rie11'
'etretat.ppm'
'the-hollow-needle-at-etretat.ppm'
'rouen-cathedral-sunset.ppm'
'the-houses-of-parliament.ppm'
'starry-night.ppm'
'water-lilies-sunset.ppm'
'gogh.chambre-arles.ppm'
'gogh.entrance.ppm'
'gogh.the-night-cafe.ppm'
'gogh.vegetable-montmartre.ppm'
'matisse.bonheur-vivre.ppm'
'matisse.flowers.ppm'
'matisse.lecon-musique.ppm'
'modigliani.nude-caryatid.ppm'
'braque.instruments.ppm'
'calcoast09.ppm'
'dodge102.ppm'
'ernst.anti-pope.ppm'
'ernst.ubu-imperator.ppm'
'fighting-forms.ppm'
'fog25.ppm'
'geyser27.ppm'
'gris.josette.ppm'
'gris.landscape-ceret.ppm'
'kandinsky.comp-9.ppm'
'kandinsky.yellow-red-blue.ppm'
'klee.insula-dulcamara.ppm'
'nile.ppm'
'picasso.jfille-chevre.ppm'
'pollock.lavender-mist.ppm'
'yngpaint.ppm')
end
object cmbPalette2: TComboBox
Left = 80
Top = 234
Width = 177
Height = 19
Style = csOwnerDrawFixed
Color = clBlack
DropDownCount = 20
Font.Charset = ANSI_CHARSET
Font.Color = clWhite
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ItemHeight = 13
ParentFont = False
ParentShowHint = False
ShowHint = False
TabOrder = 5
OnChange = cmbPalette2Change
OnDrawItem = cmbPalette1DrawItem
Items.Strings = (
'south-sea-bather'
'sky-flesh'
'blue-bather'
'no-name'
'pillows'
'mauve-splat'
'facial-treescape 6'
'fasion-bug'
'leafy-face'
'mouldy-sun'
'sunny-harvest'
'peach-tree'
'fire-dragon'
'ice-dragon'
'german-landscape'
'no-name'
'living-mud-bomb'
'cars'
'unhealthy-tan'
'daffodil'
'rose'
'healthy-skin'
'orange'
'white-ivy'
'summer-makeup'
'glow-buzz'
'deep-water'
'afternoon-beach'
'dim-beach'
'cloudy-brick'
'burning-wood'
'aquatic-garden'
'no-name'
'fall-quilt'
'night-blue-sky'
'shadow-iris'
'solid-sky'
'misty-field'
'wooden-highlight'
'jet-tundra'
'pastel-lime'
'hell'
'indian-coast'
'dentist-decor'
'greenland'
'purple-dress'
'no-name'
'spring-flora'
'andi'
'gig-o835'
'rie02'
'rie05'
'rie11'
'etretat.ppm'
'the-hollow-needle-at-etretat.ppm'
'rouen-cathedral-sunset.ppm'
'the-houses-of-parliament.ppm'
'starry-night.ppm'
'water-lilies-sunset.ppm'
'gogh.chambre-arles.ppm'
'gogh.entrance.ppm'
'gogh.the-night-cafe.ppm'
'gogh.vegetable-montmartre.ppm'
'matisse.bonheur-vivre.ppm'
'matisse.flowers.ppm'
'matisse.lecon-musique.ppm'
'modigliani.nude-caryatid.ppm'
'braque.instruments.ppm'
'calcoast09.ppm'
'dodge102.ppm'
'ernst.anti-pope.ppm'
'ernst.ubu-imperator.ppm'
'fighting-forms.ppm'
'fog25.ppm'
'geyser27.ppm'
'gris.josette.ppm'
'gris.landscape-ceret.ppm'
'kandinsky.comp-9.ppm'
'kandinsky.yellow-red-blue.ppm'
'klee.insula-dulcamara.ppm'
'nile.ppm'
'picasso.jfille-chevre.ppm'
'pollock.lavender-mist.ppm'
'yngpaint.ppm')
end
end

161
Forms/ImageColoring.pas Normal file
View File

@ -0,0 +1,161 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit ImageColoring;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, cmap;
type
TfrmImageColoring = class(TForm)
cbEnable: TCheckBox;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
cmbPalette1: TComboBox;
Label4: TLabel;
imgPal1: TImage;
imgpal2: TImage;
Label5: TLabel;
cmbPalette2: TComboBox;
procedure cmbPalette2Change(Sender: TObject);
procedure cmbPalette1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
procedure cmbPalette1Change(Sender: TObject);
private
FPal1: TColorMap;
FPal2: TColorMap;
FBkuPal1: TColorMap;
FBkuPal2: TColorMap;
Index1: integer;
Index2: integer;
procedure DrawPalette1;
procedure DrawPalette2;
procedure Apply;
public
procedure Update; override;
end;
var
frmImageColoring: TfrmImageColoring;
implementation
{$R *.dfm}
uses
Main, Editor, Mutate, GradientHlpr;
{ TfrmImageColoring }
procedure TfrmImageColoring.Update;
begin
// FPal1 := MainCP.Pal;
FBkuPal1 := FPal1;
end;
procedure TfrmImageColoring.cmbPalette1Change(Sender: TObject);
begin
Index1 := cmbPalette1.ItemIndex;
GetCmap(Index1, 1, FPal1);
FBkuPal1 := FPal1;
// ScrollBar.Position := 0;
DrawPalette1;
Apply;
end;
procedure TfrmImageColoring.Apply;
begin
MainForm.StopThread;
MainForm.UpdateUndo;
MainCp.CmapIndex := cmbPalette1.ItemIndex;
MainCp.cmap := FPal1;
if EditForm.visible then EditForm.UpdateDisplay;
if MutateForm.Visible then MutateForm.UpdateDisplay;
MainForm.RedrawTimer.enabled := true;
end;
procedure TfrmImageColoring.cmbPalette1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
var
Bitmap: TBitmap;
PalName: string;
begin
BitMap := GradientHelper.GetGradientBitmap(Index, 1);
GetCmapName(index, PalName);
with Control as TComboBox do begin
Canvas.Rectangle(Rect);
Canvas.TextOut(4, Rect.Top, PalName);
Rect.Left := (Rect.Left + rect.Right) div 2;
Canvas.StretchDraw(Rect, Bitmap);
end;
BitMap.Free;
end;
procedure TfrmImageColoring.DrawPalette1;
var
Bitmap: TBitmap;
begin
BitMap := GradientHelper.GetGradientBitmap(Index1, 1);
imgPal1.Picture.Graphic := Bitmap;
imgPal1.Refresh;
BitMap.Free;
end;
procedure TfrmImageColoring.DrawPalette2;
var
Bitmap: TBitmap;
begin
BitMap := GradientHelper.GetGradientBitmap(Index2, 1);
imgPal2.Picture.Graphic := Bitmap;
imgPal2.Refresh;
BitMap.Free;
end;
procedure TfrmImageColoring.cmbPalette2Change(Sender: TObject);
begin
Index2 := cmbPalette2.ItemIndex;
GetCmap(Index2, 1, FPal2);
FBkuPal2 := FPal2;
// ScrollBar.Position := 0;
DrawPalette2;
Apply;
end;
end.

120
Forms/LoadTracker.dfm Normal file
View File

@ -0,0 +1,120 @@
object LoadForm: TLoadForm
Left = 443
Top = 274
ActiveControl = Button1
Anchors = [akLeft, akTop, akRight, akBottom]
Caption = 'Messages'
ClientHeight = 388
ClientWidth = 662
Color = clBtnFace
Constraints.MinHeight = 275
Constraints.MinWidth = 550
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsStayOnTop
Icon.Data = {
0000010001001010000001002000680400001600000028000000100000002000
0000010020000000000040040000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000006349
35146349352E927A69FF8C7563FF87705EFF6349352E7F6654FF7A624FFF755D
4AFF6349352E6E5441FF6A513EFF674E3AFF6349352E00000000000000006349
352EAE9888FFEFE3DDFFF2E7E1FFEDDFD7FF836B59FFB79B8BFFDBBDADFFD9B7
A6FF725946FFAE8B77FFD0A692FFCC9E87FF654B38FF6349352E00000000B7A2
93FFFBF8F7FFF9F4F2FFF7F0ECFFF4EBE6FFF1E5DFFF7F6754FF7A624FFF765D
4AFF735946FF6E5542FF6B523EFF674E3AFF654B38FF634935FF00000000B7A2
93FFFDFCFBFFFBF9F7FFFAF5F2FFF7EFEDFFF4EAE6FFF2E5DFFFDDDCD7FFDFD7
CEFFDECDC0FFDEC5B6FFDEBFACFFDBBAA6FFD8B5A3FF634935FF00000000B7A2
93FFFFFFFFFFB47F65FFB47F64FFEDDDD5FFB37E63FFF4EBE6FFF1E5DFFFEFDF
D7FFEBD9D1FFE8D3C9FFE5CDC1FFE1C6B9FFD6B3A1FF634A35FF00000000B9A4
95FFFFFFFFFFFFFFFFFFFDFCFCFFFCF9F7FFFAF4F2FFF6F0ECFFF4EBE5FFF2E5
DFFFEEDFD8FFEBD9D0FFE8D3C8FFE5CCC1FFDBBDADFF634A36FF00000000BDA7
98FFFFFFFFFF968E88FFEEDED7FF968E87FFEDDDD6FF968D86FF958C85FFF4EB
E6FFF2E5DFFFEFDFD8FFECD9D0FFE8D3C9FFE0C7BAFF634A35FF00000000C1AB
9CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFBF8F7FFFAF4F2FFF7F0
ECFFF4EAE6FFF1E5DFFFEEDFD7FFEBD9D0FFE6D1C6FF634A35FF00000000C5AF
A0FFFFFFFFFFB48065FFB48065FF968E88FFC2B0A3FF968E87FF968E86FFF9F4
F2FFF7EFECFFF4EBE6FFF2E5DFFFEFDFD8FFEADBD1FF634936FF00000000C8B2
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFCF8
F7FFF9F5F2FFF7F0ECFFF4EBE6FFF1E5DFFFEEE2DAFF644A36FF00000000C9B4
A5FFFFFFFFFFFFFFFFFF66A365FF66A365FF66A365FFC0B4ADFF66A365FF66A3
65FF66A264FFFAF5F2FFF7F0ECFFF4EBE6FFEEE2DAFF644A36FF00000000C8B2
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFEFCFBFFFBF9F7FFFAF4F2FFF7F0EDFFF3EAE4FF644A36FF00000000C8B2
A3FFCAB4A5FFCBB5A6FFCAB4A5FFC9B3A4FFC7B2A3FFC6B0A1FFC3AE9FFFC1AC
9DFFBFAA9BFFBDA899FFBBA697FFB9A495FFB8A394FFB7A293FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000FFFF00000003000000010000000100000001000000010000000100000001
0000000100000001000000010000000100000001000000010000FFFF0000}
OldCreateOrder = False
OnCreate = FormCreate
OnResize = FormResize
DesignSize = (
662
388)
PixelsPerInch = 96
TextHeight = 13
object Bevel1: TBevel
Left = 7
Top = 7
Width = 533
Height = 308
Anchors = [akLeft, akTop, akRight, akBottom]
Style = bsRaised
end
object Button1: TButton
Left = 527
Top = 359
Width = 112
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Close'
TabOrder = 0
OnClick = Button1Click
end
object CheckBox1: TCheckBox
Left = 8
Top = 360
Width = 384
Height = 24
Anchors = [akLeft, akRight, akBottom]
Caption = 'Automatically open this window when loading flame'
TabOrder = 1
WordWrap = True
OnClick = CheckBox1Click
end
object Button2: TButton
Left = 406
Top = 359
Width = 113
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Clear'
TabOrder = 2
OnClick = Button2Click
end
object Output: TMemo
Left = 8
Top = 8
Width = 528
Height = 303
BevelOuter = bvRaised
BorderStyle = bsNone
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clBtnText
Font.Height = -12
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 3
end
end

104
Forms/LoadTracker.pas Normal file
View File

@ -0,0 +1,104 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit LoadTracker;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Global, Settings, ExtCtrls, Translation;
type
TLoadForm = class(TForm)
Button1: TButton;
CheckBox1: TCheckBox;
Button2: TButton;
Bevel1: TBevel;
Output: TMemo;
procedure FormResize(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
LoadForm: TLoadForm;
implementation
{$R *.dfm}
procedure TLoadForm.Button1Click(Sender: TObject);
begin
Close;
end;
procedure TLoadForm.CheckBox1Click(Sender: TObject);
begin
AutoOpenLog := CheckBox1.Checked;
end;
procedure TLoadForm.FormCreate(Sender: TObject);
begin
Button2.Caption := TextByKey('common-clear');
Button1.Caption := TextByKey('common-close');
self.Caption := TextByKey('messages-title');
CheckBox1.Caption := TextByKey('messages-openautomatically');
CheckBox1.Checked := AutoOpenLog;
end;
procedure TLoadForm.Button2Click(Sender: TObject);
begin
Output.Text := '';
end;
procedure TLoadForm.FormResize(Sender: TObject);
begin
CheckBox1.Left := 2;
Checkbox1.Top := self.ClientHeight - Checkbox1.Height - 2;
CheckBox1.Width := self.ClientWidth - button1.Width - button2.Width - 8;
Button1.Left := self.ClientWidth - button1.Width - button2.Width - 4;
Button1.Top := self.ClientHeight - Checkbox1.Height - 2 + Checkbox1.Height div 2 - Button1.Height div 2;
Button2.Left := self.ClientWidth - button2.Width - 2;
Button2.Top := Button1.Top;
Bevel1.Left := 2;
Bevel1.Top := 2;
Bevel1.Width := self.ClientWidth - 4;
Bevel1.Height := self.ClientHeight - 6 - checkbox1.Height;
Output.Left := Bevel1.Left + 2;
Output.Top := Bevel1.Top + 2;
Output.Width := Bevel1.Width - 4;
Output.Height := Bevel1.Height -4;
end;
end.

5974
Forms/Main.dfm Normal file

File diff suppressed because it is too large Load Diff

7015
Forms/Main.pas Normal file

File diff suppressed because it is too large Load Diff

421
Forms/Mutate.dfm Normal file
View File

@ -0,0 +1,421 @@
object MutateForm: TMutateForm
Left = 589
Top = 326
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Mutation'
ClientHeight = 398
ClientWidth = 422
Color = clBtnFace
Constraints.MinHeight = 400
Constraints.MinWidth = 400
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000001002000680400001600000028000000100000002000
0000010020000000000040040000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF0000
00003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF000000000000
00000000000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF0000
000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF000000000000
000000000000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF0000
0000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF000000000000
00000000000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF0000
000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF000000000000
00000000000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF0000
000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF000000000000
000000000000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF0000
0000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF0000
00003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF000000000000
00000000000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF0000
000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF000000000000
000000000000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF0000
0000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF000000000000
00000000000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF0000
000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF000000000000
00000000000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF0000
000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF000000000000
000000000000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF0000
0000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000FFFF0000C0810000C0810000C0810000C0810000C0810000C0810000FFFF
0000C0810000C0810000C0810000C0810000C0810000C0810000FFFF0000}
OldCreateOrder = False
Position = poDefault
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
DesignSize = (
422
398)
PixelsPerInch = 96
TextHeight = 13
object GroupBox1: TGroupBox
Left = 8
Top = 8
Width = 409
Height = 273
Anchors = [akLeft, akTop, akRight, akBottom]
Caption = 'Directions'
TabOrder = 0
DesignSize = (
409
273)
object Panel10: TPanel
Left = 12
Top = 20
Width = 384
Height = 238
Anchors = [akLeft, akTop, akRight, akBottom]
BevelOuter = bvNone
TabOrder = 0
OnResize = Panel10Resize
object Panel6: TPanel
Left = 112
Top = 168
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 0
object Image6: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel7: TPanel
Left = 0
Top = 168
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 1
object Image7: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel4: TPanel
Left = 224
Top = 84
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 2
object Image4: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel0: TPanel
Left = 112
Top = 84
Width = 108
Height = 80
HelpContext = 2003
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 3
object Image0: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = Image0Click
end
end
object Panel8: TPanel
Left = 0
Top = 84
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 4
object Image8: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel3: TPanel
Left = 224
Top = 0
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 5
object Image3: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel2: TPanel
Left = 112
Top = 0
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 6
object Image2: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 7
object Image1: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel5: TPanel
Left = 224
Top = 168
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 8
object Image5: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 288
Width = 409
Height = 105
Anchors = [akLeft, akRight, akBottom]
TabOrder = 1
DesignSize = (
409
105)
object scrollTime: TScrollBar
Left = 120
Top = 20
Width = 202
Height = 20
Anchors = [akLeft, akTop, akRight]
LargeChange = 5
Max = 50
Min = 1
PageSize = 0
Position = 1
TabOrder = 0
OnChange = scrollTimeChange
end
object cmbTrend: TComboBox
Left = 119
Top = 48
Width = 282
Height = 21
Style = csDropDownList
Anchors = [akLeft, akTop, akRight]
DropDownCount = 16
TabOrder = 1
OnChange = cmbTrendChange
Items.Strings = (
'Random'
'Linear'
'Sinusoidal'
'Spherical'
'Swirl'
'Horseshoe'
'Polar'
'Handkerchief'
'Heart'
'Disc'
'Spiral'
'Hyperbolic'
'Diamond'
'Ex'
'Julia'
'Bent'
'Waves'
'Fisheye'
'Popcorn')
end
object chkSameNum: TCheckBox
Left = 12
Top = 78
Width = 389
Height = 17
Anchors = [akLeft, akTop, akRight]
Caption = 'Same no. of transforms'
TabOrder = 2
OnClick = chkSameNumClick
end
object pnlSpeed: TPanel
Left = 12
Top = 20
Width = 101
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Speed'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object txtTime: TEdit
Left = 328
Top = 20
Width = 73
Height = 21
Anchors = [akTop, akRight]
ReadOnly = True
TabOrder = 4
Text = '0'
end
object pnlTrend: TPanel
Left = 12
Top = 48
Width = 101
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Trend'
ParentShowHint = False
ShowHint = True
TabOrder = 5
end
end
object Timer: TTimer
Enabled = False
Interval = 100
OnTimer = TimerTimer
Left = 168
Top = 80
end
object QualityPopup: TPopupMenu
Images = MainForm.Buttons
Left = 144
Top = 40
object mnuLowQuality: TMenuItem
Caption = 'Low Quality'
RadioItem = True
OnClick = mnuLowQualityClick
end
object mnuMediumQuality: TMenuItem
Caption = 'Medium Quality'
Checked = True
RadioItem = True
OnClick = mnuMediumQualityClick
end
object mnuHighQuality: TMenuItem
Caption = 'High Quality'
RadioItem = True
OnClick = mnuHighQualityClick
end
object N3: TMenuItem
Caption = '-'
end
object mnuBack: TMenuItem
Caption = 'Previous'
Enabled = False
ImageIndex = 4
OnClick = mnuBackClick
end
object N1: TMenuItem
Caption = '-'
end
object mnuMaintainSym: TMenuItem
Caption = 'Maintain Symmetry'
Checked = True
OnClick = mnuMaintainSymClick
end
object N2: TMenuItem
Caption = '-'
end
object mnuResetLocation: TMenuItem
Caption = 'Reset Location'
Checked = True
OnClick = mnuResetLocationClick
end
end
end

695
Forms/Mutate.pas Normal file
View File

@ -0,0 +1,695 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit Mutate;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, ControlPoint, ComCtrls, Menus, Buttons, Cmap,
RenderingInterface, Translation, Curves;
type
TMutateForm = class(TForm)
GroupBox1: TGroupBox;
Timer: TTimer;
GroupBox2: TGroupBox;
scrollTime: TScrollBar;
cmbTrend: TComboBox;
chkSameNum: TCheckBox;
QualityPopup: TPopupMenu;
mnuLowQuality: TMenuItem;
mnuMediumQuality: TMenuItem;
mnuHighQuality: TMenuItem;
N3: TMenuItem;
mnuResetLocation: TMenuItem;
mnuBack: TMenuItem;
N1: TMenuItem;
mnuMaintainSym: TMenuItem;
N2: TMenuItem;
Panel10: TPanel;
Panel6: TPanel;
Image6: TImage;
Panel7: TPanel;
Image7: TImage;
Panel4: TPanel;
Image4: TImage;
Panel0: TPanel;
Image0: TImage;
Panel8: TPanel;
Image8: TImage;
Panel3: TPanel;
Image3: TImage;
Panel2: TPanel;
Image2: TImage;
Panel1: TPanel;
Image1: TImage;
Panel5: TPanel;
Image5: TImage;
pnlSpeed: TPanel;
txtTime: TEdit;
pnlTrend: TPanel;
procedure Panel10Resize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Image0Click(Sender: TObject);
procedure MutantClick(Sender: TObject);
procedure sbTimeChange(Sender: TObject);
procedure TimerTimer(Sender: TObject);
procedure scrollTimeChange(Sender: TObject);
procedure cmbTrendChange(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure mnuHighQualityClick(Sender: TObject);
procedure mnuLowQualityClick(Sender: TObject);
procedure mnuMediumQualityClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure chkSameNumClick(Sender: TObject);
procedure mnuResetLocationClick(Sender: TObject);
procedure mnuBackClick(Sender: TObject);
procedure mnuMaintainSymClick(Sender: TObject);
private
name, nick, url: string;
bm: TBitmap;
PreviewDensity: double;
Updating: boolean;
cps: array[0..8] of TControlPoint;
Mutants: array[0..8] of TControlPoint;
Render: TRenderer;
Time: double;
bstop: boolean;
brightness, gamma, vibrancy: double;
seed, InitSeed: integer;
procedure RandomSet;
procedure ShowMain;
procedure ShowMutants;
procedure Interpolate;
public
Zoom: Double;
Center: array[0..1] of double;
cmap: TColorMap;
procedure UpdateDisplay;
procedure UpdateFlame;
end;
var
MutateForm: TMutateForm;
implementation
uses
Main, Global, Registry, Editor, Adjust, XFormMan;
{$R *.DFM}
procedure TMutateForm.UpdateFlame;
begin
MainForm.StopThread;
MainForm.UpdateUndo;
MainCp.Copy(cps[0]);
Transforms := MainCp.TrianglesFromCP(MainTriangles);
MainCp.cmap := cmap;
MainCp.name := name; // this is kinda funny,
MainCp.nick := nick; // like author's nick can change during mutation?
mainCp.url := url; // hee-heheee :-)
if mnuResetLocation.checked then
begin
MainForm.Mainzoom := cps[0].zoom;
MainForm.Center[0] := cps[0].Center[0];
MainForm.Center[1] := cps[0].Center[1];
end;
MainForm.RedrawTimer.enabled := true;
if EditForm.Visible then EditForm.UpdateDisplay;
// if AdjustForm.Visible then AdjustForm.UpdateDisplay;
end;
procedure TMutateForm.UpdateDisplay;
begin
cps[0].copy(MainCp);
cps[0].AdjustScale(Image0.Width, Image0.Height);
cps[0].cmap := MainCp.cmap;
cmap := MainCp.cmap;
name := Maincp.name;
nick := maincp.nick;
url := maincp.url;
zoom := MainCp.zoom;
center[0] := MainCp.center[0];
center[1] := MainCp.center[1];
vibrancy := cps[0].vibrancy;
gamma := cps[0].gamma;
brightness := cps[0].brightness;
Interpolate;
ShowMain;
Application.ProcessMessages;
ShowMutants;
end;
procedure TMutateForm.ShowMain;
begin
cps[0].Width := Image0.Width;
cps[0].Height := Image0.Height;
cps[0].spatial_oversample := defOversample;
cps[0].spatial_filter_radius := defFilterRadius;
cps[0].sample_density := PreviewDensity;
cps[0].brightness := brightness;
cps[0].gamma := gamma;
cps[0].vibrancy := vibrancy;
cps[0].sample_density := PreviewDensity;
cps[0].cmap := cmap;
cps[0].background := MainCp.background;
if mnuResetLocation.checked then begin
cps[0].CalcBoundbox;
zoom := 0;
center[0] := cps[0].center[0];
center[1] := cps[0].Center[1];
end;
cps[0].zoom := zoom;
cps[0].center[0] := center[0];
cps[0].center[1] := center[1];
// Render.Compatibility := compatibility;
Render.SetCP(cps[0]);
Render.Render;
BM.Assign(Render.GetImage);
Image0.Picture.Graphic := bm;
end;
procedure TMutateForm.ShowMutants;
var
i: integer;
begin
if Visible = false then exit;
Updating := true;
for i := 1 to 8 do
begin
mutants[i].Width := Image1.Width;
mutants[i].Height := Image1.Height;
mutants[i].spatial_filter_radius := defFilterRadius;
mutants[i].spatial_oversample := defOversample;
mutants[i].sample_density := PreviewDensity;
mutants[i].brightness := brightness;
mutants[i].gamma := gamma;
mutants[i].vibrancy := vibrancy;
{ mutants[i].zoom := 0;
mutants[i].CalcBoundbox;
if not mnuResetLocation.checked then begin
mutants[i].zoom := MainCp.zoom;
mutants[i].CalcBoundbox;
mutants[i].center[0] := MainCp.Center[0];
mutants[i].center[1] := MainCp.Center[1];
end;
{ if mnuResetLocation.checked then begin
mutants[i].CalcBoundbox;
zoom := 0;
center[0] := cps[0].center[0];
center[1] := cps[0].Center[1];
end;
}
if mnuResetLocation.checked then
begin
mutants[i].CalcBoundbox;
mutants[i].zoom := 0;
// center[0] := cps[0].center[0];
// center[1] := cps[0].Center[1];
end
else begin
mutants[i].zoom := zoom;
mutants[i].center[0] := center[0];
mutants[i].center[1] := center[1];
end;
// Render.Compatibility := compatibility;
Render.SetCP(mutants[i]);
Render.Render;
BM.Assign(Render.GetImage);
case i of
1: begin
Image1.Picture.Graphic := bm;
Image1.Refresh;
end;
2: begin
Image2.Picture.Graphic := bm;
Image2.Refresh;
end;
3: begin
Image3.Picture.Graphic := bm;
Image3.Refresh;
end;
4: begin
Image4.Picture.Graphic := bm;
Image4.Refresh;
end;
5: begin
Image5.Picture.Graphic := bm;
Image5.Refresh;
end;
6: begin
Image6.Picture.Graphic := bm;
Image6.Refresh;
end;
7: begin
Image7.Picture.Graphic := bm;
Image7.Refresh;
end;
8: begin
Image8.Picture.Graphic := bm;
Image8.Refresh;
end;
end;
Updating := false;
end;
end;
procedure TMutateForm.Interpolate;
var i, j, k: Integer;
begin
if MainCp = nil then Exit;
for i := 1 to 8 do
begin
if bstop then exit;
cps[0].Time := 0;
cps[i].Time := 1;
(* -X- something is not right here...
Mutants[i] may be destroyed already
Investigate? *)
Mutants[i].clear;
Mutants[i].InterpolateX(cps[0], cps[i], Time / 100);
Mutants[i].cmapindex := cps[0].cmapindex;
Mutants[i].cmap := cps[0].cmap;
Mutants[i].background := MainCp.background;
if mnuMaintainSym.Checked then // maintain symmetry
begin
for j := 0 to transforms - 1 do
begin
if cps[0].xform[j].Symmetry = 1 then
begin
mutants[i].xform[j].Assign(cps[0].xform[j]);
{
mutants[i].xform[j].Symmetry := 1;
mutants[i].xform[j].Color := cps[0].xform[j].color;
mutants[i].xform[j].Density := cps[0].xform[j].Density;
mutants[i].xform[j].c[0][0] := cps[0].xform[j].c[0][0];
mutants[i].xform[j].c[0][1] := cps[0].xform[j].c[0][1];
mutants[i].xform[j].c[1][0] := cps[0].xform[j].c[1][0];
mutants[i].xform[j].c[1][1] := cps[0].xform[j].c[1][1];
mutants[i].xform[j].c[2][0] := cps[0].xform[j].c[2][0];
mutants[i].xform[j].c[2][1] := cps[0].xform[j].c[2][1];
for k := 0 to NRVAR - 1 do
mutants[i].xform[j].vars[k] := cps[0].xform[j].vars[k];
}
end;
end;
end;
end;
end;
procedure TMutateForm.RandomSet;
var i: Integer;
begin
RandSeed := seed;
for i := 1 to 8 do
begin
cps[i].clear;
if chkSameNum.checked then
cps[i].RandomCP(transforms, transforms, false)
else
cps[i].RandomCP(mutantMinTransforms, mutantMaxTransforms, false);
cps[i].SetVariation(TVariation(cmbTrend.Items.Objects[cmbTrend.ItemIndex]));
if cps[0].HasFinalXForm = false then
begin
cps[i].xform[cps[i].NumXForms].Clear;
cps[i].xform[cps[i].NumXForms].symmetry := 1;
end;
end;
Interpolate;
end;
procedure TMutateForm.FormShow(Sender: TObject);
var
Registry: TRegistry;
begin
{ Read posution from registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Mutate', False) then
begin
if Registry.ValueExists('Left') then
MutateForm.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
MutateForm.Top := Registry.ReadInteger('Top');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
if (cps[0].xform[0].density <> 0) and Assigned(MainCp) then begin // hmm...!?
Interpolate;
ShowMain;
ShowMutants;
end;
end;
procedure TMutateForm.FormCreate(Sender: TObject);
var
i: integer;
begin
self.Caption := TextByKey('mutation-title');
GroupBox1.Caption := TextByKey('mutation-directions');
pnlSpeed.Caption := TextByKey('mutation-speed');
pnlTrend.Caption := TextByKey('mutation-trend');
chkSameNum.Caption := TextByKey('mutation-keepnumberoftransforms');
mnuLowQuality.Caption := TextByKey('common-lowquality');
mnuMediumQuality.Caption := TextByKey('common-mediumquality');
mnuHighQuality.Caption := TextByKey('common-highquality');
mnuResetLocation.Caption := TextByKey('common-resetlocation');
mnuMaintainSym.Caption := TextByKey('mutation-maintainsymmetry');
mnuBack.Caption := TextByKey('mutation-previous');
cmbTrend.Items.clear;
cmbTrend.AddItem(TextByKey('mutation-randomtrend'), Tobject(vRandom));
for i:= 0 to NRVAR -1 do begin
cmbTrend.AddItem(varnames(i), Tobject(i));
end;
bm := TBitMap.Create;
case MutatePrevQual of
0: begin
mnuLowQuality.Checked := true;
PreviewDensity := prevLowQuality;
end;
1: begin
mnuMediumQuality.Checked := true;
PreviewDensity := prevMediumQuality;
end;
2: begin
mnuHighQuality.Checked := true;
PreviewDensity := prevHighQuality;
end;
end;
Render := TRenderer.Create;
for i := 0 to 8 do
begin
cps[i] := TControlPoint.Create;
Mutants[i] := TControlPoint.Create;
end;
Time := 35;
scrollTime.Position := 25;
cmbTrend.ItemIndex := 0;
InitSeed := random(1234567890);
seed := InitSeed;
RandomSet;
end;
procedure TMutateForm.FormDestroy(Sender: TObject);
var
i: integer;
begin
Render.Stop;
Render.Free;
for i := 0 to 8 do
begin
cps[i].Free;
Mutants[i].Free;
end;
bm.free;
end;
procedure TMutateForm.Image0Click(Sender: TObject);
begin
Render.Stop;
mnuBack.Enabled := true;
inc(seed);
RandomSet;
ShowMutants;
end;
procedure TMutateForm.MutantClick(Sender: TObject);
var
i, j: integer;
cpt: TControlPoint;
begin
cpt := TControlPoint.Create;
cpt.Copy(cps[0]);
bstop := true;
if sender = Image1 then
begin
cps[0].Time := 0;
cps[1].Time := 1;
cps[0].Interpolatex(cps[0], cps[1], Time / 100);
end
else if sender = Image2 then
begin
cps[0].Time := 0;
cps[2].Time := 1;
cps[0].Interpolatex(cps[0], cps[2], Time / 100);
end
else if sender = Image3 then
begin
cps[0].Time := 0;
cps[3].Time := 1;
cps[0].InterpolateX(cps[0], cps[3], Time / 100);
end
else if sender = Image4 then
begin
cps[0].Time := 0;
cps[4].Time := 1;
cps[0].Interpolatex(cps[0], cps[4], Time / 100);
end
else if sender = Image5 then
begin
cps[0].Time := 0;
cps[5].Time := 1;
cps[0].Interpolatex(cps[0], cps[5], Time / 100);
end
else if sender = Image6 then
begin
cps[0].Time := 0;
cps[6].Time := 1;
cps[0].Interpolatex(cps[0], cps[6], Time / 100);
end
else if sender = Image7 then
begin
cps[0].Time := 0;
cps[7].Time := 1;
cps[0].Interpolatex(cps[0], cps[7], Time / 100);
end
else if sender = Image8 then
begin
cps[0].Time := 0;
cps[8].Time := 1;
cps[0].Interpolatex(cps[0], cps[8], Time / 100);
end;
if mnuMaintainSym.Checked then // maintain symmetry
begin
for i := 0 to transforms - 1 do
begin
if cpt.xform[i].Symmetry = 1 then
begin
cps[0].xform[i].Assign(cpt.xform[i]);
{
cps[0].xform[i].Symmetry := 1;
cps[0].xform[i].Color := cpt.xform[i].color;
cps[0].xform[i].Density := cpt.xform[i].Density;
cps[0].xform[i].c[0][0] := cpt.xform[i].c[0][0];
cps[0].xform[i].c[0][1] := cpt.xform[i].c[0][1];
cps[0].xform[i].c[1][0] := cpt.xform[i].c[1][0];
cps[0].xform[i].c[1][1] := cpt.xform[i].c[1][1];
cps[0].xform[i].c[2][0] := cpt.xform[i].c[2][0];
cps[0].xform[i].c[2][1] := cpt.xform[i].c[2][1];
for j := 0 to NRVAR - 1 do
cps[0].xform[i].vars[j] := cpt.xform[i].vars[j];
}
end;
end;
end;
bstop := false;
ShowMain;
Interpolate;
ShowMutants;
UpdateFlame;
cpt.free;
end;
procedure TMutateForm.sbTimeChange(Sender: TObject);
begin
bstop := true;
Render.Stop;
Time := scrollTime.Position;
bstop := false;
Interpolate;
ShowMutants;
end;
procedure TMutateForm.TimerTimer(Sender: TObject);
begin
Timer.Enabled := false;
if (Time <> scrollTime.Position) and (not updating) then
begin
Time := scrollTime.Position;
Interpolate;
ShowMutants;
end;
end;
procedure TMutateForm.scrollTimeChange(Sender: TObject);
begin
Timer.Enabled := true;
txtTime.Text := FloatToStr(scrollTime.Position / 100);
end;
procedure TMutateForm.cmbTrendChange(Sender: TObject);
var
i: integer;
begin
for i := 1 to 8 do begin
cps[i].SetVariation(TVariation(cmbTrend.Items.Objects[cmbTrend.ItemIndex]));
end;
Interpolate;
ShowMutants;
end;
procedure TMutateForm.btnCancelClick(Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TMutateForm.mnuHighQualityClick(Sender: TObject);
begin
mnuHighQuality.Checked := True;
PreviewDensity := prevHighQuality;
MutatePrevQual := 2;
ShowMain;
ShowMutants;
end;
procedure TMutateForm.mnuLowQualityClick(Sender: TObject);
begin
mnuLowQuality.Checked := True;
PreviewDensity := prevLowQuality;
MutatePrevQual := 0;
ShowMain;
ShowMutants;
end;
procedure TMutateForm.mnuMediumQualityClick(Sender: TObject);
begin
mnuMediumQuality.Checked := True;
PreviewDensity := prevMediumQuality;
MutatePrevQual := 1;
ShowMain;
ShowMutants;
end;
procedure TMutateForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
Registry: TRegistry;
begin
{ Write position to registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Mutate', True) then
begin
Registry.WriteInteger('Top', MutateForm.Top);
Registry.WriteInteger('Left', MutateForm.Left);
end;
finally
Registry.Free;
end;
end;
procedure TMutateForm.chkSameNumClick(Sender: TObject);
begin
RandomSet;
Interpolate;
ShowMutants;
end;
procedure TMutateForm.mnuResetLocationClick(Sender: TObject);
begin
mnuResetLocation.Checked := not mnuResetLocation.Checked;
if not mnuResetLocation.checked then
begin
cps[0].width := MainCp.width;
cps[0].height := MainCp.height;
cps[0].pixels_per_unit := MainCp.pixels_per_unit;
cps[0].AdjustScale(Image0.width, Image0.Height);
cps[0].zoom := MainCp.zoom;
cps[0].center[0] := MainCp.center[0];
cps[0].center[1] := MainCp.center[1];
zoom := cps[0].zoom;
center[0] := cps[0].center[0];
center[1] := cps[0].center[1];
end;
ShowMain;
ShowMutants;
end;
procedure TMutateForm.mnuBackClick(Sender: TObject);
begin
Render.Stop;
if seed > InitSeed then
dec(seed);
if seed = InitSeed then mnuBack.enabled := false;
RandomSet;
ShowMutants;
end;
procedure TMutateForm.mnuMaintainSymClick(Sender: TObject);
begin
mnuMaintainSym.Checked := not mnuMaintainSym.Checked;
Interpolate;
ShowMutants;
end;
procedure TMutateForm.Panel10Resize(Sender: TObject);
const gap:integer = 4 ;
var
w, h : integer;
begin
w := (Panel10.Width - 2*gap) div 3;
h := (Panel10.Height - 2*gap) div 3;
Panel0.Width := w; Panel1.Width := w; Panel2.Width := w;
Panel3.Width := w; Panel4.Width := w; Panel5.Width := w;
Panel6.Width := w; Panel7.Width := w; Panel8.Width := w;
Panel0.Height := h; Panel1.Height := h; Panel2.Height := h;
Panel3.Height := h; Panel4.Height := h; Panel5.Height := h;
Panel6.Height := h; Panel7.Height := h; Panel8.Height := h;
Panel2.Left := w + gap; Panel0.Left := w + gap; Panel6.Left := w + gap;
Panel3.Left := 2*(w + gap); Panel4.Left := 2*(w + gap); Panel5.Left := 2*(w + gap);
Panel8.Top := h + gap; Panel0.Top := h + gap; Panel4.Top := h + gap;
Panel7.Top := 2*(h + gap); Panel6.Top := 2*(h + gap); Panel5.Top := 2*(h + gap);
end;
end.

2848
Forms/Options.dfm Normal file

File diff suppressed because it is too large Load Diff

1398
Forms/Options.pas Normal file

File diff suppressed because it is too large Load Diff

42
Forms/Preview.dfm Normal file
View File

@ -0,0 +1,42 @@
object PreviewForm: TPreviewForm
Left = 541
Top = 357
Width = 212
Height = 181
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSizeToolWin
Caption = 'Preview'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnKeyPress = FormKeyPress
PixelsPerInch = 96
TextHeight = 13
object BackPanel: TPanel
Left = 0
Top = 0
Width = 204
Height = 152
Align = alClient
BevelInner = bvLowered
BevelOuter = bvLowered
Color = clBlack
TabOrder = 0
object Image: TImage
Left = 2
Top = 2
Width = 200
Height = 153
Align = alClient
AutoSize = True
Stretch = True
end
end
end

94
Forms/Preview.pas Normal file
View File

@ -0,0 +1,94 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit Preview;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, ControlPoint, RenderingInterface, Translation;
type
TPreviewForm = class(TForm)
BackPanel: TPanel;
Image: TImage;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
public
cp: TControlPoint;
Render: TRenderer;
procedure DrawFlame;
end;
var
PreviewForm: TPreviewForm;
implementation
uses Main, Global, ScriptForm;
{$R *.DFM}
procedure TPreviewForm.DrawFlame;
begin
Render.Stop;
// ScriptEditor.GetCpFromFlame(cp);
cp.width := Image.width;
cp.Height := Image.Height;
// Render.Compatibility := Compatibility;
Render.SetCP(cp);
Render.Render;
Image.Picture.Bitmap.Assign(Render.GetImage);
Application.ProcessMessages;
end;
procedure TPreviewForm.FormCreate(Sender: TObject);
begin
self.Caption := TextbyKey('preview-title');
cp := TControlPoint.Create;
Render := TRenderer.Create;
end;
procedure TPreviewForm.FormDestroy(Sender: TObject);
begin
Render.Free;
cp.Free;
end;
procedure TPreviewForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
ScriptEditor.Stopped := True;
end;
procedure TPreviewForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
ScriptEditor.Stopped := True;
end;
end.

152
Forms/Save.dfm Normal file
View File

@ -0,0 +1,152 @@
object SaveForm: TSaveForm
Left = 434
Top = 432
BorderStyle = bsDialog
Caption = 'Save Parameters'
ClientHeight = 153
ClientWidth = 517
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -14
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
OnCreate = FormCreate
OnShow = FormShow
DesignSize = (
517
153)
PixelsPerInch = 120
TextHeight = 16
object btnDefGradient: TSpeedButton
Left = 480
Top = 9
Width = 30
Height = 29
Hint = 'Browse...'
Anchors = [akTop, akRight]
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -15
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnDefGradientClick
end
object btnSave: TButton
Left = 322
Top = 116
Width = 93
Height = 30
Anchors = [akRight, akBottom]
Caption = '&Save'
Default = True
TabOrder = 2
OnClick = btnSaveClick
end
object btnCancel: TButton
Left = 421
Top = 116
Width = 92
Height = 30
Anchors = [akRight, akBottom]
Caption = 'Cancel'
TabOrder = 3
OnClick = btnCancelClick
end
object pnlTarget: TPanel
Left = 10
Top = 10
Width = 124
Height = 26
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Destination'
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object pnlName: TPanel
Left = 10
Top = 39
Width = 124
Height = 26
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Name'
ParentShowHint = False
ShowHint = True
TabOrder = 5
end
object txtFilename: TEdit
Left = 128
Top = 10
Width = 353
Height = 24
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
Text = 'txtFilename'
end
object txtTitle: TEdit
Left = 128
Top = 39
Width = 383
Height = 24
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
Text = 'txtTitle'
end
object optUseOldFormat: TRadioButton
Left = 10
Top = 79
Width = 304
Height = 21
Anchors = [akLeft, akTop, akRight]
Caption = 'Use classic flame format'
Checked = True
TabOrder = 6
TabStop = True
end
object optUseNewFormat: TRadioButton
Left = 10
Top = 101
Width = 304
Height = 21
Anchors = [akLeft, akTop, akRight]
Caption = 'Use new flame format'
Enabled = False
TabOrder = 7
end
end

225
Forms/Save.pas Normal file
View File

@ -0,0 +1,225 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit Save;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ExtCtrls, Translation;
type
ESaveType = (stSaveParameters, stSaveAllParameters, stSaveGradient, stExportUPR);
TSaveForm = class(TForm)
txtFilename: TEdit;
txtTitle: TEdit;
btnSave: TButton;
btnCancel: TButton;
btnDefGradient: TSpeedButton;
pnlTarget: TPanel;
pnlName: TPanel;
optUseOldFormat: TRadioButton;
optUseNewFormat: TRadioButton;
procedure FormCreate(Sender: TObject);
procedure btnSaveClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnDefGradientClick(Sender: TObject);
private
public
Title: string;
Filename: string;
SaveType : ESaveType;
end;
var
SaveForm: TSaveForm;
implementation
uses Main, Global, cmap;
{$R *.DFM}
function EntryExists(En, Fl: string): boolean;
{ Searches for existing identifier in parameter files }
var
FStrings: TStringList;
i: integer;
begin
Result := False;
if FileExists(Fl) then
begin
FStrings := TStringList.Create;
try
FStrings.LoadFromFile(Fl);
for i := 0 to FStrings.Count - 1 do
if Pos(LowerCase(En) + ' {', Lowercase(FStrings[i])) = 1 then
Result := True;
finally
FStrings.Free;
end
end
else
Result := False;
end;
function SaveTypeTextKey(st : ESaveType) : string;
begin
case st of
stSaveParameters: Result := 'save-type-parameters';
stSaveAllParameters: Result := 'save-type-allparameters';
stSaveGradient: Result := 'save-type-gradient';
stExportUPR: Result := 'save-type-exportupr';
end;
end;
function SaveDefaultExt(st : ESaveType) : string;
begin
case st of
stSaveParameters: Result := 'flame';
stSaveAllParameters: Result := 'flame';
stSaveGradient: Result := 'gradient';
stExportUPR: Result := 'upr';
end;
end;
function SaveFilter(st : ESaveType): string;
begin
case st of
stSaveParameters: Result := Format('%s|*.flame;*.xml|%s|*.*',
[TextByKey('common-filter-flamefiles'), TextByKey('common-filter-allfiles')]);
stSaveAllParameters: Result := Format('%s|*.flame;*.xml|%s|*.*',
[TextByKey('common-filter-flamefiles'), TextByKey('common-filter-allfiles')]);
stSaveGradient: Result := Format('%s|*.gradient;*.ugr|%s|*.*',
[TextByKey('common-filter-gradientfiles'), TextByKey('common-filter-allfiles')]);
stExportUPR: Result := Format('%s|*.upr|%s|*.*',
[TextByKey('common-filter-uprfiles'), TextByKey('common-filter-allfiles')]);
end;
end;
procedure TSaveForm.btnSaveClick(Sender: TObject);
var
t, f: string;
check, onestr: boolean;
begin
t := Trim(txtTitle.Text);
f := Trim(txtFilename.Text);
if ((t = '') and txtTitle.Enabled) then
begin
Application.MessageBox(PChar(TextByKey('save-status-notitle')), 'Apophysis', 48);
Exit;
end;
if f = '' then
begin
Application.MessageBox(PChar(TextByKey('save-status-invalidfilename')), 'Apophysis', 48);
Exit;
end;
if ExtractFileExt(f) = '' then
begin
Application.MessageBox(PChar(TextByKey('save-status-invalidfilename')), 'Apophysis', 48);
Exit;
end;
if SaveType = stSaveParameters then
begin
check := XMLEntryExists(t, f);
onestr := false;
end
else if SaveType = stSaveAllParameters then
begin
onestr := true;
check := FileExists(f);
end
else
begin
onestr := false;
t := CleanIdentifier(t);
check := EntryExists(t, f);
end;
if check then begin if onestr then begin
if Application.MessageBox(PChar(Format(TextByKey('save-status-alreadyexists2'), [f])),
'Apophysis', 52) = ID_NO then exit;
end else begin
if Application.MessageBox(PChar(Format(TextByKey('save-status-alreadyexists'), [t, f])),
'Apophysis', 52) = ID_NO then exit;
end end;
if (t = '*') then t := '';
Title := t;
Filename := f;
ModalResult := mrOK;
end;
procedure TSaveForm.btnCancelClick(Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TSaveForm.FormShow(Sender: TObject);
begin
txtFilename.Text := Filename;
txtTitle.Text := Title;
//btnSave.SetFocus;
self.Caption := TextByKey(SaveTypeTextKey(SaveType));
{if (SaveType = stSaveParameters) or (SaveType = stSaveAllParameters) then
self.Height := 160
else self.Height := 120; }
if (SaveType = stSaveAllParameters) then txtTitle.Text := '';
txtTitle.Enabled := (SaveType = stSaveParameters) or (SaveType = stExportUPR) or (SaveType = stSaveGradient);
if (not txtTitle.Enabled) then pnlName.Font.Color := clGrayText
else pnlName.Font.Color := clWindowText;
optUseOldFormat.Visible := (SaveType = stSaveParameters) or (SaveType = stSaveAllParameters);
optUseNewFormat.Visible := (SaveType = stSaveParameters) or (SaveType = stSaveAllParameters);
end;
procedure TSaveForm.btnDefGradientClick(Sender: TObject);
var
fn:string;
promptOverwrite: boolean;
begin
promptOverwrite := (SaveType <> stSaveParameters);
if OpenSaveFileDialog(self, SaveDefaultExt(SaveType), SaveFilter(SaveType),
ExtractFilePath(txtFilename.Text), TextByKey('common-browse'), fn, false,
(*promptOverwrite*)false, false, false) then
txtFileName.Text := fn;
end;
procedure TSaveForm.FormCreate(Sender: TObject);
begin
btnCancel.Caption := TextByKey('common-cancel');
btnSave.Caption := TextByKey('common-ok');
btnDefGradient.Hint := TextByKey('common-browse');
pnlTarget.Caption := TextByKey('common-destination');
pnlName.Caption := TextByKey('save-name');
optUseOldFormat.Caption := TextByKey('save-oldformat');
optUseNewFormat.Caption := TextByKey('save-newformat');
end;
end.

63
Forms/SavePreset.dfm Normal file
View File

@ -0,0 +1,63 @@
object SavePresetForm: TSavePresetForm
Left = 295
Top = 331
BorderStyle = bsDialog
Caption = 'Save Preset'
ClientHeight = 66
ClientWidth = 349
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
DesignSize = (
349
66)
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 190
Top = 37
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 1
OnClick = Button1Click
end
object Button2: TButton
Left = 270
Top = 37
Width = 75
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
object pnlName: TPanel
Left = 8
Top = 8
Width = 101
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Name'
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object txtPresetName: TEdit
Left = 104
Top = 8
Width = 239
Height = 21
Anchors = [akLeft, akTop, akRight]
TabOrder = 0
end
end

69
Forms/SavePreset.pas Normal file
View File

@ -0,0 +1,69 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit SavePreset;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Translation;
type
TSavePresetForm = class(TForm)
txtPresetName: TEdit;
Button1: TButton;
Button2: TButton;
pnlName: TPanel;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
SavePresetForm: TSavePresetForm;
implementation
{$R *.DFM}
procedure TSavePresetForm.Button1Click(Sender: TObject);
begin
if txtPresetName.Text = '' then
begin
Application.MessageBox(PChar(TextByKey('savepreset-notitle')), 'Apophysis', 48);
Exit;
end;
end;
procedure TSavePresetForm.FormCreate(Sender: TObject);
begin
self.Caption := TextBykey('savepreset-title');
button1.Caption := TextByKey('common-ok');
button2.Caption := TextByKey('common-cancel');
pnlName.Caption := TextByKey('savepreset-name');
end;
end.

625
Forms/ScriptForm.dfm Normal file
View File

@ -0,0 +1,625 @@
object ScriptEditor: TScriptEditor
Left = 312
Top = 383
Caption = 'Script Editor'
ClientHeight = 485
ClientWidth = 583
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000001002000680400001600000028000000100000002000
0000010020000000000040040000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000006349
35146349352E927A69FF8C7563FF87705EFF6349352E7F6654FF7A624FFF755D
4AFF6349352E6E5441FF6A513EFF674E3AFF6349352E00000000000000006349
352EAE9888FFEFE3DDFFF2E7E1FFEDDFD7FF836B59FFB79B8BFFDBBDADFFD9B7
A6FF725946FFAE8B77FFD0A692FFCC9E87FF654B38FF6349352E00000000B7A2
93FFFBF8F7FFF9F4F2FFF7F0ECFFF4EBE6FFF1E5DFFF7F6754FF7A624FFF765D
4AFF735946FF6E5542FF6B523EFF674E3AFF654B38FF634935FF00000000B7A2
93FFFDFCFBFFFBF9F7FFFAF5F2FFF7EFEDFFF4EAE6FFF2E5DFFFDDDCD7FFDFD7
CEFFDECDC0FFDEC5B6FFDEBFACFFDBBAA6FFD8B5A3FF634935FF00000000B7A2
93FFFFFFFFFFB47F65FFB47F64FFEDDDD5FFB37E63FFF4EBE6FFF1E5DFFFEFDF
D7FFEBD9D1FFE8D3C9FFE5CDC1FFE1C6B9FFD6B3A1FF634A35FF00000000B9A4
95FFFFFFFFFFFFFFFFFFFDFCFCFFFCF9F7FFFAF4F2FFF6F0ECFFF4EBE5FFF2E5
DFFFEEDFD8FFEBD9D0FFE8D3C8FFE5CCC1FFDBBDADFF634A36FF00000000BDA7
98FFFFFFFFFF968E88FFEEDED7FF968E87FFEDDDD6FF968D86FF958C85FFF4EB
E6FFF2E5DFFFEFDFD8FFECD9D0FFE8D3C9FFE0C7BAFF634A35FF00000000C1AB
9CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFBF8F7FFFAF4F2FFF7F0
ECFFF4EAE6FFF1E5DFFFEEDFD7FFEBD9D0FFE6D1C6FF634A35FF00000000C5AF
A0FFFFFFFFFFB48065FFB48065FF968E88FFC2B0A3FF968E87FF968E86FFF9F4
F2FFF7EFECFFF4EBE6FFF2E5DFFFEFDFD8FFEADBD1FF634936FF00000000C8B2
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFCF8
F7FFF9F5F2FFF7F0ECFFF4EBE6FFF1E5DFFFEEE2DAFF644A36FF00000000C9B4
A5FFFFFFFFFFFFFFFFFF66A365FF66A365FF66A365FFC0B4ADFF66A365FF66A3
65FF66A264FFFAF5F2FFF7F0ECFFF4EBE6FFEEE2DAFF644A36FF00000000C8B2
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFEFCFBFFFBF9F7FFFAF4F2FFF7F0EDFFF3EAE4FF644A36FF00000000C8B2
A3FFCAB4A5FFCBB5A6FFCAB4A5FFC9B3A4FFC7B2A3FFC6B0A1FFC3AE9FFFC1AC
9DFFBFAA9BFFBDA899FFBBA697FFB9A495FFB8A394FFB7A293FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000FFFF00000003000000010000000100000001000000010000000100000001
0000000100000001000000010000000100000001000000010000FFFF0000}
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShortCut = FormShortCut
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Splitter1: TSplitter
Left = 0
Top = 373
Width = 583
Height = 4
Cursor = crVSplit
Align = alBottom
end
object ToolBar: TToolBar
Left = 560
Top = 0
Width = 23
Height = 373
Align = alRight
AutoSize = True
Caption = 'ToolBar'
Images = MainForm.Buttons
ParentShowHint = False
ShowHint = True
TabOrder = 0
object btnNew: TToolButton
Left = 0
Top = 0
Hint = 'New'
Caption = 'btnNew'
ImageIndex = 0
Wrap = True
OnClick = btnNewClick
end
object btnOpen: TToolButton
Left = 0
Top = 22
Hint = 'Open'
Caption = 'btnOpen'
ImageIndex = 1
Wrap = True
OnClick = btnOpenClick
end
object btnSave: TToolButton
Left = 0
Top = 44
Hint = 'Save'
Caption = 'btnSave'
ImageIndex = 2
Wrap = True
OnClick = btnSaveClick
end
object btnRun: TToolButton
Left = 0
Top = 66
Hint = 'Run'
Caption = 'btnRun'
ImageIndex = 43
Wrap = True
OnClick = btnRunClick
end
object btnStop: TToolButton
Left = 0
Top = 88
Hint = 'Stop'
Caption = 'btnStop'
Enabled = False
ImageIndex = 36
Wrap = True
OnClick = btnStopClick
end
object btnBreak: TToolButton
Left = 0
Top = 110
Hint = 'Break'
Enabled = False
ImageIndex = 37
OnClick = btnBreakClick
end
end
object StatusBar: TStatusBar
Left = 0
Top = 466
Width = 583
Height = 19
Anchors = [akLeft, akRight]
Panels = <>
end
object BackPanel: TPanel
Left = 0
Top = 0
Width = 560
Height = 373
Align = alClient
BevelInner = bvLowered
BevelOuter = bvLowered
Caption = 'BackPanel'
TabOrder = 2
object Editor: TAdvMemo
Left = 2
Top = 2
Width = 556
Height = 369
Cursor = crIBeam
PopupMenu = PopupMenu
ActiveLineSettings.ShowActiveLine = False
ActiveLineSettings.ShowActiveLineIndicator = False
Align = alClient
AutoCompletion.Font.Charset = DEFAULT_CHARSET
AutoCompletion.Font.Color = clWindowText
AutoCompletion.Font.Height = -11
AutoCompletion.Font.Name = 'MS Sans Serif'
AutoCompletion.Font.Style = []
AutoCompletion.Height = 120
AutoCompletion.StartToken = '(.'
AutoCompletion.Width = 400
AutoCorrect.Active = True
AutoHintParameterPosition = hpBelowCode
BlockShow = False
BlockColor = clWindow
BlockLineColor = clGray
BkColor = clWindow
BookmarkGlyph.Data = {
36050000424D3605000000000000360400002800000010000000100000000100
0800000000000001000000000000000000000001000000000000000000000000
80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
A6000020400000206000002080000020A0000020C0000020E000004000000040
20000040400000406000004080000040A0000040C0000040E000006000000060
20000060400000606000006080000060A0000060C0000060E000008000000080
20000080400000806000008080000080A0000080C0000080E00000A0000000A0
200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0
200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0
200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000
20004000400040006000400080004000A0004000C0004000E000402000004020
20004020400040206000402080004020A0004020C0004020E000404000004040
20004040400040406000404080004040A0004040C0004040E000406000004060
20004060400040606000406080004060A0004060C0004060E000408000004080
20004080400040806000408080004080A0004080C0004080E00040A0000040A0
200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0
200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0
200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000
20008000400080006000800080008000A0008000C0008000E000802000008020
20008020400080206000802080008020A0008020C0008020E000804000008040
20008040400080406000804080008040A0008040C0008040E000806000008060
20008060400080606000806080008060A0008060C0008060E000808000008080
20008080400080806000808080008080A0008080C0008080E00080A0000080A0
200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0
200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0
200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000
2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020
2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040
2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060
2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080
2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0
2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0
2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FDFD25252525
2525252525252525FDFDFD2E25FFFFFFFFFFFFFFFFFFFF25FDFDFD2525252525
2525252525252525FDFD9A9AB7B7B7B7B7B7B7B7B7B72525FDFDFD25B7B7B7B7
B7B7B7B7B7B72525FDFD9A9AB7B7B7B7B7B7B7B7B7B72525FDFDFD25BFB7BFBF
B7B7B7B7B7B72525FDFD9A9ABFBFBFB7BFBFB7B7B7B72525FDFDFD25BFBFBFBF
BFB7BFBFB7B72525FDFD9A9ABFBFBFB7BFBFBFB7BFB72525FDFDFD25BFBFBFBF
BFBFBFBFBFB72525FDFD9A9ABFBFBFBFBFB7BFBFB7B72525FDFDFD25BFBFBFBF
BFBFBFBFBFB72525FDFD9A9ABFBFBFBFBFBFBFBFBFB725FDFDFDFD2525252525
25252525252525FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD}
BorderStyle = bsNone
ClipboardFormats = [cfText]
CodeFolding.Enabled = False
CodeFolding.LineColor = clGray
Ctl3D = False
DelErase = True
EnhancedHomeKey = False
Gutter.DigitCount = 4
Gutter.Font.Charset = DEFAULT_CHARSET
Gutter.Font.Color = clWindowText
Gutter.Font.Height = -13
Gutter.Font.Name = 'Courier New'
Gutter.Font.Style = []
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'COURIER NEW'
Font.Style = []
HiddenCaret = False
Lines.Strings = (
'{ Rotate the reference triangle continuously }'
'{ Hit any key to stop }'
'Flame.SampleDensity := 1;'
'while not Stopped do'
'begin'
' RotateReference(3.6);'
' Preview;'
'end;')
MarkerList.UseDefaultMarkerImageIndex = False
MarkerList.DefaultMarkerImageIndex = -1
MarkerList.ImageTransparentColor = 33554432
PrintOptions.MarginLeft = 0
PrintOptions.MarginRight = 0
PrintOptions.MarginTop = 0
PrintOptions.MarginBottom = 0
PrintOptions.PageNr = False
PrintOptions.PrintLineNumbers = False
RightMarginColor = 14869218
ScrollHint = False
SelColor = clWhite
SelBkColor = clHighlight
ShowRightMargin = True
SmartTabs = False
SyntaxStyles = Styler
TabOrder = 0
TabSize = 4
TabStop = True
TrimTrailingSpaces = False
UILanguage.ScrollHint = 'Row'
UILanguage.Undo = 'Undo'
UILanguage.Redo = 'Redo'
UILanguage.Copy = 'Copy'
UILanguage.Cut = 'Cut'
UILanguage.Paste = 'Paste'
UILanguage.Delete = 'Delete'
UILanguage.SelectAll = 'Select All'
UrlAware = False
UrlStyle.TextColor = clBlue
UrlStyle.BkColor = clWhite
UrlStyle.Style = [fsUnderline]
UseStyler = True
Version = '3.0.0.0'
WordWrap = wwNone
OnChange = EditorChange
end
end
object Console: TMemo
Left = 0
Top = 377
Width = 583
Height = 89
Align = alBottom
Constraints.MinHeight = 20
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 3
end
object MainOpenDialog: TOpenDialog
DefaultExt = 'asc'
Filter = 'Apophysis Script Files (*.asc)|*.asc|Text files (*.txt)|*.txt'
Options = [ofHideReadOnly, ofFileMustExist, ofEnableSizing]
Left = 472
Top = 64
end
object MainSaveDialog: TSaveDialog
DefaultExt = 'asc'
Filter = 'Apophysis Script Files (*.asc)|*.asc|Text files (*.txt)|*.txt'
Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing]
Left = 344
Top = 32
end
object PopupMenu: TPopupMenu
Images = MainForm.Buttons
Left = 280
Top = 112
object mnuUndo: TMenuItem
Caption = 'Undo'
ImageIndex = 4
OnClick = mnuUndoClick
end
object N1: TMenuItem
Caption = '-'
end
object mnuCut: TMenuItem
Caption = 'Cut'
ImageIndex = 6
ShortCut = 16472
OnClick = mnuCutClick
end
object mnuCopy: TMenuItem
Caption = 'Copy'
ImageIndex = 7
OnClick = mnuCopyClick
end
object mnuPaste: TMenuItem
Caption = 'Paste'
ImageIndex = 8
OnClick = mnuPasteClick
end
end
object Scripter: TatPascalScripter
SourceCode.Strings = (
'')
SaveCompiledCode = False
EventSupport = False
OnCompileError = ScripterCompileError
ShortBooleanEval = False
LibOptions.SearchPath.Strings = (
'$(CURDIR)'
'$(APPDIR)')
LibOptions.SourceFileExt = '.psc'
LibOptions.CompiledFileExt = '.pcu'
LibOptions.UseScriptFiles = False
CallExecHookEvent = False
Left = 480
Top = 200
end
object OpenDialog: TOpenDialog
DefaultExt = 'fla'
Filter =
'Flame files (*.flame)|*.flame|Apophysis 1.0 parameters (*.apo;*.' +
'fla)|*.apo;*.fla|All files (*.*)|*.*'
Options = [ofHideReadOnly, ofFileMustExist, ofEnableSizing]
Left = 416
Top = 200
end
object SaveDialog: TSaveDialog
DefaultExt = 'flame'
Filter = 'Flame files (*.flame)|*.flame'
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing]
Left = 440
Top = 128
end
object Styler: TAdvPascalMemoStyler
BlockStart = 'begin,try,case,class,record'
BlockEnd = 'end'
LineComment = '//'
MultiCommentLeft = '{'
MultiCommentRight = '}'
CommentStyle.TextColor = clNavy
CommentStyle.BkColor = clWhite
CommentStyle.Style = [fsItalic]
NumberStyle.TextColor = clFuchsia
NumberStyle.BkColor = clWhite
NumberStyle.Style = [fsBold]
HighlightStyle.TextColor = clWhite
HighlightStyle.BkColor = clRed
HighlightStyle.Style = [fsBold]
AllStyles = <
item
KeyWords.Strings = (
'absolute'
'abstract'
'and'
'array'
'as'
'asm'
'assembler'
'automated'
'begin'
'break'
'case'
'cdecl'
'class'
'class'
'const'
'constructor'
'continue'
'default'
'deprecated'
'destructor'
'dispid'
'dispinterface'
'div'
'do'
'downto'
'dynamic'
'else'
'end'
'except'
'exports'
'external'
'far'
'file'
'finalise'
'finally'
'for'
'forward'
'function'
'if'
'implementation'
'in'
'inherited'
'initialise'
'inline'
'interface'
'is'
'label'
'library'
'message'
'mod'
'near'
'nil'
'not'
'object'
'of'
'or'
'out'
'overload'
'override'
'packed'
'pascal'
'platform'
'private'
'procedure'
'program'
'program'
'property'
'protected'
'public'
'published'
'raise'
'record'
'register'
'reintroduce'
'repeat'
'resourcestring'
'safecall'
'set'
'shl'
'shr'
'stdcall'
'stored'
'string'
'then'
'threadvar'
'to'
'try'
'type'
'unit'
'until'
'uses'
'var'
'virtual'
'while'
'with'
'xor')
Font.Charset = DEFAULT_CHARSET
Font.Color = clGreen
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = [fsBold]
BGColor = clWhite
StyleType = stKeyword
BracketStart = #0
BracketEnd = #0
Info = 'Pascal Standard Default'
end
item
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
BGColor = clWhite
StyleType = stBracket
BracketStart = #39
BracketEnd = #39
Info = 'Simple Quote'
end
item
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
BGColor = clWhite
StyleType = stBracket
BracketStart = '"'
BracketEnd = '"'
Info = 'Double Quote'
end
item
Font.Charset = DEFAULT_CHARSET
Font.Color = clRed
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
BGColor = clWhite
StyleType = stSymbol
BracketStart = #0
BracketEnd = #0
Symbols = ' ,;:.(){}[]=+-*/^%<>#'#13#10
Info = 'Symbols Delimiters'
end>
AutoCompletion.Strings = (
'ShowMessage'
'MessageDlg')
HintParameter.TextColor = clBlack
HintParameter.BkColor = clInfoBk
HintParameter.HintCharStart = '('
HintParameter.HintCharEnd = ')'
HintParameter.HintCharDelimiter = ';'
HintParameter.HintClassDelimiter = '.'
HintParameter.HintCharWriteDelimiter = ','
HintParameter.Parameters.Strings = (
'ShowMessage(const Msg: string);'
'MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMs' +
'gDlgButtons; HelpCtx: Longint): Integer);')
HexIdentifier = '$'
Description = 'Pascal'
Filter = 'Pascal Files (*.pas,*.dpr,*.dpk,*.inc)|*.pas;*.dpr;*.dpk;*.inc'
DefaultExtension = '.pas'
StylerName = 'Pascal'
Extensions = 'pas;dpr;dpk;inc'
RegionDefinitions = <
item
Identifier = 'procedure'
RegionStart = 'begin'
RegionEnd = 'end'
RegionType = rtClosed
ShowComments = False
end
item
Identifier = 'constructor'
RegionStart = 'begin'
RegionEnd = 'end'
RegionType = rtClosed
ShowComments = False
end
item
Identifier = 'destructor'
RegionStart = 'begin'
RegionEnd = 'end'
RegionType = rtClosed
ShowComments = False
end
item
Identifier = 'interface'
RegionStart = 'interface'
RegionType = rtOpen
ShowComments = False
end
item
Identifier = 'unit'
RegionStart = 'unit'
RegionType = rtFile
ShowComments = False
end
item
Identifier = 'implementation'
RegionStart = 'implementation'
RegionType = rtOpen
ShowComments = False
end
item
Identifier = 'case'
RegionStart = 'case'
RegionEnd = 'end'
RegionType = rtIgnore
ShowComments = False
end
item
Identifier = 'try'
RegionStart = 'try'
RegionEnd = 'end'
RegionType = rtIgnore
ShowComments = False
end
item
Identifier = 'function'
RegionStart = 'begin'
RegionEnd = 'end'
RegionType = rtClosed
ShowComments = False
end
item
Identifier = '{$region'
RegionStart = '{$region'
RegionEnd = '{$endregion'
RegionType = rtClosed
ShowComments = False
end>
Left = 288
Top = 208
end
end

4210
Forms/ScriptForm.pas Normal file

File diff suppressed because it is too large Load Diff

40
Forms/ScriptRender.dfm Normal file
View File

@ -0,0 +1,40 @@
object ScriptRenderForm: TScriptRenderForm
Left = 390
Top = 391
BorderStyle = bsDialog
Caption = 'ScriptRenderForm'
ClientHeight = 58
ClientWidth = 285
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
OnDestroy = FormDestroy
DesignSize = (
285
58)
PixelsPerInch = 96
TextHeight = 13
object btnCancel: TButton
Left = 96
Top = 28
Width = 95
Height = 25
Anchors = [akLeft, akRight, akBottom]
Caption = '&Cancel'
TabOrder = 0
OnClick = btnCancelClick
end
object ProgressBar: TProgressBar
Left = 8
Top = 8
Width = 271
Height = 13
Anchors = [akLeft, akTop, akRight]
TabOrder = 1
end
end

172
Forms/ScriptRender.pas Normal file
View File

@ -0,0 +1,172 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit ScriptRender;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls, RenderThread, cmap, ControlPoint, Translation;
type
TScriptRenderForm = class(TForm)
btnCancel: TButton;
ProgressBar: TProgressBar;
procedure FormDestroy(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
private
// PixelsPerUnit: double;
StartTime: TDateTime;
Remainder: TDateTime;
procedure HandleThreadCompletion(var Message: TMessage);
message WM_THREAD_COMPLETE;
procedure HandleThreadTermination(var Message: TMessage);
message WM_THREAD_TERMINATE;
public
Renderer: TRenderThread;
ColorMap: TColorMap;
cp: TControlPoint;
Filename: string;
ImageWidth, ImageHeight, Oversample: Integer;
zoom, Sample_Density, Brightness, Gamma, Vibrancy, Filter_Radius: double;
center: array[0..1] of double;
procedure OnProgress(prog: double);
procedure Render;
procedure SetRenderBounds;
end;
var
ScriptRenderForm: TScriptRenderForm;
Cancelled: boolean;
implementation
uses Global, Math, FormRender, ScriptForm;
{$R *.DFM}
procedure TScriptRenderForm.SetRenderBounds;
begin
cp.copy(ScriptEditor.cp);
//cp.Width := ScriptEditor.Renderer.Width;
//cp.Height := ScriptEditor.Renderer.Height;
cp.AdjustScale(ScriptEditor.Renderer.Width, ScriptEditor.Renderer.Height);
// --?-- cp.CalcBoundBox;
cp.center[0] := ScriptEditor.cp.center[0];
cp.center[1] := ScriptEditor.cp.center[1];
cp.zoom := ScriptEditor.cp.zoom;
//PixelsPerUnit := cp.Pixels_per_unit;
end;
procedure TScriptRenderForm.Render;
begin
assert(not Assigned(Renderer));
Renderer := TRenderThread.Create;
Cancelled := False;
ScriptEditor.Scripter.Paused := True;
StartTime := Now;
Remainder := 1;
cp.copy(ScriptEditor.cp);
Filename := ScriptEditor.Renderer.Filename;
//cp.Width := ScriptEditor.Renderer.Width;
//cp.Height := ScriptEditor.Renderer.Height;
//cp.pixels_per_unit := PixelsPerUnit;
cp.AdjustScale(ScriptEditor.Renderer.Width, ScriptEditor.Renderer.Height);
cp.Transparency := (PNGTransparency <> 0) and (UpperCase(ExtractFileExt(ScriptEditor.Renderer.FileName)) = '.PNG');
Renderer.OnProgress := OnProgress;
// Renderer.Compatibility := Compatibility;
Renderer.SetCP(cp);
if (ScriptEditor.Renderer.MaxMemory > 0) then Renderer.MaxMem := ScriptEditor.Renderer.MaxMemory;
Renderer.TargetHandle := Handle;
renderPath := ExtractFilePath(ScriptEditor.Renderer.Filename);
Renderer.Priority := tpLower;
Renderer.NrThreads := NrTreads;
Renderer.Resume;
// Renderer.SaveImage(FileName);
// ScriptEditor.Scripter.Paused := False;
end;
procedure TScriptRenderForm.OnProgress(prog: double);
var
Elapsed: TDateTime;
begin
prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
ProgressBar.Position := round(100 * prog);
Elapsed := Now - StartTime;
// if prog > 0 then Remainder := Elapsed * (1/prog - 1);
//Application.ProcessMessages;
end;
procedure TScriptRenderForm.FormDestroy(Sender: TObject);
begin
cp.free;
assert(not Assigned(Renderer)); //if Assigned(Renderer) then Renderer.free;
end;
procedure TScriptRenderForm.FormCreate(Sender: TObject);
begin
//Renderer := TRenderThread.Create;
self.Caption := TextByKey('script-rendering');
btnCancel.Caption := TextByKey('common-cancel');
cp := TControlPoint.Create;
end;
procedure TScriptRenderForm.btnCancelClick(Sender: TObject);
begin
ScriptEditor.Scripter.Halt;
Cancelled := True;
// Renderer.Stop;
if Assigned(Renderer) then begin
Renderer.Terminate;
Renderer.WaitFor;
Renderer.Free;
Renderer := nil;
end;
LastError := 'Render cancelled';
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.

11305
Forms/SplashForm.dfm Normal file

File diff suppressed because it is too large Load Diff

39
Forms/SplashForm.pas Normal file
View File

@ -0,0 +1,39 @@
unit SplashForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Global;
type
TSplashWindow = class(TForm)
BackgroundImage: TImage;
lblVersion: TLabel;
lblInfo: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
procedure SetInfo(info:string);
end;
var
SplashWindow: TSplashWindow;
implementation
{$R *.dfm}
procedure TSplashWindow.FormCreate(Sender: TObject);
begin
lblVersion.Caption := APP_BUILD;
end;
procedure TSplashWindow.SetInfo(info:string);
begin
lblInfo.Caption := info;
//Application.ProcessMessages;
end;
end.

117
Forms/Template.dfm Normal file
View File

@ -0,0 +1,117 @@
object TemplateForm: TTemplateForm
Left = 399
Top = 213
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
Caption = 'New Flame'
ClientHeight = 391
ClientWidth = 547
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsStayOnTop
Icon.Data = {
0000010001001010000001001800680300001600000028000000100000002000
0000010018000000000000030000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000B7A293634935634935634935
6349356349356349356349356349356349356349350000000000000000000000
00000000B7A293FFFFFFB7A293B7A293B7A293B7A293B7A293B7A293B7A293B7
A293634935000000000000000000000000000000B7A293FFFFFFFFFFFFFCFAF9
F7F1EEF1E7E1ECDDD5E6D3C9E1CABDB7A2936349350000000000000000000000
00000000B7A293FFFFFFFFFFFFF5F5F5F1EEECECE4E0E6DBD4E1D1C9E4CFC4B7
A293634935000000000000000000000000000000B7A293FFFFFFC1C1C1ACACAC
ABAAA9A7A4A2A39D99A09692B4A69FB7A2936349350000000000000000000000
00000000BAA596FFFFFFB6B6B6ECECECFFFFFFFBF8F7EEE7E49C9591E8D8D0B7
A293634935000000000000000000000000000000BEA99AFFFFFFB6B6B6ECECEC
FFFFFFF8F7F6ACAAA7E7DEDAEEE1DAB7A2936349350000000000000000000000
00000000C3AE9EFFFFFFB6B6B6ECECECFCFCFCB9B9B9CCCBCAF7F1EEF1E7E1B7
A293634935000000000000000000000000000000C8B2A3FFFFFFB5B5B5EDEDED
C1C1C1CBCBCBFEFEFEFAF7F5F5EDE9B7A2936349350000000000000000000000
00000000CCB6A7FFFFFFB0B0B0C7C7C7C7C7C7FFFFFFFFFFFFFDFCFBB7A293B7
A293644A36000000000000000000000000000000D1BBABFFFFFFB6B6B6C1C1C1
FFFFFFFFFFFFFFFFFFB7A293644A36644A36644A360000000000000000000000
00000000D5BFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB9A495D4C5BA64
4A36E1D5CD000000000000000000000000000000D8C2B2FFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFC0AB9C644A36E2D6CD0000000000000000000000000000
00000000D8C2B2D8C2B2D8C2B2D8C2B2D8C2B2D4BEAECFB9A9C9B3A4E2D6CD00
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000C0070000C0070000C0070000C0070000C0070000C0070000C0070000C007
0000C0070000C0070000C0070000C0070000C00F0000C01F0000FFFF0000}
OldCreateOrder = False
OnCreate = FormCreate
OnShow = FormShow
DesignSize = (
547
391)
PixelsPerInch = 96
TextHeight = 13
object lblFile: TLabel
Left = 16
Top = 364
Width = 329
Height = 13
Anchors = [akLeft, akRight, akBottom]
AutoSize = False
Visible = False
end
object btnCancel: TButton
Left = 454
Top = 360
Width = 89
Height = 25
Anchors = [akRight, akBottom]
Cancel = True
Caption = 'Cancel'
TabOrder = 1
OnClick = btnCancelClick
end
object btnOK: TButton
Left = 357
Top = 359
Width = 89
Height = 25
Anchors = [akRight, akBottom]
Caption = 'OK'
Default = True
Enabled = False
TabOrder = 2
OnClick = btnOKClick
end
object Files: TListBox
Left = 112
Top = 8
Width = 417
Height = 113
ItemHeight = 13
TabOrder = 3
Visible = False
end
object TemplateList: TListView
Left = 8
Top = 8
Width = 529
Height = 344
Anchors = [akLeft, akTop, akRight, akBottom]
BevelInner = bvNone
BevelOuter = bvNone
BevelKind = bkTile
BorderStyle = bsNone
Color = clBtnFace
Columns = <>
LargeImages = UsedThumbnails
TabOrder = 0
OnChange = TemplateListChange
end
object UsedThumbnails: TImageList
Height = 128
Masked = False
Width = 128
Left = 8
Top = 320
end
end

344
Forms/Template.pas Normal file
View File

@ -0,0 +1,344 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit Template;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Translation,
Dialogs, StdCtrls, ComCtrls, ImgList, ControlPoint, cmap, RenderingInterface, Main,
Global, Adjust;
type
TTemplateForm = class(TForm)
TemplateList: TListView;
btnCancel: TButton;
btnOK: TButton;
UsedThumbnails: TImageList;
Files: TListBox;
lblFile: TLabel;
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure TemplateListChange(Sender: TObject; Item: TListItem;
Change: TItemChange);
procedure btnOKClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
TemplateForm: TTemplateForm;
const
blankFlameXML1 = '<flame name="Blank Flame" version="Apophysis" size="1500 1000" center="0 0" background="0 0 0">';
blankFlameXML2 = '<xform weight="0.5" color="0" linear3D="1" coefs="1 0 0 1 0 0" />';
blankFlameXML3 = '<palette count="256" format="RGB">';
procedure ListTemplateByFileName(filename:string);
implementation
{$R *.dfm}
function LoadUserTemplates2(mask:string): integer;
var
FindResult: integer;
SearchRec : TSearchRec;
Path : string;
begin
Path:=AppPath + templatePath + '\';
result := 0;
FindResult := FindFirst(Path + Mask, faAnyFile - faDirectory, SearchRec);
while FindResult = 0 do
begin
ListTemplateByFileName(Path + SearchRec.Name);
result := result + 1;
FindResult := FindNext(SearchRec);
end;
{ free memory }
FindClose(SearchRec);
end;
function LoadUserTemplates:integer;
begin
LoadUserTemplates2('*.flame');
LoadUserTemplates2('*.template');
Result := 0; // make RTL happy
end;
function BlankXML:string;
var
i:integer;
s:string;
const
break = ' ';
begin
s:=blankFlameXML1 + break + blankFlameXML2 + break + blankFlameXML3 + break;
for i:=1 to 256 do begin
s := s + '000000';
if (i mod 32 = 0) then s := s + break;
end;
s := s + '</palette></flame>';
Result := s;
end;
procedure DropBlank();
var
flameXML: string;
cp: TControlPoint;
bm: TBitmap;
cmap: TColorMap;
zoom: double;
center: array[0..1] of double;
brightness, gamma, vibrancy: double;
Render: TRenderer;
ListItem: TListItem;
index: integer;
begin
cp := TControlPoint.Create;
Render := TRenderer.Create;
bm := TBitmap.Create;
cp.Clear;
flameXML := BlankXML;
MainForm.ParseXML(cp, PCHAR(flameXML), true);
cp.AdjustScale(TemplateForm.UsedThumbnails.Width, TemplateForm.UsedThumbnails.Height);
//Clipboard.SetTextBuf(PChar(Trim(flameXML)));
// start preview
cp.Width := TemplateForm.UsedThumbnails.Width;
cp.Height := TemplateForm.UsedThumbnails.Height;
cp.spatial_oversample := 1;
cp.spatial_filter_radius := 0.1;
cp.sample_density := 3;
// Render.Compatibility := compatibility;
try
Render.SetCP(cp);
Render.Render;
finally
BM.Assign(Render.GetImage);
cp.Free;
Render.free;
end;
// Thumbnails
TemplateForm.UsedThumbnails.Add(bm, nil);
ListItem := TemplateForm.TemplateList.Items.Add;
ListItem.Caption := 'Blank Flame';
ListItem.ImageIndex := 0;
TemplateForm.Files.Items.Add('n/a');
//end preview
//
Application.ProcessMessages;
end;
procedure DropListItem(FileName: string; FlameName: string);
var
flameXML: string;
cp: TControlPoint;
bm: TBitmap;
cmap: TColorMap;
zoom: double;
center: array[0..1] of double;
brightness, gamma, vibrancy: double;
Render: TRenderer;
ListItem: TListItem;
index: integer;
begin
cp := TControlPoint.Create;
Render := TRenderer.Create;
bm := TBitmap.Create;
cp.Clear;
flameXML := LoadXMLFlameText(filename, FlameName);
MainForm.ParseXML(cp, PCHAR(flameXML), true);
cp.AdjustScale(TemplateForm.UsedThumbnails.Width, TemplateForm.UsedThumbnails.Height);
//Clipboard.SetTextBuf(PChar(Trim(flameXML)));
// start preview
cp.Width := TemplateForm.UsedThumbnails.Width;
cp.Height := TemplateForm.UsedThumbnails.Height;
cp.spatial_oversample := 1;
cp.spatial_filter_radius := 0.1;
cp.sample_density := 3;
// Render.Compatibility := compatibility;
try
Render.SetCP(cp);
Render.Render;
finally
BM.Assign(Render.GetImage);
cp.Free;
Render.free;
end;
// Thumbnails
TemplateForm.UsedThumbnails.Add(bm, nil);
ListItem := TemplateForm.TemplateList.Items.Add;
ListItem.Caption := FlameName;
ListItem.ImageIndex := TemplateForm.TemplateList.Items.Count - 1;
TemplateForm.Files.Items.Add(FileName);
//end preview
//
Application.ProcessMessages;
end;
procedure ListTemplateByFileName(filename:string);
{ List .flame file }
var
sel:integer;
i, p, img: integer;
Title: string;
ListItem: TListItem;
FStrings: TStringList;
bm: TBitmap;
begin
sel := 0;
if not FileExists(FileName) then exit;
FStrings := TStringList.Create;
FStrings.LoadFromFile(FileName);
try
if (Pos('<flame ', Lowercase(FStrings.Text)) <> 0) then
begin
for i := 0 to FStrings.Count - 1 do
begin
p := Pos('<flame ', LowerCase(FStrings[i]));
if (p <> 0) then
begin
MainForm.ListXMLScanner.LoadFromBuffer(PAnsiChar(AnsiString(FSTrings[i])));
MainForm.ListXMLScanner.Execute;
if Length(pname) = 0 then
Title := '*untitled ' + ptime
else
Title := Trim(pname);
if Title <> '' then
begin { Otherwise bad format }
//ListItem := MainForm.ListView.Items.Add;
//Listitem.Caption := Title;
DropListItem(FileName, Title);
end;
end;
end;
end;
finally
FStrings.Free;
end;
end;
procedure ListTemplate;
var
i:integer;
bm:TBitmap;
begin
TemplateForm.TemplateList.Items.BeginUpdate;
TemplateForm.TemplateList.Items.Clear;
TemplateForm.UsedThumbnails.Clear;
// hmmm...
(*for i := 0 to TemplateForm.UsedThumbnails.Count - 1 do
begin
TemplateForm.UsedThumbnails.GetBitmap(i, bm);
bm.Free;
end; *)
DropBlank;
ListTemplateByFileName(AppPath + templateFileName);
LoadUserTemplates;
TemplateForm.TemplateList.Items.EndUpdate;
TemplateForm.TemplateList.Selected := TemplateForm.TemplateList.Items[0];
end;
procedure TTemplateForm.FormCreate(Sender: TObject);
begin
self.Caption := TextByKey('template-title');
btnOK.Caption := TextByKey('common-ok');
btnCancel.Caption := TextByKey('common-cancel');
end;
procedure TTemplateForm.TemplateListChange(Sender: TObject;
Item: TListItem; Change: TItemChange);
var
fn : string;
begin
if (TemplateList.Selected = nil) then begin
btnOK.Enabled := false;
end else begin
if (TemplateList.Selected.Index >= 0) then begin
btnOK.Enabled := true;
if (TemplateList.Selected.Index > 0) then begin
fn := ChangeFileExt(ExtractFileName(Files.Items[TemplateList.Selected.Index]), '');
if (LowerCase(fn) <> 'default') then lblFile.Caption := 'Template file: ' + fn
else lblFile.Caption := '';
end else begin
lblFile.Caption := '';
end;
end else begin
btnOK.Enabled := false;
end;
end;
end;
procedure TTemplateForm.btnOKClick(Sender: TObject);
var
flameXML:string;
fn:string;
ci:integer;
begin
fn:=Files.Items[TemplateList.Selected.Index];
if (TemplateList.Selected.Index = 0) then flameXML := BlankXML
else flameXML := LoadXMLFlameText(fn, TemplateList.Selected.Caption);
MainForm.UpdateUndo;
MainForm.StopThread;
MainForm.InvokeLoadXML(flameXML);
Transforms := MainCp.TrianglesFromCP(MainTriangles);
MainForm.Statusbar.Panels[3].Text := MainCp.name;
{if ResizeOnLoad then}
MainForm.ResizeImage;
MainForm.RedrawTimer.Enabled := True;
Application.ProcessMessages;
MainForm.UpdateWindows;
ci := Random(256); //Random(NRCMAPS);
GetCMap(ci, 1, MainCp.cmap);
MainCp.cmapIndex := ci;
AdjustForm.TemplateRandomizeGradient;
btnCancelClick(sender);
end;
procedure TTemplateForm.btnCancelClick(Sender: TObject);
begin
Close();
end;
procedure TTemplateForm.FormShow(Sender: TObject);
begin
ListTemplate;
end;
end.

133
Forms/Tracer.dfm Normal file
View File

@ -0,0 +1,133 @@
object TraceForm: TTraceForm
Left = 36
Top = 159
Width = 411
Height = 527
Caption = 'Trace'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000000000800680500001600000028000000100000002000
0000010008000000000000010000000000000000000000010000000100000000
0000000080000080000000808000800000008000800080800000C0C0C000C0DC
C000F0CAA60004040400080808000C0C0C0011111100161616001C1C1C002222
220029292900555555004D4D4D004242420039393900807CFF005050FF009300
D600FFECCC00C6D6EF00D6E7E70090A9AD000000330000006600000099000000
CC00003300000033330000336600003399000033CC000033FF00006600000066
330000666600006699000066CC000066FF000099000000993300009966000099
99000099CC000099FF0000CC000000CC330000CC660000CC990000CCCC0000CC
FF0000FF660000FF990000FFCC00330000003300330033006600330099003300
CC003300FF00333300003333330033336600333399003333CC003333FF003366
00003366330033666600336699003366CC003366FF0033990000339933003399
6600339999003399CC003399FF0033CC000033CC330033CC660033CC990033CC
CC0033CCFF0033FF330033FF660033FF990033FFCC0033FFFF00660000006600
330066006600660099006600CC006600FF006633000066333300663366006633
99006633CC006633FF00666600006666330066666600666699006666CC006699
00006699330066996600669999006699CC006699FF0066CC000066CC330066CC
990066CCCC0066CCFF0066FF000066FF330066FF990066FFCC00CC00FF00FF00
CC009999000099339900990099009900CC009900000099333300990066009933
CC009900FF00996600009966330099336600996699009966CC009933FF009999
330099996600999999009999CC009999FF0099CC000099CC330066CC660099CC
990099CCCC0099CCFF0099FF000099FF330099CC660099FF990099FFCC0099FF
FF00CC00000099003300CC006600CC009900CC00CC0099330000CC333300CC33
6600CC339900CC33CC00CC33FF00CC660000CC66330099666600CC669900CC66
CC009966FF00CC990000CC993300CC996600CC999900CC99CC00CC99FF00CCCC
0000CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF
6600CCFF9900CCFFCC00CCFFFF00CC003300FF006600FF009900CC330000FF33
3300FF336600FF339900FF33CC00FF33FF00FF660000FF663300CC666600FF66
9900FF66CC00CC66FF00FF990000FF993300FF996600FF999900FF99CC00FF99
FF00FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300CCFF
6600FFFF9900FFFFCC006666FF0066FF660066FFFF00FF666600FF66FF00FFFF
66002100A5005F5F5F00777777008686860096969600CBCBCB00B2B2B200D7D7
D700DDDDDD00E3E3E300EAEAEA00F1F1F100F8F8F800F0FBFF00A4A0A0008080
80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
000000000000000000000000000000000000000000000000000000000000AC12
1212121212121212121212F70000AC000000000000000000000000120000AC00
0000000000000000000000120000AC00FA00FAFA00FA0000000000120000AC00
0000000000000000000000120000AC00FAFA00FAFAFA00FA000000120000AC00
0000000000000000000000120000AC00FA00FAFA00FAFA00000000120000AC00
0000000000000000000000120000AC000000000000000000000000120000ACAC
ACACACACACACACACACACACAC0000ACFF090909090909090909FFADFF0000ACAC
ACACACACACACACACACACACACAC0000000000000000000000000000000000FFFF
0000000100000001000000010000000100000001000000010000000100000001
0000000100000001000000010000000100000001000000010000FFFF0000}
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate
DesignSize = (
403
500)
PixelsPerInch = 96
TextHeight = 13
object PageControl1: TPageControl
Left = 0
Top = 0
Width = 403
Height = 500
ActivePage = TabMain
Align = alClient
Images = MainForm.Buttons
TabOrder = 0
object TabMain: TTabSheet
Caption = 'Main'
ImageIndex = 47
object MainTrace: TMemo
Left = 0
Top = 0
Width = 395
Height = 471
Align = alClient
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clLime
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 0
end
end
object TabFullscreen: TTabSheet
Caption = 'Fullscreen'
ImageIndex = 52
object FullscreenTrace: TMemo
Left = 0
Top = 0
Width = 395
Height = 471
Align = alClient
Color = clBlack
Font.Charset = DEFAULT_CHARSET
Font.Color = clLime
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
ParentFont = False
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 0
end
end
end
object cbTraceLevel: TComboBox
Left = 280
Top = 0
Width = 121
Height = 21
Style = csDropDownList
Anchors = [akTop, akRight]
ItemHeight = 13
TabOrder = 1
OnSelect = cbTraceLevelSelect
Items.Strings = (
'No trace'
'Minimal trace'
'Full trace')
end
end

149
Forms/Tracer.pas Normal file
View File

@ -0,0 +1,149 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit Tracer;
{$define TRACEFORM_HIDDEN}
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;
type
TTraceForm = class(TForm)
PageControl1: TPageControl;
TabMain: TTabSheet;
TabFullscreen: TTabSheet;
FullscreenTrace: TMemo;
cbTraceLevel: TComboBox;
MainTrace: TMemo;
procedure cbTraceLevelSelect(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
TraceForm: TTraceForm;
var
TraceLevel: integer;
const
MsgComplete = '< Received WM_THREAD_COMPLETE from RenderThread #';
MsgTerminated = '< Received WM_THREAD_TERMINATE from RenderThread #';
MsgNotAssigned = 'Ignoring message: RenderThread does not exist';
MsgAnotherRunning = 'Ignoring message: another RenderThread is running';
implementation
{$R *.dfm}
uses
Registry,
Global, Main;
procedure TTraceForm.cbTraceLevelSelect(Sender: TObject);
begin
TraceLevel := cbTraceLevel.ItemIndex;
end;
procedure TTraceForm.FormCreate(Sender: TObject);
var
Registry: TRegistry;
begin
{ Read position from registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Trace', False) then
begin
if Registry.ValueExists('Top') then
self.Top := Registry.ReadInteger('Top');
if Registry.ValueExists('Left') then
self.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Width') then
self.Width := Registry.ReadInteger('Width');
if Registry.ValueExists('Height') then
self.Height := Registry.ReadInteger('Height');
{$ifndef TRACEFORM_HIDDEN}
if Registry.ValueExists('TraceLevel') then
TraceLevel := Registry.ReadInteger('TraceLevel')
else
TraceLevel := 0;
MainForm.tbShowTrace.Visible := true;
MainForm.tbShowTrace.Enabled := true;
MainForm.tbTraceSeparator.Visible := true;
MainForm.tbTraceSeparator.Enabled := true;
{$else} // Tracer disabled in release version
TraceLevel := 0;
//MainForm.tbShowTrace.Visible := false;
//MainForm.tbShowTrace.Enabled := false;
//MainForm.tbTraceSeparator.Visible := false;
//MainForm.tbTraceSeparator.Enabled := false;
{$endif}
end;
Registry.CloseKey;
finally
Registry.Free;
end;
cbTraceLevel.ItemIndex := TraceLevel;
end;
procedure TTraceForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
Registry: TRegistry;
begin
{ Write position to registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Trace', True) then
begin
if self.WindowState <> wsMaximized then begin
Registry.WriteInteger('Top', self.Top);
Registry.WriteInteger('Left', self.Left);
Registry.WriteInteger('Width', self.Width);
Registry.WriteInteger('Height', self.Height);
Registry.WriteInteger('TraceLevel', TraceLevel);
end;
end;
finally
Registry.Free;
end;
end;
end.

251
Forms/formPostProcess.dfm Normal file
View File

@ -0,0 +1,251 @@
object frmPostProcess: TfrmPostProcess
Left = 421
Top = 359
Width = 709
Height = 575
Caption = 'Post Render'
Color = clBtnFace
Constraints.MinHeight = 200
Constraints.MinWidth = 700
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
DesignSize = (
701
548)
PixelsPerInch = 96
TextHeight = 13
object Panel1: TPanel
Left = 0
Top = 0
Width = 701
Height = 81
Align = alTop
BevelOuter = bvNone
TabOrder = 0
DesignSize = (
701
81)
object pnlFilter: TPanel
Left = 8
Top = 32
Width = 121
Height = 21
Cursor = crHandPoint
BevelOuter = bvLowered
Caption = 'Filter Radius'
TabOrder = 11
OnDblClick = DragPanelDblClick
OnMouseDown = DragPanelMouseDown
OnMouseMove = DragPanelMouseMove
OnMouseUp = DragPanelMouseUp
end
object pnlVibrancy: TPanel
Left = 360
Top = 32
Width = 105
Height = 21
Cursor = crHandPoint
BevelOuter = bvLowered
Caption = 'Vibrancy'
TabOrder = 10
OnDblClick = DragPanelDblClick
OnMouseDown = DragPanelMouseDown
OnMouseMove = DragPanelMouseMove
OnMouseUp = DragPanelMouseUp
end
object pnlBrightness: TPanel
Left = 192
Top = 32
Width = 105
Height = 21
Cursor = crHandPoint
BevelOuter = bvLowered
Caption = 'Brightness'
TabOrder = 8
OnDblClick = DragPanelDblClick
OnMouseDown = DragPanelMouseDown
OnMouseMove = DragPanelMouseMove
OnMouseUp = DragPanelMouseUp
end
object pnlContrast: TPanel
Left = 360
Top = 8
Width = 105
Height = 21
Cursor = crHandPoint
BevelOuter = bvLowered
Caption = 'Contrast'
TabOrder = 9
OnDblClick = DragPanelDblClick
OnMouseDown = DragPanelMouseDown
OnMouseMove = DragPanelMouseMove
OnMouseUp = DragPanelMouseUp
end
object pnlGamma: TPanel
Left = 192
Top = 8
Width = 105
Height = 21
Cursor = crHandPoint
BevelOuter = bvLowered
Caption = 'Gamma'
TabOrder = 7
OnDblClick = DragPanelDblClick
OnMouseDown = DragPanelMouseDown
OnMouseMove = DragPanelMouseMove
OnMouseUp = DragPanelMouseUp
end
object ProgressBar1: TProgressBar
Left = 8
Top = 61
Width = 690
Height = 20
Anchors = [akLeft, akRight, akBottom]
TabOrder = 1
end
object txtFilterRadius: TEdit
Left = 128
Top = 32
Width = 57
Height = 21
TabOrder = 2
end
object txtGamma: TEdit
Left = 296
Top = 8
Width = 57
Height = 21
TabOrder = 3
end
object txtVibrancy: TEdit
Left = 464
Top = 32
Width = 57
Height = 21
TabOrder = 6
end
object txtContrast: TEdit
Left = 464
Top = 8
Width = 57
Height = 21
TabOrder = 5
end
object txtBrightness: TEdit
Left = 296
Top = 32
Width = 57
Height = 21
TabOrder = 4
end
object pnlBackground: TPanel
Left = 8
Top = 8
Width = 121
Height = 21
Cursor = crArrow
BevelOuter = bvLowered
Caption = 'Background'
TabOrder = 12
OnDblClick = DragPanelDblClick
OnMouseDown = DragPanelMouseDown
OnMouseMove = DragPanelMouseMove
OnMouseUp = DragPanelMouseUp
end
object pnlBackColor: TPanel
Left = 128
Top = 8
Width = 57
Height = 21
Cursor = crHandPoint
BevelInner = bvRaised
BevelOuter = bvLowered
BorderStyle = bsSingle
TabOrder = 0
OnClick = pnlBackColorClick
object shBack: TShape
Left = 2
Top = 2
Width = 49
Height = 13
Align = alClient
Brush.Color = clBlack
Pen.Color = clWindow
Pen.Style = psClear
Pen.Width = 0
OnMouseUp = shBackMouseUp
end
end
object btnApply: TButton
Left = 597
Top = 16
Width = 97
Height = 25
Anchors = [akTop, akRight]
Caption = '&Apply'
Default = True
TabOrder = 13
OnClick = btnApplyClick
end
end
object ScrollBox1: TScrollBox
Left = 8
Top = 88
Width = 689
Height = 417
Align = alCustom
Anchors = [akLeft, akTop, akRight, akBottom]
BevelInner = bvNone
BevelKind = bkSoft
BorderStyle = bsNone
Color = clAppWorkSpace
ParentColor = False
TabOrder = 1
object Image: TImage
Left = 0
Top = 0
Width = 687
Height = 415
Align = alClient
AutoSize = True
Center = True
Proportional = True
Stretch = True
end
end
object btnSave: TButton
Left = 599
Top = 516
Width = 97
Height = 25
Anchors = [akRight, akBottom]
Caption = '&Save'
TabOrder = 2
OnClick = btnSaveClick
end
object chkFitToWindow: TCheckBox
Left = 8
Top = 520
Width = 490
Height = 17
Anchors = [akLeft, akRight, akBottom]
Caption = 'Fit to window'
Checked = True
State = cbChecked
TabOrder = 3
Visible = False
OnClick = chkFitToWindowClick
end
object ColorDialog: TColorDialog
Left = 612
Top = 76
end
end

523
Forms/formPostProcess.pas Normal file
View File

@ -0,0 +1,523 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
unit formPostProcess;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, RenderingInterface, controlpoint, StdCtrls, ComCtrls,
Translation;
type
TfrmPostProcess = class(TForm)
Panel1: TPanel;
ScrollBox1: TScrollBox;
Image: TImage;
pnlBackColor: TPanel;
ColorDialog: TColorDialog;
ProgressBar1: TProgressBar;
txtFilterRadius: TEdit;
txtGamma: TEdit;
txtVibrancy: TEdit;
txtContrast: TEdit;
txtBrightness: TEdit;
pnlGamma: TPanel;
pnlBrightness: TPanel;
pnlContrast: TPanel;
pnlVibrancy: TPanel;
pnlFilter: TPanel;
shBack: TShape;
pnlBackground: TPanel;
btnSave: TButton;
chkFitToWindow: TCheckBox;
btnApply: TButton;
procedure chkFitToWindowClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btnSaveClick(Sender: TObject);
procedure btnApplyClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure pnlBackColorClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
procedure DragPanelMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure DragPanelMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure DragPanelMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure DragPanelDblClick(Sender: TObject);
procedure shBackMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
FRenderer: TBaseRenderer;
FCP: TControlPoint;
FImagename: string;
pnlDragMode, pnlDragged, pnlMM: boolean;
pnlDragPos, pnlDragOld: integer;
pnlDragValue: double;
mousepos: TPoint;
BkgColor: TColor;
Filter,
Gamma, Brightness,
Contrast, Vibrancy: double;
procedure UpdateFlame;
procedure SetDefaultValues;
procedure OnProgress(prog: double);
public
cp : TControlPoint;
procedure SetRenderer(Renderer: TBaseRenderer);
procedure SetControlPoint(CP: TControlPoint);
procedure SetImageName(imagename: string);
end;
var
frmPostProcess: TfrmPostProcess;
implementation
uses
Registry, Global, Main;
{$R *.dfm}
{ TfrmPostProcess }
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.SetRenderer(Renderer: TBaseRenderer);
begin
if assigned(FRenderer) then
FRenderer.Free;
FRenderer := Renderer;
Frenderer.OnProgress := OnProgress;
Image.Picture.Graphic := FRenderer.GetImage;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.FormShow(Sender: TObject);
var
Registry: TRegistry;
begin
{ Read posution from registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\PostProcess', False) then begin
if Registry.ValueExists('Left') then
Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
Top := Registry.ReadInteger('Top');
//if Registry.ValueExists('Width') then
//Width := Registry.ReadInteger('Width');
//if Registry.ValueExists('Height') then
// Height := Registry.ReadInteger('Height');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.FormClose(Sender: TObject; var Action: TCloseAction);
var
Registry: TRegistry;
begin
{ Write position to registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\PostProcess', True) then
begin
Registry.WriteInteger('Top', Top);
Registry.WriteInteger('Left', Left);
// Registry.WriteInteger('Width', Width);
// Registry.WriteInteger('Height', Height);
end;
finally
Registry.Free;
end;
FRenderer.Free; // weirdness!!! :-/
FRenderer := nil;
Image.Picture.Graphic := nil;
FCP.Free;
FCP := nil;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.SetDefaultValues;
begin
BkgColor := RGB(Fcp.background[0], Fcp.background[1], Fcp.background[2]);
pnlBackColor.Color := BkgColor;
shBack.Brush.Color := BkgColor;
Filter := FCP.spatial_filter_radius;
txtFilterRadius.Text := FloatTostr(Filter);
Gamma := FCP.gamma;
txtGamma.Text := FloatTostr(Gamma);
Vibrancy := FCP.vibrancy;
txtVibrancy.Text := FloatTostr(Vibrancy);
Contrast := FCP.contrast;
txtContrast.Text := FloatTostr(Contrast);
Brightness := FCP.brightness;
txtBrightness.Text := FloatTostr(brightness);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.SetControlPoint(CP: TControlPoint);
begin
if assigned(FCP) then
FCP.Free;
FCP := cp.Clone;
SetDefaultValues;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.pnlBackColorClick(Sender: TObject);
var
col: Longint;
begin
ColorDialog.Color := shBack.Brush.Color;
if ColorDialog.Execute then begin
pnlBackColor.Color := ColorDialog.Color;
shBack.Brush.Color := ColorDialog.Color;
col := ColorToRGB(ColorDialog.Color);
Fcp.background[0] := col and 255;
Fcp.background[1] := (col shr 8) and 255;
Fcp.background[2] := (col shr 16) and 255;
UpdateFlame;
end;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.UpdateFlame;
begin
Screen.Cursor := crHourGlass;
FRenderer.UpdateImage(FCP);
Image.Picture.Graphic := FRenderer.GetImage;
Screen.Cursor := crDefault;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.FormDestroy(Sender: TObject);
begin
if assigned(FRenderer) then
FRenderer.Free;
if assigned(FCP) then
FCP.Free;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.OnProgress(prog: double);
begin
ProgressBar1.Position := round(100 * prog);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.btnApplyClick(Sender: TObject);
var
temp: double;
begin
TryStrToFloat(txtFilterRadius.Text, FCP.spatial_filter_radius);
if FCP.spatial_filter_radius > 2 then begin
FCP.spatial_filter_radius := 2;
txtFilterRadius.Text := '2';
end else if FCP.spatial_filter_radius < 0 then begin
FCP.spatial_filter_radius := 0.01;
txtFilterRadius.Text := FloatTostr(0.01);
end;
TryStrToFloat(txtGamma.Text, FCP.gamma);
if FCP.gamma > 10 then begin
FCP.gamma := 10;
txtGamma.Text := '10';
end else if FCP.gamma < 0.01 then begin
FCP.gamma := 0.01;
txtGamma.Text := FloatTostr(0.01);
end;
TryStrToFloat(txtVibrancy.Text, FCP.vibrancy);
if FCP.vibrancy > 10 then begin
FCP.vibrancy := 10;
txtVibrancy.Text := '10';
end else if FCP.vibrancy < 0.01 then begin
FCP.vibrancy := 0.01;
txtVibrancy.Text := FloatTostr(0.01);
end;
TryStrToFloat(txtContrast.Text, FCP.contrast);
if FCP.contrast > 10 then begin
FCP.contrast := 10;
txtContrast.Text := '10';
end else if FCP.contrast < 0.01 then begin
FCP.contrast := 0.01;
txtContrast.Text := FloatTostr(0.01);
end;
if TryStrToFloat(txtBrightness.Text, temp) then FCP.brightness := temp;
//TryStrToFloat(txtBrightness.Text, FCP.brightness);
if FCP.brightness > 100 then begin
FCP.brightness := 100;
txtBrightness.Text := '100';
end else if FCP.brightness < 0.01 then begin
FCP.brightness := 0.01;
txtBrightness.Text := FloatTostr(0.01);
end;
UpdateFlame;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.btnSaveClick(Sender: TObject);
begin
FRenderer.SaveImage(FImagename);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TfrmPostProcess.SetImageName(imagename: string);
begin
FImagename := imagename;
end;
// -----------------------------------------------------------------------------
procedure TfrmPostProcess.DragPanelMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if Button <> mbLeft then exit;
if (Sender = pnlFilter) then
pnlDragValue := fcp.spatial_filter_radius * 10
else if (Sender = pnlGamma) then
pnlDragValue := fcp.gamma
else if (Sender = pnlBrightness) then
pnlDragValue := fcp.brightness
else if (Sender = pnlContrast) then
pnlDragValue := fcp.contrast
else if (Sender = pnlVibrancy) then
pnlDragValue := fcp.vibrancy
else exit;//assert(false);
pnlDragMode := true;
pnlDragPos := 0;
pnlDragOld := x;
pnlMM := false;
SetCaptureControl(TControl(Sender));
Screen.Cursor := crHSplit;
GetCursorPos(mousepos); // hmmm
pnlDragged := false;
end;
procedure TfrmPostProcess.DragPanelMouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
var
v: double;
pEdit: ^TEdit;
enableDrag : boolean;
begin
if pnlMM then // hack: to skip MouseMove event
begin
pnlMM:=false;
end
else
if pnlDragMode and (x <> pnlDragOld) then
begin
Inc(pnlDragPos, x - pnlDragOld);
if GetKeyState(VK_MENU) < 0 then v := 100000
else if GetKeyState(VK_CONTROL) < 0 then v := 10000
else if GetKeyState(VK_SHIFT) < 0 then v := 100
else v := 1000;
v := Round6(pnlDragValue + pnlDragPos / v);
SetCursorPos(MousePos.x, MousePos.y); // hmmm
pnlMM:=true;
enableDrag := true;
if (Sender = pnlFilter) then
begin
v := v / 10;
if v > 2 then v := 2
else if v < 0.01 then v := 0.01;
fcp.spatial_filter_radius := v;
pEdit := @txtFilterRadius;
end
else if (Sender = pnlGamma) then
begin
if v > 10 then v := 10
else if v < 0.01 then v := 0.01;
fcp.gamma := v;
pEdit := @txtGamma;
end
else if (Sender = pnlBrightness) then
begin
if v > 100 then v := 100
else if v < 0.01 then v := 0.01;
fcp.brightness := v;
pEdit := @txtBrightness;
end
else if (Sender = pnlContrast) then
begin
if v > 10 then v := 10
else if v < 0.01 then v := 0.01;
fcp.contrast := v;
pEdit := @txtContrast;
end
else if (Sender = pnlVibrancy) then
begin
if v > 10 then v := 10
else if v < 0.01 then v := 0.01;
fcp.vibrancy := v;
pEdit := @txtVibrancy;
end else exit;
if enableDrag then begin
pEdit^.Text := FloatToStr(v);
//pEdit.Refresh;
pnlDragged := True;
// TODO: image preview (?)
//DrawPreview;
end;
end;
end;
procedure TfrmPostProcess.DragPanelMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button <> mbLeft then exit;
if pnlDragMode then
begin
SetCaptureControl(nil);
pnlDragMode := false;
Screen.Cursor := crDefault;
if pnlDragged then
begin
//UpdateFlame;
pnlDragged := False;
end;
end;
end;
procedure TfrmPostProcess.DragPanelDblClick(Sender: TObject);
var
pValue: ^double;
pDefaultValue: ^double;
pEdit: ^TEdit;
begin
if (Sender = pnlFilter) then
begin
pValue := @fcp.spatial_filter_radius;
pDefaultValue := @Filter;
pEdit := @txtFilterRadius;
end
else if (Sender = pnlGamma) then
begin
pValue := @fcp.gamma;
pDefaultValue := @Gamma;
pEdit := @txtGamma;
end
else if (Sender = pnlBrightness) then
begin
{
pValue := @fcp.brightness;
pDefaultValue := @Brightness;
pEdit := @txtBrightness;
}
if fcp.brightness = Brightness then exit;
fcp.brightness := Brightness;
txtBrightness.Text := FloatToStr(fcp.brightness);
exit;
end
else if (Sender = pnlContrast) then
begin
pValue := @fcp.contrast;
pDefaultValue := @Contrast;
pEdit := @txtContrast
end
else if (Sender = pnlVibrancy) then
begin
pValue := @fcp.vibrancy;
pDefaultValue := @Vibrancy;
pEdit := @txtVibrancy;
end
else exit; //assert(false);
if pValue^ = pDefaultValue^ then exit;
pValue^ := pDefaultValue^;
pEdit^.Text := FloatToStr(pValue^);
//UpdateFlame;
end;
procedure TfrmPostProcess.shBackMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
pnlBackColorClick(sender);
end;
procedure TfrmPostProcess.FormCreate(Sender: TObject);
begin
btnApply.Caption := TextByKey('common-apply');
pnlFilter.Caption := TextByKey('common-filterradius');
pnlGamma.Caption := TextByKey('common-gamma');
pnlBrightness.Caption := TextByKey('common-brightness');
pnlContrast.Caption := TextByKey('common-contrast');
pnlVibrancy.Caption := TextByKey('common-vibrancy');
pnlBackground.Caption := TextByKey('common-background');
pnlFilter.Hint := TextByKey('common-dragpanelhint');
pnlGamma.Hint := TextByKey('common-dragpanelhint');
pnlBrightness.Hint := TextByKey('common-dragpanelhint');
pnlVibrancy.Hint := TextByKey('common-dragpanelhint');
pnlContrast.Hint := TextByKey('common-dragpanelhint');
self.Caption := TextByKey('postprocess-title');
btnSave.Caption := TextByKey('postprocess-save');
chkFitToWindow.Caption := TextByKey('postprocess-fittowindow');
end;
procedure TfrmPostProcess.chkFitToWindowClick(Sender: TObject);
begin
{if (chkFitToWindow.Checked) then begin
Image.Stretch := true;
Image.Align := alClient;
end else begin
Image.Stretch := false;
Image.Align := alNone;
end; }
end;
end.