*** empty log message ***

This commit is contained in:
ronaldhordijk 2005-01-15 08:44:33 +00:00
parent 3826af6327
commit e46d3fc8e2
59 changed files with 0 additions and 85950 deletions

View File

@ -1,41 +0,0 @@
-$A8
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J-
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$Y+
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-E"..\..\out"
-N"..\..\out\dcu"
-LE"x:\programs\borland\delphi6\Projects\Bpl"
-LN"x:\programs\borland\delphi6\Projects\Bpl"
-U"..\..\..\Apolibstuff\libxml;..\..\..\Apolibstuff\imglib;..\..\..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\..\..\Apolibstuff\ScripterStudio;..\..\..\Apolibstuff\Indy\d6"
-O"..\..\..\Apolibstuff\libxml;..\..\..\Apolibstuff\imglib;..\..\..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\..\..\Apolibstuff\ScripterStudio;..\..\..\Apolibstuff\Indy\d6"
-I"..\..\..\Apolibstuff\libxml;..\..\..\Apolibstuff\imglib;..\..\..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\..\..\Apolibstuff\ScripterStudio;..\..\..\Apolibstuff\Indy\d6"
-R"..\..\..\Apolibstuff\libxml;..\..\..\Apolibstuff\imglib;..\..\..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\..\..\Apolibstuff\ScripterStudio;..\..\..\Apolibstuff\Indy\d6"

View File

@ -1,134 +0,0 @@
[FileVersion]
Version=6.0
[Compiler]
A=8
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=0
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=2
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=..\..\out
UnitOutputDir=..\..\out\dcu
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=..\..\..\Apolibstuff\libxml;..\..\..\Apolibstuff\imglib;..\..\..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\..\..\Apolibstuff\ScripterStudio;..\..\..\Apolibstuff\Indy\d6
Packages=vcl;rtl;dbrtl;adortl;vcldb;vclx;bdertl;vcldbx;dsnap;cds;bdecds;teeui;teedb;tee;dss;visualclx;visualdbclx;dsnapcrba;dsnapcon;VclSmp;vclie;xmlrtl;inet;inetdbbde;inetdbxpress;inetdb;nmfast;webdsnap;websnap;soaprtl;dbexpress;dbxcds;dclOffice2k;FlatStyle_D6;S303_R60;RzLPDB60;RzLPND60;vclshlctrls;B302vr60;VirtualTreesD6;o403_r60;ibxpress;CSP20I60;Rz30Ctls60;Rz30DBCtls60;indy;Indy60
Conditionals=
DebugSourceDirs=X:\Code\Delphi\Apophysis\Apolibstuff9\ScripterStudio\
UsePackages=0
[Parameters]
RunParams=
HostApplication=
Launcher=
UseLauncher=0
DebugCWD=
[Language]
ActiveLang=
ProjectLang=
RootDir=D:\Program Files\Borland\Delphi6\Bin\
[Version Info]
IncludeVerInfo=1
AutoIncBuild=0
MajorVer=2
MinorVer=0
Release=2
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=3081
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=Apophysis 2.02
FileVersion=2.0.2.0
InternalName=
LegalCopyright=Copyright © 2001-2004 Mark Townsend
LegalTrademarks=
OriginalFilename=Apophysis.exe
ProductName=
ProductVersion=2.02
Comments=
[Excluded Packages]
C:\Program Files\Indy 10 for Delphi 6\LibD6\dclIndyCore60.bpl=Indy 10 Core Design Time
C:\Program Files\Indy 10 for Delphi 6\LibD6\dclIndyProtocols60.bpl=Indy 10 Protocols Design Time
[HistoryLists\hlDebugSourcePath]
Count=1
Item0=X:\Code\Delphi\Apophysis\Apolibstuff9\ScripterStudio\
[HistoryLists\hlConditionals]
Count=4
Item0=GEONOISE
Item1=GEONOISE;V1;GROUND_SINGLE;B_ATTENUATION_PLAIN;BARRIERCORRFLOATING;BUILDING_FLOAT;ROAD_SRM2;NO_SATTENU;NO_VATTENU
Item2=GEONOISE;R1;GROUND_SINGLE;B_ATTENUATION_PLAIN;BARRIERCORRFLOATING;BUILDING_FLOAT;NO_ROAD;NO_SATTENU;NO_VATTENU
Item3=GEONOISE;V5;GROUND_SINGLE;B_ATTENUATION_PLAIN;BARRIERCORRFLOATING;BUILDING_FLOAT;ROAD_SRM2;NO_SATTENU;NO_VATTENU
[HistoryLists\hlUnitAliases]
Count=1
Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[HistoryLists\hlSearchPath]
Count=13
Item0=..\..\..\Apolibstuff\libxml;..\..\..\Apolibstuff\imglib;..\..\..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\..\..\Apolibstuff\ScripterStudio;..\..\..\Apolibstuff\Indy\d6
Item1=..\Apolibstuff\libxml;..\Apolibstuff\imglib;..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\Apolibstuff\ScripterStudio;..\Apolibstuff\Indy\d6
Item2=..\Apolibstuff\libxml;..\Apolibstuff\imglib;..\Apolibstuff\ScripterStudio;..\Apolibstuff\Scripterstudio\Imports\Delphi6;..\Apolibstuff\Indy\d6
Item3=C:\code\Apophysis\Apolibstuff\imglib
Item4=c:\proj32\geonoise510\src;w:\Src\GroundModel;w:\lib;w:\src\alg;w:\src\dll\Tool\Viewer;w:\src\dll\DLLAlg
Item5=c:\proj32\geonoise510\src;w:\lib;w:\src\dll\Method\V1;w:\src\alg;w:\src\dll\DLLAlg;w:\src\dll\Method\GenItem;w:\src\dll\tool\VLDOS
Item6=c:\proj32\geonoise510\src;w:\lib;w:\src\dll\Method\R1;w:\src\alg;w:\src\dll\DLLAlg;w:\src\dll\Method\GenItem;w:\src\dll\tool\RLDOS
Item7=c:\proj32\geonoise510\src;w:\lib;w:\src\dll\Method\V1;w:\src\alg;w:\src\dll\DLLAlg;w:\src\dll\Method\GenItem
Item8=c:\proj32\geonoise510\src;w:\src\dll\Method\V1;w:\src\alg;w:\src\dll\DLLAlg;w:\src\dll\Method\GenItem;w:\lib
Item9=c:\proj32\geonoise510\src;w:\SRC\ALG;w:\src\dll\Tool\Shape;w:\src\dll\DLLAlg;w:\src\dll\Method\GenItem;w:\LIB
Item10=c:\proj32\geonoise510\src;w:\src\alg;w:\src\exe\dbase;w:\src\exe\geoman;w:\src\DBIntf;w:\src\exe\dllman;w:\src\exe\main;w:\src\exe\model;w:\src\exe\results;w:\src\exe\lib;w:\lib
Item11=c:\proj32\geonoise510\src;w:\SRC\SPM\;w:\SRC\ALG;w:\lib
Item12=c:\proj32\geonoise510\src;w:\SRC\SPM\;w:\SRC\ALG
[HistoryLists\hlUnitOutputDirectory]
Count=7
Item0=..\..\out\dcu
Item1=..\..\..\out\dcu
Item2=.\out\dcu
Item3=..\out\dcu
Item4=C:\code\Apophysis\2.02a\out\dcu
Item5=C:\code\Apophysis\2.02\out\dcu
Item6=c:\proj32\geonoise510\out\DCU
[HistoryLists\hlOutputDirectorry]
Count=6
Item0=..\..\out
Item1=.\out
Item2=..\out
Item3=C:\code\Apophysis\2.02a\out
Item4=C:\code\Apophysis\2.02\out
Item5=c:\proj32\geonoise510\out

View File

@ -1,91 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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.
}
{$D-,L-,O+,Q-,R-,Y-,S-}
program Apophysis202;
{%File 'HtmlHlp.inc'}
{%ToDo 'Apophysis202.todo'}
{%File 'readme.txt'}
uses
Forms,
SysUtils,
Main in '..\..\Source\Main.pas' {MainForm},
Editor in '..\..\Source\Editor.pas' {EditForm},
Global in '..\..\Source\Global.pas',
Options in '..\..\Source\Options.pas' {OptionsForm},
Regstry in '..\..\Source\Regstry.pas',
MyTypes in '..\..\Source\MyTypes.pas',
Fullscreen in '..\..\Source\Fullscreen.pas' {FullscreenForm},
Render in '..\..\Source\Render.pas',
RenderThread in '..\..\Source\RenderThread.pas',
FormRender in '..\..\Source\FormRender.pas' {RenderForm},
Mutate in '..\..\Source\Mutate.pas' {MutateForm},
Adjust in '..\..\Source\Adjust.pas' {AdjustForm},
Browser in '..\..\Source\Browser.pas' {GradientBrowser},
Gradient in '..\..\Source\Gradient.pas' {GradientForm},
Save in '..\..\Source\Save.pas' {SaveForm},
About in '..\..\Source\About.pas' {AboutForm},
Cmap in '..\..\Source\cmap.pas',
SavePreset in '..\..\Source\SavePreset.pas' {SavePresetForm},
ControlPoint in '..\..\Source\ControlPoint.pas',
HtmlHlp in '..\..\Source\HtmlHlp.pas',
ScriptForm in '..\..\Source\ScriptForm.pas' {ScriptEditor},
Preview in '..\..\Source\Preview.pas' {PreviewForm},
ScriptRender in '..\..\Source\ScriptRender.pas' {ScriptRenderForm},
ap_Math in '..\..\Source\ap_Math.pas',
ap_SysUtils in '..\..\Source\ap_SysUtils.pas',
FormFavorites in '..\..\Source\FormFavorites.pas' {FavoritesForm},
Size in '..\..\Source\Size.pas' {SizeTool},
FormExport in '..\..\Source\FormExport.pas' {ExportDialog},
MsMultiPartFormData in '..\..\Source\MsMultiPartFormData.pas',
Sheep in '..\..\Source\Sheep.pas' {SheepDialog},
ap_FileCtrl in '..\..\Source\ap_FileCtrl.pas',
XForm in '..\..\Source\XForm.pas',
cmapdata in '..\..\Source\cmapdata.pas';
{$R *.RES}
begin
Application.Initialize;
Application.Title := 'Apophysis';
Application.HelpFile := 'Apophysis 2.0.chm';
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TEditForm, EditForm);
Application.CreateForm(TOptionsForm, OptionsForm);
Application.CreateForm(TFullscreenForm, FullscreenForm);
Application.CreateForm(TRenderForm, RenderForm);
Application.CreateForm(TMutateForm, MutateForm);
Application.CreateForm(TAdjustForm, AdjustForm);
Application.CreateForm(TGradientBrowser, GradientBrowser);
Application.CreateForm(TGradientForm, GradientForm);
Application.CreateForm(TSaveForm, SaveForm);
Application.CreateForm(TAboutForm, AboutForm);
Application.CreateForm(TSavePresetForm, SavePresetForm);
Application.CreateForm(TScriptEditor, ScriptEditor);
Application.CreateForm(TPreviewForm, PreviewForm);
Application.CreateForm(TScriptRenderForm, ScriptRenderForm);
Application.CreateForm(TFavoritesForm, FavoritesForm);
Application.CreateForm(TSizeTool, SizeTool);
Application.CreateForm(TExportDialog, ExportDialog);
Application.CreateForm(TSheepDialog, SheepDialog);
Application.UpdateFormatSettings := False;
DecimalSeparator := '.';
Application.Run;
end.

View File

@ -1,341 +0,0 @@
[Closed Files]
File_0=SourceModule,'X:\Code\Delphi\Apophysis\2.02f\Source\ap_FileCtrl.pas',0,1,1,1,1,0,0
File_1=SourceModule,'X:\Code\Delphi\Apophysis\2.02f\Source\ap_SysUtils.pas',0,1,1,3,20,0,0
File_2=SourceModule,'X:\Code\Delphi\Apophysis\Apolibstuff\Scripterstudio\Imports\Delphi6\ap_Classes.pas',0,1,1,3,23,0,0
File_3=SourceModule,'x:\programs\borland\delphi6\source\rtl\Win\Windows.pas',0,1,5563,114,5586,0,0
File_4=SourceModule,'X:\Code\Delphi\Apophysis\2.02e\About.pas',0,1,1,117,16,1,0
File_5=SourceModule,'X:\Code\Delphi\Apophysis\2.02e\Main.pas',0,1,3583,38,3588,1,0
File_6=SourceModule,'X:\Code\Delphi\Apophysis\2.02\ScriptForm.pas',0,1,2648,117,2664,0,0
File_7=SourceModule,'X:\Code\Delphi\Apophysis\Apolibstuff9\ScripterStudio\atScript.pas',0,1,2152,1,2170,0,0
File_8=SourceModule,'X:\Code\Delphi\Apophysis\Apolibstuff9\ScripterStudio\atpascal.pas',0,1,1519,1,1537,0,0
File_9=SourceModule,'X:\Code\Delphi\Apophysis\Apolibstuff9\ScripterStudio\atParser.pas',0,1,2033,1,2051,0,0
[Modules]
Module0=X:\Code\Delphi\Apophysis\2.02f\Source\Main.pas
Module1=X:\Code\Delphi\Apophysis\2.02f\Source\About.pas
Module2=X:\Code\Delphi\Apophysis\2.02f\Source\ScriptForm.pas
Module3=X:\Code\Delphi\Apophysis\2.02f\Source\cmapdata.pas
Module4=X:\Code\Delphi\Apophysis\2.02f\Project\delphi6\Apophysis202.dpr
Count=5
EditWindowCount=1
[X:\Code\Delphi\Apophysis\2.02f\Source\Main.pas]
ModuleType=SourceModule
FormState=1
FormOnTop=0
[X:\Code\Delphi\Apophysis\2.02f\Source\About.pas]
ModuleType=SourceModule
FormState=1
FormOnTop=0
[X:\Code\Delphi\Apophysis\2.02f\Source\ScriptForm.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[X:\Code\Delphi\Apophysis\2.02f\Source\cmapdata.pas]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[X:\Code\Delphi\Apophysis\2.02f\Project\delphi6\Apophysis202.dpr]
ModuleType=SourceModule
FormState=0
FormOnTop=0
[X:\Programs\Borland\Delphi6\Projects\ProjectGroup1.bpg]
FormState=0
FormOnTop=0
[X:\Code\Delphi\Apophysis\2.02f\Project\delphi6\Apophysis202.todo]
FormState=0
FormOnTop=0
[EditWindow0]
ViewCount=5
CurrentView=1
View0=0
View1=1
View2=2
View3=3
View4=4
CodeExplorer=CodeExplorer@EditWindow0
MessageView=MessageView@EditWindow0
Create=1
Visible=1
State=0
Left=266
Top=111
Width=1016
Height=880
MaxLeft=-4
MaxTop=108
ClientWidth=1008
ClientHeight=846
LeftPanelSize=0
RightPanelSize=0
BottomPanelSize=52
BottomPanelClients=MessageView@EditWindow0
BottomPanelData=000004000000000000000000000000000000000000000000000100000000000000000B0000004D65737361676556696577FFFFFFFF
[View0]
Module=X:\Code\Delphi\Apophysis\2.02f\Project\delphi6\Apophysis202.dpr
CursorX=73
CursorY=55
TopLine=31
LeftCol=1
[View1]
Module=X:\Code\Delphi\Apophysis\2.02f\Source\Main.pas
CursorX=45
CursorY=4394
TopLine=4354
LeftCol=1
[View2]
Module=X:\Code\Delphi\Apophysis\2.02f\Source\About.pas
CursorX=1
CursorY=1
TopLine=1
LeftCol=1
[View3]
Module=X:\Code\Delphi\Apophysis\2.02f\Source\cmapdata.pas
CursorX=1
CursorY=47737
TopLine=47709
LeftCol=1
[View4]
Module=X:\Code\Delphi\Apophysis\2.02f\Source\ScriptForm.pas
CursorX=36
CursorY=330
TopLine=302
LeftCol=1
[Watches]
Count=0
[Breakpoints]
Count=1
Breakpoint0='X:\Code\Delphi\Apophysis\2.02\ScriptForm.pas',1244,'',0,1,'',1,0,0,'',1,'','',''
[AddressBreakpoints]
Count=0
[Main Window]
Create=1
Visible=1
State=0
Left=0
Top=0
Width=1280
Height=112
MaxLeft=-1
MaxTop=-1
ClientWidth=1272
ClientHeight=78
[ProjectManager]
Create=1
Visible=1
State=0
Left=0
Top=0
Width=231
Height=843
MaxLeft=-1
MaxTop=-1
ClientWidth=231
ClientHeight=843
TBDockHeight=305
LRDockWidth=438
Dockable=1
[CPUWindow]
Create=1
Visible=0
State=0
Left=373
Top=335
Width=533
Height=353
MaxLeft=-1
MaxTop=-1
ClientWidth=525
ClientHeight=319
DumpPane=79
DisassemblyPane=187
RegisterPane=231
FlagPane=64
[AlignmentPalette]
Create=1
Visible=0
State=0
Left=200
Top=114
Width=156
Height=84
MaxLeft=-1
MaxTop=-1
ClientWidth=150
ClientHeight=60
[PropertyInspector]
Create=1
Visible=1
State=0
Left=0
Top=0
Width=231
Height=843
MaxLeft=-1
MaxTop=-1
ClientWidth=231
ClientHeight=843
TBDockHeight=527
LRDockWidth=190
Dockable=1
SplitPos=85
ArrangeBy=Name
SelectedItem=Caption
ExpandedItems=
HiddenCategories=
[WatchWindow]
Create=1
Visible=0
State=0
Left=232
Top=872
Width=1048
Height=165
MaxLeft=-1
MaxTop=-1
ClientWidth=1040
ClientHeight=139
TBDockHeight=149
LRDockWidth=421
Dockable=1
[CallStackWindow]
Create=1
Visible=1
State=0
Left=0
Top=0
Width=231
Height=843
MaxLeft=-1
MaxTop=-1
ClientWidth=231
ClientHeight=843
TBDockHeight=161
LRDockWidth=294
Dockable=1
[ObjectTree]
Create=1
Visible=0
State=0
Left=0
Top=112
Width=190
Height=350
MaxLeft=-1
MaxTop=-1
ClientWidth=182
ClientHeight=324
TBDockHeight=350
LRDockWidth=190
Dockable=1
[DebugLogView]
Create=1
Visible=0
State=0
Left=232
Top=872
Width=1048
Height=165
MaxLeft=-1
MaxTop=-1
ClientWidth=1040
ClientHeight=139
TBDockHeight=291
LRDockWidth=417
Dockable=1
[LocalVarsWindow]
Create=1
Visible=0
State=0
Left=27
Top=127
Width=194
Height=891
MaxLeft=-1
MaxTop=-1
ClientWidth=186
ClientHeight=865
TBDockHeight=110
LRDockWidth=421
Dockable=1
[CodeExplorer@EditWindow0]
Create=1
Visible=1
State=0
Left=0
Top=0
Width=231
Height=843
MaxLeft=-1
MaxTop=-1
ClientWidth=231
ClientHeight=843
TBDockHeight=305
LRDockWidth=140
Dockable=1
[MessageView@EditWindow0]
Create=1
Visible=1
State=0
Left=12
Top=0
Width=996
Height=52
MaxLeft=-1
MaxTop=-1
ClientWidth=996
ClientHeight=52
TBDockHeight=52
LRDockWidth=443
Dockable=1
[DockHosts]
DockHostCount=1
[DockSite0]
DockSiteType=1
Create=1
Visible=1
State=0
Left=0
Top=112
Width=266
Height=877
MaxLeft=-1
MaxTop=-1
ClientWidth=258
ClientHeight=851
TBDockHeight=451
LRDockWidth=177
Dockable=1
TabPosition=2
ActiveTab=Project Manager
TabDockClients=ProjectManager,CodeExplorer@EditWindow0,CallStackWindow,PropertyInspector

Binary file not shown.

View File

@ -1 +0,0 @@

File diff suppressed because it is too large Load Diff

View File

@ -1,92 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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;
type
TAboutForm = class(TForm)
btnOK: TButton;
Image1: TImage;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label10: TLabel;
Label11: TLabel;
lblFlamecom: TLabel;
Label5: TLabel;
Bevel1: TBevel;
lblCredit: TLabel;
procedure btnOKClick(Sender: TObject);
procedure Label4Click(Sender: TObject);
procedure lblFlamecomClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure lblCreditClick(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.Label4Click(Sender: TObject);
begin
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar('http://www.apophysis.org'),
nil, nil, SW_SHOWNORMAL);
end;
procedure TAboutForm.lblFlamecomClick(Sender: TObject);
begin
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar('http://flam3.com'),
nil, nil, SW_SHOWNORMAL);
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;
end.

View File

@ -1,320 +0,0 @@
object AdjustForm: TAdjustForm
Left = 500
Top = 182
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Adjust'
ClientHeight = 374
ClientWidth = 372
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000000000000680300001600000028000000100000002000
0000010018000000000040030000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000CD52
08FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFF000000000000CD5208FFFFFFFFFFFFFFFFFFFFBD96000000
FFFFFFFFFFFFFFFFFFFFBD96000000FFFFFFFFFFFFFFFFFF000000000000CD52
08FFFFFFFFFFFFFFFFFFFFBD96000000FFFFFFFFFFFFFFFFFFFFBD96000000FF
FFFFFFFFFFFFFFFF000000000000CD5208FFFFFFFFFFFFFFFFFFFFBD96000000
FFFFFFFFFFFFFFFFFFFFBD96000000FFFFFFFFFFFFFFFFFF000000000000CD52
08FFFFFFFFFFFFFFFFFFFFBD96000000FFFFFFFFFFFFFFFFFFFFBD96000000FF
FFFFFFFFFFFFFFFF000000000000CD5208FFFFFFFFFFFFE2996DE2996DE2996D
E2996DFFFFFFE2996DE2996DE2996DE2996DFFFFFFFFFFFF000000000000CD52
08FFFFFFFFFFFFCD5208CD5208CD5208CD5208FFFFFFCD5208CD5208CD5208CD
5208FFFFFFFFFFFF000000000000CD5208FFFFFFFFFFFFFFFFFFFFBD96000000
FFFFFFFFFFFFFFFFFFFFBD96000000FFFFFFFFFFFFFFFFFF000000000000CD52
08FFFFFFFFFFFFFFFFFFFFBD96000000FFFFFFFFFFFFFFFFFFFFBD96000000FF
FFFFFFFFFFFFFFFF000000000000CD5208FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000CD52
08CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD
5208CD5208CD5208000000000000CD5208FFFFFFFFBD96FFBD96FFBD96FFBD96
FFBD96FFBD96FFBD96FFBD96FFBD96FFFFFFD25C15FFFFFF000000000000CD52
08CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD
5208CD5208CD5208CD5208000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000000100000001000000010000000100000001000000010000000100000001
0000000100000001000000010000000100000001000000010000FFFF0000}
OldCreateOrder = False
Position = poDefault
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object PrevPnl: TPanel
Left = 105
Top = 5
Width = 162
Height = 122
BevelOuter = bvLowered
Color = clAppWorkSpace
TabOrder = 0
object PreviewImage: TImage
Left = 1
Top = 1
Width = 160
Height = 120
Anchors = []
Center = True
IncrementalDisplay = True
PopupMenu = QualityPopup
end
end
object GroupBox1: TGroupBox
Left = 8
Top = 128
Width = 357
Height = 129
Caption = 'Rendering'
TabOrder = 1
object Label8: TLabel
Left = 6
Top = 24
Width = 52
Height = 13
Alignment = taRightJustify
AutoSize = False
Caption = 'Gamma:'
end
object Label9: TLabel
Left = 6
Top = 48
Width = 52
Height = 13
Alignment = taRightJustify
AutoSize = False
Caption = 'Brightness:'
end
object Label10: TLabel
Left = 6
Top = 72
Width = 52
Height = 13
Alignment = taRightJustify
AutoSize = False
Caption = 'Vibrancy:'
end
object lblContrast: TLabel
Left = 56
Top = 100
Width = 101
Height = 13
Alignment = taRightJustify
AutoSize = False
Caption = 'Background color:'
end
object scrollGamma: TScrollBar
Left = 64
Top = 24
Width = 233
Height = 13
LargeChange = 10
Max = 500
Min = 100
PageSize = 0
Position = 100
TabOrder = 0
OnChange = scrollGammaChange
OnScroll = scrollGammaScroll
end
object txtGamma: TEdit
Left = 304
Top = 20
Width = 41
Height = 21
TabOrder = 1
Text = '0'
OnExit = txtGammaExit
OnKeyPress = txtGammaKeyPress
end
object scrollBrightness: TScrollBar
Left = 64
Top = 48
Width = 233
Height = 13
LargeChange = 100
Max = 10000
PageSize = 0
TabOrder = 2
OnChange = scrollBrightnessChange
OnScroll = scrollBrightnessScroll
end
object txtBrightness: TEdit
Left = 304
Top = 44
Width = 41
Height = 21
TabOrder = 3
Text = '0'
OnExit = txtBrightnessExit
OnKeyPress = txtBrightnessKeyPress
end
object scrollVibrancy: TScrollBar
Left = 64
Top = 72
Width = 233
Height = 13
LargeChange = 10
PageSize = 0
TabOrder = 4
OnChange = scrollVibrancyChange
OnScroll = scrollVibrancyScroll
end
object txtVibrancy: TEdit
Left = 304
Top = 68
Width = 41
Height = 21
TabOrder = 5
Text = '0'
OnExit = txtVibrancyExit
OnKeyPress = txtVibrancyKeyPress
end
object ColorPanel: TPanel
Left = 168
Top = 96
Width = 177
Height = 25
BevelOuter = bvLowered
Color = clBlack
TabOrder = 6
OnClick = ColorPanelClick
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 264
Width = 357
Height = 105
Caption = 'Camera'
TabOrder = 2
object Label5: TLabel
Left = 8
Top = 24
Width = 30
Height = 13
Alignment = taRightJustify
Caption = 'Zoom:'
end
object Label6: TLabel
Left = 24
Top = 44
Width = 10
Height = 13
Alignment = taRightJustify
Caption = 'X:'
end
object Label1: TLabel
Left = 24
Top = 68
Width = 10
Height = 13
Alignment = taRightJustify
Caption = 'Y:'
end
object scrollZoom: TScrollBar
Left = 48
Top = 24
Width = 249
Height = 13
LargeChange = 10
Max = 300
Min = -300
PageSize = 0
TabOrder = 0
OnChange = scrollZoomChange
OnScroll = scrollZoomScroll
end
object txtZoom: TEdit
Left = 304
Top = 20
Width = 41
Height = 21
TabOrder = 1
Text = '0'
OnExit = txtZoomExit
OnKeyPress = txtZoomKeyPress
end
object scrollCenterX: TScrollBar
Left = 48
Top = 48
Width = 249
Height = 13
LargeChange = 10
Max = 1000
Min = -1000
PageSize = 0
TabOrder = 2
OnChange = scrollCenterXChange
OnScroll = scrollCenterXScroll
end
object txtCenterX: TEdit
Left = 304
Top = 44
Width = 41
Height = 21
TabOrder = 3
Text = '0'
OnExit = txtCenterXExit
OnKeyPress = txtCenterXKeyPress
end
object scrollCenterY: TScrollBar
Left = 48
Top = 72
Width = 249
Height = 13
LargeChange = 10
Max = 1000
Min = -1000
PageSize = 0
TabOrder = 4
OnChange = scrollCenterYChange
OnScroll = scrollCenterYScroll
end
object txtCenterY: TEdit
Left = 304
Top = 68
Width = 41
Height = 21
TabOrder = 5
Text = '0'
OnExit = txtCenterYExit
OnKeyPress = txtCenterYKeyPress
end
end
object QualityPopup: TPopupMenu
Images = MainForm.Buttons
Left = 16
Top = 16
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
end
object ColorDialog: TColorDialog
Ctl3D = True
Options = [cdFullOpen]
Left = 376
Top = 8
end
end

View File

@ -1,613 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 Adjust;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, ControlPoint, Render, Buttons, Menus, cmap;
const
WM_UPDATE_PARAMS = WM_APP + 5439;
type
TAdjustForm = class(TForm)
QualityPopup: TPopupMenu;
mnuLowQuality: TMenuItem;
mnuMediumQuality: TMenuItem;
mnuHighQuality: TMenuItem;
ColorDialog: TColorDialog;
PrevPnl: TPanel;
PreviewImage: TImage;
GroupBox1: TGroupBox;
Label8: TLabel;
scrollGamma: TScrollBar;
txtGamma: TEdit;
Label9: TLabel;
scrollBrightness: TScrollBar;
txtBrightness: TEdit;
Label10: TLabel;
scrollVibrancy: TScrollBar;
txtVibrancy: TEdit;
lblContrast: TLabel;
GroupBox2: TGroupBox;
Label5: TLabel;
scrollZoom: TScrollBar;
txtZoom: TEdit;
Label6: TLabel;
scrollCenterX: TScrollBar;
txtCenterX: TEdit;
scrollCenterY: TScrollBar;
txtCenterY: TEdit;
Label1: TLabel;
ColorPanel: TPanel;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormDestroy(Sender: TObject);
procedure DrawPreview;
procedure btnOKClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure btnCanelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure mnuLowQualityClick(Sender: TObject);
procedure mnuMediumQualityClick(Sender: TObject);
procedure mnuHighQualityClick(Sender: TObject);
procedure txtZoomKeyPress(Sender: TObject; var Key: Char);
procedure txtZoomExit(Sender: TObject);
procedure txtCenterXKeyPress(Sender: TObject; var Key: Char);
procedure txtCenterXExit(Sender: TObject);
procedure txtCenterYKeyPress(Sender: TObject; var Key: Char);
procedure txtCenterYExit(Sender: TObject);
procedure txtGammaKeyPress(Sender: TObject; var Key: Char);
procedure txtGammaExit(Sender: TObject);
procedure txtBrightnessKeyPress(Sender: TObject; var Key: Char);
procedure txtBrightnessExit(Sender: TObject);
procedure txtVibrancyKeyPress(Sender: TObject; var Key: Char);
procedure txtVibrancyExit(Sender: TObject);
procedure scrollZoomScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer);
procedure scrollCenterXScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer);
procedure scrollCenterYScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer);
procedure scrollGammaScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer);
procedure scrollBrightnessScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
procedure scrollVibrancyScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
procedure scrollVibrancyChange(Sender: TObject);
procedure scrollGammaChange(Sender: TObject);
procedure scrollBrightnessChange(Sender: TObject);
procedure scrollZoomChange(Sender: TObject);
procedure scrollCenterXChange(Sender: TObject);
procedure scrollCenterYChange(Sender: TObject);
procedure ColorPanelClick(Sender: TObject);
procedure scrollContrastScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
private
Resetting: boolean;
Render: TRenderer;
bm: TBitmap;
public
PreviewDensity: double;
cp: TControlPoint;
// cmap: TColorMap;
// Sample_Density, Zoom: double;
// Center: array[0..1] of double;
procedure UpdateDisplay;
procedure UpdateFlame;
end;
var
AdjustForm: TAdjustForm;
implementation
uses Main, Global, Registry, Mutate, Editor;
{$R *.DFM}
procedure TAdjustForm.UpdateDisplay;
var
pw, ph: integer;
r: double;
begin
pw := PrevPnl.Width - 2;
ph := PrevPnl.Height - 2;
cp.copy(MainCp);
if cp.width > cp.height then
begin
PreviewImage.Width := pw;
r := cp.width / PreviewImage.Width;
PreviewImage.height := round(cp.height / r);
PreviewImage.Left := 1;
PreviewImage.Top := (ph - PreviewImage.Height) div 2;
end
else
begin
PreviewImage.Height := ph;
r := cp.height / PreviewImage.height;
PreviewImage.Width := round(cp.Width / r);
PreviewImage.Top := 1;
PreviewImage.Left := (pw - PreviewImage.Width) div 2;
end;
cp.cmap := MainCp.cmap;
AdjustScale(cp, PreviewImage.Width, PreviewImage.Height);
// zoom := MainForm.zoom;
// cp.zoom := zoom;
Resetting := True; // So the preview doesn't get drawn with these changes..
scrollGamma.Position := trunc(cp.Gamma * 100);
scrollBrightness.Position := trunc(cp.Brightness * 100);
scrollVibrancy.Position := trunc(cp.vibrancy * 100);
scrollZoom.Position := trunc(cp.zoom * 100);
scrollCenterX.Position := trunc(cp.Center[0] * 100);
scrollCenterY.Position := trunc(cp.Center[1] * 100);
ColorPanel.color := cp.background[2] shl 16 +
cp.background[1] shl 8 + cp.background[0];
Resetting := False;
DrawPreview;
end;
procedure TAdjustForm.UpdateFlame;
begin
MainForm.StopThread;
MainForm.UpdateUndo;
MainCp.Copy(cp);
// MainCp.cmap := cmap;
// MainForm.zoom := zoom;
// MainForm.Center[0] := Center[0];
// MainForm.Center[1] := Center[1];
if EditForm.Visible then EditForm.UpdateDisplay;
if MutateForm.Visible then MutateForm.UpdateDisplay;
MainForm.RedrawTimer.enabled := true;
end;
procedure TAdjustForm.DrawPreview;
begin
if not Resetting then begin
Render.Stop;
// AdjustScale(cp, PreviewImage.Width, PreviewImage.Height);
cp.sample_density := PreviewDensity;
cp.spatial_oversample := defOversample;
cp.spatial_filter_radius := defFilterRadius;
// cp.Zoom := Zoom;
// cp.center[0] := Center[0];
// cp.center[1] := Center[1];
Render.Compatibility := compatibility;
Render.SetCP(cp);
Render.Render;
BM.Assign(Render.GetImage);
PreviewImage.Picture.Graphic := bm;
end;
end;
procedure TAdjustForm.FormCreate(Sender: TObject);
begin
bm := TbitMap.Create;
cp := TControlPoint.Create;
Render := TRenderer.Create;
case AdjustPrevQual 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;
end;
procedure TAdjustForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
Registry: TRegistry;
begin
Render.Stop;
{ Write position to registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Adjust', True) then
begin
Registry.WriteInteger('Top', AdjustForm.Top);
Registry.WriteInteger('Left', AdjustForm.Left);
end;
finally
Registry.Free;
end;
// bStop := True;
end;
procedure TAdjustForm.FormDestroy(Sender: TObject);
begin
bm.free;
cp.free;
Render.free;
end;
procedure TAdjustForm.btnOKClick(Sender: TObject);
begin
ModalResult := mrOK;
end;
procedure TAdjustForm.btnCancelClick(Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TAdjustForm.btnCanelClick(Sender: TObject);
begin
ModalResult := mrCancel;
end;
procedure TAdjustForm.FormShow(Sender: TObject);
var
Registry: TRegistry;
begin
if LimitVibrancy then scrollVibrancy.Max := 100 else scrollVibrancy.Max := 300;
{ Read posution from registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Adjust', False) then
begin
if Registry.ValueExists('Left') then
AdjustForm.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
AdjustForm.Top := Registry.ReadInteger('Top');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
end;
procedure TAdjustForm.mnuLowQualityClick(Sender: TObject);
begin
mnuLowQuality.Checked := True;
PreviewDensity := prevLowQuality;
AdjustPrevQual := 0;
DrawPreview;
end;
procedure TAdjustForm.mnuMediumQualityClick(Sender: TObject);
begin
mnuMediumQuality.Checked := True;
PreviewDensity := prevMediumQuality;
AdjustPrevQual := 1;
DrawPreview;
end;
procedure TAdjustForm.mnuHighQualityClick(Sender: TObject);
begin
mnuHighQuality.Checked := True;
PreviewDensity := prevHighQuality;
AdjustPrevQual := 2;
DrawPreview;
end;
procedure TAdjustForm.txtZoomKeyPress(Sender: TObject; var Key: Char);
var v: integer;
begin
if key = #13 then
begin
key := #0;
try
v := Trunc(StrToFloat(txtZoom.Text) * 100);
if v > scrollZoom.Max then v := scrollZoom.Max;
if v < scrollZoom.Min then v := scrollZoom.Min;
if v <> ScrollZoom.Position then begin
ScrollZoom.Position := v;
UpdateFlame;
end;
except on EConvertError do
end;
end;
end;
procedure TAdjustForm.txtZoomExit(Sender: TObject);
var
v: integer;
begin
try
v := Trunc(StrToFloat(txtZoom.Text) * 100);
if v > scrollZoom.Max then v := scrollZoom.Max;
if v < scrollZoom.Min then v := scrollZoom.Min;
if v <> ScrollZoom.Position then begin
ScrollZoom.Position := v;
UpdateFlame;
end;
except on EConvertError do
txtZoom.Text := FloatToStr(cp.zoom)
end;
end;
procedure TAdjustForm.txtCenterXKeyPress(Sender: TObject; var Key: Char);
var
v: integer;
begin
if key = #13 then
begin
key := #0;
try
v := Trunc(StrToFloat(txtCenterX.Text) * 100);
if v > scrollCenterX.Max then v := scrollCenterX.Max;
if v < scrollCenterX.Min then v := scrollCenterX.Min;
ScrollCenterX.Position := v;
except on EConvertError do
end;
end;
end;
procedure TAdjustForm.txtCenterXExit(Sender: TObject);
var
v: integer;
begin
try
v := Trunc(StrToFloat(txtCenterX.Text) * 100);
if v > scrollCenterX.Max then v := scrollCenterX.Max;
if v < scrollCenterX.Min then v := scrollCenterX.Min;
ScrollCenterX.Position := v;
UpdateFlame;
except on EConvertError do
txtCenterX.Text := FloatToStr(cp.center[0]);
end;
end;
procedure TAdjustForm.txtCenterYKeyPress(Sender: TObject; var Key: Char);
var
v: integer;
begin
if key = #13 then
begin
key := #0;
try
v := Trunc(StrToFloat(txtCenterY.Text) * 100);
if v > ScrollCenterY.Max then v := ScrollCenterY.Max;
if v < ScrollCenterY.Min then v := ScrollCenterY.Min;
ScrollCenterY.Position := v;
UpdateFlame;
except on EConvertError do
end;
end;
end;
procedure TAdjustForm.txtCenterYExit(Sender: TObject);
var
v: integer;
begin
try
v := Trunc(StrToFloat(txtCenterY.Text) * 100);
if v > ScrollCenterY.Max then v := ScrollCenterY.Max;
if v < ScrollCenterY.Min then v := ScrollCenterY.Min;
ScrollCenterY.Position := v;
UpdateFlame;
except on EConvertError do
txtCenterY.Text := FloatToStr(cp.center[1]);
end;
end;
procedure TAdjustForm.txtGammaExit(Sender: TObject);
var
v: integer;
begin
try
v := Trunc(StrToFloat(txtGamma.Text) * 100);
if v > scrollGamma.Max then v := scrollGamma.Max;
if v < scrollGamma.Min then v := scrollGamma.Min;
ScrollGamma.Position := v;
UpdateFlame;
except on EConvertError do
txtGamma.Text := FloatToStr(cp.gamma);
end;
end;
procedure TAdjustForm.txtGammaKeyPress(Sender: TObject; var Key: Char);
var
v: integer;
begin
if key = #13 then
begin
key := #0;
try
v := Trunc(StrToFloat(txtGamma.Text) * 100);
if v > scrollGamma.Max then v := scrollGamma.Max;
if v < scrollGamma.Min then v := scrollGamma.Min;
ScrollGamma.Position := v;
UpdateFlame;
except on EConvertError do
end;
end;
end;
procedure TAdjustForm.txtBrightnessExit(Sender: TObject);
var
v: integer;
begin
try
v := Trunc(StrToFloat(txtBrightness.Text) * 100);
if v > scrollBrightness.Max then v := scrollBrightness.Max;
if v < scrollBrightness.Min then v := scrollBrightness.Min;
ScrollBrightness.Position := v;
UpdateFlame;
except on EConvertError do
txtBrightness.Text := FloatToStr(cp.brightness);
end;
end;
procedure TAdjustForm.txtBrightnessKeyPress(Sender: TObject;
var Key: Char);
var
v: integer;
begin
if key = #13 then
begin
key := #0;
try
v := Trunc(StrToFloat(txtBrightness.Text) * 100);
if v > scrollBrightness.Max then v := scrollBrightness.Max;
if v < scrollBrightness.Min then v := scrollBrightness.Min;
ScrollBrightness.Position := v;
UpdateFlame;
except on EConvertError do
end;
end;
end;
procedure TAdjustForm.txtVibrancyKeyPress(Sender: TObject; var Key: Char);
var
v: integer;
begin
if key = #13 then
begin
key := #0;
try
v := Trunc(StrToFloat(txtVibrancy.Text) * 100);
if v > scrollVibrancy.Max then v := scrollVibrancy.Max;
if v < scrollVibrancy.Min then v := scrollVibrancy.Min;
ScrollVibrancy.Position := v;
UpdateFlame;
except on EConvertError do
end;
end;
end;
procedure TAdjustForm.txtVibrancyExit(Sender: TObject);
var
v: integer;
begin
try
v := Trunc(StrToFloat(txtVibrancy.Text) * 100);
if v > scrollVibrancy.Max then v := scrollVibrancy.Max;
if v < scrollVibrancy.Min then v := scrollVibrancy.Min;
ScrollVibrancy.Position := v;
UpdateFlame;
except on EConvertError do
txtVibrancy.Text := FloatToStr(cp.Vibrancy);
end;
end;
procedure TAdjustForm.scrollZoomScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then UpdateFlame;
end;
procedure TAdjustForm.scrollCenterXScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then UpdateFlame;
end;
procedure TAdjustForm.scrollCenterYScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then UpdateFlame;
end;
procedure TAdjustForm.scrollGammaScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then UpdateFlame;
end;
procedure TAdjustForm.scrollBrightnessScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then UpdateFlame;
end;
procedure TAdjustForm.scrollVibrancyScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then UpdateFlame;
end;
procedure TAdjustForm.scrollVibrancyChange(Sender: TObject);
begin
cp.Vibrancy := ScrollVibrancy.Position / 100;
txtVibrancy.text := FloatToStr(cp.Vibrancy);
DrawPreview;
end;
procedure TAdjustForm.scrollGammaChange(Sender: TObject);
begin
cp.Gamma := scrollGamma.Position / 100;
txtGamma.text := FloatToStr(cp.Gamma);
DrawPreview;
end;
procedure TAdjustForm.scrollBrightnessChange(Sender: TObject);
begin
cp.Brightness := ScrollBrightness.Position / 100;
txtBrightness.text := FloatToStr(cp.Brightness);
DrawPreview;
end;
procedure TAdjustForm.scrollZoomChange(Sender: TObject);
begin
cp.zoom := scrollZoom.Position / 100;
txtZoom.text := FloatToStr(cp.zoom);
DrawPreview;
end;
procedure TAdjustForm.scrollCenterXChange(Sender: TObject);
begin
cp.center[0] := scrollCenterX.Position / 100;
txtCenterX.text := FloatToStr(cp.center[0]);
DrawPreview;
end;
procedure TAdjustForm.scrollCenterYChange(Sender: TObject);
begin
cp.center[1] := scrollCenterY.Position / 100;
txtCentery.text := FloatToStr(cp.center[1]);
DrawPreview;
end;
procedure TAdjustForm.ColorPanelClick(Sender: TObject);
var
col: Longint;
begin
ColorDialog.Color := COlorPanel.Color;
if ColorDialog.Execute then
begin
ColorPanel.Color := ColorDialog.Color;
col := ColorToRGB(ColorDialog.Color);
cp.background[0] := col and 255;
cp.background[1] := col shr 8 and 255;
cp.background[2] := col shr 16 and 255;
DrawPreview;
UpdateFlame;
end;
end;
procedure TAdjustForm.scrollContrastScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then UpdateFlame;
end;
end.

View File

@ -1,878 +0,0 @@
object GradientBrowser: TGradientBrowser
Left = 494
Top = 299
Width = 380
Height = 188
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 = {
0000010001001010000000000000680300001600000028000000100000002000
0000010018000000000040030000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000FFF5F0FFF1E9FFEFE6FFEFE6FFF0E7FFF1E8FFF1E9FFF3EBFFF3ECFF
F4EDFFF6F0000000000000000000000000000000FFF4EDFFEEE4FFEBDFFFEBDF
FFEBE0FFECE2FFEDE2FFEEE4FFEFE5FFEFE6FFF1EA0000000000000000000000
00000000FFF1E9CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD
5208FFEDE3000000000000000000000000000000FFEFE6CD5208E26518EB7A37
FFA772FFD1B2FFF7EDC2E9FF42ADF7CD5208FFE9DC0000000000000000000000
00000000FFEDE2CD5208E16519E97835FFA770FFD1B2FFF7ECC2E9FF40ADF7CD
5208FFE5D6000000000000000000000000000000FFEBDFCD5208E16518EB7836
FFA770FFD1B2FFF7ECC2E9FF42ADF7CD5208FFE1D00000000000000000000000
00000000FFE9DBCD5208E16519EC7935FFA770FFD0B2FFF7ECC2E9FF40AEF7CD
5208FFDFCD000000000000000000000000000000FFE7D8CD5208E16519EB7935
FFA570FFD1B2FFF7ECC2E9FF40ADF7CD5208FFE1D00000000000000000000000
00000000FFE4D5CD5208E3651AEB7A39FFA874FFD1B3FFF7ECC4E9FF44AEF7CD
5208FFE9DC000000000000000000000000000000FFE3D1CD5208ED7935F99457
FFBC8DFFE1C5FFFFF90000000000000000000000000000000000000000000000
00000000FFE1CFCD5208CD5208CD5208CD5208CD5208CD5208000000E17D41EB
925E000000000000000000000000000000000000FFE2D1FFD7BFFFD0B4FFCEB1
FFCFB3FFD0B4FFD3B8000000F5A7790000000000000000000000000000000000
00000000FFE7DAFFE2D0FFDECBFFDECAFFDDC9FFDECAFFDFCD00000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000800300008003000080030000800300008003000080030000800300008003
000080030000800300008003000080070000800F0000801F0000803F0000}
OldCreateOrder = False
Position = poDefaultPosOnly
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object RightPanel: TPanel
Left = 0
Top = 4
Width = 372
Height = 106
Align = alClient
BevelOuter = bvNone
TabOrder = 0
object ListView: TListView
Left = 0
Top = 0
Width = 372
Height = 106
Align = alClient
Columns = <
item
Caption = 'Title'
Width = 150
end>
HideSelection = False
LargeImages = LargeImages
ReadOnly = True
RowSelect = True
PopupMenu = PopupMenu
SmallImages = SmallImages
SortType = stText
TabOrder = 0
ViewStyle = vsList
OnChange = ListViewChange
OnDblClick = SpeedButton1Click
OnEdited = ListViewEdited
OnKeyPress = ListViewKeyPress
end
end
object pnlMain: TPanel
Left = 0
Top = 0
Width = 372
Height = 4
Align = alTop
BevelOuter = bvNone
TabOrder = 1
end
object pnlControls: TPanel
Left = 0
Top = 110
Width = 372
Height = 51
Align = alBottom
BevelOuter = bvNone
TabOrder = 2
object btnDefGradient: TSpeedButton
Left = 333
Top = 14
Width = 23
Height = 22
Hint = 'Open...'
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FF00000000000000000000000000000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FF000000000000
9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00
FFFF00FFFF00FFFF00FF0000009FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FFFF00FFFF00FF0000009FFFFF
9FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCF
FF000000FF00FFFF00FF0000009FFFFF9FFFFF9FFFFF0000009FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF0000000000000000000000000000000000000000000000
00000000000000FF00FF0000009FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9F
FFFF9FFFFF9FFFFF000000FF00FFFF00FFFF00FFFF00FFFF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF000000FF00FFFF00
FFFF00FFFF00FFFF00FF0000009FFFFF9FFFFF9FFFFF00000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000
000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000
00000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000000000FF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0C0C0CFF00FFFF00FFFF00FF0000
00FF00FF000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FF0B0B0B020202000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnDefGradientClick
end
object btnCancel: TButton
Left = 405
Top = 97
Width = 75
Height = 25
Caption = 'Cancel'
ModalResult = 2
TabOrder = 0
end
object pnlPreview: TPanel
Left = 0
Top = 6
Width = 325
Height = 40
BevelOuter = bvLowered
TabOrder = 1
object Image: TImage
Left = 1
Top = 1
Width = 323
Height = 38
Align = alClient
Stretch = True
end
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
end

View File

@ -1,509 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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, Render, StdCtrls,
Cmap, Menus, Global, Buttons;
const
PixelCountMax = 32768;
type
TGradientBrowser = class(TForm)
RightPanel: TPanel;
SmallImages: TImageList;
ListView: TListView;
pnlMain: TPanel;
PopupMenu: TPopupMenu;
DeleteItem: TMenuItem;
RenameItem: TMenuItem;
btnDefGradient: TSpeedButton;
btnCancel: TButton;
pnlPreview: TPanel;
Image: TImage;
pnlControls: TPanel;
OpenDialog: TOpenDialog;
LargeImages: TImageList;
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);
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('Cannot Open File: ' +
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
index := StrToInt(Indices[i]);
index := Round(Index * (255 / 399));
indices[i] := IntToStr(index);
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);
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
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('Are you sure you want to permanently delete' + ' "'
+ 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);
begin
OpenDialog.InitialDir := BrowserPath;
OpenDialog.FileName := '';
if OpenDialog.Execute then
begin
Filename := OpenDialog.FileName;
GradientFile := Filename;
BrowserPath := ExtractFilePath(OpenDialog.FileName);
ListFileContents;
end;
end;
procedure TGradientBrowser.Apply;
begin
MainForm.StopThread;
MainForm.UpdateUndo;
MainCp.cmap := Palette;
gradientForm.UpdateGradient(Palette);
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;
end.

File diff suppressed because it is too large Load Diff

View File

@ -1,646 +0,0 @@
object EditForm: TEditForm
Left = 516
Top = 218
Width = 582
Height = 471
Caption = 'Editor'
Color = clBtnFace
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Icon.Data = {
0000010001001010000000000000680300001600000028000000100000002000
0000010018000000000040030000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00000000000000000000000000000000000000FFFF000000
00000000000000000000000000000000000000000000FFFF0000000000000000
0000000000000000000000000000FFFF00000000000000000000000000000000
000000000000FFFF0000000000000000000000000000000000FF0000FF0000FF
00FFFF0000FF0000FF0000FF0000FF0000FF00000000FFFF0000000000000000
000000000000000000FF00000000000000000000FFFF0000000000000000FF00
000000000000FFFF0000000000000000000000000000000000FF000000000000
00000000000000FFFF0000FF00000000000000000000FFFF0000000000000000
000000000000000000FF0000000000000000000000000000FF00FFFF00000000
000000000000FFFF0000000000000000000000000000000000FF000000000000
0000000000FF00000000000000FFFF00000000000000FFFF0000000000000000
000000000000000000FF0000000000000000FF00000000000000000000000000
FFFF00000000FFFF0000000000000000000000000000000000FF0000000000FF
00000000000000000000000000000000000000FFFF00FFFF0000000000000000
000000000000000000FF0000FF00000000000000000000000000000000000000
000000000000FFFF0000000000000000000000000000000000FF000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000800100008001000080010000800100008001000080010000800100008001
0000800100008001000080010000800100008001000080010000FFFF0000}
KeyPreview = True
OldCreateOrder = True
Position = poDefaultPosOnly
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnResize = FormResize
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object GrphPnl: TPanel
Left = 0
Top = 0
Width = 394
Height = 422
Align = alClient
BevelOuter = bvLowered
Color = clBlack
TabOrder = 0
object GraphImage: TImage
Left = 1
Top = 1
Width = 392
Height = 420
Align = alClient
PopupMenu = EditPopup
OnDblClick = GraphImageDblClick
OnMouseDown = GraphImageMouseDown
OnMouseMove = GraphImageMouseMove
OnMouseUp = GraphImageMouseUp
end
end
object StatusBar: TStatusBar
Left = 0
Top = 422
Width = 574
Height = 15
Panels = <
item
Width = 60
end
item
Width = 60
end
item
Width = 150
end>
SimplePanel = False
end
object ControlPanel: TPanel
Left = 394
Top = 0
Width = 180
Height = 422
Align = alRight
Alignment = taLeftJustify
BevelOuter = bvNone
TabOrder = 2
DesignSize = (
180
422)
object lblTransform: TLabel
Left = 10
Top = 128
Width = 59
Height = 13
Caption = 'Transform'
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentFont = False
end
object PrevPnl: TPanel
Left = 10
Top = 0
Width = 162
Height = 122
BevelOuter = bvLowered
Caption = 'PrevPnl'
Color = clBlack
TabOrder = 0
object PreviewImage: TImage
Left = 1
Top = 1
Width = 160
Height = 120
Align = alClient
IncrementalDisplay = True
PopupMenu = QualityPopup
end
end
object cbTransforms: TComboBox
Left = 75
Top = 125
Width = 57
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 1
OnChange = cbTransformsChange
end
object PageControl: TPageControl
Left = 10
Top = 148
Width = 167
Height = 277
ActivePage = TabSheet2
Anchors = [akLeft, akTop, akRight, akBottom]
MultiLine = True
TabIndex = 3
TabOrder = 2
TabStop = False
object TabSheet1: TTabSheet
Caption = 'Triangle'
object Label7: TLabel
Left = 9
Top = 12
Width = 17
Height = 13
Caption = 'Ax:'
end
object Label8: TLabel
Left = 9
Top = 36
Width = 17
Height = 13
Caption = 'Ay:'
end
object Label9: TLabel
Left = 9
Top = 60
Width = 16
Height = 13
Caption = 'Bx:'
end
object Label10: TLabel
Left = 9
Top = 84
Width = 16
Height = 13
Caption = 'By:'
end
object Label11: TLabel
Left = 9
Top = 108
Width = 17
Height = 13
Caption = 'Cx:'
end
object Label12: TLabel
Left = 9
Top = 132
Width = 17
Height = 13
Caption = 'Cy:'
end
object txtAx: TEdit
Left = 32
Top = 8
Width = 110
Height = 21
AutoSelect = False
TabOrder = 0
Text = '0'
OnExit = CornerEditExit
OnKeyPress = CornerEditKeyPress
end
object txtAy: TEdit
Left = 32
Top = 32
Width = 110
Height = 21
AutoSelect = False
TabOrder = 1
Text = '0'
OnExit = CornerEditExit
OnKeyPress = CornerEditKeyPress
end
object txtBx: TEdit
Left = 32
Top = 56
Width = 110
Height = 21
AutoSelect = False
TabOrder = 2
Text = '0'
OnExit = CornerEditExit
OnKeyPress = CornerEditKeyPress
end
object txtBy: TEdit
Left = 32
Top = 80
Width = 110
Height = 21
AutoSelect = False
TabOrder = 3
Text = '0'
OnExit = CornerEditExit
OnKeyPress = CornerEditKeyPress
end
object txtCx: TEdit
Left = 32
Top = 104
Width = 110
Height = 21
AutoSelect = False
TabOrder = 4
Text = '0'
OnExit = CornerEditExit
OnKeyPress = CornerEditKeyPress
end
object txtCy: TEdit
Left = 32
Top = 128
Width = 110
Height = 21
AutoSelect = False
TabOrder = 5
Text = '0'
OnExit = CornerEditExit
OnKeyPress = CornerEditKeyPress
end
object chkPreserve: TCheckBox
Left = 8
Top = 168
Width = 129
Height = 17
Caption = 'Preserve weights'
Checked = True
State = cbChecked
TabOrder = 6
end
end
object XForm: TTabSheet
Caption = 'Transform'
object lbla: TLabel
Left = 9
Top = 12
Width = 10
Height = 13
Caption = 'a:'
end
object Label1: TLabel
Left = 9
Top = 36
Width = 10
Height = 13
Caption = 'b:'
end
object Label2: TLabel
Left = 9
Top = 60
Width = 9
Height = 13
Caption = 'c:'
end
object Label3: TLabel
Left = 9
Top = 84
Width = 10
Height = 13
Caption = 'd:'
end
object Label4: TLabel
Left = 9
Top = 108
Width = 10
Height = 13
Caption = 'e:'
end
object Label5: TLabel
Left = 9
Top = 132
Width = 8
Height = 13
Caption = 'f:'
end
object Label6: TLabel
Left = 9
Top = 156
Width = 38
Height = 13
Caption = 'Weight:'
end
object Label29: TLabel
Left = 9
Top = 180
Width = 52
Height = 13
Caption = 'Symmetry:'
end
object txtA: TEdit
Left = 32
Top = 8
Width = 110
Height = 21
TabOrder = 0
Text = '0'
OnExit = CoefExit
OnKeyPress = CoefKeyPress
end
object txtB: TEdit
Left = 32
Top = 32
Width = 110
Height = 21
TabOrder = 1
Text = '0'
OnExit = CoefExit
OnKeyPress = CoefKeyPress
end
object txtC: TEdit
Left = 32
Top = 56
Width = 110
Height = 21
TabOrder = 2
Text = '0'
OnExit = CoefExit
OnKeyPress = CoefKeyPress
end
object txtD: TEdit
Left = 32
Top = 80
Width = 110
Height = 21
TabOrder = 3
Text = '0'
OnExit = CoefExit
OnKeyPress = CoefKeyPress
end
object txtE: TEdit
Left = 32
Top = 104
Width = 110
Height = 21
TabOrder = 4
Text = '0'
OnExit = CoefExit
OnKeyPress = CoefKeyPress
end
object txtF: TEdit
Left = 32
Top = 128
Width = 110
Height = 21
TabOrder = 5
Text = '0'
OnExit = CoefExit
OnKeyPress = CoefKeyPress
end
object txtP: TEdit
Left = 72
Top = 152
Width = 70
Height = 21
TabOrder = 6
Text = '0'
OnExit = txtPExit
OnKeyPress = txtPKeyPress
end
object txtSymmetry: TEdit
Left = 72
Top = 176
Width = 70
Height = 21
TabOrder = 7
Text = '0'
OnExit = txtSymmetryExit
OnKeyPress = txtSymmetryKeyPress
end
end
object TabSheet3: TTabSheet
Caption = 'Variations'
object VEVars: TValueListEditor
Left = 0
Top = 0
Width = 159
Height = 231
Align = alClient
ScrollBars = ssVertical
TabOrder = 0
TitleCaptions.Strings = (
'Variation'
'Value')
OnExit = VEVarsExit
OnKeyPress = VEVarsKeyPress
OnValidate = VEVarsValidate
ColWidths = (
93
60)
end
end
object TabSheet2: TTabSheet
Caption = 'Colors'
ImageIndex = 3
object GroupBox1: TGroupBox
Left = 8
Top = 0
Width = 145
Height = 73
Caption = 'Transform color'
TabOrder = 0
object scrlXFormColor: TScrollBar
Left = 8
Top = 48
Width = 129
Height = 13
LargeChange = 10
PageSize = 0
TabOrder = 0
OnChange = scrlXFormColorChange
OnScroll = scrlXFormColorScroll
end
object pnlXFormColor: TPanel
Left = 8
Top = 16
Width = 65
Height = 25
BevelOuter = bvLowered
TabOrder = 1
end
object txtXFormColor: TEdit
Left = 80
Top = 16
Width = 57
Height = 21
TabOrder = 2
OnExit = txtXFormColorExit
OnKeyPress = txtXFormColorKeyPress
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 80
Width = 145
Height = 137
Caption = 'Graph'
TabOrder = 1
object Label20: TLabel
Left = 8
Top = 56
Width = 82
Height = 13
Caption = 'Background color'
end
object Label21: TLabel
Left = 8
Top = 96
Width = 89
Height = 13
Caption = 'Reference triangle'
end
object pnlBackColor: TPanel
Left = 8
Top = 72
Width = 129
Height = 17
BevelOuter = bvLowered
Color = clBlack
TabOrder = 0
OnClick = pnlBackColorClick
end
object chkUseXFormColor: TCheckBox
Left = 8
Top = 16
Width = 129
Height = 17
Caption = 'Use transform color'
TabOrder = 1
OnClick = chkUseXFormColorClick
end
object chkFlameBack: TCheckBox
Left = 8
Top = 36
Width = 129
Height = 17
Caption = 'Use flame background'
TabOrder = 2
OnClick = chkFlameBackClick
end
object pnlReference: TPanel
Left = 8
Top = 112
Width = 129
Height = 17
BevelOuter = bvLowered
Color = clGray
TabOrder = 3
OnClick = pnlReferenceClick
end
end
end
end
end
object EditPopup: TPopupMenu
Images = MainForm.Buttons
Left = 312
Top = 8
object mnuAutoZoom: TMenuItem
Caption = 'Auto Zoom'
Hint = 'Zooms the triangle display to the best fit.'
OnClick = mnuAutoZoomClick
end
object N1: TMenuItem
Caption = '-'
end
object mnuDelete: TMenuItem
Caption = 'Delete'
Hint = 'Deletes the selected triangle.'
ImageIndex = 9
OnClick = mnuDeleteClick
end
object mnuDuplicate: TMenuItem
Caption = 'Duplicate'
Hint = 'Duplicates the selected triangle.'
OnClick = mnuDupClick
end
object MenuItem2: TMenuItem
Caption = '-'
end
object mnuAdd: TMenuItem
Caption = 'Add'
Hint = 'Adds a new triangle.'
OnClick = mnuAddClick
end
object N4: TMenuItem
Caption = '-'
end
object mnuFlipVertical: TMenuItem
Caption = 'Flip Vertical'
OnClick = mnuFlipVerticalClick
end
object mnuFlipHorizontal: TMenuItem
Caption = 'Flip Horizontal'
OnClick = mnuFlipHorizontalClick
end
object N5: TMenuItem
Caption = '-'
end
object mnuVerticalFlipAll: TMenuItem
Caption = 'Flip All Vertical '
OnClick = mnuVerticalFlipAllClick
end
object mnuHorizintalFlipAll: TMenuItem
Caption = 'Flip All Horizontal'
OnClick = mnuHorizintalFlipAllClick
end
object MenuItem1: TMenuItem
Caption = '-'
end
object mnuLockSel: TMenuItem
Caption = 'Lock'
OnClick = mnuLockClick
end
object N6: TMenuItem
Caption = '-'
end
object mnuUndo: TMenuItem
Caption = 'Undo'
Enabled = False
ImageIndex = 4
ShortCut = 16474
OnClick = mnuUndoClick
end
object mnuRedo: TMenuItem
Caption = 'Redo'
Enabled = False
ImageIndex = 5
ShortCut = 16473
OnClick = mnuRedoClick
end
end
object QualityPopup: TPopupMenu
Images = MainForm.Buttons
Left = 344
Top = 8
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 mnuResetLocation: TMenuItem
Caption = 'Reset Location'
Checked = True
OnClick = mnuResetLocationClick
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,344 +0,0 @@
object ExportDialog: TExportDialog
Left = 313
Top = 276
BorderStyle = bsDialog
Caption = 'Export Flame'
ClientHeight = 270
ClientWidth = 424
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object btnOK: TButton
Left = 336
Top = 178
Width = 75
Height = 25
Caption = '&OK'
Default = True
ModalResult = 1
TabOrder = 0
OnClick = btnOKClick
end
object btnCancel: TButton
Left = 336
Top = 210
Width = 75
Height = 25
Caption = 'Cancel'
ModalResult = 2
TabOrder = 1
end
object GroupBox1: TGroupBox
Left = 8
Top = 5
Width = 408
Height = 57
Caption = 'Destination'
TabOrder = 2
object btnBrowse: TSpeedButton
Left = 368
Top = 16
Width = 24
Height = 24
Hint = 'Browse...'
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FF00000000000000000000000000000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FF000000000000
9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00
FFFF00FFFF00FFFF00FF0000009FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FFFF00FFFF00FF0000009FFFFF
9FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCF
FF000000FF00FFFF00FF0000009FFFFF9FFFFF9FFFFF0000009FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF0000000000000000000000000000000000000000000000
00000000000000FF00FF0000009FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9F
FFFF9FFFFF9FFFFF000000FF00FFFF00FFFF00FFFF00FFFF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF000000FF00FFFF00
FFFF00FFFF00FFFF00FF0000009FFFFF9FFFFF9FFFFF00000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000
000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000
00000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000000000FF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0C0C0CFF00FFFF00FFFF00FF0000
00FF00FF000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FF0B0B0B020202000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnBrowseClick
end
object Label10: TLabel
Left = 10
Top = 23
Width = 48
Height = 13
Caption = 'File name:'
end
object txtFilename: TEdit
Left = 72
Top = 20
Width = 281
Height = 21
TabOrder = 0
Text = 'txtFilename'
end
end
object GroupBox3: TGroupBox
Left = 216
Top = 66
Width = 200
Height = 105
Caption = 'Rendering'
TabOrder = 3
object Label3: TLabel
Left = 10
Top = 71
Width = 59
Height = 13
Caption = 'Oversample:'
end
object Label5: TLabel
Left = 10
Top = 47
Width = 61
Height = 13
Caption = 'Filter Radius:'
end
object Label4: TLabel
Left = 10
Top = 23
Width = 35
Height = 13
Caption = 'Quality:'
end
object txtOversample: TEdit
Left = 112
Top = 68
Width = 57
Height = 21
ReadOnly = True
TabOrder = 2
Text = '2'
OnChange = txtOversampleChange
end
object txtFilterRadius: TEdit
Left = 112
Top = 44
Width = 57
Height = 21
TabOrder = 1
OnChange = txtFilterRadiusChange
end
object txtDensity: TEdit
Left = 112
Top = 20
Width = 57
Height = 21
TabOrder = 0
OnChange = txtDensityChange
end
object udOversample: TUpDown
Left = 169
Top = 68
Width = 12
Height = 21
Associate = txtOversample
Min = 1
Max = 4
Position = 2
TabOrder = 3
Wrap = False
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 66
Width = 200
Height = 105
Caption = 'Size'
TabOrder = 4
object Label1: TLabel
Left = 10
Top = 23
Width = 28
Height = 13
Caption = 'Width'
end
object Label2: TLabel
Left = 10
Top = 47
Width = 34
Height = 13
Caption = 'Height:'
end
object chkMaintain: TCheckBox
Left = 8
Top = 76
Width = 161
Height = 17
Caption = 'Maintain aspect ratio'
Checked = True
State = cbChecked
TabOrder = 0
OnClick = chkMaintainClick
end
object cbWidth: TComboBox
Left = 112
Top = 20
Width = 73
Height = 21
ItemHeight = 13
TabOrder = 1
OnChange = txtWidthChange
Items.Strings = (
'320'
'640'
'800'
'1024'
'1280'
'1600'
'2048')
end
object cbHeight: TComboBox
Left = 112
Top = 44
Width = 73
Height = 21
ItemHeight = 13
TabOrder = 2
OnChange = txtHeightChange
Items.Strings = (
'200'
'240'
'480'
'600'
'768'
'1024'
'1200'
'2048')
end
end
object GroupBox4: TGroupBox
Left = 8
Top = 176
Width = 313
Height = 89
Caption = 'Hqi'
TabOrder = 5
object Label6: TLabel
Left = 10
Top = 23
Width = 42
Height = 13
Caption = 'Batches:'
end
object Label7: TLabel
Left = 152
Top = 23
Width = 61
Height = 13
Caption = 'Buffer depth:'
end
object Label8: TLabel
Left = 10
Top = 55
Width = 29
Height = 13
Caption = 'Strips:'
end
object txtBatches: TEdit
Left = 64
Top = 20
Width = 57
Height = 21
TabOrder = 0
Text = '1'
OnChange = txtBatchesChange
end
object udBatches: TUpDown
Left = 121
Top = 20
Width = 12
Height = 21
Associate = txtBatches
Min = 1
Max = 10000
Position = 1
TabOrder = 1
Wrap = False
end
object cmbDepth: TComboBox
Left = 224
Top = 20
Width = 73
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 2
OnChange = cmbDepthChange
Items.Strings = (
'16 bits'
'32 bits'
'64 bits')
end
object chkRender: TCheckBox
Left = 224
Top = 54
Width = 65
Height = 17
Caption = 'Render'
Checked = True
State = cbChecked
TabOrder = 3
end
object txtStrips: TEdit
Left = 64
Top = 52
Width = 57
Height = 21
TabOrder = 4
Text = '1'
OnChange = txtBatchesChange
end
object udStrips: TUpDown
Left = 121
Top = 52
Width = 12
Height = 21
Associate = txtStrips
Min = 1
Max = 512
Position = 1
TabOrder = 5
Wrap = False
end
end
object SaveDialog: TSaveDialog
DefaultExt = 'jpg'
Filter =
'JPEG Image (*.jpg)|*.jpg|PPM Image (*.ppm)|*.ppm|PNG Images (*.p' +
'ng)|*.png'
Left = 392
Top = 24
end
end

View File

@ -1,216 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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;
type
TExportDialog = class(TForm)
btnOK: TButton;
btnCancel: TButton;
GroupBox1: TGroupBox;
btnBrowse: TSpeedButton;
Label10: TLabel;
txtFilename: TEdit;
SaveDialog: TSaveDialog;
GroupBox3: TGroupBox;
Label3: TLabel;
Label5: TLabel;
Label4: TLabel;
txtOversample: TEdit;
txtFilterRadius: TEdit;
txtDensity: TEdit;
udOversample: TUpDown;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
chkMaintain: TCheckBox;
cbWidth: TComboBox;
cbHeight: TComboBox;
GroupBox4: TGroupBox;
Label6: TLabel;
txtBatches: TEdit;
udBatches: TUpDown;
Label7: TLabel;
cmbDepth: TComboBox;
chkRender: TCheckBox;
Label8: TLabel;
txtStrips: TEdit;
udStrips: TUpDown;
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);
private
{ Private declarations }
public
Filename: string;
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
Sample_Density, Filter_Radius: double;
{ Public declarations }
end;
var
ExportDialog: TExportDialog;
Ratio: double;
implementation
uses Global, Main;
{$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 := 'JPEG image (*.jpg) |*.jpg|PPM image (*.ppm)|*.ppm|PNG Image (*.png)|*.png';
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;
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;
end.

View File

@ -1,104 +0,0 @@
object FavoritesForm: TFavoritesForm
Left = 457
Top = 267
BorderStyle = bsDialog
Caption = 'Favorite Scripts'
ClientHeight = 237
ClientWidth = 303
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
PixelsPerInch = 96
TextHeight = 13
object PageControl1: TPageControl
Left = 8
Top = 8
Width = 289
Height = 193
TabOrder = 0
end
object ListView: TListView
Left = 16
Top = 16
Width = 193
Height = 177
Columns = <
item
Caption = 'Name'
Width = 189
end>
HideSelection = False
ReadOnly = True
RowSelect = True
ShowColumnHeaders = False
TabOrder = 1
ViewStyle = vsReport
OnChange = ListViewChange
end
object btnAdd: TButton
Left = 216
Top = 16
Width = 75
Height = 25
Caption = '&Add'
TabOrder = 2
TabStop = False
OnClick = btnAddClick
end
object btnRemove: TButton
Left = 216
Top = 48
Width = 75
Height = 25
Caption = '&Remove'
TabOrder = 3
TabStop = False
OnClick = btnRemoveClick
end
object btnMoveUp: TButton
Left = 216
Top = 80
Width = 75
Height = 25
Caption = 'Move &Up'
TabOrder = 4
TabStop = False
OnClick = btnMoveUpClick
end
object btnMoveDown: TButton
Left = 216
Top = 112
Width = 75
Height = 25
Caption = 'Move &Down'
TabOrder = 5
TabStop = False
OnClick = btnMoveDownClick
end
object btnOK: TButton
Left = 144
Top = 208
Width = 75
Height = 25
Caption = '&OK'
TabOrder = 6
OnClick = btnOKClick
end
object btnCancel: TButton
Left = 224
Top = 208
Width = 75
Height = 25
Caption = '&Cancel'
TabOrder = 7
OnClick = btnCancelClick
end
end

View File

@ -1,206 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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;
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) - 4);
Listitem.Caption := s;
end;
if Favorites.Count <> 0 then ListView.Selected := ListView.Items[0];
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 + 'favorites');
end;
procedure TFavoritesForm.FormCreate(Sender: TObject);
begin
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;
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) - 4);
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.

View File

@ -1,431 +0,0 @@
object RenderForm: TRenderForm
Left = 280
Top = 279
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'RenderForm'
ClientHeight = 400
ClientWidth = 424
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000000000000680300001600000028000000100000002000
0000010018000000000040030000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000005F97013B5500000000000000
0000000000000000000000000000000000000000000000005F97013B55000000
000000005F97181818000000000000005F971818180000000000000000000000
00000000000000005F97013B55005F97005F97005F971818181A0155005F9700
5F97181818000000000000000000000000000000005F97E4F2FB0088D9005F97
1A015537BBFD0088D91A0155005F970088D90088D91818180000000000000000
00000000005F97005F97E4F2FB0088D985E8FF85E8FF85E8FF37BBFD0088D9E4
F2FB181818005F97000000000000000000000000005F97013B55005F9785E8FF
37BBFD005F97005F9737BBFD85E8FF0088D9005F97005F970000000000000000
00000000013B5585E8FF85E8FF85E8FF005F9737BBFD0088D9005F9785E8FF85
E8FFE4F2FB005F97000000000000000000000000000000005F970088D9005F97
005F9785E8FF0088D9005F97005F970088D9005F970000000000000000000000
00000000000000005F97E8E8E80088D9005F9785E8FF0088D9005F970088D9E4
F2FB005F970000000000000000000000000000000000000088D9005F97000000
005F9785E8FF0088D9005F970000000088D90088D90000000000000000000000
00000000000000000000000000000000005F97E4F2FBE4F2FB005F9700000000
0000000000000000000000000000000000000000000000000000000000000000
000000005F97005F970000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000FFFF0000FE7F0000E6670000E0070000C0030000C0030000C0030000C003
0000E0070000E0070000E4270000FC3F0000FE7F0000FFFF0000FFFF0000}
OldCreateOrder = False
OnClose = FormClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object ProgressBar: TProgressBar
Left = 8
Top = 330
Width = 409
Height = 13
Min = 0
Max = 100
TabOrder = 0
end
object btnRender: TButton
Left = 256
Top = 352
Width = 75
Height = 23
Caption = 'Render'
Default = True
TabOrder = 5
OnClick = btnRenderClick
end
object btnCancel: TButton
Left = 344
Top = 350
Width = 75
Height = 25
Caption = 'Close'
TabOrder = 6
OnClick = btnCancelClick
end
object GroupBox1: TGroupBox
Left = 8
Top = 69
Width = 408
Height = 57
Caption = 'Destination'
TabOrder = 1
object btnBrowse: TSpeedButton
Left = 368
Top = 16
Width = 24
Height = 24
Hint = 'Browse...'
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FF00000000000000000000000000000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FF000000000000
9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00
FFFF00FFFF00FFFF00FF0000009FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FFFF00FFFF00FF0000009FFFFF
9FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCF
FF000000FF00FFFF00FF0000009FFFFF9FFFFF9FFFFF0000009FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF0000000000000000000000000000000000000000000000
00000000000000FF00FF0000009FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9F
FFFF9FFFFF9FFFFF000000FF00FFFF00FFFF00FFFF00FFFF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF000000FF00FFFF00
FFFF00FFFF00FFFF00FF0000009FFFFF9FFFFF9FFFFF00000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000
000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000
00000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000000000FF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0C0C0CFF00FFFF00FFFF00FF0000
00FF00FF000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FF0B0B0B020202000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnBrowseClick
end
object Label10: TLabel
Left = 10
Top = 23
Width = 48
Height = 13
Caption = 'File name:'
end
object txtFilename: TEdit
Left = 72
Top = 20
Width = 281
Height = 21
TabOrder = 0
Text = 'txtFilename'
OnChange = txtFilenameChange
end
end
object GroupBox2: TGroupBox
Left = 8
Top = 130
Width = 200
Height = 105
Caption = 'Size'
TabOrder = 2
object Label1: TLabel
Left = 10
Top = 23
Width = 28
Height = 13
Caption = 'Width'
end
object Label2: TLabel
Left = 10
Top = 47
Width = 34
Height = 13
Caption = 'Height:'
end
object chkMaintain: TCheckBox
Left = 8
Top = 76
Width = 161
Height = 17
Caption = 'Maintain aspect ratio'
Checked = True
State = cbChecked
TabOrder = 0
OnClick = chkMaintainClick
end
object cbWidth: TComboBox
Left = 112
Top = 20
Width = 73
Height = 21
Enabled = False
ItemHeight = 13
TabOrder = 1
OnChange = txtWidthChange
Items.Strings = (
'320'
'640'
'800'
'1024'
'1280'
'1600'
'2048')
end
object cbHeight: TComboBox
Left = 112
Top = 44
Width = 73
Height = 21
Enabled = False
ItemHeight = 13
TabOrder = 2
OnChange = txtHeightChange
Items.Strings = (
'200'
'240'
'480'
'600'
'768'
'1024'
'1200'
'2048')
end
end
object GroupBox3: TGroupBox
Left = 216
Top = 130
Width = 200
Height = 105
Caption = 'Rendering'
TabOrder = 3
object Label3: TLabel
Left = 10
Top = 71
Width = 59
Height = 13
Caption = 'Oversample:'
end
object Label5: TLabel
Left = 10
Top = 47
Width = 61
Height = 13
Caption = 'Filter Radius:'
end
object Label4: TLabel
Left = 10
Top = 23
Width = 35
Height = 13
Caption = 'Quality:'
end
object txtOversample: TEdit
Left = 112
Top = 68
Width = 57
Height = 21
Enabled = False
ReadOnly = True
TabOrder = 2
Text = '2'
OnChange = txtOversampleChange
end
object txtFilterRadius: TEdit
Left = 112
Top = 44
Width = 57
Height = 21
TabOrder = 1
OnChange = txtFilterRadiusChange
end
object txtDensity: TEdit
Left = 112
Top = 20
Width = 57
Height = 21
TabOrder = 0
OnChange = txtDensityChange
end
object udOversample: TUpDown
Left = 169
Top = 68
Width = 12
Height = 21
Associate = txtOversample
Min = 1
Max = 4
Position = 2
TabOrder = 3
Wrap = False
end
end
object GroupBox4: TGroupBox
Left = 8
Top = 238
Width = 409
Height = 81
Caption = 'Memory usage'
TabOrder = 4
object lblApproxMem: TLabel
Left = 202
Top = 46
Width = 119
Height = 13
Caption = 'Approx. memory required:'
end
object lblPhysical: TLabel
Left = 202
Top = 20
Width = 121
Height = 13
Caption = 'Available phycial memory:'
end
object Label9: TLabel
Left = 8
Top = 46
Width = 86
Height = 13
Caption = 'Maximum memory:'
end
object cbMaxMemory: TComboBox
Left = 112
Top = 44
Width = 57
Height = 21
Enabled = False
ItemHeight = 13
TabOrder = 1
Items.Strings = (
'32'
'64'
'128'
'256'
'512')
end
object chkLimitMem: TCheckBox
Left = 8
Top = 20
Width = 145
Height = 17
Caption = 'Limit memory usage'
TabOrder = 0
OnClick = chkLimitMemClick
end
end
object btnPause: TButton
Left = 168
Top = 350
Width = 75
Height = 25
Caption = 'Pause'
TabOrder = 7
OnClick = btnPauseClick
end
object chkSave: TCheckBox
Left = 8
Top = 354
Width = 113
Height = 17
Caption = 'Save parameters'
Checked = True
State = cbChecked
TabOrder = 8
end
object GroupBox5: TGroupBox
Left = 8
Top = 8
Width = 408
Height = 57
Caption = 'Preset'
TabOrder = 9
object btnSavePreset: TSpeedButton
Left = 344
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 = 368
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 = 327
Height = 21
Style = csDropDownList
ItemHeight = 13
TabOrder = 0
OnChange = cmbPresetChange
end
end
object StatusBar: TStatusBar
Left = 0
Top = 381
Width = 424
Height = 19
Panels = <
item
Width = 161
end
item
Width = 150
end
item
Width = 50
end>
SimplePanel = False
end
object SaveDialog: TSaveDialog
Left = 368
Top = 256
end
end

View File

@ -1,675 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 FormRender;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ControlPoint, RenderThread, ComCtrls, Math, Buttons, Registry, cmap,
ImageDLLLoader, ICOLoader, PNGLOader, HIPSLoader, BMPLoader, PCXLoader, WMFLoader,
LinarBitmap, ExtCtrls, FileUtils, JPEGLoader, JPEG;
const
WM_THREAD_COMPLETE = WM_APP + 5437;
WM_THREAD_TERMINATE = WM_APP + 5438;
type
TRenderForm = class(TForm)
ProgressBar: TProgressBar;
btnRender: TButton;
btnCancel: TButton;
GroupBox1: TGroupBox;
btnBrowse: TSpeedButton;
Label10: TLabel;
txtFilename: TEdit;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
GroupBox3: TGroupBox;
Label3: TLabel;
Label5: TLabel;
Label4: TLabel;
txtOversample: TEdit;
txtFilterRadius: TEdit;
txtDensity: TEdit;
GroupBox4: TGroupBox;
lblApproxMem: TLabel;
lblPhysical: TLabel;
Label9: TLabel;
cbMaxMemory: TComboBox;
chkLimitMem: TCheckBox;
SaveDialog: TSaveDialog;
btnPause: TButton;
chkSave: TCheckBox;
GroupBox5: TGroupBox;
btnSavePreset: TSpeedButton;
cmbPreset: TComboBox;
btnDeletePreset: TSpeedButton;
udOversample: TUpDown;
chkMaintain: TCheckBox;
cbWidth: TComboBox;
cbHeight: TComboBox;
StatusBar: TStatusBar;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure btnRenderClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure txtWidthChange(Sender: TObject);
procedure txtHeightChange(Sender: TObject);
procedure txtOversampleChange(Sender: TObject);
procedure chkLimitMemClick(Sender: TObject);
procedure txtFilenameChange(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure txtDensityChange(Sender: TObject);
procedure txtFilterRadiusChange(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure btnPauseClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure btnSavePresetClick(Sender: TObject);
procedure btnBrowseClick(Sender: TObject);
procedure btnDeletePresetClick(Sender: TObject);
procedure cmbPresetChange(Sender: TObject);
procedure chkMaintainClick(Sender: TObject);
private
StartTime: TDateTime;
Remainder: TDateTime;
procedure HandleThreadCompletion(var Message: TMessage);
message WM_THREAD_COMPLETE;
procedure HandleThreadTermination(var Message: TMessage);
message WM_THREAD_TERMINATE;
procedure ListPresets;
public
Renderer: TRenderThread;
PhysicalMemory, ApproxMemory: int64;
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 ShowMemoryStatus;
procedure ResetControls;
end;
var
RenderForm: TRenderForm;
Ratio: double;
implementation
uses Main, Global, SavePreset, FileCtrl;
{$R *.DFM}
procedure TRenderForm.ResetControls;
begin
txtFilename.Enabled := true;
btnBrowse.Enabled := true;
cbWidth.Enabled := true;
cbHeight.Enabled := true;
txtDensity.Enabled := true;
txtFilterRadius.enabled := true;
txtOversample.Enabled := true;
chkLimitMem.Enabled := true;
cbMaxMemory.enabled := chkLimitMem.Checked;
btnRender.Enabled := true;
cmbPreset.enabled := true;
chkSave.enabled := true;
btnSavePreset.enabled := true;
btnDeletePreset.enabled := true;
btnCancel.Caption := 'Close';
btnPause.enabled := false;
ProgressBar.Position := 0;
ShowMemoryStatus;
end;
procedure TRenderForm.ShowMemoryStatus;
var
GlobalMemoryInfo: TMemoryStatus; // holds the global memory status information
begin
GlobalMemoryInfo.dwLength := SizeOf(GlobalMemoryInfo);
GlobalMemoryStatus(GlobalMemoryInfo);
PhysicalMemory := GlobalMemoryInfo.dwAvailPhys div 1048576;
ApproxMemory := 32 * Oversample * Oversample;
ApproxMemory := ApproxMemory * ImageHeight * ImageWidth;
ApproxMemory := ApproxMemory div 1048576;
// ApproxMemory := (32 * Oversample * Oversample * ImageHeight * ImageWidth) div 1048576; // or 1000000?
lblPhysical.Caption := 'Physical memory available: ' + Format('%d', [PhysicalMemory]) + ' MB';
lblApproxMem.Caption := 'Approximate memory required: ' + Format('%d', [ApproxMemory]) + ' MB';
if ApproxMemory > PhysicalMemory then
; // show warning icon.
end;
procedure TRenderForm.HandleThreadCompletion(var Message: TMessage);
begin
with TLinearBitmap.Create do
try
Assign(Renderer.GetImage);
JPEGLoader.Default.Quality := JPEGQuality;
SaveToFile(RenderForm.FileName);
Renderer.Free;
Renderer := nil;
ResetControls;
finally
Free;
end;
end;
procedure TRenderForm.HandleThreadTermination(var Message: TMessage);
begin
if Assigned(Renderer) then
begin
Renderer.Free;
Renderer := nil;
ResetControls;
end;
end;
procedure TRenderForm.OnProgress(prog: double);
var
Elapsed: TDateTime;
e, r: string;
begin
prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
if ShowProgress then ProgressBar.Position := round(100 * prog);
Elapsed := Now - StartTime;
e := Format('Elapsed %2.2d:%2.2d:%2.2d.%2.2d',
[Trunc(Elapsed * 24),
Trunc((Elapsed * 24 - Trunc(Elapsed * 24)) * 60),
Trunc((Elapsed * 24 * 60 - Trunc(Elapsed * 24 * 60)) * 60),
Trunc((Elapsed * 24 * 60 * 60 - Trunc(Elapsed * 24 * 60 * 60)) * 100)]);
if prog > 0 then
Remainder := Min(Remainder, Elapsed * (power(1 / prog, 1.2) - 1));
r := Format('Remaining %2.2d:%2.2d:%2.2d.%2.2d',
[Trunc(Remainder * 24),
Trunc((Remainder * 24 - Trunc(Remainder * 24)) * 60),
Trunc((Remainder * 24 * 60 - Trunc(Remainder * 24 * 60)) * 60),
Trunc((Remainder * 24 * 60 * 60 - Trunc(Remainder * 24 * 60 * 60)) * 100)]);
StatusBar.Panels[0].text := e;
StatusBar.Panels[1].text := r;
StatusBar.Panels[2].text := 'Slice ' + IntToStr(Renderer.Slice + 1) + ' of ' + IntToStr(Renderer.nrSlices);
end;
procedure TRenderForm.FormCreate(Sender: TObject);
begin
cp := TControlPoint.Create;
ImageDLLLoader.Default.FindDLLs(ProgramPath);
cbMaxMemory.ItemIndex := 1;
MainForm.Buttons.GetBitmap(2, btnSavePreset.Glyph);
MainForm.Buttons.GetBitmap(9, btnDeletePreset.Glyph);
ListPresets;
end;
procedure TRenderForm.FormDestroy(Sender: TObject);
begin
if assigned(Renderer) then Renderer.Terminate;
if assigned(Renderer) then Renderer.WaitFor;
if assigned(Renderer) then Renderer.Free;
cp.free;
end;
procedure TRenderForm.btnRenderClick(Sender: TObject);
var
t: string;
begin
ImageWidth := StrToInt(cbWidth.text);
ImageHeight := StrToInt(cbHeight.text);
if (not chkLimitMem.checked) and (ApproxMemory > PhysicalMemory) then
begin
Application.MessageBox('You do not have enough memory for this render. Please use memory limiting.', 'Apophysis', 48);
exit;
end;
if chkLimitMem.checked and (PhysicalMemory < StrToInt(cbMaxMemory.text)) and (Approxmemory > PhysicalMemory) then begin
Application.MessageBox('You do not have enough memory for this render. Please use a lower Maximum memory setting.', 'Apophysis', 48);
exit;
end;
t := txtFilename.Text;
if t = '' then
begin
Application.MessageBox(PChar('Please enter a file name.'), 'Apophysis', 48);
Exit;
end;
if FileExists(t) then
if Application.MessageBox(PChar(t + ' already exists.' + chr(13) + 'Do you want to replace it?'),
'Apophysis', 52) = ID_NO then exit;
if not DirectoryExists(ExtractFileDir(t)) then
begin
Application.MessageBox('The directory does not exist.', 'Apophyis', 16);
exit;
end;
{Check for invalid values }
if sample_density <= 0 then
begin
Application.MessageBox('Invalid Sample Density value', 'Apophysis', 16);
exit;
end;
if filter_radius <= 0 then
begin
Application.MessageBox('Invalid Filter Radius value', 'Apophysis', 16);
exit;
end;
if Oversample < 1 then
begin
Application.MessageBox('Invalid Oversmple value', 'Apophysis', 16);
exit;
end;
if ImageWidth < 1 then
begin
Application.MessageBox('Invalid image width', 'Apophysis', 16);
exit;
end;
if ImageHeight < 1 then
begin
Application.MessageBox('Invalid image height', 'Apophysis', 16);
exit;
end;
txtFilename.Enabled := false;
btnBrowse.Enabled := false;
cbWidth.Enabled := False;
cbHeight.Enabled := false;
txtDensity.Enabled := false;
txtFilterRadius.enabled := false;
txtOversample.Enabled := false;
chkLimitMem.Enabled := false;
cbMaxMemory.Enabled := false;
cmbPreset.enabled := false;
chkSave.enabled := false;
btnSavePreset.enabled := false;
btnDeletePreset.enabled := false;
btnRender.Enabled := false;
btnPause.enabled := true;
btnCancel.Caption := 'Stop';
StartTime := Now;
Remainder := 365;
if Assigned(Renderer) then Renderer.Terminate;
if Assigned(Renderer) then Renderer.WaitFor;
if not Assigned(Renderer) then
begin
cp.sample_density := Sample_density;
cp.spatial_oversample := Oversample;
cp.spatial_filter_radius := Filter_Radius;
AdjustScale(cp, ImageWidth, ImageHeight);
renderPath := ExtractFilePath(Filename);
if chkSave.checked then
MainForm.SaveXMLFlame(cp, ExtractFileName(FileName), renderPath + 'renders.flame');
Renderer := TRenderThread.Create;
if chkLimitMem.checked then
(*
if cbMaxMemory.ItemIndex = 0 then Renderer.MaxMem := 32
else if cbMaxMemory.ItemIndex = 1 then Renderer.MaxMem := 64
else if cbMaxMemory.ItemIndex = 2 then Renderer.MaxMem := 128
else if cbMaxMemory.ItemIndex = 3 then Renderer.MaxMem := 256
else if cbMaxMemory.ItemIndex = 4 then Renderer.MaxMem := 512;
*)
Renderer.MaxMem := StrToInt(cbMaxMemory.text);
Renderer.OnProgress := OnProgress;
Renderer.TargetHandle := RenderForm.Handle;
Renderer.Compatibility := compatibility;
Renderer.SetCP(cp);
Renderer.Priority := tpLower;
Renderer.Resume;
end;
end;
procedure TRenderForm.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\Render', False) then
begin
if Registry.ValueExists('Left') then
RenderForm.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
RenderForm.Top := Registry.ReadInteger('Top');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
SaveDialog.FileName := Filename;
case renderFileFormat of
1: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.bmp');
2: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.png');
3: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.jpg');
end;
txtOversample.Text := IntToStr(renderOversample);
txtFilterRadius.Text := FloatToStr(renderFilterRadius);
cbWidth.Text := IntToStr(MainForm.Image.Width);
cbHeight.Text := IntToStr(MainForm.Image.Height);
ImageWidth := StrToInt(cbWidth.Text);
ImageHeight := StrToInt(cbHeight.Text);
txtDensity.Text := FloatToStr(renderDensity);
ShowMemoryStatus;
Ratio := ImageWidth / ImageHeight;
end;
procedure TRenderForm.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;
ShowMemoryStatus;
end;
procedure TRenderForm.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;
ShowMemoryStatus;
end;
procedure TRenderForm.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;
ShowMemoryStatus;
end;
procedure TRenderForm.chkLimitMemClick(Sender: TObject);
begin
cbMaxMemory.enabled := chkLimitMem.Checked;
end;
procedure TRenderForm.txtFilenameChange(Sender: TObject);
begin
filename := txtFilename.text;
end;
procedure TRenderForm.btnCancelClick(Sender: TObject);
begin
if Assigned(Renderer) then
Renderer.Terminate
else
close;
end;
procedure TRenderForm.txtDensityChange(Sender: TObject);
begin
try
Sample_Density := StrToFloat(txtDensity.Text);
except
end;
end;
procedure TRenderForm.txtFilterRadiusChange(Sender: TObject);
begin
try
Filter_Radius := StrToFloat(txtFilterRadius.Text);
except
end;
end;
procedure TRenderForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
Ext: string;
Registry: TRegistry;
begin
Ext := ExtractFileExt(txtFileName.Text);
if Ext = '.bmp' then renderFileFormat := 1;
if Ext = '.png' then renderFileFormat := 2;
if (Ext = '.jpg') or (Ext = '.jpeg') then renderFileFormat := 3;
renderFilterRadius := Filter_Radius;
renderWidth := ImageWidth;
renderHeight := ImageHeight;
renderDensity := Sample_density;
renderOversample := Oversample;
{ Write position to registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Render', True) then
begin
Registry.WriteInteger('Top', RenderForm.Top);
Registry.WriteInteger('Left', RenderForm.Left);
end;
finally
Registry.Free;
end;
end;
procedure TRenderForm.btnPauseClick(Sender: TObject);
begin
if Assigned(Renderer) then
if Renderer.Suspended = false then
begin
renderer.suspend;
btnPause.caption := 'Resume';
end
else
begin
renderer.resume;
btnPause.caption := 'Pause';
end;
end;
procedure TRenderForm.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
if Assigned(Renderer) then
if Application.MessageBox('Do you want to abort the current render?', 'Apophysis', 36) = ID_NO then
CanClose := False
else
begin
if Assigned(Renderer) then Renderer.Terminate;
end;
end;
procedure TRenderForm.btnSavePresetClick(Sender: TObject);
var
IFile: TextFile;
Title, Filename: string;
begin
SavePresetForm.txtPresetName.Text := cmbPreset.Text;
if SavePresetForm.ShowModal = mrOK then
begin
Title := Trim(SavePresetForm.txtPresetName.Text);
Filename := AppPath + 'render presets';
try
AssignFile(IFile, FileName);
if FileExists(FileName) then
begin
if EntryExists(Title, FileName) then DeleteEntry(Title, FileName);
Append(IFile);
end
else
ReWrite(IFile);
WriteLn(IFile, Title + ' {');
WriteLn(IFile, Trim(cbWidth.text));
WriteLn(IFile, Trim(cbHeight.text));
WriteLn(IFile, Trim(txtDensity.text));
WriteLn(IFile, Trim(txtFilterRadius.text));
WriteLn(IFile, Trim(txtOversample.text));
WriteLn(IFile, ExtractFileExt(txtFileName.Text));
if chkLimitMem.Checked then
WriteLn(IFile, 'true')
else
WriteLn(IFile, 'false');
WriteLn(IFile, IntToStr(cbMaxMemory.ItemIndex));
WriteLn(IFile, cbMaxMemory.Text);
WriteLn(IFile, '}');
WriteLn(IFile, '');
CloseFile(IFile);
except on EInOutError do
begin
Application.MessageBox('Cannot save preset.', 'Apophysis', 16);
Exit;
end;
end;
ListPresets;
cmbPreset.ItemIndex := cmbPreset.Items.count - 1;
end;
end;
procedure TRenderForm.btnBrowseClick(Sender: TObject);
begin
SaveDialog.Filename := Filename;
case renderFileFormat of
1: SaveDialog.DefaultExt := 'bmp';
2: SaveDialog.DefaultExt := 'png';
3: SaveDialog.DefaultExt := 'jpg';
end;
SaveDialog.filterIndex := renderFileFormat;
SaveDialog.Filter := 'Bitmap image (*.bmp) | *.bmp|PNG Image (*.png)|*.png|JPEG image (*.jpg;*.jpeg)|*.jpg;*.jpeg';
if SaveDialog.Execute then
begin
case SaveDialog.FilterIndex of
1: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.bmp');
2: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.png');
3: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.jpg');
end;
renderFileFormat := SaveDialog.FilterIndex;
renderPath := ExtractFilePath(SaveDialog.Filename);
end;
end;
procedure TRenderForm.ListPresets;
{ List identifiers in file }
var
i, p: integer;
Title: string;
FStrings: TStringList;
begin
FStrings := TStringList.Create;
if fileExists(AppPath + 'render presets') then
try
FStrings.LoadFromFile(AppPath + 'render presets');
cmbPreset.Clear;
if (Pos('{', FStrings.Text) <> 0) then
begin
for i := 0 to FStrings.Count - 1 do
begin
p := Pos('{', FStrings[i]);
if (p <> 0) then
begin
Title := Trim(Copy(FStrings[i], 1, p - 1));
if Title <> '' then
begin
cmbPreset.Items.add(Copy(FStrings[i], 1, p - 1));
end;
end;
end;
end;
finally
FStrings.Free;
end;
end;
procedure TRenderForm.btnDeletePresetClick(Sender: TObject);
var
Title, Filename: string;
begin
Title := Trim(cmbPreset.Text);
if Title = '' then exit;
Filename := AppPath + 'render presets';
if EntryExists(Title, FileName) then DeleteEntry(Title, FileName);
ListPresets;
end;
procedure TRenderForm.cmbPresetChange(Sender: TObject);
var
chk: boolean;
i, j: integer;
FStrings: TStringList;
Title, Filename: string;
begin
Title := Trim(cmbPreset.Text);
Filename := AppPath + 'render presets';
if Title = '' then exit;
if EntryExists(Title, FileName) then
begin
// Load preset
FStrings := TStringList.Create;
try
FStrings.LoadFromFile(Filename);
for i := 0 to FStrings.Count - 1 do
if Pos(LowerCase(Title) + ' {', Lowercase(FStrings[i])) <> 0 then
begin
chk := chkMaintain.checked;
chkMaintain.Checked := False;
j := i + 1;
cbWidth.Text := FStrings[j];
inc(j);
cbHeight.text := FStrings[j];
chkMaintain.Checked := chk;
inc(j);
txtDensity.text := FStrings[j];
inc(j);
txtFilterRadius.text := FStrings[j];
inc(j);
txtOversample.text := FStrings[j];
inc(j);
txtFileName.Text := ChangeFileExt(txtFileName.Text, FStrings[j]);
inc(j);
if Fstrings[j] = 'true' then chkLimitMem.checked := true else chkLimitMem.checked := false;
inc(j);
cbMaxMemory.ItemIndex := StrToInt(Fstrings[j]);
cbMaxMemory.enabled := chkLimitMem.checked;
inc(j);
cbMaxMemory.Text := Fstrings[j];
break;
end;
finally
FStrings.Free;
end
end;
ImageWidth := StrToInt(cbWidth.Text);
ImageHeight := StrToInt(cbHeight.Text);
ShowMemoryStatus;
end;
procedure TRenderForm.chkMaintainClick(Sender: TObject);
begin
Ratio := ImageWidth / ImageHeight;
end;
end.

View File

@ -1,30 +0,0 @@
object FullscreenForm: TFullscreenForm
Left = 438
Top = 324
BorderStyle = bsNone
Caption = 'FullscreenForm'
ClientHeight = 133
ClientWidth = 188
Color = clBlack
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
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Image: TImage
Left = 0
Top = 0
Width = 188
Height = 133
Align = alClient
OnDblClick = ImageDblClick
end
end

View File

@ -1,180 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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, ControlPoint, RenderThread, ExtCtrls;
type
TFullscreenForm = class(TForm)
Image: TImage;
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);
private
Remainder, StartTime, Now: Extended;
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;
end;
var
FullscreenForm: TFullscreenForm;
implementation
uses Main, Math, Global;
{$R *.DFM}
procedure TFullscreenForm.DrawFlame;
begin
AdjustScale(cp, Image.Width, Image.Height);
// cp.Zoom := MainForm.Zoom;
// cp.center[0] := MainForm.center[0];
// cp.center[1] := MainForm.center[1];
cp.sample_density := defSampleDensity;
StartTime := Now;
Remainder := 1;
if Assigned(Renderer) then Renderer.Terminate;
if Assigned(Renderer) then Renderer.WaitFor;
if not Assigned(Renderer) then
begin
Renderer := TRenderThread.Create;
Renderer.TargetHandle := Handle;
Renderer.OnProgress := OnProgress;
Renderer.Compatibility := Compatibility;
Renderer.SetCP(cp);
Renderer.Resume;
end;
end;
procedure TFullscreenForm.HandleThreadCompletion(var Message: TMessage);
var
bm: TBitmap;
begin
if Assigned(Renderer) then
begin
bm := TBitmap.Create;
bm.assign(Renderer.GetImage);
Image.Picture.Graphic := bm;
// Canvas.StretchDraw(Rect(0, 0, ClientWidth, ClientHeight), bm);
Renderer.Free;
Renderer := nil;
bm.Free;
end;
end;
procedure TFullscreenForm.HandleThreadTermination(var Message: TMessage);
begin
if Assigned(Renderer) then
begin
Renderer.Free;
Renderer := nil;
end;
end;
procedure TFullscreenForm.OnProgress(prog: double);
begin
prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
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));
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
MainForm.mnuShowFull.enabled := true;
HideTaskbar;
if calculate then
DrawFlame;
end;
procedure TFullscreenForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
if Assigned(Renderer) then Renderer.Terminate;
ShowTaskbar;
end;
procedure TFullscreenForm.FormCreate(Sender: TObject);
begin
cp := TControlPoint.Create;
end;
procedure TFullscreenForm.FormDestroy(Sender: TObject);
begin
if assigned(Renderer) then Renderer.Terminate;
if assigned(Renderer) then Renderer.WaitFor;
if assigned(Renderer) then Renderer.Free;
cp.Free;
end;
procedure TFullscreenForm.FormKeyPress(Sender: TObject; var Key: Char);
begin
close;
end;
procedure TFullscreenForm.ImageDblClick(Sender: TObject);
begin
close;
end;
end.

View File

@ -1,379 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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.
}
{$D-,L-,O+,Q-,R-,Y-,S-}
unit Global;
interface
uses SysUtils, Classes, SyncObjs, Controls, Graphics, Math, MyTypes, controlpoint;
type
EFormatInvalid = class(Exception);
{ Weight manipulation }
{ Triangle transformations }
function triangle_area(t: TTriangle): double;
function transform_affine(const t: TTriangle; const Triangles: TTriangles): boolean;
function line_dist(x, y, x1, y1, x2, y2: double): double;
function dist(x1, y1, x2, y2: double): double;
{ Parsing functions }
function GetVal(token: string): string;
function ReplaceTabs(str: string): string;
{ Palette and gradient functions }
function GetGradient(FileName, Entry: string): string;
{ Misc }
function det(a, b, c, d: double): double;
function solve3(x1, x2, x1h, y1, y2, y1h, z1, z2, z1h: double;
var a, b, e: double): double;
const
APP_NAME: string = 'Apophysis 2.0';
prefilter_white: integer = 1024;
eps: double = 1E-10;
White_level = 200;
clyellow1 = TColor($17FCFF);
clplum2 = TColor($ECA9E6);
clSlateGray = TColor($837365);
FT_BMP = 1; FT_PNG = 2; FT_JPG = 3;
var
MainTriangles: TTriangles;
ConfirmDelete: boolean; // Flag confirmation of entry deletion
// FlameTitle: string;
Transforms: integer; // Count of Tranforms
AppPath: string; // Path of applicatio file
OpenFile: string; // Name of currently open file
CanDrawOnResize: boolean;
PreserveWeights: boolean;
{UPR Options}
UPRSampleDensity: integer;
UPRFilterRadius: double;
UPROversample: integer;
UPRAdjustDensity: boolean;
UPRColoringIdent: string;
UPRColoringFile: string;
UPRFormulaIdent: string;
UPRFormulaFile: string;
UPRWidth: Integer;
UPRHeight: Integer;
ImageFolder: string;
UPRPath: string; // Name and folder of last UPR file
UpdateGradient: boolean;
cmap_index: integer; // Index to current gradient
Variation: TVariation; // Current variation
NumTries, TryLength: integer; // Settings for smooth palette
SmoothPaletteFile: string;
{ Display }
defSampleDensity, defPreviewDensity: Double;
defGamma, defBrightness, defVibrancy, defFilterRadius: Double;
defOversample: integer;
{ Render }
renderDensity, renderFilterRadius: double;
renderOversample, renderWidth, renderHeight: integer;
renderPath: string;
JPEGQuality: integer;
renderFileFormat: integer;
{ Defaults }
SavePath, SmoothPalettePath: string;
RandomPrefix, RandomDate: string;
RandomIndex: integer;
FlameFile, GradientFile, GradientEntry, FlameEntry: string;
ParamFolder: string;
prevLowQuality, prevMediumQuality, prevHighQuality: double;
defSmoothPaletteFile: string;
BrowserPath: string; // Stored path of browser open dialog
EditPrevQual, MutatePrevQual, AdjustPrevQual: Integer;
randMinTransforms, randMaxTransforms: integer;
mutantMinTransforms, mutantMaxTransforms: integer;
KeepBackground: boolean;
randGradient: Integer;
defFlameFile: string;
SymmetryType: integer;
SymmetryOrder: integer;
Variations: array[0..NVARS - 1] of boolean;
VariationOptions: integer;
{ For random gradients }
MinNodes, MaxNodes, MinHue, MaxHue, MinSat, MaxSat, MinLum, MaxLum: integer;
FixedReference: boolean;
BatchSize: Integer;
Compatibility: integer; //0 = original, 1 = Drave's
Favorites: TStringList;
Script: string;
ScriptPath: string;
SheepServer, SheepNick, SheepURL, SheepPW, HqiPath: string;
ExportBatches, ExportOversample, ExportWidth, ExportHeight, ExportFileFormat: Integer;
ExportFilter, ExportDensity: Double;
OpenFileType: TFileType;
ResizeOnLoad: Boolean;
ShowProgress: Boolean;
defLibrary: string;
LimitVibrancy: Boolean;
implementation
uses dialogs, Main;
{ IFS }
function det(a, b, c, d: double): double;
begin
Result := (a * d - b * c);
end;
function solve3(x1, x2, x1h, y1, y2, y1h, z1, z2, z1h: double;
var a, b, e: double): double;
var
det1: double;
begin
det1 := x1 * det(y2, 1.0, z2, 1.0) - x2 * det(y1, 1.0, z1, 1.0)
+ 1 * det(y1, y2, z1, z2);
if (det1 = 0.0) then
begin
Result := det1;
EXIT;
end
else
begin
a := (x1h * det(y2, 1.0, z2, 1.0) - x2 * det(y1h, 1.0, z1h, 1.0)
+ 1 * det(y1h, y2, z1h, z2)) / det1;
b := (x1 * det(y1h, 1.0, z1h, 1.0) - x1h * det(y1, 1.0, z1, 1.0)
+ 1 * det(y1, y1h, z1, z1h)) / det1;
e := (x1 * det(y2, y1h, z2, z1h) - x2 * det(y1, y1h, z1, z1h)
+ x1h * det(y1, y2, z1, z2)) / det1;
a := Round6(a);
b := Round6(b);
e := Round6(e);
Result := det1;
end;
end;
function dist(x1, y1, x2, y2: double): double;
var
d2: double;
begin
{ From FDesign source
{ float pt_pt_distance(float x1, float y1, float x2, float y2) }
d2 := (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
if (d2 = 0.0) then
begin
Result := 0.0;
exit;
end
else
Result := sqrt(d2);
end;
function line_dist(x, y, x1, y1, x2, y2: double): double;
var
a, b, e, c: double;
begin
if ((x = x1) and (y = y1)) then
a := 0.0
else
a := sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
if ((x = x2) and (y = y2)) then
b := 0.0
else
b := sqrt((x - x2) * (x - x2) + (y - y2) * (y - y2));
if ((x1 = x2) and (y1 = y2)) then
e := 0.0
else
e := sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
if ((a * a + e * e) < (b * b)) then
Result := a
else if ((b * b + e * e) < (a * a)) then
Result := b
else if (e <> 0.0) then
begin
c := (b * b - a * a - e * e) / (-2 * e);
if ((a * a - c * c) < 0.0) then
Result := 0.0
else
Result := sqrt(a * a - c * c);
end
else
Result := a;
end;
function transform_affine(const t: TTriangle; const Triangles: TTriangles): boolean;
var
ra, rb, rc, a, b, c: double;
begin
Result := True;
ra := dist(Triangles[-1].y[0], Triangles[-1].x[0],
Triangles[-1].y[1], Triangles[-1].x[1]);
rb := dist(Triangles[-1].y[1], Triangles[-1].x[1],
Triangles[-1].y[2], Triangles[-1].x[2]);
rc := dist(Triangles[-1].y[2], Triangles[-1].x[2],
Triangles[-1].y[0], Triangles[-1].x[0]);
a := dist(t.y[0], t.x[0], t.y[1], t.x[1]);
b := dist(t.y[1], t.x[1], t.y[2], t.x[2]);
c := dist(t.y[2], t.x[2], t.y[0], t.x[0]);
if (a > ra) then
Result := False
else if (b > rb) then
Result := False
else if (c > rc) then
Result := False
else if ((a = ra) and (b = rb) and (c = rc)) then
Result := False;
end;
function triangle_area(t: TTriangle): double;
var
base, height: double;
begin
try
base := dist(t.x[0], t.y[0], t.x[1], t.y[1]);
height := line_dist(t.x[2], t.y[2], t.x[1], t.y[1],
t.x[0], t.y[0]);
if (base < 1.0) then
Result := height
else if (height < 1.0) then
Result := base
else
Result := 0.5 * base * height;
except on E: EMathError do
Result := 0;
end;
end;
{ Weight manipulation }
{ Parse }
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;
{ Palette and gradient functions }
function RGBToColor(Pal: TMapPalette; index: integer): Tcolor;
begin
{ Converts the RGB values from a palette index to the TColor type ...
could maybe change it to SHLs }
Result := (Pal.Blue[index] * 65536) + (Pal.Green[index] * 256)
+ Pal.Red[index];
end;
procedure rgb2hsv(const rgb: array of double; out hsv: array of double);
var
maxval, minval: double;
del: double;
begin
Maxval := Max(rgb[0], Max(rgb[1], rgb[2]));
Minval := Min(rgb[0], Min(rgb[1], rgb[2]));
hsv[2] := maxval; // v
if (Maxval > 0) and (maxval <> minval) then begin
del := maxval - minval;
hsv[1] := del / Maxval; //s
hsv[0] := 0;
if (rgb[0] > rgb[1]) and (rgb[0] > rgb[2]) then begin
hsv[0] := (rgb[1] - rgb[2]) / del;
end else if (rgb[1] > rgb[2]) then begin
hsv[0] := 2 + (rgb[2] - rgb[0]) / del;
end else begin
hsv[0] := 4 + (rgb[0] - rgb[1]) / del;
end;
if hsv[0] < 0 then
hsv[0] := hsv[0] + 6;
end else begin
hsv[0] := 0;
hsv[1] := 0;
end;
end;
procedure hsv2rgb(const hsv: array of double; out rgb: array of double);
var
j: integer;
f, p, q, t, v: double;
begin
j := floor(hsv[0]);
f := hsv[0] - j;
v := hsv[2];
p := hsv[2] * (1 - hsv[1]);
q := hsv[2] * (1 - hsv[1] * f);
t := hsv[2] * (1 - hsv[1] * (1 - f));
case j of
0: begin rgb[0] := v; rgb[1] := t; rgb[2] := p; end;
1: begin rgb[0] := q; rgb[1] := v; rgb[2] := p; end;
2: begin rgb[0] := p; rgb[1] := v; rgb[2] := t; end;
3: begin rgb[0] := p; rgb[1] := q; rgb[2] := v; end;
4: begin rgb[0] := t; rgb[1] := p; rgb[2] := v; end;
5: begin rgb[0] := v; rgb[1] := p; rgb[2] := t; end;
end;
end;
function GetGradient(FileName, Entry: string): string;
var
FileStrings: TStringList;
GradStrings: TStringList;
i: integer;
begin
FileStrings := TStringList.Create;
GradStrings := TStringList.Create;
try
try
FileStrings.LoadFromFile(FileName);
for i := 0 to FileStrings.count - 1 do
if Pos(Entry + ' ', Trim(FileStrings[i])) = 1 then break;
GradStrings.Add(FileStrings[i]);
repeat
inc(i);
GradStrings.Add(FileStrings[i]);
until Pos('}', FileStrings[i]) <> 0;
GetGradient := GradStrings.Text;
except on exception do
Result := '';
end;
finally
GradStrings.Free;
FileStrings.Free;
end;
end;
end.

View File

@ -1,488 +0,0 @@
object GradientForm: TGradientForm
Left = 565
Top = 216
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Gradient'
ClientHeight = 172
ClientWidth = 372
Color = clBtnFace
DragMode = dmAutomatic
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Icon.Data = {
0000010001001010000000000000680300001600000028000000100000002000
0000010018000000000040030000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000DA7F48DE7F46E68C56F1A273FDBA92FFCDB1FFE1CFFFF4EDE3F2FCA2
D5F862B9F339A1F0000000000000000000000000DA7D46DD7D41E68952F09F6F
FCB88FFFCDAFFFE1CEFFF4EEE2F2FD9FD4F85EB6F3349FF00000000000000000
00000000D97D45DD7C42E58750F09E6EFCB88FFFCCAFFFE0CEFFF4EDE2F2FD9F
D4F85DB6F4339FEF000000000000000000000000D97D45DD7D42E58851F09E6E
FCB88FFFCDAFFFE1CEFFF4EDE2F2FD9FD4F85DB6F3339FEF0000000000000000
00000000D97D45DD7D41E68851F09E6EFDB88FFFCCAFFFE1CEFFF4EDE2F2FD9F
D4F85EB6F3329FEF000000000000000000000000D97D45DD7C42E68851F19E6E
FDB78FFFCDAFFFE1CEFFF4EEE2F2FD9FD4F85EB6F4329FEF0000000000000000
00000000D97D45DD7D42E68851F19F6EFCB88FFFCCAFFFE0CEFFF4EDE1F2FD9F
D4F85DB7F3339FEF000000000000000000000000D97D45DD7D42E58850F19F6E
FDB78FFFCDAFFFE0CFFFF4EDE1F2FD9FD4F85DB6F3329FEF0000000000000000
00000000DA7D46DD7C41E68952F19E6EFDB88FFFCDAFFFE0CEFFF4EEE1F2FD9F
D4F85EB6F3339FF0000000000000000000000000DA7F48DE7F46E68C56F0A173
FCBA93FFCEB1FFE1D0FFF4EDE2F2FDA3D5F862B8F338A1F00000000000000000
00000000DB834EE08752E89563F3A97EFDC09CFFD2B8FFE4D4FFF5EFE4F3FDAA
D9F96FBEF449AAF1000000000000000000000000DD8A58E39565ECA57AF5B692
FDCAABFFD9C3FFE8DBFFF7F2E8F5FDB7DFFA85C8F763B6F20000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
0000800100008001000080010000800100008001000080010000800100008001
0000800100008001000080010000800100008001000080010000FFFF0000}
OldCreateOrder = True
Position = poDefault
OnClose = FormClose
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object pnlPalette: TPanel
Left = 0
Top = 0
Width = 372
Height = 102
Align = alClient
BevelOuter = bvLowered
TabOrder = 0
object GradientImage: TImage
Left = 1
Top = 1
Width = 370
Height = 100
Align = alClient
PopupMenu = PopupMenu
Stretch = True
OnDblClick = mnuRandomizeClick
end
end
object pnlControls: TPanel
Left = 0
Top = 102
Width = 372
Height = 70
Align = alBottom
BevelOuter = bvNone
TabOrder = 1
object btnMenu: TSpeedButton
Left = 8
Top = 10
Width = 57
Height = 22
Caption = 'Rotate'
Flat = True
PopupMenu = Popup
OnClick = btnMenuClick
end
object lblVal: TLabel
Left = 344
Top = 16
Width = 6
Height = 13
Caption = '0'
end
object btnOpen: TSpeedButton
Left = 312
Top = 40
Width = 23
Height = 22
Hint = 'Gradient Browser'
Flat = True
Glyph.Data = {
76030000424D7603000000000000360000002800000011000000100000000100
18000000000040030000120B0000120B00000000000000000000FF00FFFF00FF
0000000000000000000000000000000000000000000000000000000000000000
00000000000000FF00FFFF00FF00FF00FFFF00FF000000FFF5F0FFF1E9FFEFE6
FFEFE6FFF0E7FFF1E8FFF1E9FFF3EBFFF3ECFFF4EDFFF6F0000000FF00FFFF00
FF00FF00FFFF00FF000000FFF4EDFFEEE4FFEBDFFFEBDFFFEBE0FFECE2FFEDE2
FFEEE4FFEFE5FFEFE6FFF1EA000000FF00FFFF00FF00FF00FFFF00FF000000FF
F1E9CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208CD5208FFEDE3
000000FF00FFFF00FF00FF00FFFF00FF000000FFEFE6CD5208E26518EB7A37FF
A772FFD1B2FFF7EDC2E9FF42ADF7CD5208FFE9DC000000FF00FFFF00FF00FF00
FFFF00FF000000FFEDE2CD5208E16519E97835FFA770FFD1B2FFF7ECC2E9FF40
ADF7CD5208FFE5D6000000FF00FFFF00FF00FF00FFFF00FF000000FFEBDFCD52
08E16518EB7836FFA770FFD1B2FFF7ECC2E9FF42ADF7CD5208FFE1D0000000FF
00FFFF00FF00FF00FFFF00FF000000FFE9DBCD5208E16519EC7935FFA770FFD0
B2FFF7ECC2E9FF40AEF7CD5208FFDFCD000000FF00FFFF00FF00FF00FFFF00FF
000000FFE7D8CD5208E16519EB7935FFA570FFD1B2FFF7ECC2E9FF40ADF7CD52
08FFE1D0000000FF00FFFF00FF00FF00FFFF00FF000000FFE4D5CD5208E3651A
EB7A39FFA874FFD1B3FFF7ECC4E9FF44AEF7CD5208FFE9DC000000FF00FFFF00
FF00FF00FFFF00FF000000FFE3D1CD5208ED7935F99457FFBC8DFFE1C5FFFFF9
000000000000000000000000000000FF00FFFF00FF00FF00FFFF00FF000000FF
E1CFCD5208CD5208CD5208CD5208CD5208CD5208000000E17D41EB925E000000
FF00FFFF00FFFF00FF00FF00FFFF00FF000000FFE2D1FFD7BFFFD0B4FFCEB1FF
CFB3FFD0B4FFD3B8000000F5A779000000FF00FFFF00FFFF00FFFF00FF00FF00
FFFF00FF000000FFE7DAFFE2D0FFDECBFFDECAFFDDC9FFDECAFFDFCD00000000
0000FF00FFFF00FFFF00FFFF00FFFF00FF00FF00FFFF00FF0000000000000000
00000000000000000000000000000000000000FF00FFFF00FFFF00FFFF00FFFF
00FFFF00FF00FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00}
ParentShowHint = False
ShowHint = True
OnClick = btnOpenClick
end
object btnSmoothPalette: TSpeedButton
Left = 336
Top = 40
Width = 23
Height = 22
Hint = 'Smooth Palette'
Flat = True
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000000000000000000
0000000000000000000000000000000000000000000000FF00FFFF00FF000000
374BA83A53AB3E5DB14368B74876BF4E84C65493CE5BA3D661B2DE67C0E66CCE
EC71DAF3000000FF00FFFF00FF000000374BA83A53AB3E5DB14368B74876BF4E
84C65593CE5BA2D661B2DE67C0E66CCEED71DAF3000000FF00FFFF00FF000000
374BA83A52AC3E5DB14369B84876BE4F84C65593CE5BA3D661B1DE67C1E66CCD
ED71D9F3000000FF00FFFF00FF000000374BA83A53AB3E5CB14369B74876BE4E
84C65494CE5BA2D661B2DE66C1E56CCEEC71DAF3000000FF00FFFF00FF000000
374BA83A53AC3E5DB14368B74975BE4F84C65593CE5AA2D661B2DE67C0E56CCE
ED71D9F3000000FF00FFFF00FF000000374BA83A52AC3E5DB14368B84976BF4E
84C65493CE5BA3D661B2DE66C0E56CCEEC71D9F3000000FF00FFFF00FF000000
374BA83A52AC3E5CB14369B74975BE4F84C65494CD5BA2D661B1DE66C0E56CCE
ED71DAF3000000FF00FFFF00FF000000374BA83A53AC3E5CB14368B74876BF4E
84C65493CE5BA2D660B2DE67C0E56DCEEC71D9F3000000FF00FFFF00FF000000
374BA83A52AC3E5CB24368B74975BE4E84C65594CE5AA3D661B2DE67C1E66DCE
EC71D9F3000000FF00FFFF00FF000000374BA83A52AC3E5CB14369B74875BF4F
84C65493CE5AA3D661B2DE66C0E66DCEEC71DAF3000000FF00FFFF00FF000000
374BA83A52AC3E5DB14368B74976BF4F84C65593CE5BA3D660B2DE67C0E56CCD
ED71D9F3000000FF00FFFF00FF000000374BA83A53AC3E5CB14268B74876BF4F
84C65593CE5BA3D661B2DE67C1E66CCEED71DAF3000000FF00FFFF00FF000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentShowHint = False
ShowHint = True
OnClick = mnuSmoothPaletteClick
end
object Label1: TLabel
Left = 8
Top = 43
Width = 57
Height = 13
Alignment = taCenter
AutoSize = False
Caption = 'Preset'
end
object btnPaste: TSpeedButton
Left = 288
Top = 40
Width = 23
Height = 22
Flat = True
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000
0000000000000000000000000000000000000000000000FF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFF000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000FF
FFFFE39A6FFFFFFFE3996CE2996DE3996DFFFFFF000000FF00FFFF00FFFF00FF
000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFF000000FF00FFFF00FF00000056B9F556B9F556B9F556B9F5000000FF
FFFFE29566E39363FFFFFFE39262E29363FFFFFF000000FF00FFFF00FF000000
56B9F556B9F556B9F556B9F5000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFF000000FF00FFFF00FF00000056B9F556B9F556B9F556B9F5000000FF
FFFFE3915FE28C58FFFFFFFFFFFFE29364FFFFFF000000FF00FFFF00FF000000
56B9F556B9F556B9F556B9F5000000FFFFFFFFFFFFFFFFFFFFFFFF0000000000
00000000000000FF00FFFF00FF00000056B9F556B9F556B9F556B9F5000000FF
FFFFE29160FFFFFFFFFFFF000000FFFFFF000000FF00FFFF00FFFF00FF000000
56B9F556B9F556B9F556B9F5000000FFFFFFFFFFFFFFFFFFFFFFFF0000000000
00FF00FFFF00FFFF00FFFF00FF00000056B9F500000000000000000000000000
0000000000000000000000000000000000FF00FFFF00FFFF00FFFF00FF000000
56B9F5000000BBE5F9BBE5F9BBE5F9BBE5F9BBE5F9BBE5F900000056B9F50000
00FF00FFFF00FFFF00FFFF00FF00000056B9F556B9F5000000BBE5F900000000
0000BBE5F900000056B9F556B9F5000000FF00FFFF00FFFF00FFFF00FFFF00FF
000000000000000000000000BBE5F9BBE5F9000000000000000000000000FF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000
0000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
OnClick = btnPasteClick
end
object btnCopy: TSpeedButton
Left = 264
Top = 40
Width = 23
Height = 22
Flat = True
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FF000000FFFFFFE39A6FFFFFFFE3996CE2
996DE3996DFFFFFF000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
000000FFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000
00000000000000FF00FFFF00FFFF00FF000000FFFFFFE29566E39363000000FF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF00FFFF00FFFF00FF
000000FFFFFFFFFFFFFFFFFF000000FFFFFFE39A6FFFFFFFE3996CE2996DE399
6DFFFFFF000000FF00FFFF00FFFF00FF000000FFFFFFE3915FE28C58000000FF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF00FFFF00FFFF00FF
000000FFFFFFFFFFFFFFFFFF000000FFFFFFE29566E39363FFFFFFE39262E293
63FFFFFF000000FF00FFFF00FFFF00FF000000FFFFFFE29160FFFFFF000000FF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF00FFFF00FFFF00FF
000000FFFFFFFFFFFFFFFFFF000000FFFFFFE3915FE28C58FFFFFFFFFFFFE293
64FFFFFF000000FF00FFFF00FFFF00FF000000000000000000000000000000FF
FFFFFFFFFFFFFFFFFFFFFF000000000000000000000000FF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FF000000FFFFFFE29160FFFFFFFFFFFF000000FFFF
FF000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000FF
FFFFFFFFFFFFFFFFFFFFFF000000000000FF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FF000000000000000000000000000000000000FF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
OnClick = btnCopyClick
end
object cmbPalette: TComboBox
Left = 72
Top = 42
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 = 1
OnChange = cmbPaletteChange
OnDrawItem = cmbPaletteDrawItem
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 ScrollBar: TScrollBar
Left = 72
Top = 16
Width = 257
Height = 13
LargeChange = 15
Max = 255
PageSize = 0
TabOrder = 0
OnChange = ScrollBarChange
OnScroll = ScrollBarScroll
end
end
object PopupMenu: TPopupMenu
Images = MainForm.Buttons
Left = 8
Top = 8
object mnuRandomize: TMenuItem
Caption = 'Randomize'
OnClick = mnuRandomizeClick
end
object N7: TMenuItem
Caption = '-'
end
object mnuInvert: TMenuItem
Caption = 'Invert'
OnClick = mnuInvertClick
end
object mnuReverse: TMenuItem
Caption = '&Reverse'
OnClick = mnuReverseClick
end
object N3: TMenuItem
Caption = '-'
end
object mnuSmoothPalette: TMenuItem
Caption = 'Smooth Palette...'
ImageIndex = 34
OnClick = mnuSmoothPaletteClick
end
object mnuGradientBrowser: TMenuItem
Caption = 'Gradient Browser...'
ImageIndex = 22
OnClick = btnOpenClick
end
object N4: TMenuItem
Caption = '-'
end
object SaveGradient1: TMenuItem
Caption = 'Save Gradient...'
ImageIndex = 2
OnClick = SaveGradient1Click
end
object SaveasMapfile1: TMenuItem
Caption = 'Save as Map file...'
OnClick = SaveasMapfile1Click
end
object N6: TMenuItem
Caption = '-'
end
object mnuSaveasDefault: TMenuItem
Caption = 'Save as Default'
OnClick = mnuSaveasDefaultClick
end
object N5: TMenuItem
Caption = '-'
end
object mnuCopy: TMenuItem
Caption = 'Copy'
ImageIndex = 7
OnClick = btnCopyClick
end
object mnuPaste: TMenuItem
Caption = 'Paste'
ImageIndex = 8
OnClick = btnPasteClick
end
end
object Popup: TPopupMenu
AutoHotkeys = maManual
AutoPopup = False
Left = 40
Top = 8
object mnuRotate: TMenuItem
Caption = 'Rotate'
OnClick = mnuRotateClick
end
object N1: TMenuItem
Caption = '-'
end
object mnuHue: TMenuItem
Caption = 'Hue'
OnClick = mnuHueClick
end
object mnuSaturation: TMenuItem
Caption = 'Saturation'
OnClick = mnuSaturationClick
end
object mnuBrightness: TMenuItem
Caption = 'Brightness'
OnClick = mnuBrightnessClick
end
object Contrast1: TMenuItem
Caption = 'Contrast'
OnClick = Contrast1Click
end
object N2: TMenuItem
Caption = '-'
end
object mnuBlur: TMenuItem
Caption = 'Blur'
OnClick = mnuBlurClick
end
object mnuFrequency: TMenuItem
Caption = 'Frequency'
OnClick = mnuFrequencyClick
end
end
object SaveDialog: TSaveDialog
DefaultExt = 'map'
Filter = 'Map files|*.map'
Left = 72
Top = 8
end
object ApplicationEvents: TApplicationEvents
OnActivate = ApplicationEventsActivate
Left = 104
Top = 8
end
end

View File

@ -1,856 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 Gradient;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls, ComCtrls, Registry, cmap, Menus, ToolWin, Buttons,
AppEvnts;
const
PixelCountMax = 32768;
type
pRGBTripleArray = ^TRGBTripleArray;
TRGBTripleArray = array[0..PixelCountMax - 1] of TRGBTriple;
type
TGradientForm = class(TForm)
pnlPalette: TPanel;
pnlControls: TPanel;
cmbPalette: TComboBox;
GradientImage: TImage;
PopupMenu: TPopupMenu;
mnuReverse: TMenuItem;
mnuInvert: TMenuItem;
btnMenu: TSpeedButton;
Popup: TPopupMenu;
mnuHue: TMenuItem;
mnuRotate: TMenuItem;
N1: TMenuItem;
mnuSaturation: TMenuItem;
mnuBrightness: TMenuItem;
N2: TMenuItem;
ScrollBar: TScrollBar;
lblVal: TLabel;
mnuBlur: TMenuItem;
btnOpen: TSpeedButton;
N3: TMenuItem;
mnuGradientBrowser: TMenuItem;
mnuSmoothPalette: TMenuItem;
btnSmoothPalette: TSpeedButton;
N4: TMenuItem;
SaveGradient1: TMenuItem;
SaveasMapfile1: TMenuItem;
SaveDialog: TSaveDialog;
Label1: TLabel;
btnPaste: TSpeedButton;
btnCopy: TSpeedButton;
N5: TMenuItem;
mnuCopy: TMenuItem;
mnuPaste: TMenuItem;
ApplicationEvents: TApplicationEvents;
mnuSaveasDefault: TMenuItem;
N6: TMenuItem;
mnuRandomize: TMenuItem;
N7: TMenuItem;
mnuFrequency: TMenuItem;
Contrast1: TMenuItem;
procedure cmbPaletteChange(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnApplyClick(Sender: TObject);
procedure DrawPalette;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure mnuReverseClick(Sender: TObject);
procedure mnuInvertClick(Sender: TObject);
procedure btnMenuClick(Sender: TObject);
procedure mnuRotateClick(Sender: TObject);
procedure mnuHueClick(Sender: TObject);
procedure mnuSaturationClick(Sender: TObject);
procedure ScrollBarChange(Sender: TObject);
procedure mnuBrightnessClick(Sender: TObject);
procedure mnuBlurClick(Sender: TObject);
procedure btnOpenClick(Sender: TObject);
procedure mnuSmoothPaletteClick(Sender: TObject);
procedure SaveGradient1Click(Sender: TObject);
procedure SaveasMapfile1Click(Sender: TObject);
procedure cmbPaletteDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
procedure ScrollBarScroll(Sender: TObject; ScrollCode: TScrollCode;
var ScrollPos: Integer);
procedure btnCopyClick(Sender: TObject);
procedure btnPasteClick(Sender: TObject);
procedure ApplicationEventsActivate(Sender: TObject);
procedure mnuSaveasDefaultClick(Sender: TObject);
procedure mnuRandomizeClick(Sender: TObject);
procedure mnuFrequencyClick(Sender: TObject);
procedure Contrast1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
procedure Apply;
function Blur(const radius: integer; const pal: TColorMap): TColorMap;
function Frequency(const times: Integer; const pal: TColorMap): TColorMap;
procedure SaveMap(FileName: string);
public
Palette: TColorMap;
BackupPal: TColorMap;
procedure UpdateGradient(Pal: TColorMap);
function RandomGradient: TColorMap;
end;
var
GradientForm: TGradientForm;
pCmap: integer;
function GradientInClipboard: boolean;
procedure RGBToHSV(R, G, B: byte; var H, S, V: real);
procedure HSVToRGB(H, S, V: real; var Rb, Gb, Bb: integer);
implementation
uses Main, cmapdata, Math, Browser, Editor, Global, Save, Adjust, Mutate, ClipBrd;
{$R *.DFM}
procedure TGradientForm.Apply;
begin
MainForm.StopThread;
MainForm.UpdateUndo;
MainCp.CmapIndex := cmbPalette.ItemIndex;
MainCp.cmap := Palette;
if EditForm.visible then EditForm.UpdateDisplay;
// if AdjustForm.visible then AdjustForm.UpdateDisplay;
if MutateForm.Visible then MutateForm.UpdateDisplay;
MainForm.RedrawTimer.enabled := true;
end;
procedure TGradientForm.SaveMap(FileName: string);
var
i: Integer;
l: string;
MapFile: TextFile;
begin
{ Save a map file }
AssignFile(MapFile, FileName);
try
ReWrite(MapFile);
{ first line with comment }
l := Format(' %3d %3d %3d Exported from Apophysis 2.0', [Palette[0][0], palette[0][1],
palette[0][2]]);
Writeln(MapFile, l);
{ now the rest }
for i := 1 to 255 do
begin
l := Format(' %3d %3d %3d', [Palette[i][0], palette[i][1],
palette[i][2]]);
Writeln(MapFile, l);
end;
CloseFile(MapFile);
except
on EInOutError do Application.MessageBox(PChar('Cannot Open File: ' +
FileName), 'Apophysis', 16);
end;
end;
procedure TGradientForm.UpdateGradient(Pal: TColorMap);
begin
Palette := Pal;
BackupPal := Pal;
DrawPalette;
ScrollBar.Position := 0;
end;
procedure HSVToRGB(H, S, V: real; var Rb, Gb, Bb: integer);
var
R, G, B, Sa, Va, Hue, i, f, p, q, t: real;
begin
R := 0;
G := 0;
B := 0;
Sa := S / 100;
Va := V / 100;
if S = 0 then
begin
R := Va;
G := Va;
B := Va;
end
else
begin
Hue := H / 60;
if Hue = 6 then Hue := 0;
i := Int(Hue);
f := Hue - i;
p := Va * (1 - Sa);
q := Va * (1 - (Sa * f));
t := Va * (1 - (Sa * (1 - f)));
case Round(i) of
0: begin
R := Va;
G := t;
B := p;
end;
1: begin
R := q;
G := Va;
B := p;
end;
2: begin
R := p;
G := Va;
B := t;
end;
3: begin
R := p;
G := q;
B := Va;
end;
4: begin
R := t;
G := p;
B := Va;
end;
5: begin
R := Va;
G := p;
B := q;
end;
end;
end;
Rb := Round(Int(255.9999 * R));
Gb := Round(Int(255.9999 * G));
Bb := Round(Int(255.9999 * B));
end;
procedure RGBToHSV(R, G, B: byte; var H, S, V: real);
var
vRed, vGreen, vBlue, Mx, Mn, Va, Sa, rc, gc, bc: real;
begin
vRed := R / 255;
vGreen := G / 255;
vBlue := B / 255;
Mx := vRed;
if vGreen > Mx then Mx := vGreen;
if vBlue > Mx then Mx := vBlue;
Mn := vRed;
if vGreen < Mn then Mn := vGreen;
if vBlue < Mn then Mn := vBlue;
Va := Mx;
if Mx <> 0 then
Sa := (Mx - Mn) / Mx
else
Sa := 0;
if Sa = 0 then
H := 0
else
begin
rc := (Mx - vRed) / (Mx - Mn);
gc := (Mx - vGreen) / (Mx - Mn);
bc := (Mx - vBlue) / (Mx - Mn);
if Mx = vRed then
H := bc - gc
else if Mx = vGreen then
H := 2 + rc - bc
else if Mx = vBlue then
H := 4 + gc - rc;
H := H * 60;
if H < 0 then H := H + 360;
end;
S := Sa * 100;
V := Va * 100;
end;
function TGradientForm.Blur(const Radius: Integer; const pal: TColorMap): TColorMap;
var
r, g, b, n, i, j, k: Integer;
begin
Result := Pal;
if Radius <> 0 then
for i := 0 to 255 do
begin
n := -1;
r := 0;
g := 0;
b := 0;
for j := i - radius to i + radius do
begin
inc(n);
k := (256 + j) mod 256;
if k <> i then begin
r := r + Pal[k][0];
g := g + Pal[k][1];
b := b + Pal[k][2];
end;
end;
if n <> 0 then begin
Result[i][0] := r div n;
Result[i][1] := g div n;
Result[i][2] := b div n;
end;
end;
end;
function TGradientForm.Frequency(const times: Integer; const pal: TColorMap): TColorMap;
{ This can be improved }
var
n, i, j: Integer;
begin
Result := Pal;
if times <> 1 then
begin
n := 256 div times;
for j := 0 to times do
for i := 0 to n do
begin
if (i + j * n) < 256 then
begin
Result[i + j * n][0] := pal[i * times][0];
Result[i + j * n][1] := pal[i * times][1];
Result[i + j * n][2] := pal[i * times][2];
end;
end;
end;
end;
procedure TGradientForm.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;
GradientImage.Picture.Graphic := Bitmap;
GradientImage.Refresh;
finally
BitMap.Free;
end;
end;
procedure TGradientForm.cmbPaletteChange(Sender: TObject);
var
i: integer;
begin
i := cmbPalette.ItemIndex;
GetCmap(i, 1, Palette);
BackupPal := Palette;
ScrollBar.Position := 0;
DrawPalette;
Apply;
end;
procedure TGradientForm.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\Gradient', False) then
begin
if Registry.ValueExists('Left') then
GradientForm.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
GradientForm.Top := Registry.ReadInteger('Top');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
DrawPalette;
end;
procedure TGradientForm.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\Gradient', True) then
begin
Registry.WriteInteger('Top', GradientForm.Top);
Registry.WriteInteger('Left', GradientForm.Left);
end;
finally
Registry.Free;
end;
end;
procedure TGradientForm.btnApplyClick(Sender: TObject);
begin
Apply;
end;
procedure TGradientForm.mnuReverseClick(Sender: TObject);
var
i: integer;
pal: TColorMap;
begin
for i := 0 to 255 do begin
pal[i][0] := Palette[255 - i][0];
pal[i][1] := Palette[255 - i][1];
pal[i][2] := Palette[255 - i][2];
end;
UpdateGradient(pal);
Apply;
end;
procedure TGradientForm.mnuInvertClick(Sender: TObject);
var
i: integer;
begin
for i := 0 to 255 do
begin
Palette[i][0] := 255 - Palette[i][0];
Palette[i][1] := 255 - Palette[i][1];
Palette[i][2] := 255 - Palette[i][2];
end;
UpdateGradient(palette);
Apply;
end;
procedure TGradientForm.btnMenuClick(Sender: TObject);
begin
Popup.Popup(btnMenu.ClientOrigin.x, btnMenu.ClientOrigin.y + btnMenu.Height);
end;
procedure TGradientForm.ScrollBarChange(Sender: TObject);
var
intens, i, r, g, b: integer;
h, s, v: real;
begin
lblVal.Caption := IntToStr(ScrollBar.Position);
if btnMenu.Caption = 'Hue' then
begin
for i := 0 to 255 do
begin
RGBToHSV(BackupPal[i][0], BackupPal[i][1], BackupPal[i][2], h, s, v);
h := Round(360 + h + ScrollBar.Position) mod 360;
HSVToRGB(h, s, v, Palette[i][0], Palette[i][1], Palette[i][2]);
end;
end;
if btnMenu.Caption = 'Saturation' then
begin
for i := 0 to 255 do
begin
RGBToHSV(BackupPal[i][0], BackupPal[i][1], BackupPal[i][2], h, s, v);
s := s + ScrollBar.Position;
if s > 100 then s := 100;
if s < 0 then s := 0;
HSVToRGB(h, s, v, Palette[i][0], Palette[i][1], Palette[i][2]);
end;
end;
if btnMenu.Caption = 'Contrast' then
begin
intens := scrollBar.Position;
if intens > 0 then intens := intens * 2;
for i := 0 to 255 do
begin
r := BackupPal[i][0];
g := BackupPal[i][1];
b := BackupPal[i][2];
r := round(r + intens / 100 * (r - 127));
g := round(g + intens / 100 * (g - 127));
b := round(b + intens / 100 * (b - 127));
if R > 255 then R := 255 else if R < 0 then R := 0;
if G > 255 then G := 255 else if G < 0 then G := 0;
if B > 255 then B := 255 else if B < 0 then B := 0;
Palette[i][0] := r;
Palette[i][1] := g;
Palette[i][2] := b;
end;
end;
if btnMenu.Caption = 'Brightness' then
begin
for i := 0 to 255 do
begin
Palette[i][0] := BackupPal[i][0] + ScrollBar.Position;
if Palette[i][0] > 255 then Palette[i][0] := 255;
if Palette[i][0] < 0 then Palette[i][0] := 0;
Palette[i][1] := BackupPal[i][1] + ScrollBar.Position;
if Palette[i][1] > 255 then Palette[i][1] := 255;
if Palette[i][1] < 0 then Palette[i][1] := 0;
Palette[i][2] := BackupPal[i][2] + ScrollBar.Position;
if Palette[i][2] > 255 then Palette[i][2] := 255;
if Palette[i][2] < 0 then Palette[i][2] := 0;
end;
end;
if btnMenu.Caption = 'Rotate' then
begin
for i := 0 to 255 do
begin
Palette[i][0] := BackupPal[(255 + i - ScrollBar.Position) mod 256][0];
Palette[i][1] := BackupPal[(255 + i - ScrollBar.Position) mod 256][1];
Palette[i][2] := BackupPal[(255 + i - ScrollBar.Position) mod 256][2];
end;
end;
if btnMenu.Caption = 'Blur' then
begin
Palette := Blur(ScrollBar.Position, BackupPal);
end;
if btnMenu.Caption = 'Frequency' then
begin
Palette := Frequency(ScrollBar.Position, BackupPal);
end;
DrawPalette;
end;
{ ***************************** Adjust menu ********************************* }
procedure TGradientForm.mnuRotateClick(Sender: TObject);
begin
btnMenu.Caption := 'Rotate';
BackupPal := Palette;
ScrollBar.Min := 0;
ScrollBar.Max := 255;
ScrollBar.LargeChange := 15;
ScrollBar.Position := 0;
end;
procedure TGradientForm.mnuHueClick(Sender: TObject);
begin
btnMenu.Caption := 'Hue';
BackupPal := Palette;
ScrollBar.Min := 0;
ScrollBar.Max := 360;
ScrollBar.LargeChange := 15;
ScrollBar.Position := 0;
end;
procedure TGradientForm.mnuBrightnessClick(Sender: TObject);
begin
btnMenu.Caption := 'Brightness';
BackupPal := Palette;
ScrollBar.Min := -255;
ScrollBar.Max := 255;
ScrollBar.LargeChange := 15;
ScrollBar.Position := 0;
end;
procedure TGradientForm.mnuSaturationClick(Sender: TObject);
begin
btnMenu.Caption := 'Saturation';
BackupPal := Palette;
ScrollBar.Min := -100;
ScrollBar.Max := 100;
ScrollBar.LargeChange := 15;
ScrollBar.Position := 0;
end;
procedure TGradientForm.mnuBlurClick(Sender: TObject);
begin
btnMenu.Caption := 'Blur';
BackupPal := Palette;
ScrollBar.Min := 0;
ScrollBar.Max := 127;
ScrollBar.LargeChange := 15;
ScrollBar.Position := 0;
end;
procedure TGradientForm.mnuFrequencyClick(Sender: TObject);
begin
btnMenu.Caption := 'Frequency';
BackupPal := Palette;
ScrollBar.Min := 1;
ScrollBar.Max := 10;
ScrollBar.LargeChange := 1;
ScrollBar.Position := 1;
end;
procedure TGradientForm.btnOpenClick(Sender: TObject);
begin
GradientBrowser.Filename := GradientFile;
GradientBrowser.Show;
end;
procedure TGradientForm.mnuSmoothPaletteClick(Sender: TObject);
begin
MainForm.SmoothPalette;
end;
procedure TGradientForm.SaveGradient1Click(Sender: TObject);
var
gradstr: TStringList;
begin
gradstr := TStringList.Create;
try
SaveForm.Caption := 'Save Gradient';
SaveForm.Filename := GradientFile;
SaveForm.Title := MainCp.name;
if SaveForm.ShowModal = mrOK then
begin
gradstr.add(CleanIdentifier(SaveForm.Title) + ' {');
gradstr.add(MainForm.GradientFromPalette(Palette, SaveForm.Title));
gradstr.add('}');
if MainForm.SaveGradient(gradstr.text, SaveForm.Title, SaveForm.Filename) then
GradientFile := SaveForm.FileName;
end;
finally
gradstr.free
end;
end;
procedure TGradientForm.SaveasMapfile1Click(Sender: TObject);
begin
SaveDialog.Filename := MainCp.name + '.map';
if SaveDialog.execute then
SaveMap(SaveDialog.Filename);
end;
procedure TGradientForm.cmbPaletteDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
var
i, j: integer;
Row: pRGBTripleArray;
Bitmap: TBitmap;
pal: TColorMap;
PalName: string;
begin
{ Draw the preset palettes on the combo box items }
GetCMap(index, 1, pal);
GetCmapName(index, PalName);
BitMap := TBitMap.create;
Bitmap.PixelFormat := pf24bit;
BitMap.Width := 256;
BitMap.Height := 100;
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;
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 TGradientForm.ScrollBarScroll(Sender: TObject;
ScrollCode: TScrollCode; var ScrollPos: Integer);
begin
if ScrollCode = scEndScroll then Apply;
end;
procedure TGradientForm.btnCopyClick(Sender: TObject);
var
gradstr: TStringList;
begin
gradstr := TStringList.Create;
try
gradstr.add(CleanIdentifier(MainCp.name) + ' {');
gradstr.add('gradient:');
gradstr.add(' title="' + MainCp.name + '" smooth=no');
gradstr.add(GradientString(Palette));
gradstr.add('}');
Clipboard.SetTextBuf(PChar(gradstr.text));
btnPaste.enabled := true;
mnuPaste.enabled := true;
MainForm.btnPaste.enabled := False;
MainForm.mnuPaste.enabled := False;
finally
gradstr.free
end;
end;
procedure TGradientForm.btnPasteClick(Sender: TObject);
begin
if Clipboard.HasFormat(CF_TEXT) then
begin
UpdateGradient(CreatePalette(Clipboard.AsText));
Apply;
end;
end;
function GradientInClipboard: boolean;
var
gradstr: TStringList;
begin
{ returns true if gradient in clipboard - can be tricked }
result := true;
if Clipboard.HasFormat(CF_TEXT) then
begin
gradstr := TStringList.Create;
try
gradstr.text := Clipboard.AsText;
if (Pos('}', gradstr.text) = 0) or (Pos('{', gradstr.text) = 0) or
(Pos('gradient:', gradstr.text) = 0) or (Pos('fractal:', gradstr.text) <> 0) then
begin
result := false;
exit;
end;
finally
gradstr.free;
end;
end
else
result := false;
end;
procedure TGradientForm.ApplicationEventsActivate(Sender: TObject);
begin
if GradientInClipboard then begin
mnuPaste.enabled := true;
btnPaste.enabled := true;
end
else
begin
mnuPaste.enabled := false;
btnPaste.enabled := false;
end;
end;
procedure TGradientForm.mnuSaveasDefaultClick(Sender: TObject);
begin
MainForm.DefaultPalette := Palette;
SaveMap(AppPath + 'default.map');
end;
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 TGradientForm.RandomGradient: TColorMap;
var
a, b, n, nodes: integer;
rgb: array[0..2] of double;
hsv: array[0..2] of double;
pal: TColorMap;
begin
inc(MainForm.Seed);
RandSeed := MainForm.seed;
nodes := random((MaxNodes - 1) - (MinNodes - 2)) + (MinNodes - 1);
n := 256 div nodes;
b := 0;
hsv[0] := (random(MaxHue - (MinHue - 1)) + MinHue) / 100;
hsv[1] := (random(MaxSat - (MinSat - 1)) + MinSat) / 100;
hsv[2] := (random(MaxLum - (MinLum - 1)) + MinLum) / 100;
hsv2rgb(hsv, rgb);
Pal[0][0] := Round(rgb[0] * 255);
Pal[0][1] := Round(rgb[1] * 255);
Pal[0][2] := Round(rgb[2] * 255);
repeat
a := b;
b := b + n;
hsv[0] := (random(MaxHue - (MinHue - 1)) + MinHue) / 100;
hsv[1] := (random(MaxSat - (MinSat - 1)) + MinSat) / 100;
hsv[2] := (random(MaxLum - (MinLum - 1)) + MinLum) / 100;
hsv2rgb(hsv, rgb);
if b > 255 then b := 255;
Pal[b][0] := Round(rgb[0] * 255);
Pal[b][1] := Round(rgb[1] * 255);
Pal[b][2] := Round(rgb[2] * 255);
RGBBlend(a, b, pal);
until b = 255;
Result := Pal;
end;
procedure TGradientForm.mnuRandomizeClick(Sender: TObject);
begin
GradientForm.UpdateGradient(RandomGradient);
GradientForm.Apply;
end;
procedure TGradientForm.Contrast1Click(Sender: TObject);
begin
btnMenu.Caption := 'Contrast';
BackupPal := Palette;
ScrollBar.Min := -100;
ScrollBar.Max := 100;
ScrollBar.LargeChange := 15;
ScrollBar.Position := 0;
end;
procedure TGradientForm.FormCreate(Sender: TObject);
begin
Sendmessage(cmbPalette.Handle, CB_SETDROPPEDWIDTH , cmbPalette.width * 2, 0);
end;
end.

View File

@ -1,6 +0,0 @@
{.$DEFINE DELPHI3}
{.$DEFINE _WIN64}
{.$DEFINE HTMLHELP11}
{$DEFINE HTMLHELP12}
{.$DEFINE HTMLHELP_DYNAMIC_LINK}
{.$DEFINE HTMLHELP_DYNAMIC_LINK_EXPLICIT}

View File

@ -1,862 +0,0 @@
{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ HTML Help interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: htmlhelp.h, released 12 May 1999. }
{ The original Pascal code is: HTMLHelp.pas, released 9 Jun 1999. }
{ The initial developer of the Pascal code is Marcel van Brakel }
{ (brakelm@bart.nl). }
{ }
{ Portions created by Marcel van Brakel are }
{ Copyright (C) 1999 Marcel van Brakel. }
{ }
{ Contributor(s): Robert Chandler (robert@helpware.net) }
{ Kurt Senfer (ks@siemens.dk) }
{ }
{ Obtained through: }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the "License"); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{******************************************************************}
unit HtmlHlp;
interface
(*$HPPEMIT ''*)
(*$HPPEMIT '#include "htmlhelp.h"'*)
(*$HPPEMIT ''*)
(*$HPPEMIT 'typedef struct tagHH_LAST_ERROR'*)
(*$HPPEMIT '{'*)
(*$HPPEMIT ' int cbStruct ;'*)
(*$HPPEMIT ' HRESULT hr ;'*)
(*$HPPEMIT ' BSTR description ;'*)
(*$HPPEMIT '} HH_LAST_ERROR ;'*)
(*$HPPEMIT ''*)
uses
Windows;
{$I HTMLHLP.INC}
type
{$IFDEF HTMLHELP12}
{$IFNDEF _WIN64}
DWORD_PTR = DWORD;
{$ENDIF}
{$ENDIF}
PCSTR = LPCSTR;
// Commands to pass to HtmlHelp()
const
HH_DISPLAY_TOPIC = $0000;
{$EXTERNALSYM HH_DISPLAY_TOPIC}
HH_HELP_FINDER = $0000; // WinHelp equivalent
{$EXTERNALSYM HH_HELP_FINDER}
HH_DISPLAY_TOC = $0001; // not currently implemented
{$EXTERNALSYM HH_DISPLAY_TOC}
HH_DISPLAY_INDEX = $0002; // not currently implemented
{$EXTERNALSYM HH_DISPLAY_INDEX}
HH_DISPLAY_SEARCH = $0003; // not currently implemented
{$EXTERNALSYM HH_DISPLAY_SEARCH}
HH_SET_WIN_TYPE = $0004;
{$EXTERNALSYM HH_SET_WIN_TYPE}
HH_GET_WIN_TYPE = $0005;
{$EXTERNALSYM HH_GET_WIN_TYPE}
HH_GET_WIN_HANDLE = $0006;
{$EXTERNALSYM HH_GET_WIN_HANDLE}
HH_ENUM_INFO_TYPE = $0007; // Get Info type name, call repeatedly to enumerate, -1 at end
{$EXTERNALSYM HH_ENUM_INFO_TYPE}
HH_SET_INFO_TYPE = $0008; // Add Info type to filter.
{$EXTERNALSYM HH_SET_INFO_TYPE}
HH_SYNC = $0009;
{$EXTERNALSYM HH_SYNC}
{$IFDEF HTMLHELP11}
HH_ADD_NAV_UI = $000A; // not currently implemented
{$EXTERNALSYM HH_ADD_NAV_UI}
HH_ADD_BUTTON = $000B; // not currently implemented
{$EXTERNALSYM HH_ADD_BUTTON}
HH_GETBROWSER_APP = $000C; // not currently implemented
{$EXTERNALSYM HH_GETBROWSER_APP}
{$ENDIF}
{$IFDEF HTMLHELP12}
HH_RESERVED1 = $000A;
{$EXTERNALSYM HH_RESERVED1}
HH_RESERVED2 = $000B;
{$EXTERNALSYM HH_RESERVED2}
HH_RESERVED3 = $000C;
{$EXTERNALSYM HH_RESERVED3}
{$ENDIF}
HH_KEYWORD_LOOKUP = $000D;
{$EXTERNALSYM HH_KEYWORD_LOOKUP}
HH_DISPLAY_TEXT_POPUP = $000E; // display string resource id or text in a popup window
{$EXTERNALSYM HH_DISPLAY_TEXT_POPUP}
HH_HELP_CONTEXT = $000F; // display mapped numeric value in dwData
{$EXTERNALSYM HH_HELP_CONTEXT}
HH_TP_HELP_CONTEXTMENU = $0010; // text popup help, same as WinHelp HELP_CONTEXTMENU
{$EXTERNALSYM HH_TP_HELP_CONTEXTMENU}
HH_TP_HELP_WM_HELP = $0011; // text popup help, same as WinHelp HELP_WM_HELP
{$EXTERNALSYM HH_TP_HELP_WM_HELP}
HH_CLOSE_ALL = $0012; // close all windows opened directly or indirectly by the caller
{$EXTERNALSYM HH_CLOSE_ALL}
HH_ALINK_LOOKUP = $0013; // ALink version of HH_KEYWORD_LOOKUP
{$EXTERNALSYM HH_ALINK_LOOKUP}
HH_GET_LAST_ERROR = $0014; // not currently implemented, See HHERROR.h
{$EXTERNALSYM HH_GET_LAST_ERROR}
HH_ENUM_CATEGORY = $0015; // Get category name, call repeatedly to enumerate, -1 at end
{$EXTERNALSYM HH_ENUM_CATEGORY}
HH_ENUM_CATEGORY_IT = $0016; // Get category info type members, call repeatedly to enumerate, -1 at end
{$EXTERNALSYM HH_ENUM_CATEGORY_IT}
HH_RESET_IT_FILTER = $0017; // Clear the info type filter of all info types.
{$EXTERNALSYM HH_RESET_IT_FILTER}
HH_SET_INCLUSIVE_FILTER = $0018; // set inclusive filtering method for untyped topics to be included in display
{$EXTERNALSYM HH_SET_INCLUSIVE_FILTER}
HH_SET_EXCLUSIVE_FILTER = $0019; // set exclusive filtering method for untyped topics to be excluded from display
{$EXTERNALSYM HH_SET_EXCLUSIVE_FILTER}
{$IFDEF HTMLHELP11}
HH_SET_GUID = $001A; // For Microsoft Installer -- dwData is a pointer to the GUID string
{$EXTERNALSYM HH_SET_GUID}
{$ENDIF}
{$IFDEF HTMLHELP12}
HH_INITIALIZE = $001C; // Initializes the help system.
{$EXTERNALSYM HH_INITIALIZE}
HH_UNINITIALIZE = $001D; // Uninitializes the help system.
{$EXTERNALSYM HH_UNINITIALIZE}
HH_PRETRANSLATEMESSAGE = $00FD; // Pumps messages. (NULL, NULL, MSG*).
{$EXTERNALSYM HH_PRETRANSLATEMESSAGE}
HH_SET_GLOBAL_PROPERTY = $00FC; // Set a global property. (NULL, NULL, HH_GPROP)
{$EXTERNALSYM HH_SET_GLOBAL_PROPERTY}
{$ENDIF}
{$IFDEF HTMLHELP11}
HH_INTERNAL = $00FF; // Used internally.
{$EXTERNALSYM HH_INTERNAL}
{$ENDIF}
{$IFDEF HTMLHELP12}
HHWIN_PROP_TAB_AUTOHIDESHOW = (1 shl 0); // Automatically hide/show tri-pane window
{$EXTERNALSYM HHWIN_PROP_TAB_AUTOHIDESHOW}
{$ENDIF}
HHWIN_PROP_ONTOP = (1 shl 1); // Top-most window (not currently implemented)
{$EXTERNALSYM HHWIN_PROP_ONTOP}
HHWIN_PROP_NOTITLEBAR = (1 shl 2); // no title bar
{$EXTERNALSYM HHWIN_PROP_NOTITLEBAR}
HHWIN_PROP_NODEF_STYLES = (1 shl 3); // no default window styles (only HH_WINTYPE.dwStyles)
{$EXTERNALSYM HHWIN_PROP_NODEF_STYLES}
HHWIN_PROP_NODEF_EXSTYLES = (1 shl 4); // no default extended window styles (only HH_WINTYPE.dwExStyles)
{$EXTERNALSYM HHWIN_PROP_NODEF_EXSTYLES}
HHWIN_PROP_TRI_PANE = (1 shl 5); // use a tri-pane window
{$EXTERNALSYM HHWIN_PROP_TRI_PANE}
HHWIN_PROP_NOTB_TEXT = (1 shl 6); // no text on toolbar buttons
{$EXTERNALSYM HHWIN_PROP_NOTB_TEXT}
HHWIN_PROP_POST_QUIT = (1 shl 7); // post WM_QUIT message when window closes
{$EXTERNALSYM HHWIN_PROP_POST_QUIT}
HHWIN_PROP_AUTO_SYNC = (1 shl 8); // automatically ssync contents and index
{$EXTERNALSYM HHWIN_PROP_AUTO_SYNC}
HHWIN_PROP_TRACKING = (1 shl 9); // send tracking notification messages
{$EXTERNALSYM HHWIN_PROP_TRACKING}
HHWIN_PROP_TAB_SEARCH = (1 shl 10); // include search tab in navigation pane
{$EXTERNALSYM HHWIN_PROP_TAB_SEARCH}
HHWIN_PROP_TAB_HISTORY = (1 shl 11); // include history tab in navigation pane
{$EXTERNALSYM HHWIN_PROP_TAB_HISTORY}
{$IFDEF HTMLHELP11}
HHWIN_PROP_TAB_BOOKMARKS = (1 shl 12); // include bookmark tab in navigation pane
{$EXTERNALSYM HHWIN_PROP_TAB_BOOKMARKS}
{$ENDIF}
{$IFDEF HTMLHELP12}
HHWIN_PROP_TAB_FAVORITES = (1 shl 12); // include favorites tab in navigation pane
{$EXTERNALSYM HHWIN_PROP_TAB_FAVORITES}
{$ENDIF}
HHWIN_PROP_CHANGE_TITLE = (1 shl 13); // Put current HTML title in title bar
{$EXTERNALSYM HHWIN_PROP_CHANGE_TITLE}
HHWIN_PROP_NAV_ONLY_WIN = (1 shl 14); // Only display the navigation window
{$EXTERNALSYM HHWIN_PROP_NAV_ONLY_WIN}
HHWIN_PROP_NO_TOOLBAR = (1 shl 15); // Don't display a toolbar
{$EXTERNALSYM HHWIN_PROP_NO_TOOLBAR}
HHWIN_PROP_MENU = (1 shl 16); // Menu
{$EXTERNALSYM HHWIN_PROP_MENU}
HHWIN_PROP_TAB_ADVSEARCH = (1 shl 17); // Advanced FTS UI.
{$EXTERNALSYM HHWIN_PROP_TAB_ADVSEARCH}
HHWIN_PROP_USER_POS = (1 shl 18); // After initial creation, user controls window size/Position
{$EXTERNALSYM HHWIN_PROP_USER_POS}
{$IFDEF HTMLHELP12}
HHWIN_PROP_TAB_CUSTOM1 = (1 shl 19); // Use custom tab #1
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM1}
HHWIN_PROP_TAB_CUSTOM2 = (1 shl 20); // Use custom tab #2
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM2}
HHWIN_PROP_TAB_CUSTOM3 = (1 shl 21); // Use custom tab #3
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM3}
HHWIN_PROP_TAB_CUSTOM4 = (1 shl 22); // Use custom tab #4
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM4}
HHWIN_PROP_TAB_CUSTOM5 = (1 shl 23); // Use custom tab #5
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM5}
HHWIN_PROP_TAB_CUSTOM6 = (1 shl 24); // Use custom tab #6
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM6}
HHWIN_PROP_TAB_CUSTOM7 = (1 shl 25); // Use custom tab #7
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM7}
HHWIN_PROP_TAB_CUSTOM8 = (1 shl 26); // Use custom tab #8
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM8}
HHWIN_PROP_TAB_CUSTOM9 = (1 shl 27); // Use custom tab #9
{$EXTERNALSYM HHWIN_PROP_TAB_CUSTOM9}
HHWIN_TB_MARGIN = (1 shl 28); // the window type has a margin
{$EXTERNALSYM HHWIN_TB_MARGIN}
{$ENDIF}
HHWIN_PARAM_PROPERTIES = (1 shl 1); // valid fsWinProperties
{$EXTERNALSYM HHWIN_PARAM_PROPERTIES}
HHWIN_PARAM_STYLES = (1 shl 2); // valid dwStyles
{$EXTERNALSYM HHWIN_PARAM_STYLES}
HHWIN_PARAM_EXSTYLES = (1 shl 3); // valid dwExStyles
{$EXTERNALSYM HHWIN_PARAM_EXSTYLES}
HHWIN_PARAM_RECT = (1 shl 4); // valid rcWindowPos
{$EXTERNALSYM HHWIN_PARAM_RECT}
HHWIN_PARAM_NAV_WIDTH = (1 shl 5); // valid iNavWidth
{$EXTERNALSYM HHWIN_PARAM_NAV_WIDTH}
HHWIN_PARAM_SHOWSTATE = (1 shl 6); // valid nShowState
{$EXTERNALSYM HHWIN_PARAM_SHOWSTATE}
HHWIN_PARAM_INFOTYPES = (1 shl 7); // valid apInfoTypes
{$EXTERNALSYM HHWIN_PARAM_INFOTYPES}
HHWIN_PARAM_TB_FLAGS = (1 shl 8); // valid fsToolBarFlags
{$EXTERNALSYM HHWIN_PARAM_TB_FLAGS}
HHWIN_PARAM_EXPANSION = (1 shl 9); // valid fNotExpanded
{$EXTERNALSYM HHWIN_PARAM_EXPANSION}
HHWIN_PARAM_TABPOS = (1 shl 10); // valid tabpos
{$EXTERNALSYM HHWIN_PARAM_TABPOS}
HHWIN_PARAM_TABORDER = (1 shl 11); // valid taborder
{$EXTERNALSYM HHWIN_PARAM_TABORDER}
HHWIN_PARAM_HISTORY_COUNT = (1 shl 12); // valid cHistory
{$EXTERNALSYM HHWIN_PARAM_HISTORY_COUNT}
HHWIN_PARAM_CUR_TAB = (1 shl 13); // valid curNavType
{$EXTERNALSYM HHWIN_PARAM_CUR_TAB}
HHWIN_BUTTON_EXPAND = (1 shl 1); // Expand/contract button
{$EXTERNALSYM HHWIN_BUTTON_EXPAND}
HHWIN_BUTTON_BACK = (1 shl 2); // Back button
{$EXTERNALSYM HHWIN_BUTTON_BACK}
HHWIN_BUTTON_FORWARD = (1 shl 3); // Forward button
{$EXTERNALSYM HHWIN_BUTTON_FORWARD}
HHWIN_BUTTON_STOP = (1 shl 4); // Stop button
{$EXTERNALSYM HHWIN_BUTTON_STOP}
HHWIN_BUTTON_REFRESH = (1 shl 5); // Refresh button
{$EXTERNALSYM HHWIN_BUTTON_REFRESH}
HHWIN_BUTTON_HOME = (1 shl 6); // Home button
{$EXTERNALSYM HHWIN_BUTTON_HOME}
HHWIN_BUTTON_BROWSE_FWD = (1 shl 7); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_BROWSE_FWD}
HHWIN_BUTTON_BROWSE_BCK = (1 shl 8); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_BROWSE_BCK}
HHWIN_BUTTON_NOTES = (1 shl 9); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_NOTES}
HHWIN_BUTTON_CONTENTS = (1 shl 10); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_CONTENTS}
HHWIN_BUTTON_SYNC = (1 shl 11); // Sync button
{$EXTERNALSYM HHWIN_BUTTON_SYNC}
HHWIN_BUTTON_OPTIONS = (1 shl 12); // Options button
{$EXTERNALSYM HHWIN_BUTTON_OPTIONS}
HHWIN_BUTTON_PRINT = (1 shl 13); // Print button
{$EXTERNALSYM HHWIN_BUTTON_PRINT}
HHWIN_BUTTON_INDEX = (1 shl 14); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_INDEX}
HHWIN_BUTTON_SEARCH = (1 shl 15); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_SEARCH}
HHWIN_BUTTON_HISTORY = (1 shl 16); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_HISTORY}
{$IFDEF HTMLHELP11}
HHWIN_BUTTON_BOOKMARKS = (1 shl 17); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_BOOKMARKS}
{$ENDIF}
{$IFDEF HTMLHELP12}
HHWIN_BUTTON_FAVORITES = (1 shl 17); // not implemented
{$EXTERNALSYM HHWIN_BUTTON_FAVORITES}
{$ENDIF}
HHWIN_BUTTON_JUMP1 = (1 shl 18);
{$EXTERNALSYM HHWIN_BUTTON_JUMP1}
HHWIN_BUTTON_JUMP2 = (1 shl 19);
{$EXTERNALSYM HHWIN_BUTTON_JUMP2}
HHWIN_BUTTON_ZOOM = (1 shl 20);
{$EXTERNALSYM HHWIN_BUTTON_ZOOM}
HHWIN_BUTTON_TOC_NEXT = (1 shl 21);
{$EXTERNALSYM HHWIN_BUTTON_TOC_NEXT}
HHWIN_BUTTON_TOC_PREV = (1 shl 22);
{$EXTERNALSYM HHWIN_BUTTON_TOC_PREV}
HHWIN_DEF_BUTTONS = HHWIN_BUTTON_EXPAND or HHWIN_BUTTON_BACK or
HHWIN_BUTTON_OPTIONS or HHWIN_BUTTON_PRINT;
{$EXTERNALSYM HHWIN_DEF_BUTTONS}
// Button IDs
IDTB_EXPAND = 200;
{$EXTERNALSYM IDTB_EXPAND}
IDTB_CONTRACT = 201;
{$EXTERNALSYM IDTB_CONTRACT}
IDTB_STOP = 202;
{$EXTERNALSYM IDTB_STOP}
IDTB_REFRESH = 203;
{$EXTERNALSYM IDTB_REFRESH}
IDTB_BACK = 204;
{$EXTERNALSYM IDTB_BACK}
IDTB_HOME = 205;
{$EXTERNALSYM IDTB_HOME}
IDTB_SYNC = 206;
{$EXTERNALSYM IDTB_SYNC}
IDTB_PRINT = 207;
{$EXTERNALSYM IDTB_PRINT}
IDTB_OPTIONS = 208;
{$EXTERNALSYM IDTB_OPTIONS}
IDTB_FORWARD = 209;
{$EXTERNALSYM IDTB_FORWARD}
IDTB_NOTES = 210; // not implemented
{$EXTERNALSYM IDTB_NOTES}
IDTB_BROWSE_FWD = 211;
{$EXTERNALSYM IDTB_BROWSE_FWD}
IDTB_BROWSE_BACK = 212;
{$EXTERNALSYM IDTB_BROWSE_BACK}
IDTB_CONTENTS = 213; // not implemented
{$EXTERNALSYM IDTB_CONTENTS}
IDTB_INDEX = 214; // not implemented
{$EXTERNALSYM IDTB_INDEX}
IDTB_SEARCH = 215; // not implemented
{$EXTERNALSYM IDTB_SEARCH}
IDTB_HISTORY = 216; // not implemented
{$EXTERNALSYM IDTB_HISTORY}
{$IFDEF HTMLHELP11}
IDTB_BOOKMARKS = 217; // not implemented
{$EXTERNALSYM IDTB_BOOKMARKS}
{$ENDIF}
{$IFDEF HTMLHELP12}
IDTB_FAVORITES = 217; // not implemented
{$EXTERNALSYM IDTB_FAVORITES}
{$ENDIF}
IDTB_JUMP1 = 218;
{$EXTERNALSYM IDTB_JUMP1}
IDTB_JUMP2 = 219;
{$EXTERNALSYM IDTB_JUMP2}
IDTB_CUSTOMIZE = 221;
{$EXTERNALSYM IDTB_CUSTOMIZE}
IDTB_ZOOM = 222;
{$EXTERNALSYM IDTB_ZOOM}
IDTB_TOC_NEXT = 223;
{$EXTERNALSYM IDTB_TOC_NEXT}
IDTB_TOC_PREV = 224;
{$EXTERNALSYM IDTB_TOC_PREV}
// Notification codes
HHN_FIRST = -860;
{$EXTERNALSYM HHN_FIRST}
HHN_LAST = -879;
{$EXTERNALSYM HHN_LAST}
HHN_NAVCOMPLETE = (HHN_FIRST - 0);
{$EXTERNALSYM HHN_NAVCOMPLETE}
HHN_TRACK = (HHN_FIRST - 1);
{$EXTERNALSYM HHN_TRACK}
HHN_WINDOW_CREATE = (HHN_FIRST - 2);
{$EXTERNALSYM HHN_WINDOW_CREATE}
type
PHHLastError = ^THHLastError;
tagHH_LAST_ERROR = packed record
cbStruct: Integer; // size of this structure
hr: HRESULT; // the last error code.
description: PWideChar; // a description of the error (unicode string - BSTR).
end;
THHLastError = tagHH_LAST_ERROR;
PHHNNotify = ^THHNNotify;
tagHHN_NOTIFY = packed record
hdr: NMHDR;
pszUrl: PCSTR; // multibyte null-terminated string
end;
{$EXTERNALSYM tagHHN_NOTIFY}
HHN_NOTIFY = tagHHN_NOTIFY;
{$EXTERNALSYM HHN_NOTIFY}
THHNNotify = tagHHN_NOTIFY;
PHHPopup = ^THHPopup;
tagHH_POPUP = packed record
cbStruct: Integer; // sizeof this structure
hinst: HINST; // instance handle for string resource
idString: UINT; // string resource id, or text id if pszFile is specified in HtmlHelp call
pszText: LPCTSTR; // used if idString is zero
pt: TPoint; // top center of popup window
clrForeGround: TColorRef; // use -1 for default
clrBackground: TColorRef; // use -1 for default
rcMargins: TRect; // amount of space between edges of window and text, -1 for each member to ignore
pszFont: LPCTSTR; // facename, point size, char set, BOLD ITALIC UNDERLINE
end;
{$EXTERNALSYM tagHH_POPUP}
HH_POPUP = tagHH_POPUP;
{$EXTERNALSYM HH_POPUP}
THHPopup = tagHH_POPUP;
PHHAKLink = ^THHAKLink;
tagHH_AKLINK = packed record
cbStruct: Integer; // sizeof this structure
fReserved: BOOL; // must be FALSE (really!)
pszKeywords: LPCTSTR; // semi-colon separated keywords
pszUrl: LPCTSTR; // URL to jump to if no keywords found (may be NULL)
pszMsgText: LPCTSTR; // Message text to display in MessageBox if pszUrl is NULL and no keyword match
pszMsgTitle: LPCTSTR; // Message text to display in MessageBox if pszUrl is NULL and no keyword match
pszWindow: LPCTSTR; // Window to display URL in
fIndexOnFail: BOOL; // Displays index if keyword lookup fails.
end;
{$EXTERNALSYM tagHH_AKLINK}
HH_AKLINK = tagHH_AKLINK;
{$EXTERNALSYM HH_AKLINK}
THHAKLink = tagHH_AKLINK;
const
HHWIN_NAVTYPE_TOC = 0;
{$EXTERNALSYM HHWIN_NAVTYPE_TOC}
HHWIN_NAVTYPE_INDEX = 1;
{$EXTERNALSYM HHWIN_NAVTYPE_INDEX}
HHWIN_NAVTYPE_SEARCH = 2;
{$EXTERNALSYM HHWIN_NAVTYPE_SEARCH}
{$IFDEF HTMLHELP11}
HHWIN_NAVTYPE_BOOKMARKS = 3;
{$EXTERNALSYM HHWIN_NAVTYPE_BOOKMARKS}
HHWIN_NAVTYPE_HISTORY = 4; //not implemented
{$EXTERNALSYM HHWIN_NAVTYPE_HISTORY}
{$ENDIF}
{$IFDEF HTMLHELP12}
HHWIN_NAVTYPE_FAVORITES = 3;
{$EXTERNALSYM HHWIN_NAVTYPE_FAVORITES}
HHWIN_NAVTYPE_HISTORY = 4; //not implemented
{$EXTERNALSYM HHWIN_NAVTYPE_HISTORY}
HHWIN_NAVTYPE_AUTHOR = 5;
{$EXTERNALSYM HHWIN_NAVTYPE_AUTHOR}
HHWIN_NAVTYPE_CUSTOM_FIRST = 11;
{$EXTERNALSYM HHWIN_NAVTYPE_CUSTOM_FIRST}
{$ENDIF}
IT_INCLUSIVE = 0;
{$EXTERNALSYM IT_INCLUSIVE}
IT_EXCLUSIVE = 1;
{$EXTERNALSYM IT_EXCLUSIVE}
IT_HIDDEN = 2;
{$EXTERNALSYM IT_HIDDEN}
type
PHHEnumIT = ^THHEnumIT;
tagHH_ENUM_IT = packed record
cbStruct: Integer; // size of this structure
iType: Integer; // the type of the information type ie. Inclusive, Exclusive, or Hidden
pszCatName: LPCSTR; // Set to the name of the Category to enumerate the info types in a category; else NULL
pszITName: LPCSTR; // volitile pointer to the name of the infotype. Allocated by call. Caller responsible for freeing
pszITDescription: LPCSTR; // volitile pointer to the description of the infotype.
end;
{$EXTERNALSYM tagHH_ENUM_IT}
HH_ENUM_IT = tagHH_ENUM_IT;
{$EXTERNALSYM HH_ENUM_IT}
PHH_ENUM_IT = ^tagHH_ENUM_IT;
{$EXTERNALSYM PHH_ENUM_IT}
THHEnumIT = tagHH_ENUM_IT;
PHHEnumCat = ^THHEnumCat;
tagHH_ENUM_CAT = packed record
cbStruct: Integer; // size of this structure
pszCatName: LPCSTR; // volitile pointer to the category name
pszCatDescription: LPCSTR; // volitile pointer to the category description
end;
{$EXTERNALSYM tagHH_ENUM_CAT}
HH_ENUM_CAT = tagHH_ENUM_CAT;
{$EXTERNALSYM HH_ENUM_CAT}
PHH_ENUM_CAT = ^tagHH_ENUM_CAT;
{$EXTERNALSYM PHH_ENUM_CAT}
THHEnumCat = tagHH_ENUM_CAT;
PHHSetInfoType = ^THHSetInfoType;
tagHH_SET_INFOTYPE = packed record
cbStruct: Integer; // the size of this structure
pszCatName: LPCSTR; // the name of the category, if any, the InfoType is a member of.
pszInfoTypeName: LPCSTR; // the name of the info type to add to the filter
end;
{$EXTERNALSYM tagHH_SET_INFOTYPE}
HH_SET_INFOTYPE = tagHH_SET_INFOTYPE;
{$EXTERNALSYM HH_SET_INFOTYPE}
PHH_SET_INFOTYPE = ^tagHH_SET_INFOTYPE;
{$EXTERNALSYM PHH_SET_INFOTYPE}
THHSetInfoType = tagHH_SET_INFOTYPE;
HH_INFOTYPE = DWORD;
{$EXTERNALSYM HH_INFOTYPE}
PHH_INFOTYPE = ^HH_INFOTYPE;
{$EXTERNALSYM PHH_INFOTYPE}
PHHInfoType = ^THHInfoType;
THHInfoType = HH_INFOTYPE;
const
HHWIN_NAVTAB_TOP = 0;
{$EXTERNALSYM HHWIN_NAVTAB_TOP}
HHWIN_NAVTAB_LEFT = 1;
{$EXTERNALSYM HHWIN_NAVTAB_LEFT}
HHWIN_NAVTAB_BOTTOM = 2;
{$EXTERNALSYM HHWIN_NAVTAB_BOTTOM}
HH_MAX_TABS = 19;
{$EXTERNALSYM HH_MAX_TABS}
HH_TAB_CONTENTS = 0;
{$EXTERNALSYM HH_TAB_CONTENTS}
HH_TAB_INDEX = 1;
{$EXTERNALSYM HH_TAB_INDEX}
HH_TAB_SEARCH = 2;
{$EXTERNALSYM HH_TAB_SEARCH}
{$IFDEF HTMLHELP11}
HH_TAB_BOOKMARKS = 3;
{$EXTERNALSYM HH_TAB_BOOKMARKS}
HH_TAB_HISTORY = 4;
{$EXTERNALSYM HH_TAB_HISTORY}
{$ENDIF}
{$IFDEF HTMLHELP12}
HH_TAB_FAVORITES = 3;
{$EXTERNALSYM HH_TAB_FAVORITES}
HH_TAB_HISTORY = 4;
{$EXTERNALSYM HH_TAB_HISTORY}
HH_TAB_AUTHOR = 5;
{$EXTERNALSYM HH_TAB_AUTHOR}
HH_TAB_CUSTOM_FIRST = 11;
{$EXTERNALSYM HH_TAB_CUSTOM_FIRST}
HH_TAB_CUSTOM_LAST = HH_MAX_TABS;
{$EXTERNALSYM HH_TAB_CUSTOM_LAST}
HH_MAX_TABS_CUSTOM = HH_TAB_CUSTOM_LAST - HH_TAB_CUSTOM_FIRST + 1;
{$EXTERNALSYM HH_MAX_TABS_CUSTOM}
{$ENDIF}
// HH_DISPLAY_SEARCH Command Related Structures and Constants
HH_FTS_DEFAULT_PROXIMITY = -1;
{$EXTERNALSYM HH_FTS_DEFAULT_PROXIMITY}
type
PHHFtsQuery = ^THHFtsQuery;
tagHH_FTS_QUERY = packed record
cbStruct: Integer; // Sizeof structure in bytes.
fUniCodeStrings: BOOL; // TRUE if all strings are unicode.
pszSearchQuery: LPCTSTR; // String containing the search query.
iProximity: LongInt; // Word proximity.
fStemmedSearch: BOOL; // TRUE for StemmedSearch only.
fTitleOnly: BOOL; // TRUE for Title search only.
fExecute: BOOL; // TRUE to initiate the search.
pszWindow: LPCTSTR; // Window to display in
end;
{$EXTERNALSYM tagHH_FTS_QUERY}
HH_FTS_QUERY = tagHH_FTS_QUERY;
{$EXTERNALSYM HH_FTS_QUERY}
THHFtsQuery = tagHH_FTS_QUERY;
PHHWinType = ^THHWinType;
tagHH_WINTYPE = packed record
cbStruct: Integer; // IN: size of this structure including all Information Types
fUniCodeStrings: BOOL; // IN/OUT: TRUE if all strings are in UNICODE
pszType: LPCTSTR; // IN/OUT: Name of a type of window
fsValidMembers: DWORD; // IN: Bit flag of valid members (HHWIN_PARAM_)
fsWinProperties: DWORD; // IN/OUT: Properties/attributes of the window (HHWIN_)
pszCaption: LPCTSTR; // IN/OUT: Window title
dwStyles: DWORD; // IN/OUT: Window styles
dwExStyles: DWORD; // IN/OUT: Extended Window styles
rcWindowPos: TRect; // IN: Starting position, OUT: current position
nShowState: Integer; // IN: show state (e.g., SW_SHOW)
hwndHelp: HWND; // OUT: window handle
hwndCaller: HWND; // OUT: who called this window
paInfoTypes: PHHInfoType; // IN: Pointer to an array of Information Types
{ The following members are only valid if HHWIN_PROP_TRI_PANE is set }
hwndToolBar: HWND; // OUT: toolbar window in tri-pane window
hwndNavigation: HWND; // OUT: navigation window in tri-pane window
hwndHTML: HWND; // OUT: window displaying HTML in tri-pane window
iNavWidth: Integer; // IN/OUT: width of navigation window
rcHTML: TRect; // OUT: HTML window coordinates
pszToc: LPCTSTR; // IN: Location of the table of contents file
pszIndex: LPCTSTR; // IN: Location of the index file
pszFile: LPCTSTR; // IN: Default location of the html file
pszHome: LPCTSTR; // IN/OUT: html file to display when Home button is clicked
fsToolBarFlags: DWORD; // IN: flags controling the appearance of the toolbar
fNotExpanded: BOOL; // IN: TRUE/FALSE to contract or expand, OUT: current state
curNavType: Integer; // IN/OUT: UI to display in the navigational pane
tabpos: Integer; // IN/OUT: HHWIN_NAVTAB_TOP, HHWIN_NAVTAB_LEFT, or HHWIN_NAVTAB_BOTTOM
idNotify: Integer; // IN: ID to use for WM_NOTIFY messages
tabOrder: array[0..HH_MAX_TABS] of Byte; // IN/OUT: tab order: Contents, Index, Search, History, Favorites, Reserved 1-5, Custom tabs
cHistory: Integer; // IN/OUT: number of history items to keep (default is 30)
pszJump1: LPCTSTR; // Text for HHWIN_BUTTON_JUMP1
pszJump2: LPCTSTR; // Text for HHWIN_BUTTON_JUMP2
pszUrlJump1: LPCTSTR; // URL for HHWIN_BUTTON_JUMP1
pszUrlJump2: LPCTSTR; // URL for HHWIN_BUTTON_JUMP2
rcMinSize: TRect; // Minimum size for window (ignored in version 1)
cbInfoTypes: Integer; // size of paInfoTypes;
{$IFDEF HTMLHELP12}
pszCustomTabs: LPCTSTR; // multiple zero-terminated Strings
{$ENDIF}
end;
{$EXTERNALSYM tagHH_WINTYPE}
HH_WINTYPE = tagHH_WINTYPE;
{$EXTERNALSYM HH_WINTYPE}
PHH_WINTYPE = ^tagHH_WINTYPE;
{$EXTERNALSYM PHH_WINTYPE}
THHWinType = tagHH_WINTYPE;
const
HHACT_TAB_CONTENTS = 0;
{$EXTERNALSYM HHACT_TAB_CONTENTS}
HHACT_TAB_INDEX = 1;
{$EXTERNALSYM HHACT_TAB_INDEX}
HHACT_TAB_SEARCH = 2;
{$EXTERNALSYM HHACT_TAB_SEARCH}
HHACT_TAB_HISTORY = 3;
{$EXTERNALSYM HHACT_TAB_HISTORY}
HHACT_TAB_FAVORITES = 4;
{$EXTERNALSYM HHACT_TAB_FAVORITES}
HHACT_EXPAND = 5;
{$EXTERNALSYM HHACT_EXPAND}
HHACT_CONTRACT = 6;
{$EXTERNALSYM HHACT_CONTRACT}
HHACT_BACK = 7;
{$EXTERNALSYM HHACT_BACK}
HHACT_FORWARD = 8;
{$EXTERNALSYM HHACT_FORWARD}
HHACT_STOP = 9;
{$EXTERNALSYM HHACT_STOP}
HHACT_REFRESH = 10;
{$EXTERNALSYM HHACT_REFRESH}
HHACT_HOME = 11;
{$EXTERNALSYM HHACT_HOME}
HHACT_SYNC = 12;
{$EXTERNALSYM HHACT_SYNC}
HHACT_OPTIONS = 13;
{$EXTERNALSYM HHACT_OPTIONS}
HHACT_PRINT = 14;
{$EXTERNALSYM HHACT_PRINT}
HHACT_HIGHLIGHT = 15;
{$EXTERNALSYM HHACT_HIGHLIGHT}
HHACT_CUSTOMIZE = 16;
{$EXTERNALSYM HHACT_CUSTOMIZE}
HHACT_JUMP1 = 17;
{$EXTERNALSYM HHACT_JUMP1}
HHACT_JUMP2 = 18;
{$EXTERNALSYM HHACT_JUMP2}
HHACT_ZOOM = 19;
{$EXTERNALSYM HHACT_ZOOM}
HHACT_TOC_NEXT = 20;
{$EXTERNALSYM HHACT_TOC_NEXT}
HHACT_TOC_PREV = 21;
{$EXTERNALSYM HHACT_TOC_PREV}
HHACT_NOTES = 22;
{$EXTERNALSYM HHACT_NOTES}
HHACT_LAST_ENUM = 23;
{$EXTERNALSYM HHACT_LAST_ENUM}
type
PHHNTrack = ^THHNTrack;
tagHHNTRACK = packed record
hdr: NMHDR;
pszCurUrl: PCSTR; // Multi-byte, null-terminated string
idAction: Integer; // HHACT_ value
phhWinType: PHHWinType; // Current window type structure
end;
{$EXTERNALSYM tagHHNTRACK}
HHNTRACK = tagHHNTRACK;
{$EXTERNALSYM HHNTRACK}
THHNTrack = tagHHNTRACK;
{$IFDEF HTMLHELP_DYNAMIC_LINK}
type
THtmlHelpA = function (hwndCaller: HWND; pszFile: PAnsiChar; uCommand: UINT;
{$IFDEF HTMLHELP11}dwData: DWORD): HWND; stdcall;{$ENDIF}
{$IFDEF HTMLHELP12}dwData: DWORD_PTR): HWND; stdcall;{$ENDIF}
THtmlHelpW = function (hwndCaller: HWND; pszFile: PWideChar; uCommand: UINT;
{$IFDEF HTMLHELP11}dwData: DWORD): HWND; stdcall;{$ENDIF}
{$IFDEF HTMLHELP12}dwData: DWORD_PTR): HWND; stdcall;{$ENDIF}
THtmlHelp = THtmlHelpA;
var
HtmlHelpA: THtmlHelpA = nil;
HtmlHelpW: THtmlHelpW = nil;
HtmlHelp: THtmlHelp = nil;
{$ELSE}
function HtmlHelpA(hwndCaller: HWND; pszFile: PAnsiChar; uCommand: UINT;
{$IFDEF HTMLHELP11}
dwData: DWORD): HWND; stdcall;
{$ENDIF}
{$IFDEF HTMLHELP12}
dwData: DWORD_PTR): HWND; stdcall;
{$ENDIF}
{$EXTERNALSYM HtmlHelpA}
function HtmlHelpW(hwndCaller: HWND; pszFile: PWideChar; uCommand: UINT;
{$IFDEF HTMLHELP11}
dwData: DWORD): HWND; stdcall;
{$ENDIF}
{$IFDEF HTMLHELP12}
dwData: DWORD_PTR): HWND; stdcall;
{$ENDIF}
{$EXTERNALSYM HtmlHelpW}
function HtmlHelp(hwndCaller: HWND; pszFile: PChar; uCommand: UINT;
{$IFDEF HTMLHELP11}
dwData: DWORD): HWND; stdcall;
{$ENDIF}
{$IFDEF HTMLHELP12}
dwData: DWORD_PTR): HWND; stdcall;
{$ENDIF}
{$EXTERNALSYM HtmlHelp}
{$ENDIF}
// Use the following for GetProcAddress to load from hhctrl.ocx
const
ATOM_HTMLHELP_API_ANSI = LPTSTR(DWORD(WORD(14)));
{$EXTERNALSYM ATOM_HTMLHELP_API_ANSI}
ATOM_HTMLHELP_API_UNICODE = LPTSTR(DWORD(WORD(15)));
{$EXTERNALSYM ATOM_HTMLHELP_API_UNICODE}
{$IFDEF HTMLHELP12}
// Global Control Properties
const
HH_GPROPID_SINGLETHREAD = 1; // VARIANT_BOOL: True for single thread
{$EXTERNALSYM HH_GPROPID_SINGLETHREAD}
HH_GPROPID_TOOLBAR_MARGIN = 2; // long: Provides a left/right margin around the toolbar.
{$EXTERNALSYM HH_GPROPID_TOOLBAR_MARGIN}
HH_GPROPID_UI_LANGUAGE = 3; // long: LangId of the UI.
{$EXTERNALSYM HH_GPROPID_UI_LANGUAGE}
HH_GPROPID_CURRENT_SUBSET = 4; // BSTR: Current subset.
{$EXTERNALSYM HH_GPROPID_CURRENT_SUBSET}
HH_GPROPID_CONTENT_LANGUAGE = 5; // long: LandId for desired content.
{$EXTERNALSYM HH_GPROPID_CONTENT_LANGUAGE}
type
HH_GPROPID = HH_GPROPID_SINGLETHREAD..HH_GPROPID_CONTENT_LANGUAGE;
{$EXTERNALSYM HH_GPROPID}
THHGPropID = HH_GPROPID;
// Global Property structure
PHHGlobalProperty = ^THHGlobalProperty;
tagHH_GLOBAL_PROPERTY = record
id: THHGPropID;
Dummy: Integer; // JEDI: Added to enforce 8-byte packing
var_: OleVariant;
end;
HH_GLOBAL_PROPERTY = tagHH_GLOBAL_PROPERTY;
THHGlobalProperty = tagHH_GLOBAL_PROPERTY;
{$ENDIF}
{$IFDEF HTMLHELP_DYNAMIC_LINK}
function HtmlHelpLoaded: Boolean;
{$IFDEF HTMLHELP_DYNAMIC_LINK_EXPLICIT}
function LoadHtmlHelp: Boolean;
function UnLoadHtmlHelp: Boolean;
{$ENDIF}
{$ENDIF}
implementation
{$IFDEF HTMLHELP_DYNAMIC_LINK}
uses
Registry, SysUtils;
var
HtmlHelpLib: THandle = 0;
function GetOCXPath(var Path: string): Boolean;
const
HHPathRegKey = 'CLSID\{adb880a6-d8ff-11cf-9377-00aa003b7a11}\InprocServer32';
begin
with TRegistry.Create do
try
RootKey := HKEY_CLASSES_ROOT;
if OpenKeyReadOnly(HHPathRegKey) then Path := ReadString('');
Result := (Path <> '') and FileExists(Path);
finally
Free;
end;
end;
function HtmlHelpLoaded: Boolean;
begin
Result := HtmlHelpLib <> 0;
end;
function UnLoadHtmlHelp: Boolean;
begin
Result := True;
if HtmlHelpLoaded then
begin
if Assigned(HtmlHelp) then HtmlHelp(0, nil, HH_CLOSE_ALL, 0);
Result := FreeLibrary(HtmlHelpLib);
HtmlHelpLib := 0;
@HtmlHelpA := nil;
@HtmlHelpW := nil;
@HtmlHelp := nil;
end;
end;
function LoadHtmlHelp: Boolean;
const
ProcNameA = 'HtmlHelpA';
ProcNameW = 'HtmlHelpW';
ProcName = ProcNameA;
var
HHOCXPath: string;
begin
Result := HtmlHelpLoaded;
if (not Result) and GetOCXPath(HHOCXPath) then
begin
HtmlHelpLib := LoadLibrary(PChar(HHOCXPath));
if HtmlHelpLoaded then
begin
@HtmlHelpA := GetProcAddress(HtmlHelpLib, ProcNameA);
@HtmlHelpW := GetProcAddress(HtmlHelpLib, ProcNameW);
@HtmlHelp := GetProcAddress(HtmlHelpLib, ProcName);
Result := Assigned(HtmlHelpA) and Assigned(HtmlHelpW);
if not Result then UnLoadHtmlHelp;
end;
end;
end;
{$ELSE}
const
hhctrl = 'hhctrl.ocx';
function HtmlHelpA; external hhctrl Name 'HtmlHelpA';
{$EXTERNALSYM HtmlHelpA}
function HtmlHelpW; external hhctrl Name 'HtmlHelpW';
{$EXTERNALSYM HtmlHelpW}
function HtmlHelp; external hhctrl Name 'HtmlHelpA';
{$EXTERNALSYM HtmlHelp}
{$ENDIF}
{$IFDEF HTMLHELP_DYNAMIC_LINK}
initialization
{$IFNDEF HTMLHELP_DYNAMIC_LINK_EXPLICIT}
LoadHtmlHelp;
{$ENDIF}
finalization
UnLoadHtmlHelp;
{$ENDIF}
end.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,123 +0,0 @@
unit MsMultiPartFormData;
interface
uses
SysUtils, Classes;
const
CONTENT_TYPE = 'multipart/form-data; boundary=';
CRLF = #13#10;
CONTENT_DISPOSITION = 'Content-Disposition: form-data; name="%s"';
FILE_NAME_PLACE_HOLDER = '; filename="%s"';
CONTENT_TYPE_PLACE_HOLDER = 'Content-Type: %s' + crlf + crlf;
CONTENT_LENGTH = 'Content-Length: %d' + crlf;
type
TMsMultiPartFormDataStream = class(TMemoryStream)
private
FBoundary: string;
FRequestContentType: string;
FInitial: Boolean;
function GenerateUniqueBoundary: string;
public
procedure AddFormField(const FieldName, FieldValue: string);
procedure AddFile(const FieldName, FileName, ContentType: string; FileData: TStream); overload;
procedure AddFile(const FieldName, FileName, ContentType: string); overload;
procedure PrepareStreamForDispatch;
constructor Create;
property Boundary: string read FBoundary;
property RequestContentType: string read FRequestContentType;
end;
implementation
{ TMsMultiPartFormDataStream }
constructor TMsMultiPartFormDataStream.Create;
begin
inherited;
FInitial := True;
FBoundary := GenerateUniqueBoundary;
FRequestContentType := CONTENT_TYPE + FBoundary;
end;
procedure TMsMultiPartFormDataStream.AddFile(const FieldName, FileName,
ContentType: string; FileData: TStream);
var
sFormFieldInfo: string;
Buffer: PChar;
iSize: Int64;
begin
iSize := FileData.Size;
// Malikyar -- Removed the Content_length parameter since the web buffer did not contain it.
{
sFormFieldInfo := Format(CRLF + '--' + Boundary + CRLF + CONTENT_DISPOSITION +
FILE_NAME_PLACE_HOLDER + CRLF + CONTENT_LENGTH +
CONTENT_TYPE_PLACE_HOLDER, [FieldName, FileName, iSize, ContentType]);
}
sFormFieldInfo := Format(CRLF + '--' + Boundary + CRLF + CONTENT_DISPOSITION +
FILE_NAME_PLACE_HOLDER + CRLF +
CONTENT_TYPE_PLACE_HOLDER, [FieldName, FileName, ContentType]);
Write(Pointer(sFormFieldInfo)^, Length(sFormFieldInfo));
FileData.Position := 0;
GetMem(Buffer, iSize);
try
FileData.Read(Buffer^, iSize);
Write(Buffer^, iSize);
finally
FreeMem(Buffer, iSize);
end;
end;
procedure TMsMultiPartFormDataStream.AddFile(const FieldName, FileName,
ContentType: string);
var
FileStream: TFileStream;
begin
FileStream := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
try
AddFile(FieldName, FileName, ContentType, FileStream);
finally
FileStream.Free;
end;
end;
procedure TMsMultiPartFormDataStream.AddFormField(const FieldName,
FieldValue: string);
var
sFormFieldInfo: string;
begin
// Add a check to see if it's the initial field being added. If so, then do not preface with a CRLF.
if FInitial then
begin
sFormFieldInfo :=
Format('--' + Boundary + CRLF + CONTENT_DISPOSITION + CRLF + CRLF +
FieldValue, [FieldName]);
FInitial := False;
end
else
sFormFieldInfo :=
Format(CRLF + '--' + Boundary + CRLF + CONTENT_DISPOSITION + CRLF + CRLF +
FieldValue, [FieldName]);
Write(Pointer(sFormFieldInfo)^, Length(sFormFieldInfo));
end;
function TMsMultiPartFormDataStream.GenerateUniqueBoundary: string;
begin
Result := '---------------------------' + FormatDateTime('mmddyyhhnnsszzz', Now);
end;
procedure TMsMultiPartFormDataStream.PrepareStreamForDispatch;
var
sFormFieldInfo: string;
begin
sFormFieldInfo := CRLF + '--' + Boundary + '--' + CRLF;
Write(Pointer(sFormFieldInfo)^, Length(sFormFieldInfo));
Position := 0;
FInitial := True;
end;
end.

View File

@ -1,375 +0,0 @@
object MutateForm: TMutateForm
Left = 857
Top = 311
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Mutation'
ClientHeight = 383
ClientWidth = 372
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000000000000680300001600000028000000100000002000
0000010018000000000040030000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000056B9F5000000
00000000000000000056B9F500000000000000000000000056B9F50000000000
0000000000000000000056B9F500000000000000000000000056B9F500000000
000000000000000056B9F500000000000000000000000000000056B9F5000000
00000000000000000056B9F500000000000000000000000056B9F50000000000
0056B9F556B9F556B9F556B9F500000056B9F556B9F556B9F556B9F500000056
B9F556B9F556B9F556B9F5000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000056B9F500000000000000000000000056B9F500000000
000000000000000056B9F500000000000000000000000000000056B9F5000000
00000000000000000056B9F500000000000000000000000056B9F50000000000
0000000000000000000056B9F500000000000000000000000056B9F500000000
000000000000000056B9F500000000000056B9F556B9F556B9F556B9F5000000
56B9F556B9F556B9F556B9F500000056B9F556B9F556B9F556B9F50000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000056B9F5000000
00000000000000000056B9F500000000000000000000000056B9F50000000000
0000000000000000000056B9F500000000000000000000000056B9F500000000
000000000000000056B9F500000000000000000000000000000056B9F5000000
00000000000000000056B9F500000000000000000000000056B9F50000000000
0056B9F556B9F556B9F556B9F500000056B9F556B9F556B9F556B9F500000056
B9F556B9F556B9F556B9F5000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000FFFF
000084210000842100008421000084210000FFFF000084210000842100008421
000084210000FFFF000084210000842100008421000084210000FFFF0000}
OldCreateOrder = False
Position = poDefault
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object GroupBox1: TGroupBox
Left = 8
Top = 8
Width = 357
Height = 283
Caption = 'Directions'
TabOrder = 0
object Panel1: TPanel
Left = 12
Top = 20
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 1
object Image1: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel2: TPanel
Left = 124
Top = 20
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 2
object Image2: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel3: TPanel
Left = 236
Top = 20
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 3
object Image3: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel8: TPanel
Left = 12
Top = 104
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 Panel0: TPanel
Left = 124
Top = 104
Width = 108
Height = 80
HelpContext = 2003
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 0
object Image0: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = Image0Click
end
end
object Panel4: TPanel
Left = 236
Top = 104
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 5
object Image4: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel7: TPanel
Left = 12
Top = 188
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 6
object Image7: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel6: TPanel
Left = 124
Top = 188
Width = 108
Height = 80
BevelOuter = bvLowered
Caption = 'PrevPnl3'
Color = clBlack
TabOrder = 7
object Image6: TImage
Left = 1
Top = 1
Width = 106
Height = 78
Align = alClient
PopupMenu = QualityPopup
Stretch = True
OnClick = MutantClick
end
end
object Panel5: TPanel
Left = 236
Top = 188
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
object GroupBox2: TGroupBox
Left = 8
Top = 296
Width = 357
Height = 81
Caption = 'Controls'
TabOrder = 1
object Label1: TLabel
Left = 8
Top = 52
Width = 31
Height = 13
Caption = 'Trend:'
end
object Label2: TLabel
Left = 8
Top = 23
Width = 34
Height = 13
Caption = 'Speed:'
end
object lblTime: TLabel
Left = 320
Top = 23
Width = 6
Height = 13
Caption = '0'
end
object scrollTime: TScrollBar
Left = 48
Top = 24
Width = 265
Height = 13
LargeChange = 5
Max = 50
Min = 1
PageSize = 0
Position = 1
TabOrder = 0
OnChange = scrollTimeChange
end
object cmbTrend: TComboBox
Left = 56
Top = 48
Width = 145
Height = 21
Style = csDropDownList
ItemHeight = 13
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 = 208
Top = 50
Width = 129
Height = 17
Caption = 'Same no. of transforms'
TabOrder = 2
OnClick = chkSameNumClick
end
end
object Timer: TTimer
Enabled = False
Interval = 100
OnTimer = TimerTimer
Left = 80
Top = 40
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

View File

@ -1,632 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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, Render, ComCtrls, Menus, Buttons, Cmap;
type
TMutateForm = class(TForm)
GroupBox1: TGroupBox;
Panel0: TPanel;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel8: TPanel;
Panel4: TPanel;
Panel7: TPanel;
Panel6: TPanel;
Panel5: TPanel;
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
Image6: TImage;
Image7: TImage;
Image8: TImage;
Image0: TImage;
Timer: TTimer;
GroupBox2: TGroupBox;
Label1: TLabel;
Label2: TLabel;
scrollTime: TScrollBar;
cmbTrend: TComboBox;
lblTime: TLabel;
chkSameNum: TCheckBox;
QualityPopup: TPopupMenu;
mnuLowQuality: TMenuItem;
mnuMediumQuality: TMenuItem;
mnuHighQuality: TMenuItem;
N3: TMenuItem;
mnuResetLocation: TMenuItem;
mnuBack: TMenuItem;
N1: TMenuItem;
mnuMaintainSym: TMenuItem;
N2: TMenuItem;
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;
{$R *.DFM}
procedure TMutateForm.UpdateFlame;
begin
MainForm.StopThread;
MainForm.UpdateUndo;
MainCp.Copy(cps[0]);
Transforms := MainForm.TrianglesFromCP(MainCp, MainTriangles);
MainCp.cmap := cmap;
MainCp.name := name;
MainCp.nick := nick;
mainCp.url := url;
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);
AdjustScale(cps[0], 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
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
for i := 1 to 8 do
begin
if bstop then exit;
cps[0].Time := 0;
cps[i].Time := 1;
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].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 NVARS - 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]));
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;
Interpolate;
ShowMain;
ShowMutants;
end;
procedure TMutateForm.FormCreate(Sender: TObject);
var
i: integer;
begin
cmbTrend.Items.clear;
cmbTrend.AddItem('Random', Tobject(vRandom));
for i:= 0 to NVars -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].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 NVARS - 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;
lblTime.Caption := 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;
AdjustScale(cps[0], 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;
end.

View File

@ -1,51 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 MyTypes;
interface
uses ControlPoint;
type
TTriangle = record
x: array[0..2] of double;
y: array[0..2] of double;
end;
TTriangles = array[-1..NXFORMS] of TTriangle;
TSPoint = record
x: double;
y: double;
end;
TMapPalette = record
Red: array[0..255] of byte;
Green: array[0..255] of byte;
Blue: array[0..255] of byte;
end;
TColorMaps = record
Identifier: string;
UGRFile: string;
end;
pPixArray = ^TPixArray;
TPixArray = array[0..1279, 0..1023, 0..3] of integer;
pPreviewPixArray = ^TPreviewPixArray;
TPreviewPixArray = array[0..159, 0..119, 0..3] of integer;
TFileType = (ftIfs, ftFla, ftXML);
implementation
end.

File diff suppressed because it is too large Load Diff

View File

@ -1,590 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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.
}
{$D-,L-,O+,Q-,R-,Y-,S-}
unit Options;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls, Buttons, Registry, Mask, CheckLst;
type
TOptionsForm = class(TForm)
btnOK: TButton;
btnCancel: TButton;
OpenDialog: TOpenDialog;
Tabs: TPageControl;
GeneralPage: TTabSheet;
chkConfirmDel: TCheckBox;
GroupBox13: TGroupBox;
JPEG: TGroupBox;
txtJPEGQuality: TEdit;
DisplayPage: TTabSheet;
GroupBox2: TGroupBox;
Label4: TLabel;
Label1: TLabel;
Label30: TLabel;
txtLowQuality: TEdit;
txtMediumQuality: TEdit;
txtHighQuality: TEdit;
grpRendering: TGroupBox;
lblSampleDensity: TLabel;
lblGamma: TLabel;
lblBrightness: TLabel;
lblVibrancy: TLabel;
lblOversample: TLabel;
lblFilterRadius: TLabel;
txtSampleDensity: TEdit;
txtGamma: TEdit;
txtBrightness: TEdit;
txtVibrancy: TEdit;
txtOversample: TEdit;
txtFilterRadius: TEdit;
RandomPage: TTabSheet;
gpNumberOfTransforms: TGroupBox;
Label28: TLabel;
Label29: TLabel;
txtMinXForms: TEdit;
txtMaxXforms: TEdit;
chkKeepBackground: TCheckBox;
TabSheet6: TTabSheet;
UPRPage: TPageControl;
GroupBox11: TGroupBox;
Label26: TLabel;
Label27: TLabel;
txtUPRWidth: TEdit;
txtUPRHeight: TEdit;
gpFlameTitlePrefix: TGroupBox;
txtRandomPrefix: TEdit;
gpMutationTransforms: TGroupBox;
Label2: TLabel;
Label3: TLabel;
txtMinMutate: TEdit;
txtMaxMutate: TEdit;
gpForcedSymmetry: TGroupBox;
cmbSymType: TComboBox;
txtSymOrder: TEdit;
Label7: TLabel;
Label9: TLabel;
VariationsPage: TTabSheet;
GroupBox17: TGroupBox;
btnSetAll: TButton;
btnClearAll: TButton;
Label8: TLabel;
txtNumtries: TEdit;
Label10: TLabel;
txtTryLength: TEdit;
TabSheet1: TTabSheet;
grpGradient: TRadioGroup;
GroupBox3: TGroupBox;
txtMinNodes: TEdit;
txtMaxNodes: TEdit;
Label18: TLabel;
Label19: TLabel;
txtMinHue: TEdit;
txtMaxHue: TEdit;
Label31: TLabel;
Label32: TLabel;
Label33: TLabel;
txtMinSat: TEdit;
Label34: TLabel;
txtMaxSat: TEdit;
Label35: TLabel;
txtMinLum: TEdit;
Label36: TLabel;
txtMaxLum: TEdit;
udMinNodes: TUpDown;
udMaxNodes: TUpDown;
udMinHue: TUpDown;
udMaxHue: TUpDown;
udMinSat: TUpDown;
udmaxSat: TUpDown;
udMinLum: TUpDown;
udMaxLum: TUpDown;
udMinXforms: TUpDown;
udMaxXForms: TUpDown;
udMinMutate: TUpDown;
udMaxMutate: TUpDown;
udSymOrder: TUpDown;
chkFixedReference: TCheckBox;
GroupBox1: TGroupBox;
txtBatchSize: TEdit;
udBatchSize: TUpDown;
GroupBox9: TGroupBox;
Label20: TLabel;
Label21: TLabel;
Label22: TLabel;
txtFIterDensity: TEdit;
txtUPRFilterRadius: TEdit;
txtUPROversample: TEdit;
GroupBox4: TGroupBox;
Label11: TLabel;
Label12: TLabel;
txtFCIdent: TEdit;
txtFCFile: TEdit;
GroupBox5: TGroupBox;
Label13: TLabel;
Label14: TLabel;
txtFFIdent: TEdit;
txtFFFile: TEdit;
chkAdjustDensity: TCheckBox;
TabSheet2: TTabSheet;
GroupBox6: TGroupBox;
Label5: TLabel;
Label6: TLabel;
txtNick: TEdit;
txtURL: TEdit;
Label15: TLabel;
txtPassword: TEdit;
GroupBox8: TGroupBox;
Label17: TLabel;
txtServer: TEdit;
chkResize: TCheckBox;
Paths: TTabSheet;
GroupBox10: TGroupBox;
btnDefGradient: TSpeedButton;
Label25: TLabel;
txtDefParameterFile: TEdit;
GroupBox12: TGroupBox;
Label23: TLabel;
txtDefSmoothFile: TEdit;
btnSmooth: TSpeedButton;
GroupBox7: TGroupBox;
btnRenderer: TSpeedButton;
Label16: TLabel;
txtRenderer: TEdit;
GroupBox14: TGroupBox;
SpeedButton2: TSpeedButton;
Label37: TLabel;
txtLibrary: TEdit;
clbVarEnabled: TCheckListBox;
procedure btnCancelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure btnDefGradientClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure btnSmoothClick(Sender: TObject);
procedure cmbSymTypeChange(Sender: TObject);
procedure btnSetAllClick(Sender: TObject);
procedure btnClearAllClick(Sender: TObject);
procedure txtMinNodesChange(Sender: TObject);
procedure txtMaxNodesChange(Sender: TObject);
procedure txtMaxHueChange(Sender: TObject);
procedure txtMaxSatChange(Sender: TObject);
procedure txtMaxLumChange(Sender: TObject);
procedure txtMinHueChange(Sender: TObject);
procedure txtMinSatChange(Sender: TObject);
procedure txtMinLumChange(Sender: TObject);
procedure txtMinXFormsChange(Sender: TObject);
procedure txtMaxXformsChange(Sender: TObject);
procedure txtMinMutateChange(Sender: TObject);
procedure txtMaxMutateChange(Sender: TObject);
procedure btnRendererClick(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
OptionsForm: TOptionsForm;
implementation
uses Main, Global, Editor, ControlPoint;
{$R *.DFM}
procedure TOptionsForm.btnCancelClick(Sender: TObject);
begin
Close;
end;
procedure TOptionsForm.FormShow(Sender: TObject);
var
Registry: TRegistry;
i: integer;
begin
{ Read posution from registry }
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Options', False) then
begin
if Registry.ValueExists('Left') then
OptionsForm.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
OptionsForm.Top := Registry.ReadInteger('Top');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
{ General tab }
txtDefParameterFile.Text := DefFlameFile;
txtDefSmoothFile.Text := defSmoothPaletteFile;
txtNumtries.text := IntToStr(Numtries);
txtTryLength.text := IntToStr(Trylength);
chkConfirmDel.Checked := ConfirmDelete;
txtJPEGQuality.text := IntToStr(JPEGQuality);
chkFixedReference.Checked := FixedReference;
udBatchSize.Position := BatchSize;
chkResize.checked := ResizeOnLoad;
{ Display tab }
txtSampleDensity.Text := FloatToStr(defSampleDensity);
txtGamma.Text := FloatToStr(defGamma);
txtBrightness.Text := FloatToStr(defBrightness);
txtVibrancy.Text := FloatToStr(defVibrancy);
txtOversample.Text := IntToStr(defOversample);
txtFilterRadius.Text := FloatToStr(defFilterRadius);
txtLowQuality.Text := FloatToStr(prevLowQuality);
txtMediumQuality.Text := FloatToStr(prevMediumQuality);
txtHighQuality.Text := FloatToStr(prevHighQuality);
{ Random tab }
udMinXforms.Position := randMinTransforms;
udMaxXforms.Position := randMaxTransforms;
udMinMutate.Position := mutantMinTransforms;
udMaxMutate.Position := mutantMaxTransforms;
txtRandomPrefix.text := RandomPrefix;
chkKeepbackground.Checked := KeepBackground;
cmbSymType.ItemIndex := SymmetryType;
if (SymmetryType = 0) or (SymmetryType = 1) then txtSymOrder.enabled := false;
udSymOrder.Position := SymmetryOrder;
{ Variations tab }
UnpackVariations(VariationOptions);
for i := 0 to NVars -1 do
clbVarEnabled.Checked[i] := Variations[i];
{ Gradient tab }
grpGradient.ItemIndex := randGradient;
udMinNodes.Position := MinNodes;
udMaxNodes.Position := MaxNodes;
udMinHue.Position := MinHue;
udMinSat.Position := MinSat;
udMinLum.Position := MinLum;
udMaxHue.Position := MaxHue;
udMaxSat.Position := MaxSat;
udMaxLum.Position := MaxLum;
{ UPR tab }
txtFIterDensity.text := IntToStr(UPRSampleDensity);
txtUPRFilterRadius.text := FloatToStr(UPRFilterRadius);
txtUPROversample.text := IntToStr(UPROversample);
txtFCIdent.text := UPRColoringIdent;
txtFCFile.text := UPRColoringFile;
txtFFIdent.text := UPRFormulaIdent;
txtFFFile.text := UPRFormulaFile;
txtUPRWidth.text := IntToStr(UPRWidth);
txtUPRHeight.text := IntToStr(UPRHeight);
chkAdjustDensity.checked := UPRAdjustDensity;
{ UPR tab }
txtNick.Text := SheepNick;
txtURL.Text := SheepURL;
txtPassword.Text := SheepPW;
txtRenderer.Text := HqiPath;
txtServer.Text := SheepServer;
txtLibrary.text := defLibrary;
end;
procedure TOptionsForm.btnOKClick(Sender: TObject);
var
v: integer;
i: integer;
begin
{ Variations tab }
{ Get option values from controls. Disallow bad values }
for i := 0 to NVars -1 do
Variations[i] := clbVarEnabled.Checked[i];
v := PackVariations;
if v <> 0 then VariationOptions := v
else
begin
Application.MessageBox('You must select at least one variation.', 'Apophysis', 48);
Tabs.ActivePage := VariationsPage;
Exit;
end;
{ General tab }
defFlameFile := txtDefParameterFile.Text;
defSmoothPaletteFile := txtDefSmoothFile.Text;
JPEGQuality := StrToInt(txtJPEGQuality.text);
Numtries := StrToInt(txtNumtries.text);
if NumTries < 1 then Numtries := 1;
Trylength := StrToInt(txtTrylength.text);
if Trylength < 100 then trylength := 100;
if JPEGQuality > 100 then JPEGQuality := 100;
if JPEGQuality < 1 then JPEGQuality := 100;
BatchSize := udBatchSize.Position;
if BatchSize < 1 then BatchSize := 1;
if BatchSize > 300 then BatchSize := 300;
ConfirmDelete := chkConfirmDel.Checked;
FixedReference := chkFixedReference.Checked;
ResizeOnLoad := chkResize.checked;
{ Display tab }
defSampleDensity := StrToFloat(txtSampleDensity.Text);
if defSampleDensity > 100 then defSampleDensity := 100;
if defSampleDensity <= 0 then defSampleDensity := 0.1;
defGamma := StrToFloat(txtGamma.Text);
if defGamma < 0.1 then defGamma := 0.1;
defBrightness := StrToFloat(txtBrightness.Text);
if defBrightness < 0.1 then defBrightness := 0.1;
defVibrancy := StrToFloat(txtVibrancy.Text);
if defVibrancy < 0 then defVibrancy := 0.1;
defFilterRadius := StrToFloat(txtFilterRadius.Text);
if defFilterRadius <= 0 then defFilterRadius := 0.1;
defOversample := StrToInt(txtOversample.Text);
if defOversample > 4 then defOversample := 4;
if defOversample < 1 then defOversample := 1;
prevLowQuality := StrToFloat(txtLowQuality.Text);
if prevLowQuality > 100 then prevLowQuality := 100;
if prevLowQuality < 0.01 then prevLowQuality := 0.01;
prevMediumQuality := StrToFloat(txtMediumQuality.Text);
if prevMediumQuality > 100 then prevMediumQuality := 100;
if prevMediumQuality < 0.01 then prevMediumQuality := 0.01;
prevHighQuality := StrToFloat(txtHighQuality.Text);
if prevHighQuality > 100 then prevHighQuality := 100;
if prevHighQuality < 0.01 then prevHighQuality := 0.01;
{ Random tab }
randMinTransforms := udMinXforms.Position;
randMaxTransforms := udMaxXforms.Position;
mutantMinTransforms := udMinMutate.Position;
mutantMaxTransforms := udMaxMutate.Position;
RandomPrefix := txtRandomPrefix.text;
SymmetryType := cmbSymType.ItemIndex;
SymmetryOrder := udSymOrder.Position;
KeepBackground := chkKeepbackground.Checked;
{Gradient tab }
randGradient := grpGradient.ItemIndex;
MinNodes := udMinNodes.Position;
MaxNodes := udMaxNodes.Position;
MinHue := udMinHue.Position;
MinSat := udMinSat.Position;
MinLum := udMinLum.Position;
MaxHue := udMaxHue.Position;
MaxSat := udMaxSat.Position;
MaxLum := udMaxLum.Position;
{ UPR options }
UPRSampleDensity := StrToInt(txtFIterDensity.text);
UPRFilterRadius := StrToFloat(txtUPRFilterRadius.text);
UPROversample := StrToInt(txtUPROversample.text);
UPRColoringIdent := txtFCIdent.text;
UPRColoringFile := txtFCFile.text;
UPRFormulaIdent := txtFFIdent.text;
UPRFormulaFile := txtFFFile.text;
UPRAdjustDensity := chkAdjustDensity.checked;
UPRWidth := StrToInt(txtUPRWidth.text);
UPRHeight := StrToInt(txtUPRHeight.text);
{ Sheep options }
SheepNick := txtNick.Text;
SheepURL := txtURL.Text;
SheepPW := txtPassword.text;
HqiPath := txtRenderer.text;
SheepServer := txtServer.text;
{Paths}
defLibrary := txtLibrary.text;
Close;
end;
procedure TOptionsForm.btnDefGradientClick(Sender: TObject);
begin
OpenDialog.Filter := 'Flame files (*.flame)|*.flame|Apophysis 1.0 parameters (*.apo;*.fla)|*.apo;*.fla';
OpenDialog.FileName := '';
if OpenDialog.Execute then
begin
txtDefParameterFile.text := OpenDialog.FileName;
end;
end;
procedure TOptionsForm.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\Options', True) then
begin
Registry.WriteInteger('Top', OptionsForm.Top);
Registry.WriteInteger('Left', OptionsForm.Left);
end;
finally
Registry.Free;
end;
end;
procedure TOptionsForm.btnSmoothClick(Sender: TObject);
begin
OpenDialog.Filter := 'Gradient files (*.ugr)|*.ugr';
OpenDialog.InitialDir := ExtractFilePath(defSmoothPaletteFile);
OpenDialog.FileName := '';
OpenDialog.DefaultExt := 'ugr';
if OpenDialog.Execute then
begin
txtDefSmoothFile.text := OpenDialog.FileName;
end;
end;
procedure TOptionsForm.cmbSymTypeChange(Sender: TObject);
begin
if (cmbSymType.ItemIndex = 0) or (cmbSymType.ItemIndex = 1) then
txtSymOrder.enabled := false
else
txtSymOrder.enabled := true;
end;
procedure TOptionsForm.btnSetAllClick(Sender: TObject);
var
i: integer;
begin
for i := 0 to NVars - 1 do
clbVarEnabled.Checked[i] := True;
end;
procedure TOptionsForm.btnClearAllClick(Sender: TObject);
var
i: integer;
begin
for i := 0 to NVars - 1 do
clbVarEnabled.Checked[i] := False;
end;
procedure TOptionsForm.txtMinNodesChange(Sender: TObject);
begin
if StrToInt(txtMinNodes.Text) > udMaxNodes.position then
udMaxNodes.Position := StrToInt(txtMinNodes.Text);
end;
procedure TOptionsForm.txtMaxNodesChange(Sender: TObject);
begin
if StrToInt(txtMaxNodes.Text) < udMinNodes.position then
udMinNodes.Position := StrToInt(txtMaxNodes.Text);
end;
procedure TOptionsForm.txtMaxHueChange(Sender: TObject);
begin
if StrToInt(txtMaxHue.Text) < udMinHue.position then
udMinHue.Position := StrToInt(txtMaxHue.Text);
end;
procedure TOptionsForm.txtMaxSatChange(Sender: TObject);
begin
if StrToInt(txtMaxSat.Text) < udMinSat.position then
udMinSat.Position := StrToInt(txtMaxSat.Text);
end;
procedure TOptionsForm.txtMaxLumChange(Sender: TObject);
begin
if StrToInt(txtMaxLum.Text) < udMinLum.position then
udMinLum.Position := StrToInt(txtMaxLum.Text);
end;
procedure TOptionsForm.txtMinHueChange(Sender: TObject);
begin
if StrToInt(txtMinHue.Text) > udMaxHue.position then
udMaxHue.Position := StrToInt(txtMinHue.Text);
end;
procedure TOptionsForm.txtMinSatChange(Sender: TObject);
begin
if StrToInt(txtMinSat.Text) > udMaxSat.position then
udMaxSat.Position := StrToInt(txtMinSat.Text);
end;
procedure TOptionsForm.txtMinLumChange(Sender: TObject);
begin
if StrToInt(txtMinLum.Text) > udMaxLum.position then
udMaxLum.Position := StrToInt(txtMinLum.Text);
end;
procedure TOptionsForm.txtMinXFormsChange(Sender: TObject);
begin
if StrToInt(txtMinXForms.Text) > udMaxXForms.position then
udMaxXFOrms.Position := StrToInt(txtMinXForms.Text);
end;
procedure TOptionsForm.txtMaxXformsChange(Sender: TObject);
begin
if StrToInt(txtMaxXForms.Text) < udMinXForms.position then
udMinXForms.Position := StrToInt(txtMaxXforms.Text);
end;
procedure TOptionsForm.txtMinMutateChange(Sender: TObject);
begin
if StrToInt(txtMinMutate.Text) > udMaxMutate.position then
udMaxMutate.Position := StrToInt(txtMinMutate.Text);
end;
procedure TOptionsForm.txtMaxMutateChange(Sender: TObject);
begin
if StrToInt(txtMaxMutate.Text) < udMinMutate.position then
udMinMutate.Position := StrToInt(txtMaxMutate.Text);
end;
procedure TOptionsForm.btnRendererClick(Sender: TObject);
begin
OpenDialog.Filter := 'Executables (*.exe)|*.exe';
OpenDialog.InitialDir := ExtractFilePath(HqiPath);
OpenDialog.FileName := '';
if OpenDialog.Execute then
begin
txtRenderer.text := OpenDialog.FileName;
end;
end;
procedure TOptionsForm.SpeedButton2Click(Sender: TObject);
begin
OpenDialog.Filter := 'Script files (*.asc)|*.asc';
OpenDialog.InitialDir := ExtractFilePath(defLibrary);
OpenDialog.FileName := '';
if OpenDialog.Execute then
begin
txtLibrary.text := OpenDialog.FileName;
end;
end;
procedure TOptionsForm.FormCreate(Sender: TObject);
var
i: integer;
begin
for i:= 0 to NVARS - 1 do begin
clbVarEnabled.AddItem(Main.varnames[i],nil);
end;
end;
end.

View File

@ -1,43 +0,0 @@
object PreviewForm: TPreviewForm
Left = 336
Top = 228
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
Position = poDefaultPosOnly
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnKeyPress = FormKeyPress
PixelsPerInch = 96
TextHeight = 13
object BackPanel: TPanel
Left = 0
Top = 0
Width = 204
Height = 154
Align = alClient
BevelInner = bvLowered
BevelOuter = bvLowered
Color = clBlack
TabOrder = 0
object Image: TImage
Left = 2
Top = 2
Width = 200
Height = 150
Align = alClient
AutoSize = True
Stretch = True
end
end
end

View File

@ -1,88 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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, Render;
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
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.

View File

@ -1,910 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 Regstry;
interface
uses graphics, Messages;
procedure ReadSettings;
procedure SaveSettings;
implementation
uses Windows, SysUtils, Forms, Registry, Global, Dialogs;
procedure ReadSettings;
var
Registry: TRegistry;
DefaultPath: string;
begin
DefaultPath := ExtractFilePath(Application.Exename);
// ShowMessage(DefaultPath);
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
{ Defaults }
if Registry.OpenKey('Software\' + APP_NAME + '\Defaults', False) then
begin
if Registry.ValueExists('DefaultFlameFile') then
begin
defFlameFile := Registry.ReadString('DefaultFlameFile');
end
else
begin
defFlameFile := '';
end;
if Registry.ValueExists('GradientFile') then
begin
GradientFile := Registry.ReadString('GradientFile');
end
else
begin
GradientFile := ''
end;
if Registry.ValueExists('SavePath') then
begin
SavePath := Registry.ReadString('SavePath');
end
else
begin
SavePath := DefaultPath + 'Parameters\My Flames.flame';
end;
if Registry.ValueExists('SmoothPaletteFile') then
begin
defSmoothPaletteFile := Registry.ReadString('SmoothPaletteFIle');
end
else
begin
defSmoothPaletteFile := DefaultPath + 'smooth.ugr';
end;
if Registry.ValueExists('ConfirmDelete') then
begin
ConfirmDelete := Registry.ReadBool('ConfirmDelete');
end
else
begin
ConfirmDelete := True;
end;
if Registry.ValueExists('KeepBackground') then
begin
KeepBackground := Registry.ReadBool('KeepBackground');
end
else
begin
KeepBackground := False;
end;
if Registry.ValueExists('NumTries') then
begin
NumTries := Registry.ReadInteger('NumTries');
end
else
begin
NumTries := 10;
end;
if Registry.ValueExists('TryLength') then
begin
TryLength := Registry.ReadInteger('TryLength');
end
else
begin
TryLength := 100000;
end;
if Registry.ValueExists('MinTransforms') then
begin
randMinTransforms := Registry.ReadInteger('MinTransforms');
end
else
begin
randMinTransforms := 2;
end;
if Registry.ValueExists('MaxTransforms') then
begin
randMaxTransforms := Registry.ReadInteger('MaxTransforms');
end
else
begin
randMaxTransforms := 3;
end;
if Registry.ValueExists('MutationMinTransforms') then
begin
mutantMinTransforms := Registry.ReadInteger('MutationMinTransforms');
end
else
begin
mutantMinTransforms := 2;
end;
if Registry.ValueExists('MutationMaxTransforms') then
begin
mutantMaxTransforms := Registry.ReadInteger('MutationMaxTransforms');
end
else
begin
mutantMaxTransforms := 6;
end;
if Registry.ValueExists('RandomGradient') then
begin
randGradient := Registry.ReadInteger('RandomGradient');
end
else
begin
randGradient := 0;
end;
if Registry.ValueExists('ParameterFolder') then
begin
ParamFolder := Registry.ReadString('ParameterFolder');
end
else
begin
ParamFolder := DefaultPath + 'Parameters\';
end;
if Registry.ValueExists('UPRPath') then
begin
UPRPath := Registry.ReadString('UPRPath');
end
else
begin
UPRPath := DefaultPath;
end;
if Registry.ValueExists('ImageFolder') then
begin
ImageFolder := Registry.ReadString('ImageFolder');
end
else
begin
ImageFolder := DefaultPath;
end;
if Registry.ValueExists('UPRWidth') then
begin
UPRWidth := Registry.ReadInteger('UPRWidth');
end
else
begin
UPRWidth := 640;
end;
if Registry.ValueExists('UPRHeight') then
begin
UPRHeight := Registry.ReadInteger('UPRHeight');
end
else
begin
UPRHeight := 480;
end;
if Registry.ValueExists('BrowserPath') then
begin
BrowserPath := Registry.ReadString('BrowserPath');
end
else
begin
BrowserPath := DefaultPath;
end;
if Registry.ValueExists('EditPreviewQaulity') then
begin
EditPrevQual := Registry.ReadInteger('EditPreviewQaulity');
end
else
begin
EditPrevQual := 1;
end;
if Registry.ValueExists('MutatePreviewQaulity') then
begin
MutatePrevQual := Registry.ReadInteger('MutatePreviewQaulity');
end
else
begin
MutatePrevQual := 1;
end;
if Registry.ValueExists('AdjustPreviewQaulity') then
begin
AdjustPrevQual := Registry.ReadInteger('AdjustPreviewQaulity');
end
else
begin
AdjustPrevQual := 1;
end;
if Registry.ValueExists('RandomPrefix') then
begin
RandomPrefix := Registry.ReadString('RandomPrefix');
end
else
begin
RandomPrefix := 'Apophysis-'
end;
if Registry.ValueExists('RandomDate') then
begin
RandomDate := Registry.ReadString('RandomDate');
end
else
begin
RandomDate := ''
end;
if Registry.ValueExists('RandomIndex') then
begin
RandomIndex := Registry.ReadInteger('RandomIndex');
end
else
begin
RandomIndex := 0;
end;
if Registry.ValueExists('SymmetryType') then
begin
SymmetryType := Registry.ReadInteger('SymmetryType');
end
else
begin
SymmetryType := 0;
end;
if Registry.ValueExists('SymmetryOrder') then
begin
SymmetryOrder := Registry.ReadInteger('SymmetryOrder');
end
else
begin
SymmetryOrder := 4;
end;
if Registry.ValueExists('VariationOptions') then
begin
VariationOptions := Registry.ReadInteger('VariationOptions');
end
else
begin
VariationOptions := 262143;
end;
if Registry.ValueExists('MinNodes') then
begin
MinNodes := Registry.ReadInteger('MinNodes');
end
else
begin
MinNodes := 2;
end;
if Registry.ValueExists('MinHue') then
begin
MinHue := Registry.ReadInteger('MinHue');
end
else
begin
MinHue := 0;
end;
if Registry.ValueExists('MinSat') then
begin
MinSat := Registry.ReadInteger('MinSat');
end
else
begin
MinSat := 0;
end;
if Registry.ValueExists('MinLum') then
begin
MinLum := Registry.ReadInteger('MinLum');
end
else
begin
MinLum := 0;
end;
if Registry.ValueExists('MaxNodes') then
begin
MaxNodes := Registry.ReadInteger('MaxNodes');
end
else
begin
MaxNodes := 10;
end;
if Registry.ValueExists('MaxHue') then
begin
MaxHue := Registry.ReadInteger('MaxHue');
end
else
begin
MaxHue := 600;
end;
if Registry.ValueExists('MaxSat') then
begin
MaxSat := Registry.ReadInteger('MaxSat');
end
else
begin
MaxSat := 100;
end;
if Registry.ValueExists('FixedReference') then
begin
FixedReference := Registry.ReadBool('FixedReference');
end
else
begin
FixedReference := False;
end;
if Registry.ValueExists('MaxLum') then
begin
MaxLum := Registry.ReadInteger('MaxLum');
end
else
begin
MaxLum := 100;
end;
if Registry.ValueExists('BatchSize') then
begin
BatchSize := Registry.ReadInteger('BatchSize');
end
else
begin
BatchSize := 100;
end;
if Registry.ValueExists('ScriptPath') then
begin
ScriptPath := Registry.ReadString('ScriptPath');
end
else
begin
ScriptPath := DefaultPath + 'Scripts\';
end;
if Registry.ValueExists('FunctionLibrary') then
begin
defLibrary := Registry.ReadString('FunctionLibrary');
end
else
begin
defLibrary := DefaultPath + 'Scripts\Functions.asc';
end;
if Registry.ValueExists('ExportFileFormat') then
begin
ExportFileFormat := Registry.ReadInteger('ExportFileFormat');
end
else
begin
ExportFileFormat := 1;
end;
if Registry.ValueExists('ExportWidth') then
begin
ExportWidth := Registry.ReadInteger('ExportWidth');
end
else
begin
ExportWidth := 640;
end;
if Registry.ValueExists('ExportHeight') then
begin
ExportHeight := Registry.ReadInteger('ExportHeight');
end
else
begin
ExportHeight := 480;
end;
if Registry.ValueExists('ExportDensity') then
begin
ExportDensity := Registry.ReadFloat('ExportDensity');
end
else
begin
ExportDensity := 100;
end;
if Registry.ValueExists('ExportOversample') then
begin
ExportOversample := Registry.ReadInteger('ExportOversample');
end
else
begin
ExportOversample := 2;
end;
if Registry.ValueExists('ExportFilter') then
begin
ExportFilter := Registry.ReadFloat('ExportFilter');
end
else
begin
ExportFilter := 0.6;
end;
if Registry.ValueExists('ExportBatches') then
begin
ExportBatches := Registry.ReadInteger('ExportBatches');
end
else
begin
ExportBatches := 3;
end;
if Registry.ValueExists('Nick') then
begin
SheepNick := Registry.ReadString('Nick');
end
else
begin
SheepNick := '';
end;
if Registry.ValueExists('URL') then
begin
SheepURL := Registry.ReadString('URL');
end
else
begin
SheepURL := '';
end;
if Registry.ValueExists('Pass') then
begin
SheepPW := Registry.ReadString('Pass');
end
else
begin
SheepPW := '';
end;
if Registry.ValueExists('Renderer') then
begin
HQIPath := Registry.ReadString('Renderer');
end
else
begin
HQIPath := DefaultPath + 'hqi.exe';
end;
if Registry.ValueExists('Server') then
begin
SheepServer := Registry.ReadString('Server');
end
else
begin
SheepServer := 'http://v2d5.sheepserver.net/';
end;
if Registry.ValueExists('ResizeOnLoad') then
begin
ResizeOnLoad := Registry.ReadBool('ResizeOnLoad');
end
else
begin
ResizeOnLoad := False;
end;
if Registry.ValueExists('ShowProgress') then
begin
ShowProgress := Registry.ReadBool('ShowProgress');
end
else
begin
ShowProgress := true;
end;
end
else
begin
FixedReference := false;
EditPrevQual := 1;
MutatePrevQual := 1;
AdjustPrevQual := 1;
GradientFile := '';
defFlameFile := '';
SavePath := DefaultPath + 'Parameters\My Flames.flame';
defSmoothPaletteFile := DefaultPath + 'smooth.ugr';
ConfirmDelete := True;
NumTries := 10;
TryLength := 100000;
randMinTransforms := 2;
randMaxTransforms := 3;
mutantMinTransforms := 2;
mutantMaxTransforms := 6;
randGradient := 0;
KeepBackground := False;
UPRPath := DefaultPath;
ImageFolder := DefaultPath;
ParamFolder := DefaultPath + 'Parameters\';
UPRWidth := 640;
UPRHeight := 480;
RandomPrefix := 'Apophysis-';
RandomIndex := 0;
RandomDate := '';
SymmetryType := 0;
SymmetryOrder := 4;
VariationOptions := 262143;
MinNodes := 2;
MaxNodes := 10;
MinHue := 0;
MinSat := 0;
MinLum := 0;
MaxHue := 600;
MaxSat := 100;
MaxLum := 100;
BatchSize := 100;
ScriptPath := DefaultPath + 'Scripts\';
defLibrary := DefaultPath + 'Scripts\Functions.asc';
ExportFileFormat := 1;
ExportWidth := 640;
ExportHeight := 480;
ExportDensity := 100;
ExportOversample := 2;
ExportFilter := 0.6;
ExportBatches := 3;
SheepNick := '';
SheepURL := '';
SheepPW := '';
HQIPath := DefaultPath + 'hqi.exe';
SheepServer := 'http://v2d5.sheepserver.net/';
ResizeOnLoad := False;
ShowProgress := true;
end;
Registry.CloseKey;
{ Render }
if Registry.OpenKey('Software\' + APP_NAME + '\Render', False) then
begin
if Registry.ValueExists('Path') then
begin
RenderPath := Registry.ReadString('Path');
end
else
begin
RenderPath := DefaultPath;
end;
if Registry.ValueExists('SampleDensity') then
begin
renderDensity := Registry.ReadFloat('SampleDensity');
end
else
begin
renderDensity := 200;
end;
if Registry.ValueExists('FilterRadius') then
begin
renderFilterRadius := Registry.ReadFloat('FilterRadius');
end
else
begin
renderFilterRadius := 0.4;
end;
if Registry.ValueExists('Oversample') then
begin
renderOversample := Registry.ReadInteger('Oversample');
end
else
begin
renderOversample := 2;
end;
if Registry.ValueExists('Width') then
begin
renderWidth := Registry.ReadInteger('Width');
end
else
begin
renderWidth := 1024;
end;
if Registry.ValueExists('Height') then
begin
renderHeight := Registry.ReadInteger('Height');
end
else
begin
renderHeight := 768;
end;
if Registry.ValueExists('JPEGQuality') then
begin
JPEGQuality := Registry.ReadInteger('JPEGQuality');
end
else
begin
JPEGQuality := 80;
end;
if Registry.ValueExists('FileFormat') then
begin
renderFileFormat := Registry.ReadInteger('FileFormat');
end
else
begin
renderFileFormat := 3;
end;
end
else
begin
renderFileFormat := 2;
JPEGQuality := 80;
renderPath := DefaultPath;
renderDensity := 200;
renderOversample := 2;
renderFilterRadius := 0.4;
renderWidth := 1024;
renderHeight := 768;
end;
Registry.CloseKey;
{UPR}
if Registry.OpenKey('Software\' + APP_NAME + '\UPR', False) then
begin
if Registry.ValueExists('FlameColoringFile') then
begin
UPRColoringFile := Registry.ReadString('FlameColoringFile');
end
else
begin
UPRColoringFile := 'apophysis.ucl';
end;
if Registry.ValueExists('FlameColoringIdent') then
begin
UPRColoringIdent := Registry.ReadString('FlameColoringIdent');
end
else
begin
UPRColoringIdent := 'enr-flame-a';
end;
if Registry.ValueExists('FlameFormulaFile') then
begin
UPRFormulaFile := Registry.ReadString('FlameFormulaFile');
end
else
begin
UPRFormulaFile := 'mt.ufm';
end;
if Registry.ValueExists('FlameFormulaIdent') then
begin
UPRFormulaIdent := Registry.ReadString('FlameFormulaIdent');
end
else
begin
UPRFormulaIdent := 'mt-pixel';
end;
if Registry.ValueExists('FlameIterDensity') then
begin
UPRSampleDensity := Registry.ReadInteger('FlameIterDensity');
end
else
begin
UPRSampleDensity := 35;
end;
if Registry.ValueExists('FlameFilterRadius') then
begin
UPRFilterRadius := Registry.ReadFloat('FlameFilterRadius');
end
else
begin
UPRFilterRadius := 0.7;
end;
if Registry.ValueExists('FlameOversample') then
begin
UPROversample := Registry.ReadInteger('FlameOversample');
end
else
begin
UPROversample := 3;
end;
if Registry.ValueExists('FlameAdjustDensity') then
begin
UPRAdjustDensity := Registry.ReadBool('FlameAdjustDensity');
end
else
begin
UPRAdjustDensity := true;
end;
end
else
begin
UPRColoringFile := 'apophysis.ucl';
UPRColoringIdent := 'enr-flame-a';
UPRFormulaFile := 'mt.ufm';
UPRFormulaIdent := 'mt-pixel';
UPRSampleDensity := 35;
UPRFilterRadius := 0.7;
UPROversample := 3;
UPRAdjustDensity := True; ;
end;
Registry.CloseKey;
if Registry.OpenKey('Software\' + APP_NAME + '\Display', False) then
begin
if Registry.ValueExists('SampleDensity') then
begin
defSampleDensity := Registry.ReadFloat('SampleDensity');
end
else
begin
defSampleDensity := 5;
end;
if Registry.ValueExists('Gamma') then
begin
defGamma := Registry.ReadFloat('Gamma');
end
else
begin
defGamma := 4;
end;
if Registry.ValueExists('Brightness') then
begin
defBrightness := Registry.ReadFloat('Brightness');
end
else
begin
defBrightness := 4;
end;
if Registry.ValueExists('Vibrancy') then
begin
defVibrancy := Registry.ReadFloat('Vibrancy');
end
else
begin
defVibrancy := 1;
end;
if Registry.ValueExists('FilterRadius') then
begin
defFilterRadius := Registry.ReadFloat('FilterRadius');
end
else
begin
defFilterRadius := 0.2;
end;
if Registry.ValueExists('Oversample') then
begin
defOversample := Registry.ReadInteger('Oversample');
end
else
begin
defOversample := 1;
end;
if Registry.ValueExists('PreviewDensity') then
begin
defPreviewDensity := Registry.ReadFloat('PreviewDensity');
end
else
begin
defPreviewDensity := 0.5;
end;
if Registry.ValueExists('PreviewLowQuality') then
begin
prevLowQuality := Registry.ReadFloat('PreviewLowQuality');
end
else
begin
prevLowQuality := 0.1;
end;
if Registry.ValueExists('PreviewMediumQuality') then
begin
prevMediumQuality := Registry.ReadFloat('PreviewMediumQuality');
end
else
begin
prevMediumQuality := 1;
end;
if Registry.ValueExists('PreviewHighQuality') then
begin
prevHighQuality := Registry.ReadFloat('PreviewHighQuality');
end
else
begin
prevHighQuality := 5;
end;
end
else
begin
defSampleDensity := 5;
defGamma := 4;
defBrightness := 4;
defVibrancy := 1;
defFilterRadius := 0.2;
defOversample := 1;
defPreviewDensity := 0.5;
prevLowQuality := 0.1;
prevMediumQuality := 1;
prevHighQuality := 5;
end;
Registry.CloseKey;
finally
Registry.Free;
end;
end;
procedure SaveSettings;
var
Registry: TRegistry;
begin
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
{ Defaults }
if Registry.OpenKey('\Software\' + APP_NAME + '\Defaults', True) then
begin
Registry.WriteString('GradientFile', GradientFile);
Registry.WriteString('SmoothPaletteFile', SmoothPaletteFile);
Registry.WriteBool('ConfirmDelete', ConfirmDelete);
Registry.WriteInteger('NumTries', NumTries);
Registry.WriteInteger('TryLength', TryLength);
Registry.WriteInteger('MinTransforms', randMinTransforms);
Registry.WriteInteger('MaxTransforms', randMaxTransforms);
Registry.WriteInteger('MutationMinTransforms', mutantMinTransforms);
Registry.WriteInteger('MutationMaxTransforms', mutantMaxTransforms);
Registry.WriteInteger('RandomGradient', randGradient);
Registry.WriteString('ParameterFolder', ParamFolder);
Registry.WriteString('UPRPath', UPRPath);
Registry.WriteString('ImageFolder', ImageFolder);
Registry.WriteString('SavePath', SavePath);
Registry.WriteInteger('UPRWidth', UPRWidth);
Registry.WriteInteger('UPRHeight', UPRHeight);
Registry.WriteString('BrowserPath', BrowserPath);
Registry.WriteInteger('EditPreviewQaulity', EditPrevQual);
Registry.WriteInteger('MutatePreviewQaulity', MutatePrevQual);
Registry.WriteInteger('AdjustPreviewQaulity', AdjustPrevQual);
Registry.WriteString('RandomPrefix', RandomPrefix);
Registry.WriteString('RandomDate', RandomDate);
Registry.WriteInteger('RandomIndex', RandomIndex);
Registry.WriteString('DefaultFlameFile', defFlameFile);
Registry.WriteString('SmoothPalettePath', SmoothPalettePath);
Registry.WriteString('GradientFile', GradientFile);
Registry.WriteInteger('TryLength', TryLength);
Registry.WriteInteger('NumTries', NumTries);
Registry.WriteString('SmoothPaletteFile', defSmoothPaletteFile);
Registry.WriteInteger('SymmetryType', SymmetryType);
Registry.WriteInteger('SymmetryOrder', SymmetryOrder);
Registry.WriteInteger('VariationOptions', VariationOptions);
Registry.WriteBool('FixedReference', FixedReference);
Registry.WriteInteger('MinNodes', MinNodes);
Registry.WriteInteger('MinHue', MinHue);
Registry.WriteInteger('MinSat', MinSat);
Registry.WriteInteger('MinLum', MinLum);
Registry.WriteInteger('MaxNodes', MaxNodes);
Registry.WriteInteger('MaxHue', MaxHue);
Registry.WriteInteger('MaxSat', MaxSat);
Registry.WriteInteger('MaxLum', MaxLum);
Registry.WriteInteger('BatchSize', BatchSize);
Registry.WriteString('ScriptPath', ScriptPath);
Registry.WriteInteger('ExportFileFormat', ExportFileFormat);
Registry.WriteInteger('ExportWidth', ExportWidth);
Registry.WriteInteger('ExportHeight', ExportHeight);
Registry.WriteFloat('ExportDensity', ExportDensity);
Registry.WriteFloat('ExportFilter', ExportFilter);
Registry.WriteInteger('ExportOversample', ExportOversample);
Registry.WriteInteger('ExportBatches', ExportBatches);
Registry.WriteString('Nick', SheepNick);
Registry.WriteString('URL', SheepURL);
Registry.WriteString('Renderer', HqiPath);
Registry.WriteString('Server', SheepServer);
Registry.WriteString('Pass', SheepPW);
Registry.WriteBool('ResizeOnLoad', ResizeOnLoad);
Registry.WriteBool('ShowProgress', ShowProgress);
Registry.WriteBool('KeepBackground', KeepBackground);
Registry.WriteString('FunctionLibrary', defLibrary);
end;
{ Display }
if Registry.OpenKey('\Software\' + APP_NAME + '\Display', True) then
begin
Registry.WriteFloat('SampleDensity', defSampleDensity);
Registry.WriteFloat('Gamma', defGamma);
Registry.WriteFloat('Brightness', defBrightness);
Registry.WriteFloat('Vibrancy', defVibrancy);
Registry.WriteFloat('FilterRadius', defFilterRadius);
Registry.WriteInteger('Oversample', defOversample);
Registry.WriteFloat('PreviewDensity', defPreviewDensity);
Registry.WriteFloat('PreviewLowQuality', prevLowQuality);
Registry.WriteFloat('PreviewMediumQuality', prevMediumQuality);
Registry.WriteFloat('PreviewHighQuality', prevHighQuality);
end;
{ UPR }
if Registry.OpenKey('\Software\' + APP_NAME + '\UPR', True) then
begin
Registry.WriteString('FlameColoringFile', UPRColoringFile);
Registry.WriteString('FlameColoringIdent', UPRColoringIdent);
Registry.WriteString('FlameFormulaFile', UPRFormulaFile);
Registry.WriteString('FlameFormulaIdent', UPRFormulaIdent);
Registry.WriteInteger('FlameIterDensity', UPRSampleDensity);
Registry.WriteFloat('FlameFilterRadius', UPRFilterRadius);
Registry.WriteInteger('FlameOversample', UPROversample);
Registry.WriteBool('FlameAdjustDensity', UPRAdjustDensity);
end;
if Registry.OpenKey('\Software\' + APP_NAME + '\Render', True) then
begin
Registry.WriteString('Path', renderPath);
Registry.WriteFloat('SampleDensity', renderDensity);
Registry.WriteInteger('Oversample', renderOversample);
Registry.WriteFloat('FilterRadius', renderFilterRadius);
Registry.WriteInteger('Width', renderWidth);
Registry.WriteInteger('Height', renderHeight);
Registry.WriteInteger('JPEGQuality', JPEGQuality);
Registry.WriteInteger('FileFormat', renderFileFormat);
end;
finally
Registry.Free;
end;
end;
end.

View File

@ -1,43 +0,0 @@
{
Flame screensaver Copyright (C) 2002 Ronald Hordijk
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 Render;
interface
uses
RenderThread;
type
TRenderer = class(TRenderThread)
private
public
procedure Execute; override;
end;
implementation
{ TRenderer }
procedure TRenderer.Execute;
begin
// do nothing TRenderer does not use the Thread capabilities
end;
end.

File diff suppressed because it is too large Load Diff

View File

@ -1,116 +0,0 @@
object SaveForm: TSaveForm
Left = 246
Top = 327
BorderStyle = bsDialog
Caption = 'Save Parameters'
ClientHeight = 142
ClientWidth = 406
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poOwnerFormCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 16
Top = 8
Width = 48
Height = 13
Caption = 'File name:'
end
object Label2: TLabel
Left = 16
Top = 64
Width = 23
Height = 13
Caption = 'Title:'
end
object btnDefGradient: TSpeedButton
Left = 368
Top = 22
Width = 24
Height = 24
Hint = 'Browse...'
Flat = True
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Arial'
Font.Style = [fsBold]
Glyph.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FF00000000000000000000000000000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FF000000000000
9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00
FFFF00FFFF00FFFF00FF0000009FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FFFF00FFFF00FF0000009FFFFF
9FFFFF0000009FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCF
FF000000FF00FFFF00FF0000009FFFFF9FFFFF9FFFFF0000009FCFFF9FCFFF9F
CFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF9FCFFF000000FF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF0000000000000000000000000000000000000000000000
00000000000000FF00FF0000009FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9F
FFFF9FFFFF9FFFFF000000FF00FFFF00FFFF00FFFF00FFFF00FF0000009FFFFF
9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF9FFFFF000000FF00FFFF00
FFFF00FFFF00FFFF00FF0000009FFFFF9FFFFF9FFFFF00000000000000000000
0000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000
000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0000
00000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000000000FF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF0C0C0CFF00FFFF00FFFF00FF0000
00FF00FF000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FF0B0B0B020202000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
ParentFont = False
ParentShowHint = False
ShowHint = True
OnClick = btnDefGradientClick
end
object txtFilename: TEdit
Left = 16
Top = 24
Width = 345
Height = 21
TabOrder = 0
Text = 'txtFilename'
end
object txtTitle: TEdit
Left = 16
Top = 80
Width = 345
Height = 21
TabOrder = 1
Text = 'txtTitle'
end
object btnSave: TButton
Left = 240
Top = 112
Width = 75
Height = 25
Caption = '&Save'
Default = True
TabOrder = 2
OnClick = btnSaveClick
end
object btnCancel: TButton
Left = 320
Top = 112
Width = 75
Height = 25
Caption = 'Cancel'
TabOrder = 3
OnClick = btnCancelClick
end
object SaveDialog: TSaveDialog
Left = 368
Top = 64
end
end

View File

@ -1,165 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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;
type
TSaveForm = class(TForm)
txtFilename: TEdit;
txtTitle: TEdit;
btnSave: TButton;
btnCancel: TButton;
Label1: TLabel;
Label2: TLabel;
btnDefGradient: TSpeedButton;
SaveDialog: TSaveDialog;
procedure btnSaveClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnDefGradientClick(Sender: TObject);
private
public
Title: string;
Filename: string;
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;
procedure TSaveForm.btnSaveClick(Sender: TObject);
var
warn, t, f: string;
check: boolean;
begin
if caption = 'Save Parameters' then
warn := 'parameters'
else if caption = 'Save Gradient' then
warn := 'gradient'
else if caption = 'Export UPR' then
warn := 'UPR';
t := Trim(txtTitle.Text);
f := Trim(txtFilename.Text);
if t = '' then
begin
Application.MessageBox(PChar('Please enter a title for the ' + warn + '.'), 'Apophysis', 48);
Exit;
end;
if f = '' then
begin
Application.MessageBox('Please enter a file name.', 'Apophysis', 48);
Exit;
end;
if ExtractFileExt(f) = '' then
begin
Application.MessageBox('Invalid file name.', 'Apophysis', 48);
Exit;
end;
if warn = 'parameters' then
begin
check := XMLEntryExists(t, f);
end
else
begin
t := CleanIdentifier(t);
check := EntryExists(t, f);
end;
if check then
if Application.MessageBox(PChar(t + ' in ' + f + ' already exists.' + chr(13) + 'Do you want to replace it?'),
'Apophysis', 52) = ID_NO then exit;
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;
end;
procedure TSaveForm.btnDefGradientClick(Sender: TObject);
begin
if caption = 'Save Parameters' then
begin
SaveDialog.Title := 'Select Parameter File';
SaveDialog.DefaultExt := 'flame';
SaveDialog.Filter := 'Flame files (*.flame)|*.flame|Apophysis 1.0 Parameters (*.fla)|*.fla|Fractint IFS Files (*.ifs)|*.ifs';
end
else if caption = 'Save Gradient' then
begin
SaveDialog.Title := 'Select Gradient File';
SaveDialog.DefaultExt := 'ugr';
SaveDialog.Filter := 'Gradient files (*.ugr)|*.ugr'
end
else if caption = 'Export UPR' then
begin
SaveDialog.Title := 'Select Ultra Fractal Parameter File';
SaveDialog.DefaultExt := 'upr';
SaveDialog.Filter := 'UPR Files (*.upr)|*.upr';
end;
SaveDialog.InitialDir := ExtractFilePath(txtFilename.Text);
if SaveDialog.Execute then
txtFileName.Text := SaveDialog.Filename;
end;
end.

View File

@ -1,51 +0,0 @@
object SavePresetForm: TSavePresetForm
Left = 295
Top = 331
BorderStyle = bsDialog
Caption = 'Save Preset'
ClientHeight = 77
ClientWidth = 325
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 8
Top = 4
Width = 62
Height = 13
Caption = 'Preset name:'
end
object txtPresetName: TEdit
Left = 8
Top = 20
Width = 305
Height = 21
TabOrder = 0
end
object Button1: TButton
Left = 88
Top = 48
Width = 75
Height = 25
Caption = 'OK'
Default = True
ModalResult = 1
TabOrder = 1
OnClick = Button1Click
end
object Button2: TButton
Left = 168
Top = 48
Width = 75
Height = 25
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
end

View File

@ -1,55 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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;
type
TSavePresetForm = class(TForm)
txtPresetName: TEdit;
Label1: TLabel;
Button1: TButton;
Button2: TButton;
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('Please enter a name for the preset.'), 'Apophysis', 48);
Exit;
end;
end;
end.

View File

@ -1,394 +0,0 @@
object ScriptEditor: TScriptEditor
Left = 312
Top = 383
Width = 539
Height = 390
Caption = 'Default Animation'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poDefaultPosOnly
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Splitter1: TSplitter
Left = 0
Top = 244
Width = 531
Height = 4
Cursor = crVSplit
Align = alBottom
end
object ToolBar: TToolBar
Left = 508
Top = 0
Width = 23
Height = 244
Align = alRight
AutoSize = True
Caption = 'ToolBar'
Flat = True
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 = 38
OnClick = btnBreakClick
end
end
object StatusBar: TStatusBar
Left = 0
Top = 337
Width = 531
Height = 19
Anchors = [akLeft, akRight]
Panels = <>
SimplePanel = False
end
object BackPanel: TPanel
Left = 0
Top = 0
Width = 508
Height = 244
Align = alClient
BevelInner = bvLowered
BevelOuter = bvLowered
Caption = 'BackPanel'
TabOrder = 2
object Editor: TAdvMemo
Left = 2
Top = 2
Width = 504
Height = 240
Cursor = crIBeam
PopupMenu = PopupMenu
Align = alClient
AutoCompletion.Active = False
AutoCompletion.Font.Charset = DEFAULT_CHARSET
AutoCompletion.Font.Color = clWindowText
AutoCompletion.Font.Height = -11
AutoCompletion.Font.Name = 'MS Sans Serif'
AutoCompletion.Font.Style = []
AutoHintParameterPosition = hpBelowCode
AutoIndent = True
BlockShow = False
BlockColor = clWindow
BlockLineColor = clGray
BkColor = clWindow
BorderStyle = bsNone
Ctl3D = False
DelErase = True
GutterColorTo = clBtnFace
GutterWidth = 35
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -13
Font.Name = 'COURIER NEW'
Font.Style = []
HiddenCaret = False
LineNumbers = True
LineNumberStart = 1
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;')
PrintOptions.MarginLeft = 0
PrintOptions.MarginRight = 0
PrintOptions.MarginTop = 0
PrintOptions.MarginBottom = 0
PrintOptions.PageNr = False
RightMarginColor = 14869218
SelColor = clWhite
SelBkColor = clHighlight
SyntaxStyles = PascalStyler
TabOrder = 0
TabSize = 4
TabStop = True
UndoLimit = 100
UrlAware = False
UrlStyle.TextColor = clBlue
UrlStyle.BkColor = clWhite
UrlStyle.Style = [fsUnderline]
Version = '1.5.0.8'
WordWrap = wwNone
OnChange = EditorChange
end
end
object Console: TMemo
Left = 0
Top = 248
Width = 531
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 = 456
Top = 32
end
object MainSaveDialog: TSaveDialog
DefaultExt = 'asc'
Filter = 'Apophysis Script Files (*.asc)|*.asc|Text files (*.txt)|*.txt'
Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing]
Left = 424
Top = 32
end
object PopupMenu: TPopupMenu
Images = MainForm.Buttons
Left = 392
Top = 32
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 PascalStyler: TAdvPascalMemoStyler
BlockStart = 'begin'
BlockEnd = 'end'
LineComment = '//'
MultiCommentLeft = '{'
MultiCommentRight = '}'
CommentStyle.TextColor = clNavy
CommentStyle.BkColor = clWindow
CommentStyle.Style = [fsItalic]
NumberStyle.TextColor = clWindowText
NumberStyle.BkColor = clWindow
NumberStyle.Style = []
AllStyles = <
item
KeyWords.Strings = (
'and'
'begin'
'break'
'class'
'class'
'const'
'constructor'
'continue'
'default'
'destructor'
'do'
'else'
'end'
'except'
'finalise'
'finally'
'for'
'function'
'if'
'implementation'
'inherited'
'initialise'
'interface'
'nil'
'not'
'or'
'override'
'private'
'procedure'
'property'
'protected'
'public'
'published'
'raise'
'repeat'
'stored'
'then'
'to'
'try'
'type'
'unit'
'until'
'uses'
'var'
'virtual'
'while'
'with')
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = [fsBold]
BGColor = clWindow
StyleType = stKeyword
Bracket = #0
Info = 'Pascal Standard Default'
end
item
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
BGColor = clWindow
StyleType = stBracket
Bracket = #39
Info = 'Simple Quote'
end
item
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
BGColor = clWindowText
StyleType = stBracket
Bracket = '"'
Info = 'Double Quote'
end
item
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'Courier New'
Font.Style = []
BGColor = clWindow
StyleType = stSymbol
Bracket = #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.HintCharWriteDelimiter = ','
HintParameter.Parameters.Strings = (
'ShowMessage(const Msg: string);'
'MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMs' +
'gDlgButtons; HelpCtx: Longint): Integer);')
HexIdentifier = '$'
Left = 328
Top = 32
end
object Scripter: TatPascalScripter
SourceCode.Strings = (
'')
Compiled = True
EventSupport = False
OnCompileError = ScripterCompileError
ShortBooleanEval = False
Left = 360
Top = 32
PCode = {
1B010000617450617363616C2045786563757461626C652046696C651A040F01
0000000000000000790000000000000000000000000000000000000000000000
0000000000000000545046300D546174536372697074496E666F025F3108526F
7574696E65730E01044E616D6506044D41494E095661726961626C65730E000A
497346756E6374696F6E0808417267436F756E7402000C42795265664172674D
61736B02000B526573756C74496E6465780200000007476C6F62616C730E0000
001C0000000000000003000000010000000000000000000000000000004D4149
4E1E000000330000000200000000000000000000000000000000000000526573
756C7418000000410000000200000000000000000000000000000000000000}
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 = 328
Top = 64
end
object SaveDialog: TSaveDialog
DefaultExt = 'flame'
Filter = 'Flame files (*.flame)|*.flame'
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing]
Left = 360
Top = 64
end
end

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
object ScriptRenderForm: TScriptRenderForm
Left = 390
Top = 391
BorderStyle = bsDialog
Caption = 'ScriptRenderForm'
ClientHeight = 62
ClientWidth = 268
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
PixelsPerInch = 96
TextHeight = 13
object btnCancel: TButton
Left = 96
Top = 32
Width = 75
Height = 25
Caption = '&Cancel'
TabOrder = 0
OnClick = btnCancelClick
end
object ProgressBar: TProgressBar
Left = 8
Top = 8
Width = 249
Height = 13
Min = 0
Max = 100
TabOrder = 1
end
end

View File

@ -1,139 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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, Render, cmap, ControlPoint, ImageDLLLoader,
PNGLoader, BMPLoader, LinarBitmap, ExtCtrls, FileUtils, JPEGLoader, JPEG;
const
WM_THREAD_COMPLETE = WM_APP + 5437;
WM_THREAD_TERMINATE = WM_APP + 5438;
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;
public
Renderer: TRenderer;
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.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
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;
Renderer.OnProgress := OnProgress;
Renderer.Compatibility := Compatibility;
Renderer.SetCP(cp);
if (ScriptEditor.Renderer.MaxMemory > 0) then
Renderer.RenderMaxMem(ScriptEditor.Renderer.MaxMemory)
else Renderer.Render;
with TLinearBitmap.Create do
try
Assign(Renderer.GetImage);
JPEGLoader.Default.Quality := JPEGQuality;
if not cancelled then SaveToFile(FileName);
finally
Free;
end;
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 := Min(Remainder, Elapsed * (power(1 / prog, 1.2) - 1));
Application.ProcessMessages;
end;
procedure TScriptRenderForm.FormDestroy(Sender: TObject);
begin
cp.free;
Renderer.free;
end;
procedure TScriptRenderForm.FormCreate(Sender: TObject);
begin
Renderer := TRenderer.Create;
cp := TControlPoint.Create;
ImageDLLLoader.Default.FindDLLs(ProgramPath);
end;
procedure TScriptRenderForm.btnCancelClick(Sender: TObject);
begin
ScriptEditor.Scripter.Halt;
Cancelled := True;
Renderer.Stop;
LastError := 'Render cancelled';
end;
end.

View File

@ -1,186 +0,0 @@
object SheepDialog: TSheepDialog
Left = 478
Top = 274
BorderStyle = bsDialog
Caption = 'Post Sheep'
ClientHeight = 312
ClientWidth = 240
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
Icon.Data = {
0000010001001010000001000800680500001600000028000000100000002000
0000010008000000000000000000480000004800000000010000000000000402
0400846E7C005C4E5C002C323C00141A2C00C4AAC4000C0E0C009C8E9C00AC5E
B4005C5A5C00544654001C121C00745E6C007C828400443A4400141614002426
2400140E0C000C0A0400241A2400AC96A40074666C00847A84005C667C00443E
44000C0604009C828C00140E1C00846A8400946E9400844684003C2E4400DCD6
DC009492BC006C5A640054565400242224004C424C00040604008C6E9C006C4E
7C001C222C00ACBADC000C121C00646264001C161400141214002C1A2400BC9E
AC007C6A7C00444254009C869C0084727C0064567400342E34001C1A1C00C4AE
C4000C0E14009C8EA400645E64004C4E640074626C008C82A4004C3644001416
1C002C2A2C00140E14000C0A0C00241E2400B496B400746A7C00947A8C00646A
8C00444244000C0614009C82940014121C00846A8C003C3634009496BC005456
6C0004060C001C161C00000077003862FF00000BFF00A714FF000000FF00E000
C70070002700ED00F60077007700D800E400110027001A00F60000007700E001
000070000000ED0015007700000000010900000003000000100000000000A814
B2000E0017001A00F50000007700380100000000000001000000000000000000
3800000000001500A70000000000A800E000C50070001200ED0000007700B010
20000E0000001A00000000000000000020000000000015000000000000008500
0C00F4000000F5000E007700000000A8A40000C4C3000012D900000077000000
D8000000C300150012000000000085380000F4C50000F512000077000000A1BF
0000F4ED0000F5D600007777000008700200064F7F0015D900000077000038FF
E80000FFC300A7FF120000FF0000014B0000003B000000D4000000770000010D
38000045C60000D412000077000038008D00C6004A001200D4000000770096C4
A40039C6C300E7D4D900777777009E620200390B7F00E7140000770000003C82
20000000C600A7001200000000001C00230039000400E7000000770000000000
2300000004000000000000000000B0CC75000EF405001A860700000001003818
88000045C400A7D412000077000001BCBD0000024400007AD70000005A000888
6200C6C50B00121214000000000040006200F9000B0012001400000000004001
F800F9009500120033000000000009002F0048004200E900D70077005A00381C
620030C50B00E812140077000000FF000100FF000000FF000000FF0000009E40
000039F90000E71200007700000012BFC400EBEDC60041D6D400007777008000
C4006A4FC6001AD9D40000777700D9FF0C0057FF4500E7FFD70077FF5A001C18
620039450B00E7D4140077770000AF5D020079A10000D4D400007777000023B8
000004F400000086000000000000008282000000000000000000000000000000
0000000000000000000000000000000000002626000000000000000000002600
26264019260026000026002600262626002D0F002600262E2F26262626262600
0041245119060B351E1B260000262626261849100032482708450D2E00262651
001831162C0E2121281D091043260013364E073338091C2A3C1911264226000B
3122013A4B470A3E17000000264326003D051A3146023F1F5039002626432600
232014300C294213034351262626514329234918152F0000292B190026262651
51000000410F26004C04512626262626002626062E1900262600265119260000
0000002600000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000}
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnDestroy = FormDestroy
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 16
Top = 162
Width = 25
Height = 13
Caption = 'Nick:'
end
object Label2: TLabel
Left = 16
Top = 194
Width = 25
Height = 13
Caption = 'URL:'
end
object Label3: TLabel
Left = 16
Top = 226
Width = 49
Height = 13
Caption = 'Password:'
end
object lblLink: TLabel
Left = 16
Top = 262
Width = 209
Height = 13
Alignment = taCenter
AutoSize = False
Caption = 'Creative Commons License'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlue
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = [fsUnderline]
ParentFont = False
OnClick = lblLinkClick
end
object lblLicense: TLabel
Left = 16
Top = 250
Width = 209
Height = 13
Alignment = taCenter
AutoSize = False
Caption = 'Posted sheep are distributed under a'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
end
object Button1: TButton
Left = 40
Top = 282
Width = 75
Height = 25
Caption = 'Upload'
ModalResult = 1
TabOrder = 4
OnClick = Button1Click
end
object Button2: TButton
Left = 128
Top = 282
Width = 75
Height = 25
Caption = 'Cancel'
Default = True
ModalResult = 2
TabOrder = 0
end
object PrevPnl: TPanel
Left = 37
Top = 5
Width = 162
Height = 122
BevelOuter = bvLowered
Caption = 'PrevPnl'
TabOrder = 5
object PreviewImage: TImage
Left = 1
Top = 1
Width = 160
Height = 120
Align = alClient
IncrementalDisplay = True
end
end
object txtNick: TEdit
Left = 72
Top = 160
Width = 153
Height = 21
TabOrder = 1
end
object txtURL: TEdit
Left = 72
Top = 192
Width = 153
Height = 21
TabOrder = 2
end
object txtPassword: TEdit
Left = 72
Top = 224
Width = 153
Height = 21
TabOrder = 3
end
object ScrollBar: TScrollBar
Left = 16
Top = 136
Width = 209
Height = 13
LargeChange = 10
PageSize = 0
TabOrder = 6
OnChange = ScrollBarChange
end
end

View File

@ -1,137 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 Sheep;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, Global, ControlPoint, Render;
type
TSheepDialog = class(TForm)
Button1: TButton;
Button2: TButton;
PrevPnl: TPanel;
PreviewImage: TImage;
txtNick: TEdit;
Label1: TLabel;
Label2: TLabel;
txtURL: TEdit;
Label3: TLabel;
txtPassword: TEdit;
ScrollBar: TScrollBar;
lblLicense: TLabel;
lblLink: TLabel;
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure ScrollBarChange(Sender: TObject);
procedure lblLinkClick(Sender: TObject);
private
Render: TRenderer;
bm: TBitmap;
procedure DrawPreview;
{ Private declarations }
public
cp: TControlPoint;
{ Public declarations }
end;
var
SheepDialog: TSheepDialog;
implementation
uses Main, cmap, ShellAPI;
{$R *.DFM}
procedure TSheepDialog.DrawPreview;
begin
Render.Stop;
cp.Width := PreviewImage.Width;
cp.Height := PreviewImage.Height;
cp.sample_density := 10;
cp.spatial_oversample := 2;
cp.spatial_filter_radius := 0.4;
cp.Zoom := 0;
cp.center[0] := 0;
cp.center[1] := 0;
cp.pixels_per_unit := 60;
cp.gamma := 4;
cp.brightness := 4;
cp.vibrancy := 1;
GetCMap(cp.cmapindex, cp.hue_rotation, cp.cmap);
Render.Compatibility := compatibility;
Render.SetCP(cp);
Render.Render;
BM.Assign(Render.GetImage);
PreviewImage.Picture.Graphic := bm;
end;
procedure TSheepDialog.FormShow(Sender: TObject);
var
i: integer;
begin
scrollbar.position := 0;
txtNick.text := MainCp.nick;
txtURL.text := MainCp.URL;
txtPassword.text := SheepPW;
cp.copy(MainCp);
for i := 0 to 2 do cp.background[i] := 0;
DrawPreview;
end;
procedure TSheepDialog.FormCreate(Sender: TObject);
begin
bm := TbitMap.Create;
cp := TControlPoint.Create;
Render := TRenderer.Create;
end;
procedure TSheepDialog.FormDestroy(Sender: TObject);
begin
bm.free;
cp.free;
Render.free;
end;
procedure TSheepDialog.Button1Click(Sender: TObject);
begin
SheepNick := txtNick.Text;
SheepURL := txtURL.Text;
SheepPW := txtPassword.Text;
end;
procedure TSheepDialog.ScrollBarChange(Sender: TObject);
begin
cp.hue_rotation := ScrollBar.Position / 100;
DrawPreview;
end;
procedure TSheepDialog.lblLinkClick(Sender: TObject);
begin
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar('http://creativecommons.org/licenses/by-sa/1.0/'),
nil, nil, SW_SHOWNORMAL);
end;
end.

View File

@ -1,70 +0,0 @@
object SizeTool: TSizeTool
Left = 330
Top = 199
BorderStyle = bsDialog
Caption = 'Image Size'
ClientHeight = 113
ClientWidth = 152
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnActivate = FormActivate
OnClose = FormClose
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 18
Top = 23
Width = 28
Height = 13
Caption = '&Width'
FocusControl = txtWidth
end
object Bevel: TBevel
Left = 8
Top = 8
Width = 137
Height = 97
Shape = bsFrame
end
object Label2: TLabel
Left = 18
Top = 47
Width = 34
Height = 13
Caption = '&Height:'
FocusControl = txtHeight
end
object txtWidth: TEdit
Left = 64
Top = 20
Width = 70
Height = 21
TabOrder = 0
OnChange = txtWidthChange
OnKeyPress = txtWidthKeyPress
end
object txtHeight: TEdit
Left = 64
Top = 44
Width = 70
Height = 21
TabOrder = 1
OnChange = txtHeightChange
OnKeyPress = txtHeightKeyPress
end
object chkMaintain: TCheckBox
Left = 16
Top = 76
Width = 121
Height = 17
Caption = '&Maintain aspect ratio'
TabOrder = 2
OnClick = chkMaintainClick
end
end

View File

@ -1,176 +0,0 @@
{
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 Size;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TSizeTool = class(TForm)
Label1: TLabel;
txtWidth: TEdit;
Bevel: TBevel;
txtHeight: TEdit;
Label2: TLabel;
chkMaintain: TCheckBox;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormActivate(Sender: TObject);
procedure txtHeightKeyPress(Sender: TObject; var Key: Char);
procedure txtWidthKeyPress(Sender: TObject; var Key: Char);
procedure chkMaintainClick(Sender: TObject);
procedure txtWidthChange(Sender: TObject);
procedure txtHeightChange(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
SizeTool: TSizeTool;
ImageHeight, ImageWidth: integer;
ratio: double;
xdif, ydif: integer;
implementation
uses Main, Registry, Global;
{$R *.DFM}
procedure TSizeTool.FormShow(Sender: TObject);
var
Registry: TRegistry;
begin
Registry := TRegistry.Create;
try
Registry.RootKey := HKEY_CURRENT_USER;
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\SizeTool', False) then
begin
if Registry.ValueExists('Left') then
SizeTool.Left := Registry.ReadInteger('Left');
if Registry.ValueExists('Top') then
SizeTool.Top := Registry.ReadInteger('Top');
end;
Registry.CloseKey;
finally
Registry.Free;
end;
txtWidth.text := IntToStr(MainForm.Image.Width);
txtHeight.text := IntToStr(MainForm.Image.Height);
end;
procedure AdjustWindow;
var
xtot, ytot: integer;
begin
xtot := ImageWidth + xdif;
ytot := ImageHeight + ydif;
if xtot > Screen.Width then
begin
MainForm.Left := 0;
xtot := Screen.width;
end;
if ytot > Screen.height then
begin
MainForm.Top := 0;
ytot := Screen.height;
end;
MainForm.Width := xtot;
MainForm.Height := ytot;
end;
procedure TSizeTool.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\SizeTool', True) then
begin
Registry.WriteInteger('Top', SizeTool.Top);
Registry.WriteInteger('Left', SizeTool.Left);
end;
finally
Registry.Free;
end;
end;
procedure TSizeTool.FormActivate(Sender: TObject);
begin
xdif := MainForm.Width - MainForm.Image.Width;
ydif := MainForm.Height - MainForm.Image.Height;
end;
procedure TSizeTool.txtHeightKeyPress(Sender: TObject; var Key: Char);
begin
if key = #13 then
begin
key := #0;
AdjustWindow;
end;
end;
procedure TSizeTool.txtWidthKeyPress(Sender: TObject; var Key: Char);
begin
if key = #13 then
begin
key := #0;
AdjustWindow;
end;
end;
procedure TSizeTool.chkMaintainClick(Sender: TObject);
begin
Ratio := ImageWidth / ImageHeight;
end;
procedure TSizeTool.txtWidthChange(Sender: TObject);
begin
try
ImageWidth := StrToInt(txtWidth.Text);
if chkMaintain.checked and txtWidth.Focused then
begin
ImageHeight := Round(ImageWidth / ratio);
txtHeight.Text := IntToStr(ImageHeight)
end;
except
end;
end;
procedure TSizeTool.txtHeightChange(Sender: TObject);
begin
try
ImageHeight := StrToInt(txtHeight.Text);
if chkMaintain.checked and txtHeight.Focused then
begin
ImageWidth := Round(ImageHeight * ratio);
txtWidth.Text := IntToStr(ImageWidth)
end;
except
end;
end;
end.

View File

@ -1,584 +0,0 @@
unit XForm;
interface
const
NVARS = 22;
EPS = 1E-10;
type
TCalcMethod = procedure of object;
type
TXForm = class
private
FNrFunctions: Integer;
FFunctionList: array[0..NVARS] of TCalcMethod;
FTx, FTy: double;
FPx, FPy: double;
FAngle: double;
FLength: double;
CalculateAngle: boolean;
CalculateLength: boolean;
procedure Linear; // var[0]
procedure Sinusoidal; // var[1]
procedure Spherical; // var[2]
procedure Swirl; // var[3]
procedure Horseshoe; // var[4]
procedure Polar; // var[5]
procedure FoldedHandkerchief; // var[6]
procedure Heart; // var[7]
procedure Disc; // var[8]
procedure Spiral; // var[9]
procedure hyperbolic; // var[10]
procedure Square; // var[11]
procedure Ex; // var[12]
procedure Julia; // var[13]
procedure Bent; // var[14]
procedure Waves; // var[15]
procedure Fisheye; // var[16]
procedure Popcorn; // var[17]
procedure Exponential; // var[18]
procedure Power; // var[19]
procedure Cosine; // var[20]
procedure SawTooth; // var[21]
public
vars: array[0..NVARS - 1] of double; // normalized interp coefs between variations
c: array[0..2, 0..1] of double; // the coefs to the affine part of the function
density: double; // prob is this function is chosen. 0 - 1
color: double; // color coord for this function. 0 - 1
symmetry: double;
c00, c01, c10, c11, c20, c21: double;
varType: integer;
Orientationtype: integer;
constructor Create;
procedure Prepare;
procedure NextPoint(var px, py, pc: double); overload;
procedure NextPoint(var px, py, pz, pc: double); overload;
end;
implementation
uses
SysUtils, Math;
{ TXForm }
///////////////////////////////////////////////////////////////////////////////
constructor TXForm.Create;
var
i: Integer;
begin
density := 0;
Color := 0;
Vars[0] := 1;
for i := 1 to NVARS - 1 do begin
Vars[i] := 0;
end;
c[0, 0] := 1;
c[0, 1] := 0;
c[1, 0] := 0;
c[1, 1] := 1;
c[2, 0] := 0;
c[2, 1] := 0;
Symmetry := 0;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Prepare;
begin
c00 := c[0][0];
c01 := c[0][1];
c10 := c[1][0];
c11 := c[1][1];
c20 := c[2][0];
c21 := c[2][1];
FNrFunctions := 0;
if (vars[0] <> 0.0) then begin
FFunctionList[FNrFunctions] := Linear;
Inc(FNrFunctions);
end;
if (vars[1] <> 0.0) then begin
FFunctionList[FNrFunctions] := Sinusoidal;
Inc(FNrFunctions);
end;
if (vars[2] <> 0.0) then begin
FFunctionList[FNrFunctions] := Spherical;
Inc(FNrFunctions);
end;
if (vars[3] <> 0.0) then begin
FFunctionList[FNrFunctions] := Swirl;
Inc(FNrFunctions);
end;
if (vars[4] <> 0.0) then begin
FFunctionList[FNrFunctions] := Horseshoe;
Inc(FNrFunctions);
end;
if (vars[5] <> 0.0) then begin
FFunctionList[FNrFunctions] := Polar;
Inc(FNrFunctions);
end;
if (vars[6] <> 0.0) then begin
FFunctionList[FNrFunctions] := FoldedHandkerchief;
Inc(FNrFunctions);
end;
if (vars[7] <> 0.0) then begin
FFunctionList[FNrFunctions] := Heart;
Inc(FNrFunctions);
end;
if (vars[8] <> 0.0) then begin
FFunctionList[FNrFunctions] := Disc;
Inc(FNrFunctions);
end;
if (vars[9] <> 0.0) then begin
FFunctionList[FNrFunctions] := Spiral;
Inc(FNrFunctions);
end;
if (vars[10] <> 0.0) then begin
FFunctionList[FNrFunctions] := Hyperbolic;
Inc(FNrFunctions);
end;
if (vars[11] <> 0.0) then begin
FFunctionList[FNrFunctions] := Square;
Inc(FNrFunctions);
end;
if (vars[12] <> 0.0) then begin
FFunctionList[FNrFunctions] := Ex;
Inc(FNrFunctions);
end;
if (vars[13] <> 0.0) then begin
FFunctionList[FNrFunctions] := Julia;
Inc(FNrFunctions);
end;
if (vars[14] <> 0.0) then begin
FFunctionList[FNrFunctions] := Bent;
Inc(FNrFunctions);
end;
if (vars[15] <> 0.0) then begin
FFunctionList[FNrFunctions] := Waves;
Inc(FNrFunctions);
end;
if (vars[16] <> 0.0) then begin
FFunctionList[FNrFunctions] := Fisheye;
Inc(FNrFunctions);
end;
if (vars[17] <> 0.0) then begin
FFunctionList[FNrFunctions] := Popcorn;
Inc(FNrFunctions);
end;
if (vars[18] <> 0.0) then begin
FFunctionList[FNrFunctions] := Exponential;
Inc(FNrFunctions);
end;
if (vars[19] <> 0.0) then begin
FFunctionList[FNrFunctions] := Power;
Inc(FNrFunctions);
end;
if (vars[20] <> 0.0) then begin
FFunctionList[FNrFunctions] := Cosine;
Inc(FNrFunctions);
end;
if (vars[21] <> 0.0) then begin
FFunctionList[FNrFunctions] := SawTooth;
Inc(FNrFunctions);
end;
CalculateAngle := (vars[5] <> 0.0) or (vars[6] <> 0.0) or (vars[7] <> 0.0) or (vars[8] <> 0.0) or
(vars[9] <> 0.0) or (vars[10] <> 0.0) or (vars[11] <> 0.0) or (vars[12] <> 0.0) or
(vars[13] <> 0.0) or (vars[19] <> 0.0) or (vars[21] <> 0.0);
CalculateLength := False;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.NextPoint(var px,py,pc: double);
var
i: Integer;
begin
// first compute the color coord
pc := (pc + color) * 0.5 * (1 - symmetry) + symmetry * pc;
FTx := c00 * px + c10 * py + c20;
FTy := c01 * px + c11 * py + c21;
if CalculateAngle then begin
if (FTx < -EPS) or (FTx > EPS) or (FTy < -EPS) or (FTy > EPS) then
FAngle := arctan2(FTx, FTy)
else
FAngle := 0.0;
end;
// if CalculateLength then begin
// FLength := sqrt(FTx * FTx + FTy * FTy);
// end;
Fpx := 0;
Fpy := 0;
for i:= 0 to FNrFunctions-1 do
FFunctionList[i];
px := FPx;
py := FPy;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Linear;
begin
FPx := FPx + vars[0] * FTx;
FPy := FPy + vars[0] * FTy;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Sinusoidal;
begin
FPx := FPx + vars[1] * sin(FTx);
FPy := FPy + vars[1] * sin(FTy);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Spherical;
var
r2: double;
begin
r2 := FTx * FTx + FTy * FTy + 1E-6;
FPx := FPx + vars[2] * (FTx / r2);
FPy := FPy + vars[2] * (FTy / r2);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Swirl;
var
c1, c2, r2: double;
begin
r2 := FTx * FTx + FTy * FTy;
c1 := sin(r2);
c2 := cos(r2);
FPx := FPx + vars[3] * (c1 * FTx - c2 * FTy);
FPy := FPy + vars[3] * (c2 * FTx + c1 * FTy);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Horseshoe;
var
a, c1, c2: double;
begin
if (FTx < -EPS) or (FTx > EPS) or (FTy < -EPS) or (FTy > EPS) then
a := arctan2(FTx, FTy)
else
a := 0.0;
c1 := sin(a);
c2 := cos(a);
FPx := FPx + vars[4] * (c1 * FTx - c2 * FTy);
FPy := FPy + vars[4] * (c2 * FTx + c1 * FTy);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Polar;
var
ny: double;
begin
ny := sqrt(FTx * FTx + FTy * FTy) - 1.0;
FPx := FPx + vars[5] * (FAngle/PI);
FPy := FPy + vars[5] * ny;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.FoldedHandkerchief;
var
r: double;
begin
r := sqrt(FTx * FTx + FTy * FTy);
FPx := FPx + vars[6] * sin(FAngle + r) * r;
FPy := FPy + vars[6] * cos(FAngle - r) * r;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Heart;
var
r: double;
begin
r := sqrt(FTx * FTx + FTy * FTy);
FPx := FPx + vars[7] * sin(FAngle * r) * r;
FPy := FPy + vars[7] * cos(FAngle * r) * -r;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Disc;
var
nx, ny, r: double;
begin
nx := FTx * PI;
ny := FTy * PI;
r := sqrt(nx * nx + ny * ny);
FPx := FPx + vars[8] * sin(r) * FAngle / PI;
FPy := FPy + vars[8] * cos(r) * FAngle / PI;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Spiral;
var
r: double;
begin
r := sqrt(FTx * FTx + FTy * FTy) + 1E-6;
FPx := FPx + vars[9] * (cos(FAngle) + sin(r)) / r;
FPy := FPy + vars[9] * (sin(FAngle) - cos(r)) / r;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.hyperbolic;
var
r: double;
begin
r := sqrt(FTx * FTx + FTy * FTy) + 1E-6;
FPx := FPx + vars[10] * sin(FAngle) / r;
FPy := FPy + vars[10] * cos(FAngle) * r;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Square;
var
r: double;
begin
r := sqrt(FTx * FTx + FTy * FTy);
FPx := FPx + vars[11] * sin(FAngle) * cos(r);
FPy := FPy + vars[11] * cos(FAngle) * sin(r);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Ex;
var
r: double;
n0,n1, m0, m1: double;
begin
r := sqrt(FTx * FTx + FTy * FTy);
n0 := sin(FAngle + r);
n1 := cos(FAngle - r);
m0 := n0 * n0 * n0 * r;
m1 := n1 * n1 * n1 * r;
FPx := FPx + vars[12] * (m0 + m1);
FPy := FPy + vars[12] * (m0 - m1);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Julia;
var
a,r: double;
begin
r := Math.power(FTx * FTx + FTy * FTy, 0.25);
a := FAngle/2 + Trunc(random * 2) * PI;
FPx := FPx + vars[13] * r * cos(a);
FPy := FPy + vars[13] * r * sin(a);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Bent;
var
nx, ny: double;
begin
nx := FTx;
ny := FTy;
if (nx < 0) and (nx > -1E100) then
nx := nx * 2;
if ny < 0 then
ny := ny / 2;
FPx := FPx + vars[14] * nx;
FPy := FPy + vars[14] * ny;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Waves;
var
dx,dy,nx,ny: double;
begin
dx := c20;
dy := c21;
nx := FTx + c10 * sin(FTy / ((dx * dx) + EPS));
ny := FTy + c11 * sin(FTx / ((dy * dy) + EPS));
FPx := FPx + vars[15] * nx;
FPy := FPy + vars[15] * ny;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Fisheye;
var
a, r: double;
begin
r := sqrt(FTx * FTx + FTy * FTy);
a := arctan2(FTx, FTy);
r := 2 * r / (r + 1);
FPx := FPx + vars[16] * r * cos(a);
FPy := FPy + vars[16] * r * sin(a);
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Popcorn;
var
dx, dy: double;
nx, ny: double;
begin
dx := tan(3 * FTy);
if (dx <> dx) then
dx := 0.0; // < probably won't work in Delphi
dy := tan(3 * FTx); // NAN will raise an exception...
if (dy <> dy) then
dy := 0.0; // remove for speed?
nx := FTx + c20 * sin(dx);
ny := FTy + c21 * sin(dy);
FPx := FPx + vars[17] * nx;
FPy := FPy + vars[17] * ny;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Exponential;
var
dx, dy: double;
begin
dx := exp(FTx)/ 2.718281828459045;
dy := PI * FTy;
FPx := FPx + vars[18] * cos(dy) * dx;
FPy := FPy + vars[18] * sin(dy) * dx;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Power;
var
r,sa: double;
nx, ny: double;
begin
r := sqrt(FTx * FTx + FTy * FTy);
sa := sin(FAngle);
r := Math.power(r, sa);
nx := r * cos(FAngle);
ny := r * sa;
FPx := FPx + vars[19] * nx;
FPy := FPy + vars[19] * ny;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.Cosine;
var
nx, ny: double;
begin
nx := cos(Ftx * PI) * cosh(Fty);
ny := -sin(Ftx * PI) * sinh(Fty);
FPx := FPx + vars[20] * nx;
FPy := FPy + vars[20] * ny;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.SawTooth;
var
r: double;
nx, ny: double;
begin
r := sqrt(FTx * FTx + FTy * FTy);
// r := fmod(r + 1.0, 2.0) - 1.0;
r := r + 1;
r := r - System.Int(r/2) * 2.0 - 1;
nx := cos(FAngle) * r;
ny := sin(FAngle) * r;
FPx := FPx + vars[21] * nx;
FPy := FPy + vars[21] * ny;
end;
///////////////////////////////////////////////////////////////////////////////
procedure TXForm.NextPoint(var px, py, pz, pc: double);
var
i: Integer;
tpx, tpy: double;
begin
// first compute the color coord
pc := (pc + color) * 0.5 * (1 - symmetry) + symmetry * pc;
case Orientationtype of
1:
begin
tpx := px;
tpy := pz;
end;
2:
begin
tpx := py;
tpy := pz;
end;
else
tpx := px;
tpy := py;
end;
FTx := c00 * tpx + c10 * tpy + c20;
FTy := c01 * tpx + c11 * tpy + c21;
if CalculateAngle then begin
if (FTx < -EPS) or (FTx > EPS) or (FTy < -EPS) or (FTy > EPS) then
FAngle := arctan2(FTx, FTy)
else
FAngle := 0.0;
end;
if CalculateLength then begin
FLength := sqrt(FTx * FTx + FTy * FTy);
end;
Fpx := 0;
Fpy := 0;
for i:= 0 to FNrFunctions-1 do
FFunctionList[i];
case Orientationtype of
1:
begin
px := FPx;
pz := FPy;
end;
2:
begin
py := FPx;
pz := FPy;
end;
else
px := FPx;
py := FPy;
end;
end;
///////////////////////////////////////////////////////////////////////////////
end.

View File

@ -1,474 +0,0 @@
{***************************************************************************}
{ This source code was generated automatically by }
{ Pas file import tool for Scripter Studio }
{ }
{ Scripter Studio and Pas file import tool for Scripter Studio }
{ written by Automa / TMS Software }
{ copyright © 1997 - 2003 }
{ Email : info@tmssoftware.com }
{ Web : http://www.tmssoftware.com }
{***************************************************************************}
unit ap_FileCtrl;
interface
uses
Windows,
Messages,
SysUtils,
Classes,
Controls,
Graphics,
Forms,
Menus,
StdCtrls,
Buttons,
FileCtrl,
Variants,
atScript;
type
TatFileCtrlLibrary = class(TatScripterLibrary)
procedure __TFileListBoxCreate(AMachine: TatVirtualMachine);
procedure __TFileListBoxDestroy(AMachine: TatVirtualMachine);
procedure __TFileListBoxUpdate(AMachine: TatVirtualMachine);
procedure __TFileListBoxApplyFilePath(AMachine: TatVirtualMachine);
procedure __GetTFileListBoxDrive(AMachine: TatVirtualMachine);
procedure __SetTFileListBoxDrive(AMachine: TatVirtualMachine);
procedure __GetTFileListBoxDirectory(AMachine: TatVirtualMachine);
procedure __SetTFileListBoxDirectory(AMachine: TatVirtualMachine);
procedure __GetTFileListBoxFileName(AMachine: TatVirtualMachine);
procedure __SetTFileListBoxFileName(AMachine: TatVirtualMachine);
procedure __TDirectoryListBoxCreate(AMachine: TatVirtualMachine);
procedure __TDirectoryListBoxDestroy(AMachine: TatVirtualMachine);
procedure __TDirectoryListBoxDisplayCase(AMachine: TatVirtualMachine);
procedure __TDirectoryListBoxFileCompareText(AMachine: TatVirtualMachine);
procedure __TDirectoryListBoxGetItemPath(AMachine: TatVirtualMachine);
procedure __TDirectoryListBoxOpenCurrent(AMachine: TatVirtualMachine);
procedure __TDirectoryListBoxUpdate(AMachine: TatVirtualMachine);
procedure __GetTDirectoryListBoxDrive(AMachine: TatVirtualMachine);
procedure __SetTDirectoryListBoxDrive(AMachine: TatVirtualMachine);
procedure __GetTDirectoryListBoxDirectory(AMachine: TatVirtualMachine);
procedure __SetTDirectoryListBoxDirectory(AMachine: TatVirtualMachine);
procedure __GetTDirectoryListBoxPreserveCase(AMachine: TatVirtualMachine);
procedure __GetTDirectoryListBoxCaseSensitive(AMachine: TatVirtualMachine);
procedure __TDriveComboBoxCreate(AMachine: TatVirtualMachine);
procedure __TDriveComboBoxDestroy(AMachine: TatVirtualMachine);
procedure __GetTDriveComboBoxDrive(AMachine: TatVirtualMachine);
procedure __SetTDriveComboBoxDrive(AMachine: TatVirtualMachine);
procedure __TFilterComboBoxCreate(AMachine: TatVirtualMachine);
procedure __TFilterComboBoxDestroy(AMachine: TatVirtualMachine);
procedure __GetTFilterComboBoxMask(AMachine: TatVirtualMachine);
procedure __ProcessPath(AMachine: TatVirtualMachine);
procedure __MinimizeName(AMachine: TatVirtualMachine);
procedure __DirectoryExists(AMachine: TatVirtualMachine);
procedure __ForceDirectories(AMachine: TatVirtualMachine);
procedure Init; override;
class function LibraryName: string; override;
end;
TFileListBoxClass = class of TFileListBox;
TDirectoryListBoxClass = class of TDirectoryListBox;
TDriveComboBoxClass = class of TDriveComboBox;
TFilterComboBoxClass = class of TFilterComboBox;
implementation
{$WARNINGS OFF}
procedure TatFileCtrlLibrary.__TFileListBoxCreate(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := Integer(TFileListBoxClass(CurrentClass.ClassRef).Create(TComponent(Integer(GetInputArg(0)))));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__TFileListBoxDestroy(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TFileListBox(CurrentObject).Destroy;
end;
end;
procedure TatFileCtrlLibrary.__TFileListBoxUpdate(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TFileListBox(CurrentObject).Update;
end;
end;
procedure TatFileCtrlLibrary.__TFileListBoxApplyFilePath(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TFileListBox(CurrentObject).ApplyFilePath(GetInputArg(0));
end;
end;
procedure TatFileCtrlLibrary.__GetTFileListBoxDrive(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TFileListBox(CurrentObject).Drive);
end;
end;
procedure TatFileCtrlLibrary.__SetTFileListBoxDrive(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TFileListBox(CurrentObject).Drive:=VarToStr(GetInputArg(0))[1];
end;
end;
procedure TatFileCtrlLibrary.__GetTFileListBoxDirectory(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TFileListBox(CurrentObject).Directory);
end;
end;
procedure TatFileCtrlLibrary.__SetTFileListBoxDirectory(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TFileListBox(CurrentObject).Directory:=GetInputArg(0);
end;
end;
procedure TatFileCtrlLibrary.__GetTFileListBoxFileName(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TFileListBox(CurrentObject).FileName);
end;
end;
procedure TatFileCtrlLibrary.__SetTFileListBoxFileName(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TFileListBox(CurrentObject).FileName:=GetInputArg(0);
end;
end;
procedure TatFileCtrlLibrary.__TDirectoryListBoxCreate(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := Integer(TDirectoryListBoxClass(CurrentClass.ClassRef).Create(TComponent(Integer(GetInputArg(0)))));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__TDirectoryListBoxDestroy(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TDirectoryListBox(CurrentObject).Destroy;
end;
end;
procedure TatFileCtrlLibrary.__TDirectoryListBoxDisplayCase(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := TDirectoryListBox(CurrentObject).DisplayCase(GetInputArg(0));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__TDirectoryListBoxFileCompareText(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := Integer(TDirectoryListBox(CurrentObject).FileCompareText(GetInputArg(0),GetInputArg(1)));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__TDirectoryListBoxGetItemPath(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := TDirectoryListBox(CurrentObject).GetItemPath(VarToInteger(GetInputArg(0)));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__TDirectoryListBoxOpenCurrent(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TDirectoryListBox(CurrentObject).OpenCurrent;
end;
end;
procedure TatFileCtrlLibrary.__TDirectoryListBoxUpdate(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TDirectoryListBox(CurrentObject).Update;
end;
end;
procedure TatFileCtrlLibrary.__GetTDirectoryListBoxDrive(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TDirectoryListBox(CurrentObject).Drive);
end;
end;
procedure TatFileCtrlLibrary.__SetTDirectoryListBoxDrive(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TDirectoryListBox(CurrentObject).Drive:=VarToStr(GetInputArg(0))[1];
end;
end;
procedure TatFileCtrlLibrary.__GetTDirectoryListBoxDirectory(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TDirectoryListBox(CurrentObject).Directory);
end;
end;
procedure TatFileCtrlLibrary.__SetTDirectoryListBoxDirectory(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TDirectoryListBox(CurrentObject).Directory:=GetInputArg(0);
end;
end;
procedure TatFileCtrlLibrary.__GetTDirectoryListBoxPreserveCase(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TDirectoryListBox(CurrentObject).PreserveCase);
end;
end;
procedure TatFileCtrlLibrary.__GetTDirectoryListBoxCaseSensitive(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TDirectoryListBox(CurrentObject).CaseSensitive);
end;
end;
procedure TatFileCtrlLibrary.__TDriveComboBoxCreate(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := Integer(TDriveComboBoxClass(CurrentClass.ClassRef).Create(TComponent(Integer(GetInputArg(0)))));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__TDriveComboBoxDestroy(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TDriveComboBox(CurrentObject).Destroy;
end;
end;
procedure TatFileCtrlLibrary.__GetTDriveComboBoxDrive(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TDriveComboBox(CurrentObject).Drive);
end;
end;
procedure TatFileCtrlLibrary.__SetTDriveComboBoxDrive(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TDriveComboBox(CurrentObject).Drive:=VarToStr(GetInputArg(0))[1];
end;
end;
procedure TatFileCtrlLibrary.__TFilterComboBoxCreate(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := Integer(TFilterComboBoxClass(CurrentClass.ClassRef).Create(TComponent(Integer(GetInputArg(0)))));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__TFilterComboBoxDestroy(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
TFilterComboBox(CurrentObject).Destroy;
end;
end;
procedure TatFileCtrlLibrary.__GetTFilterComboBoxMask(AMachine: TatVirtualMachine);
begin
with AMachine do
begin
ReturnOutputArg(TFilterComboBox(CurrentObject).Mask);
end;
end;
procedure TatFileCtrlLibrary.__ProcessPath(AMachine: TatVirtualMachine);
var
Param1: Char;
Param2: string;
Param3: string;
begin
with AMachine do
begin
Param1 := VarToStr(GetInputArg(1))[1];
Param2 := GetInputArg(2);
Param3 := GetInputArg(3);
FileCtrl.ProcessPath(GetInputArg(0),Param1,Param2,Param3);
SetInputArg(1,Param1);
SetInputArg(2,Param2);
SetInputArg(3,Param3);
end;
end;
procedure TatFileCtrlLibrary.__MinimizeName(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := FileCtrl.MinimizeName(GetInputArg(0),TCanvas(Integer(GetInputArg(1))),VarToInteger(GetInputArg(2)));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__DirectoryExists(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := FileCtrl.DirectoryExists(GetInputArg(0));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.__ForceDirectories(AMachine: TatVirtualMachine);
var
AResult: variant;
begin
with AMachine do
begin
AResult := FileCtrl.ForceDirectories(GetInputArg(0));
ReturnOutputArg(AResult);
end;
end;
procedure TatFileCtrlLibrary.Init;
begin
With Scripter.DefineClass(TFileListBox) do
begin
DefineMethod('Create',1,tkClass,TFileListBox,__TFileListBoxCreate,true);
DefineMethod('Destroy',0,tkNone,nil,__TFileListBoxDestroy,false);
DefineMethod('Update',0,tkNone,nil,__TFileListBoxUpdate,false);
DefineMethod('ApplyFilePath',1,tkNone,nil,__TFileListBoxApplyFilePath,false);
DefineProp('Drive',tkVariant,__GetTFileListBoxDrive,__SetTFileListBoxDrive,nil,false,0);
DefineProp('Directory',tkVariant,__GetTFileListBoxDirectory,__SetTFileListBoxDirectory,nil,false,0);
DefineProp('FileName',tkVariant,__GetTFileListBoxFileName,__SetTFileListBoxFileName,nil,false,0);
end;
With Scripter.DefineClass(TDirectoryListBox) do
begin
DefineMethod('Create',1,tkClass,TDirectoryListBox,__TDirectoryListBoxCreate,true);
DefineMethod('Destroy',0,tkNone,nil,__TDirectoryListBoxDestroy,false);
DefineMethod('DisplayCase',1,tkVariant,nil,__TDirectoryListBoxDisplayCase,false);
DefineMethod('FileCompareText',2,tkInteger,nil,__TDirectoryListBoxFileCompareText,false);
DefineMethod('GetItemPath',1,tkVariant,nil,__TDirectoryListBoxGetItemPath,false);
DefineMethod('OpenCurrent',0,tkNone,nil,__TDirectoryListBoxOpenCurrent,false);
DefineMethod('Update',0,tkNone,nil,__TDirectoryListBoxUpdate,false);
DefineProp('Drive',tkVariant,__GetTDirectoryListBoxDrive,__SetTDirectoryListBoxDrive,nil,false,0);
DefineProp('Directory',tkVariant,__GetTDirectoryListBoxDirectory,__SetTDirectoryListBoxDirectory,nil,false,0);
DefineProp('PreserveCase',tkVariant,__GetTDirectoryListBoxPreserveCase,nil,nil,false,0);
DefineProp('CaseSensitive',tkVariant,__GetTDirectoryListBoxCaseSensitive,nil,nil,false,0);
end;
With Scripter.DefineClass(TDriveComboBox) do
begin
DefineMethod('Create',1,tkClass,TDriveComboBox,__TDriveComboBoxCreate,true);
DefineMethod('Destroy',0,tkNone,nil,__TDriveComboBoxDestroy,false);
DefineProp('Text',tkVariant,nil,nil,nil,false,0);
DefineProp('Drive',tkVariant,__GetTDriveComboBoxDrive,__SetTDriveComboBoxDrive,nil,false,0);
end;
With Scripter.DefineClass(TFilterComboBox) do
begin
DefineMethod('Create',1,tkClass,TFilterComboBox,__TFilterComboBoxCreate,true);
DefineMethod('Destroy',0,tkNone,nil,__TFilterComboBoxDestroy,false);
DefineProp('Mask',tkVariant,__GetTFilterComboBoxMask,nil,nil,false,0);
DefineProp('Text',tkVariant,nil,nil,nil,false,0);
end;
With Scripter.DefineClass(ClassType) do
begin
DefineMethod('ProcessPath',4,tkNone,nil,__ProcessPath,false).SetVarArgs([1,2,3]);
DefineMethod('MinimizeName',3,tkVariant,nil,__MinimizeName,false);
DefineMethod('DirectoryExists',1,tkVariant,nil,__DirectoryExists,false);
DefineMethod('ForceDirectories',1,tkVariant,nil,__ForceDirectories,false);
AddConstant('ftReadOnly',ftReadOnly);
AddConstant('ftHidden',ftHidden);
AddConstant('ftSystem',ftSystem);
AddConstant('ftVolumeID',ftVolumeID);
AddConstant('ftDirectory',ftDirectory);
AddConstant('ftArchive',ftArchive);
AddConstant('ftNormal',ftNormal);
AddConstant('dtUnknown',dtUnknown);
AddConstant('dtNoDrive',dtNoDrive);
AddConstant('dtFloppy',dtFloppy);
AddConstant('dtFixed',dtFixed);
AddConstant('dtNetwork',dtNetwork);
AddConstant('dtCDROM',dtCDROM);
AddConstant('dtRAM',dtRAM);
AddConstant('tcLowerCase',tcLowerCase);
AddConstant('tcUpperCase',tcUpperCase);
AddConstant('sdAllowCreate',sdAllowCreate);
AddConstant('sdPerformCreate',sdPerformCreate);
AddConstant('sdPrompt',sdPrompt);
AddConstant('WNTYPE_DRIVE',WNTYPE_DRIVE);
end;
end;
class function TatFileCtrlLibrary.LibraryName: string;
begin
result := 'FileCtrl';
end;
initialization
RegisterScripterLibrary(TatFileCtrlLibrary, True);
{$WARNINGS ON}
end.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,359 +0,0 @@
{
Flame screensaver Copyright (C) 2002 Ronald Hordijk
Apophysis Copyright (C) 2001-2004 Mark Townsend
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 Cmap;
interface
uses sysutils, classes;
type
TColorMap = array[0..255, 0..3] of integer;
type
EFormatInvalid = class(Exception);
const
RANDOMCMAP = -1;
NRCMAPS = 701;
procedure GetCmap(var Index: integer; const hue_rotation: double; out cmap: TColorMap);
procedure GetCmapName(var Index: integer; out Name: string);
procedure rgb2hsv(const rgb: array of double; out hsv: array of double);
procedure hsv2rgb(const hsv: array of double; out rgb: array of double);
function GetGradient(FileName, Entry: string): string;
function GetPalette(strng: string; var Palette: TColorMap): boolean;
procedure GetTokens(s: string; var mlist: TStringList);
implementation
uses
cmapdata, Math;
procedure rgb2hsv(const rgb: array of double; out hsv: array of double);
var
maxval, minval: double;
del: double;
begin
Maxval := Max(rgb[0], Max(rgb[1], rgb[2]));
Minval := Min(rgb[0], Min(rgb[1], rgb[2]));
hsv[2] := maxval; // v
if (Maxval > 0) and (maxval <> minval) then begin
del := maxval - minval;
hsv[1] := del / Maxval; //s
hsv[0] := 0;
if (rgb[0] > rgb[1]) and (rgb[0] > rgb[2]) then begin
hsv[0] := (rgb[1] - rgb[2]) / del;
end else if (rgb[1] > rgb[2]) then begin
hsv[0] := 2 + (rgb[2] - rgb[0]) / del;
end else begin
hsv[0] := 4 + (rgb[0] - rgb[1]) / del;
end;
if hsv[0] < 0 then
hsv[0] := hsv[0] + 6;
end else begin
hsv[0] := 0;
hsv[1] := 0;
end;
end;
procedure hsv2rgb(const hsv: array of double; out rgb: array of double);
var
j: integer;
f, p, q, t, v: double;
begin
try
j := floor(hsv[0]);
f := hsv[0] - j;
v := hsv[2];
p := hsv[2] * (1 - hsv[1]);
q := hsv[2] * (1 - hsv[1] * f);
t := hsv[2] * (1 - hsv[1] * (1 - f));
case j of
0: begin rgb[0] := v; rgb[1] := t; rgb[2] := p; end;
1: begin rgb[0] := q; rgb[1] := v; rgb[2] := p; end;
2: begin rgb[0] := p; rgb[1] := v; rgb[2] := t; end;
3: begin rgb[0] := p; rgb[1] := q; rgb[2] := v; end;
4: begin rgb[0] := t; rgb[1] := p; rgb[2] := v; end;
5: begin rgb[0] := v; rgb[1] := p; rgb[2] := t; end;
end;
except on EMathError do
end;
end;
procedure GetCmap(var Index: integer; const hue_rotation: double; out cmap: TColorMap);
var
i: Integer;
rgb: array[0..2] of double;
hsv: array[0..2] of double;
begin
if Index = RANDOMCMAP then
Index := Random(NRCMAPS);
if (Index < 0) or (Index >= NRCMAPS) then
Index := 0;
for i := 0 to 255 do begin
rgb[0] := cmaps[Index][i][0] / 255.0;
rgb[1] := cmaps[Index][i][1] / 255.0;
rgb[2] := cmaps[Index][i][2] / 255.0;
rgb2hsv(rgb, hsv);
hsv[0] := hsv[0] + hue_rotation * 6;
hsv2rgb(hsv, rgb);
cmap[i][0] := Round(rgb[0] * 255);
cmap[i][1] := Round(rgb[1] * 255);
cmap[i][2] := Round(rgb[2] * 255);
end;
end;
procedure GetCmapName(var Index: integer; out Name: string);
begin
if Index = RANDOMCMAP then
Index := Random(NRCMAPS);
if (Index < 0) or (Index >= NRCMAPS) then
Index := 0;
Name := CMapNames[Index];
end;
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;
procedure GetTokens(s: string; var mlist: TStringList);
var
test, token: string;
begin
mlist.clear;
test := s;
while (Length(Test) > 0) do
begin
while (Length(Test) > 0) and (test[1] in [#32]) do
Delete(test, 1, 1);
if (Length(Test) = 0) then
exit;
token := '';
while (Length(Test) > 0) and (not (test[1] in [#32])) do
begin
token := token + test[1];
Delete(test, 1, 1);
end;
mlist.add(token);
end;
end;
function GetPalette(strng: string; var Palette: TColorMap): boolean;
{ Loads a palette from a gradient string }
var
Strings: TStringList;
index, i: integer;
Tokens: TStringList;
Indices, Colors: TStringList;
a, b: integer;
begin
GetPalette := True;
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);
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
Palette[i][0] := 0;
Palette[i][1] := 0;
Palette[i][2] := 0;
end;
if Indices.Count = 0 then raise EFormatInvalid.Create('No color info');
for i := 0 to Indices.Count - 1 do
begin
index := StrToInt(Indices[i]);
index := Round(Index * (255 / 399));
indices[i] := IntToStr(index);
Palette[index][0] := StrToInt(Colors[i]) mod 256;
Palette[index][1] := trunc(StrToInt(Colors[i]) / 256) mod 256;
Palette[index][2] := trunc(StrToInt(Colors[i]) / 65536);
end;
i := 1;
repeat
a := StrToInt(Indices[i - 1]);
b := StrToInt(Indices[i]);
RGBBlend(a, b, Palette);
inc(i);
until i = Indices.Count;
if (Indices[0] <> '0') or (Indices[Indices.Count - 1] <> '255') then
begin
a := StrToInt(Indices[Indices.Count - 1]);
b := StrToInt(Indices[0]) + 256;
RGBBlend(a, b, Palette);
end;
except on EFormatInvalid do
begin
Result := False;
end;
end;
finally
Tokens.Free;
Strings.Free;
Indices.Free;
Colors.Free;
end;
end;
function GetGradient(FileName, Entry: string): string;
var
FileStrings: TStringList;
GradStrings: TStringList;
i: integer;
begin
FileStrings := TStringList.Create;
GradStrings := TStringList.Create;
try
try
FileStrings.LoadFromFile(FileName);
for i := 0 to FileStrings.count - 1 do
if Pos(Entry + ' ', Trim(FileStrings[i])) = 1 then break;
GradStrings.Add(FileStrings[i]);
repeat
inc(i);
GradStrings.Add(FileStrings[i]);
until Pos('}', FileStrings[i]) <> 0;
GetGradient := GradStrings.Text;
except on exception do
Result := '';
end;
finally
GradStrings.Free;
FileStrings.Free;
end;
end;
function LoadGradient(FileName, Entry: string; var gString: string; var Pal: TColorMap): boolean;
var
FileStrings: TStringList;
GradStrings: TStringList;
i: integer;
begin
FileStrings := TStringList.Create;
GradStrings := TStringList.Create;
try
try
FileStrings.LoadFromFile(FileName);
for i := 0 to FileStrings.count - 1 do
if Pos(Entry + ' ', Trim(FileStrings[i])) = 1 then break;
GradStrings.Add(FileStrings[i]);
repeat
inc(i);
GradStrings.Add(FileStrings[i]);
until Pos('}', FileStrings[i]) <> 0;
gString := GradStrings.Text;
Result := GetPalette(GradStrings.Text, Pal);
except on exception do
Result := False;
end;
finally
GradStrings.Free;
FileStrings.Free;
end;
end;
end.

File diff suppressed because it is too large Load Diff