ADMIN: migration complete
git-svn-id: https://svn.code.sf.net/p/apophysis7x/svn/trunk@1 a5d1c0f9-a0e9-45c6-87dd-9d276e40c949
This commit is contained in:
commit
95a2f54683
222
Apophysis7X.dpr
Normal file
222
Apophysis7X.dpr
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
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.
|
||||||
|
}
|
||||||
|
program Apophysis7X;
|
||||||
|
|
||||||
|
{%ToDo 'Assets\Apophysis7X.todo'}
|
||||||
|
{$R 'Resources\Apophysis7X.res'}
|
||||||
|
{$SetPEFlags $20}
|
||||||
|
|
||||||
|
{$ifdef VER240}
|
||||||
|
// we need to update TMS Scripter to the XE3 version...
|
||||||
|
{$ifndef DisableScripting}
|
||||||
|
{$Define DisableScripting}
|
||||||
|
{$endif}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
uses
|
||||||
|
|
||||||
|
{-- BASIC --}
|
||||||
|
FastMM4 in 'System\FastMM4.pas',
|
||||||
|
FastMM4Messages in 'System\FastMM4Messages.pas',
|
||||||
|
Forms, Dialogs, SysUtils,
|
||||||
|
Binary in 'IO\Binary.pas',
|
||||||
|
Base64 in 'IO\Base64.pas',
|
||||||
|
sdStringTable in 'System\sdStringTable.pas',
|
||||||
|
CustomDrawControl in 'System\CustomDrawControl.pas',
|
||||||
|
LibXmlComps in 'System\LibXmlComps.pas',
|
||||||
|
LibXmlParser in 'System\LibXmlParser.pas',
|
||||||
|
Windows7 in 'System\Windows7.pas',
|
||||||
|
RegexHelper in 'System\RegexHelper.pas',
|
||||||
|
CurvesControl in 'System\CurvesControl.pas',
|
||||||
|
|
||||||
|
{$ifdef Apo7X64}
|
||||||
|
// if on x64, we don't use assembler
|
||||||
|
{$else}
|
||||||
|
AsmRandom in 'System\AsmRandom.pas',
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
{-- CORE --}
|
||||||
|
Global in 'Core\Global.pas',
|
||||||
|
CommandLine in 'IO\CommandLine.pas',
|
||||||
|
MissingPlugin in 'IO\MissingPlugin.pas',
|
||||||
|
Settings in 'IO\Settings.pas',
|
||||||
|
Translation in 'Core\Translation.pas',
|
||||||
|
ParameterIO in 'IO\ParameterIO.pas',
|
||||||
|
Bezier in 'Core\Bezier.pas',
|
||||||
|
|
||||||
|
{-- FLAME --}
|
||||||
|
RndFlame in 'Flame\RndFlame.pas',
|
||||||
|
ControlPoint in 'Flame\ControlPoint.pas',
|
||||||
|
cmapdata in 'ColorMap\cmapdata.pas',
|
||||||
|
cmap in 'ColorMap\cmap.pas',
|
||||||
|
GradientHlpr in 'ColorMap\GradientHlpr.pas',
|
||||||
|
XFormMan in 'Core\XFormMan.pas',
|
||||||
|
XForm in 'Flame\XForm.pas',
|
||||||
|
BaseVariation in 'Core\BaseVariation.pas',
|
||||||
|
|
||||||
|
{-- RENDERER --}
|
||||||
|
RenderingCommon in 'Rendering\RenderingCommon.pas',
|
||||||
|
RenderingInterface in 'Rendering\RenderingInterface.pas',
|
||||||
|
RenderingImplementation in 'Rendering\RenderingImplementation.pas',
|
||||||
|
BucketFillerThread in 'Rendering\BucketFillerThread.pas',
|
||||||
|
RenderThread in 'Rendering\RenderThread.pas',
|
||||||
|
ImageMaker in 'Rendering\ImageMaker.pas',
|
||||||
|
|
||||||
|
{-- VARIATIONS --}
|
||||||
|
varHemisphere in 'Variations\varHemisphere.pas',
|
||||||
|
varLog in 'Variations\varLog.pas',
|
||||||
|
varPolar2 in 'Variations\varPolar2.pas',
|
||||||
|
varRings2 in 'Variations\varRings2.pas',
|
||||||
|
varFan2 in 'Variations\varFan2.pas',
|
||||||
|
varCross in 'Variations\varCross.pas',
|
||||||
|
varWedge in 'Variations\varWedge.pas',
|
||||||
|
varEpispiral in 'Variations\varEpispiral.pas',
|
||||||
|
varBwraps in 'Variations\varBwraps.pas',
|
||||||
|
varPDJ in 'Variations\varPDJ.pas',
|
||||||
|
varJuliaN in 'Variations\varJuliaN.pas',
|
||||||
|
varJuliaScope in 'Variations\varJuliaScope.pas',
|
||||||
|
varJulia3Djf in 'Variations\varJulia3Djf.pas',
|
||||||
|
varJulia3Dz in 'Variations\varJulia3Dz.pas',
|
||||||
|
varCurl in 'Variations\varCurl.pas',
|
||||||
|
varCurl3D in 'Variations\varCurl3D.pas',
|
||||||
|
varRadialBlur in 'Variations\varRadialBlur.pas',
|
||||||
|
varBlurCircle in 'Variations\varBlurCircle.pas',
|
||||||
|
varBlurZoom in 'Variations\varBlurZoom.pas',
|
||||||
|
varBlurPixelize in 'Variations\varBlurPixelize.pas',
|
||||||
|
varFalloff2 in 'Variations\varFalloff2.pas',
|
||||||
|
varRectangles in 'Variations\varRectangles.pas',
|
||||||
|
varSplits in 'Variations\varSplits.pas',
|
||||||
|
varSeparation in 'Variations\varSeparation.pas',
|
||||||
|
varBipolar in 'Variations\varBipolar.pas',
|
||||||
|
varLoonie in 'Variations\varLoonie.pas',
|
||||||
|
varEscher in 'Variations\varEscher.pas',
|
||||||
|
varScry in 'Variations\varScry.pas',
|
||||||
|
varNGon in 'Variations\varNGon.pas',
|
||||||
|
varFoci in 'Variations\varFoci.pas',
|
||||||
|
varLazysusan in 'Variations\varLazysusan.pas',
|
||||||
|
varMobius in 'Variations\varMobius.pas',
|
||||||
|
varCrop in 'Variations\varCrop.pas',
|
||||||
|
// circlecrop
|
||||||
|
varElliptic in 'Variations\varElliptic.pas',
|
||||||
|
varWaves2 in 'Variations\varWaves2.pas',
|
||||||
|
varAuger in 'Variations\varAuger.pas',
|
||||||
|
// glynnsim2
|
||||||
|
// flux
|
||||||
|
// boarders2
|
||||||
|
varPreSpherical in 'Variations\varPreSpherical.pas',
|
||||||
|
varPreSinusoidal in 'Variations\varPreSinusoidal.pas',
|
||||||
|
varPreDisc in 'Variations\varPreDisc.pas',
|
||||||
|
// pre_boarders2
|
||||||
|
varPreBwraps in 'Variations\varPreBwraps.pas',
|
||||||
|
varPreCrop in 'Variations\varPreCrop.pas',
|
||||||
|
// pre_circlecrop
|
||||||
|
varPreFalloff2 in 'Variations\varPreFalloff2.pas',
|
||||||
|
// post_boarders2
|
||||||
|
varPostBwraps in 'Variations\varPostBwraps.pas',
|
||||||
|
varPostCurl in 'Variations\varPostCurl.pas',
|
||||||
|
varPostCurl3D in 'Variations\varPostCurl3D.pas',
|
||||||
|
varPostCrop in 'Variations\varPostCrop.pas',
|
||||||
|
// post_circlecrop
|
||||||
|
varPostFalloff2 in 'Variations\varPostFalloff2.pas',
|
||||||
|
varGenericPlugin in 'Variations\varGenericPlugin.pas',
|
||||||
|
|
||||||
|
{-- GUI --}
|
||||||
|
Main in 'Forms\Main.pas' {MainForm},
|
||||||
|
Tracer in 'Forms\Tracer.pas' {TraceForm},
|
||||||
|
About in 'Forms\About.pas' {AboutForm},
|
||||||
|
Adjust in 'Forms\Adjust.pas' {AdjustForm},
|
||||||
|
Browser in 'Forms\Browser.pas' {GradientBrowser},
|
||||||
|
Editor in 'Forms\Editor.pas' {EditForm},
|
||||||
|
FormExport in 'Forms\FormExport.pas' {ExportDialog},
|
||||||
|
formPostProcess in 'Forms\formPostProcess.pas' {frmPostProcess},
|
||||||
|
FormRender in 'Forms\FormRender.pas' {RenderForm},
|
||||||
|
Fullscreen in 'Forms\Fullscreen.pas' {FullscreenForm},
|
||||||
|
ImageColoring in 'Forms\ImageColoring.pas' {frmImageColoring},
|
||||||
|
LoadTracker in 'Forms\LoadTracker.pas' {LoadForm},
|
||||||
|
Mutate in 'Forms\Mutate.pas' {MutateForm},
|
||||||
|
Options in 'Forms\Options.pas' {OptionsForm},
|
||||||
|
Save in 'Forms\Save.pas' {SaveForm},
|
||||||
|
SavePreset in 'Forms\SavePreset.pas' {SavePresetForm},
|
||||||
|
SplashForm in 'Forms\SplashForm.pas' {SplashWindow},
|
||||||
|
Template in 'Forms\Template.pas' {TemplateForm},
|
||||||
|
Curves in 'Forms\Curves.pas' {CurvesForm}
|
||||||
|
|
||||||
|
{$ifdef DisableScripting};
|
||||||
|
// if scripting is disabled, don't import the scripting form units
|
||||||
|
{$else},
|
||||||
|
Preview in 'Forms\Preview.pas' {PreviewForm},
|
||||||
|
FormFavorites in 'Forms\FormFavorites.pas' {FavoritesForm},
|
||||||
|
ScriptForm in 'Forms\ScriptForm.pas' {ScriptEditor},
|
||||||
|
ScriptRender in 'Forms\ScriptRender.pas'; {ScriptRenderForm}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
begin
|
||||||
|
InitializePlugins;
|
||||||
|
|
||||||
|
SplashWindow := TSplashWindow.Create(Application);
|
||||||
|
SplashWindow.Show;
|
||||||
|
|
||||||
|
Application.Initialize;
|
||||||
|
SplashWindow.Update;
|
||||||
|
|
||||||
|
{$ifdef Apo7X64}
|
||||||
|
Application.Title := 'Apophysis 7x (32 bit)';
|
||||||
|
{$else}
|
||||||
|
Application.Title := 'Apophysis 7x (64 bit)';
|
||||||
|
{$endif}
|
||||||
|
Application.HelpFile := 'Apophysis7x.chm';
|
||||||
|
Application.CreateForm(TMainForm, MainForm);
|
||||||
|
Application.CreateForm(TTraceForm, TraceForm);
|
||||||
|
Application.CreateForm(TAboutForm, AboutForm);
|
||||||
|
Application.CreateForm(TAdjustForm, AdjustForm);
|
||||||
|
Application.CreateForm(TGradientBrowser, GradientBrowser);
|
||||||
|
Application.CreateForm(TEditForm, EditForm);
|
||||||
|
Application.CreateForm(TExportDialog, ExportDialog);
|
||||||
|
Application.CreateForm(TfrmPostProcess, frmPostProcess);
|
||||||
|
Application.CreateForm(TRenderForm, RenderForm);
|
||||||
|
Application.CreateForm(TFullscreenForm, FullscreenForm);
|
||||||
|
Application.CreateForm(TfrmImageColoring, frmImageColoring);
|
||||||
|
Application.CreateForm(TLoadForm, LoadForm);
|
||||||
|
Application.CreateForm(TMutateForm, MutateForm);
|
||||||
|
Application.CreateForm(TOptionsForm, OptionsForm);
|
||||||
|
Application.CreateForm(TSaveForm, SaveForm);
|
||||||
|
Application.CreateForm(TSavePresetForm, SavePresetForm);
|
||||||
|
Application.CreateForm(TTemplateForm, TemplateForm);
|
||||||
|
Application.CreateForm(TCurvesForm, CurvesForm);
|
||||||
|
|
||||||
|
{$ifdef DisableScripting}
|
||||||
|
// if scripting is disabled, don't create the scripting forms
|
||||||
|
{$else}
|
||||||
|
Application.CreateForm(TPreviewForm, PreviewForm);
|
||||||
|
Application.CreateForm(TFavoritesForm, FavoritesForm);
|
||||||
|
Application.CreateForm(TScriptEditor, ScriptEditor);
|
||||||
|
Application.CreateForm(TScriptRenderForm, ScriptRenderForm);
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
Application.UpdateFormatSettings := False;
|
||||||
|
{$ifdef VER240}
|
||||||
|
FormatSettings.DecimalSeparator := '.';
|
||||||
|
{$else}
|
||||||
|
DecimalSeparator := '.';
|
||||||
|
{$endif}
|
||||||
|
Application.Run;
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
360
Apophysis7X.dproj
Normal file
360
Apophysis7X.dproj
Normal file
@ -0,0 +1,360 @@
|
|||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{AC01F3AB-4101-4C09-A648-1CC8E2C412D5}</ProjectGuid>
|
||||||
|
<MainSource>Apophysis7X.dpr</MainSource>
|
||||||
|
<Base>True</Base>
|
||||||
|
<Config Condition="'$(Config)'==''">Release</Config>
|
||||||
|
<TargetedPlatforms>3</TargetedPlatforms>
|
||||||
|
<AppType>Application</AppType>
|
||||||
|
<FrameworkType>VCL</FrameworkType>
|
||||||
|
<ProjectVersion>14.3</ProjectVersion>
|
||||||
|
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||||
|
<Base_Win64>true</Base_Win64>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||||
|
<Base_Win32>true</Base_Win32>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
|
||||||
|
<Cfg_1_Win64>true</Cfg_1_Win64>
|
||||||
|
<CfgParent>Cfg_1</CfgParent>
|
||||||
|
<Cfg_1>true</Cfg_1>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||||
|
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||||
|
<CfgParent>Cfg_2</CfgParent>
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||||
|
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||||
|
<CfgParent>Cfg_2</CfgParent>
|
||||||
|
<Cfg_2>true</Cfg_2>
|
||||||
|
<Base>true</Base>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
|
<DCC_Define>DisableScripting;$(DCC_Define)</DCC_Define>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0</VerInfo_Keys>
|
||||||
|
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||||
|
<Icon_MainIcon>Apophysis7X_Icon.ico</Icon_MainIcon>
|
||||||
|
<DCC_IOChecking>false</DCC_IOChecking>
|
||||||
|
<VerInfo_Build>1325</VerInfo_Build>
|
||||||
|
<DCC_COMBINING_SIGNED_UNSIGNED>false</DCC_COMBINING_SIGNED_UNSIGNED>
|
||||||
|
<DCC_UsePackage>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;vclactnband;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
|
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||||
|
<DCC_Hints>false</DCC_Hints>
|
||||||
|
<DCC_COMPARING_SIGNED_UNSIGNED>false</DCC_COMPARING_SIGNED_UNSIGNED>
|
||||||
|
<VerInfo_MajorVer>2</VerInfo_MajorVer>
|
||||||
|
<DCC_UNIT_DEPRECATED>false</DCC_UNIT_DEPRECATED>
|
||||||
|
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<DCC_SYMBOL_PLATFORM>false</DCC_SYMBOL_PLATFORM>
|
||||||
|
<DCC_ExeOutput>..\..\out</DCC_ExeOutput>
|
||||||
|
<DCC_UnitSearchPath>$(BDS)\lib\Debug;$(BDS)\Lib\Debug\Indy10;$(DELPHI)\Lib\Debug;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||||
|
<DCC_S>false</DCC_S>
|
||||||
|
<DCC_N>true</DCC_N>
|
||||||
|
<DCC_K>false</DCC_K>
|
||||||
|
<DCC_SYMBOL_DEPRECATED>false</DCC_SYMBOL_DEPRECATED>
|
||||||
|
<VerInfo_Release>9</VerInfo_Release>
|
||||||
|
<DCC_UNIT_PLATFORM>false</DCC_UNIT_PLATFORM>
|
||||||
|
<DCC_F>false</DCC_F>
|
||||||
|
<DCC_DcuOutput>..\..\out\dcu</DCC_DcuOutput>
|
||||||
|
<DCC_COMPARISON_TRUE>false</DCC_COMPARISON_TRUE>
|
||||||
|
<DCC_E>false</DCC_E>
|
||||||
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
|
<DCC_COMPARISON_FALSE>false</DCC_COMPARISON_FALSE>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||||
|
<PreBuildEvent><![CDATA[DEL /Q "$(OUTPUTDIR)*$(OUTPUTEXT)"
|
||||||
|
$(PreBuildEvent)]]></PreBuildEvent>
|
||||||
|
<PostBuildEvent><![CDATA[COPY /Y "$(OUTPUTDIR)$(OUTPUTFILENAME)" "$(OUTPUTDIR)Apophysis7X64$(OUTPUTEXT)"
|
||||||
|
DEL /Q "$(OUTPUTDIR)$(OUTPUTFILENAME)"
|
||||||
|
$(PostBuildEvent)]]></PostBuildEvent>
|
||||||
|
<VerInfo_Build>0</VerInfo_Build>
|
||||||
|
<VerInfo_MajorVer>1</VerInfo_MajorVer>
|
||||||
|
<VerInfo_Release>0</VerInfo_Release>
|
||||||
|
<DCC_ExeOutput>..\..\Out\x64\</DCC_ExeOutput>
|
||||||
|
<DCC_DcuOutput>..\..\Out\x64\dcu\</DCC_DcuOutput>
|
||||||
|
<DCC_Define>Apo7X64;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||||
|
<DCC_ExeOutput>..\..\Out\x86\</DCC_ExeOutput>
|
||||||
|
<DCC_DcuOutput>..\..\Out\x86\dcu\</DCC_DcuOutput>
|
||||||
|
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||||
|
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||||
|
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||||
|
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||||
|
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_MajorVer>1</VerInfo_MajorVer>
|
||||||
|
<VerInfo_Release>0</VerInfo_Release>
|
||||||
|
<VerInfo_Build>0</VerInfo_Build>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||||
|
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||||
|
<DCC_Optimize>false</DCC_Optimize>
|
||||||
|
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||||
|
<VerInfo_MajorVer>1</VerInfo_MajorVer>
|
||||||
|
<VerInfo_Build>0</VerInfo_Build>
|
||||||
|
<VerInfo_Release>0</VerInfo_Release>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<Icon_MainIcon>Resources\MAINICON.ico</Icon_MainIcon>
|
||||||
|
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||||
|
<DCC_IMPLICIT_STRING_CAST>false</DCC_IMPLICIT_STRING_CAST>
|
||||||
|
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||||
|
<VerInfo_Build>1590</VerInfo_Build>
|
||||||
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
|
<VerInfo_MinorVer>1</VerInfo_MinorVer>
|
||||||
|
<VerInfo_Release>15</VerInfo_Release>
|
||||||
|
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.1.15.1590;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0</VerInfo_Keys>
|
||||||
|
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<DelphiCompile Include="$(MainSource)">
|
||||||
|
<MainSource>MainSource</MainSource>
|
||||||
|
</DelphiCompile>
|
||||||
|
<DCCReference Include="System\FastMM4.pas"/>
|
||||||
|
<DCCReference Include="System\FastMM4Messages.pas"/>
|
||||||
|
<DCCReference Include="IO\Binary.pas"/>
|
||||||
|
<DCCReference Include="IO\Base64.pas"/>
|
||||||
|
<DCCReference Include="System\sdStringTable.pas"/>
|
||||||
|
<DCCReference Include="System\CustomDrawControl.pas"/>
|
||||||
|
<DCCReference Include="System\LibXmlComps.pas"/>
|
||||||
|
<DCCReference Include="System\LibXmlParser.pas"/>
|
||||||
|
<DCCReference Include="System\Windows7.pas"/>
|
||||||
|
<DCCReference Include="System\RegexHelper.pas"/>
|
||||||
|
<DCCReference Include="System\CurvesControl.pas"/>
|
||||||
|
<DCCReference Include="System\AsmRandom.pas"/>
|
||||||
|
<DCCReference Include="Core\Global.pas"/>
|
||||||
|
<DCCReference Include="IO\CommandLine.pas"/>
|
||||||
|
<DCCReference Include="IO\MissingPlugin.pas"/>
|
||||||
|
<DCCReference Include="IO\Settings.pas"/>
|
||||||
|
<DCCReference Include="Core\Translation.pas"/>
|
||||||
|
<DCCReference Include="IO\ParameterIO.pas"/>
|
||||||
|
<DCCReference Include="Core\Bezier.pas"/>
|
||||||
|
<DCCReference Include="Flame\RndFlame.pas"/>
|
||||||
|
<DCCReference Include="Flame\ControlPoint.pas"/>
|
||||||
|
<DCCReference Include="ColorMap\cmapdata.pas"/>
|
||||||
|
<DCCReference Include="ColorMap\cmap.pas"/>
|
||||||
|
<DCCReference Include="ColorMap\GradientHlpr.pas"/>
|
||||||
|
<DCCReference Include="Core\XFormMan.pas"/>
|
||||||
|
<DCCReference Include="Flame\XForm.pas"/>
|
||||||
|
<DCCReference Include="Core\BaseVariation.pas"/>
|
||||||
|
<DCCReference Include="Rendering\RenderingCommon.pas"/>
|
||||||
|
<DCCReference Include="Rendering\RenderingInterface.pas"/>
|
||||||
|
<DCCReference Include="Rendering\RenderingImplementation.pas"/>
|
||||||
|
<DCCReference Include="Rendering\BucketFillerThread.pas"/>
|
||||||
|
<DCCReference Include="Rendering\RenderThread.pas"/>
|
||||||
|
<DCCReference Include="Rendering\ImageMaker.pas"/>
|
||||||
|
<DCCReference Include="Variations\varHemisphere.pas"/>
|
||||||
|
<DCCReference Include="Variations\varLog.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPolar2.pas"/>
|
||||||
|
<DCCReference Include="Variations\varRings2.pas"/>
|
||||||
|
<DCCReference Include="Variations\varFan2.pas"/>
|
||||||
|
<DCCReference Include="Variations\varCross.pas"/>
|
||||||
|
<DCCReference Include="Variations\varWedge.pas"/>
|
||||||
|
<DCCReference Include="Variations\varEpispiral.pas"/>
|
||||||
|
<DCCReference Include="Variations\varBwraps.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPDJ.pas"/>
|
||||||
|
<DCCReference Include="Variations\varJuliaN.pas"/>
|
||||||
|
<DCCReference Include="Variations\varJuliaScope.pas"/>
|
||||||
|
<DCCReference Include="Variations\varJulia3Djf.pas"/>
|
||||||
|
<DCCReference Include="Variations\varJulia3Dz.pas"/>
|
||||||
|
<DCCReference Include="Variations\varCurl.pas"/>
|
||||||
|
<DCCReference Include="Variations\varCurl3D.pas"/>
|
||||||
|
<DCCReference Include="Variations\varRadialBlur.pas"/>
|
||||||
|
<DCCReference Include="Variations\varBlurCircle.pas"/>
|
||||||
|
<DCCReference Include="Variations\varBlurZoom.pas"/>
|
||||||
|
<DCCReference Include="Variations\varBlurPixelize.pas"/>
|
||||||
|
<DCCReference Include="Variations\varFalloff2.pas"/>
|
||||||
|
<DCCReference Include="Variations\varRectangles.pas"/>
|
||||||
|
<DCCReference Include="Variations\varSplits.pas"/>
|
||||||
|
<DCCReference Include="Variations\varSeparation.pas"/>
|
||||||
|
<DCCReference Include="Variations\varBipolar.pas"/>
|
||||||
|
<DCCReference Include="Variations\varLoonie.pas"/>
|
||||||
|
<DCCReference Include="Variations\varEscher.pas"/>
|
||||||
|
<DCCReference Include="Variations\varScry.pas"/>
|
||||||
|
<DCCReference Include="Variations\varNGon.pas"/>
|
||||||
|
<DCCReference Include="Variations\varFoci.pas"/>
|
||||||
|
<DCCReference Include="Variations\varLazysusan.pas"/>
|
||||||
|
<DCCReference Include="Variations\varMobius.pas"/>
|
||||||
|
<DCCReference Include="Variations\varCrop.pas"/>
|
||||||
|
<DCCReference Include="Variations\varElliptic.pas"/>
|
||||||
|
<DCCReference Include="Variations\varWaves2.pas"/>
|
||||||
|
<DCCReference Include="Variations\varAuger.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPreSpherical.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPreSinusoidal.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPreDisc.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPreBwraps.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPreCrop.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPreFalloff2.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPostBwraps.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPostCurl.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPostCurl3D.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPostCrop.pas"/>
|
||||||
|
<DCCReference Include="Variations\varPostFalloff2.pas"/>
|
||||||
|
<DCCReference Include="Variations\varGenericPlugin.pas"/>
|
||||||
|
<DCCReference Include="Forms\Main.pas">
|
||||||
|
<Form>MainForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Tracer.pas">
|
||||||
|
<Form>TraceForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\About.pas">
|
||||||
|
<Form>AboutForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Adjust.pas">
|
||||||
|
<Form>AdjustForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Browser.pas">
|
||||||
|
<Form>GradientBrowser</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Editor.pas">
|
||||||
|
<Form>EditForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\FormExport.pas">
|
||||||
|
<Form>ExportDialog</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\formPostProcess.pas">
|
||||||
|
<Form>frmPostProcess</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\FormRender.pas">
|
||||||
|
<Form>RenderForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Fullscreen.pas">
|
||||||
|
<Form>FullscreenForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\ImageColoring.pas">
|
||||||
|
<Form>frmImageColoring</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\LoadTracker.pas">
|
||||||
|
<Form>LoadForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Mutate.pas">
|
||||||
|
<Form>MutateForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Options.pas">
|
||||||
|
<Form>OptionsForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Save.pas">
|
||||||
|
<Form>SaveForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\SavePreset.pas">
|
||||||
|
<Form>SavePresetForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\SplashForm.pas">
|
||||||
|
<Form>SplashWindow</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Template.pas">
|
||||||
|
<Form>TemplateForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<DCCReference Include="Forms\Curves.pas">
|
||||||
|
<Form>CurvesForm</Form>
|
||||||
|
</DCCReference>
|
||||||
|
<None Include="Apophysis7X.todo"/>
|
||||||
|
<BuildConfiguration Include="Debug">
|
||||||
|
<Key>Cfg_2</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Base">
|
||||||
|
<Key>Base</Key>
|
||||||
|
</BuildConfiguration>
|
||||||
|
<BuildConfiguration Include="Release">
|
||||||
|
<Key>Cfg_1</Key>
|
||||||
|
<CfgParent>Base</CfgParent>
|
||||||
|
</BuildConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ProjectExtensions>
|
||||||
|
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||||
|
<Borland.ProjectType/>
|
||||||
|
<BorlandProject>
|
||||||
|
<Delphi.Personality>
|
||||||
|
<Source>
|
||||||
|
<Source Name="MainSource">Apophysis7X.dpr</Source>
|
||||||
|
</Source>
|
||||||
|
<Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
<Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||||
|
</Excluded_Packages>
|
||||||
|
<VersionInfo>
|
||||||
|
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||||
|
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||||
|
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||||
|
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||||
|
<VersionInfo Name="Release">0</VersionInfo>
|
||||||
|
<VersionInfo Name="Build">0</VersionInfo>
|
||||||
|
<VersionInfo Name="Debug">False</VersionInfo>
|
||||||
|
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||||
|
<VersionInfo Name="Special">False</VersionInfo>
|
||||||
|
<VersionInfo Name="Private">False</VersionInfo>
|
||||||
|
<VersionInfo Name="DLL">False</VersionInfo>
|
||||||
|
<VersionInfo Name="Locale">1031</VersionInfo>
|
||||||
|
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||||
|
</VersionInfo>
|
||||||
|
<VersionInfoKeys>
|
||||||
|
<VersionInfoKeys Name="CompanyName"/>
|
||||||
|
<VersionInfoKeys Name="FileDescription"/>
|
||||||
|
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||||
|
<VersionInfoKeys Name="InternalName"/>
|
||||||
|
<VersionInfoKeys Name="LegalCopyright"/>
|
||||||
|
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||||
|
<VersionInfoKeys Name="OriginalFilename"/>
|
||||||
|
<VersionInfoKeys Name="ProductName"/>
|
||||||
|
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||||
|
<VersionInfoKeys Name="Comments"/>
|
||||||
|
</VersionInfoKeys>
|
||||||
|
</Delphi.Personality>
|
||||||
|
<Platforms>
|
||||||
|
<Platform value="Win64">True</Platform>
|
||||||
|
<Platform value="Win32">True</Platform>
|
||||||
|
</Platforms>
|
||||||
|
</BorlandProject>
|
||||||
|
<ProjectFileVersion>12</ProjectFileVersion>
|
||||||
|
</ProjectExtensions>
|
||||||
|
<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
|
||||||
|
<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Release' And '$(Platform)'=='Win64'">
|
||||||
|
<PreBuildEvent>DEL /Q "$(OUTPUTDIR)*$(OUTPUTEXT)"</PreBuildEvent>
|
||||||
|
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
|
||||||
|
<PreLinkEvent/>
|
||||||
|
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
|
||||||
|
<PostBuildEvent>COPY /Y "$(OUTPUTDIR)$(OUTPUTFILENAME)" "$(OUTPUTDIR)Apophysis7X64$(OUTPUTEXT)"&&DEL /Q "$(OUTPUTDIR)$(OUTPUTFILENAME)"</PostBuildEvent>
|
||||||
|
<PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win64'">
|
||||||
|
<PreBuildEvent>DEL /Q "$(OUTPUTDIR)*$(OUTPUTEXT)"</PreBuildEvent>
|
||||||
|
<PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
|
||||||
|
<PreLinkEvent/>
|
||||||
|
<PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
|
||||||
|
<PostBuildEvent>COPY /Y "$(OUTPUTDIR)$(OUTPUTFILENAME)" "$(OUTPUTDIR)Apophysis7X64$(OUTPUTEXT)"&&DEL /Q "$(OUTPUTDIR)$(OUTPUTFILENAME)"</PostBuildEvent>
|
||||||
|
<PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
36
Apophysis7X.groupproj
Normal file
36
Apophysis7X.groupproj
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>{2C89F2DE-83E1-4164-B84E-1D0509F8AB8C}</ProjectGuid>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Projects Include="Apophysis7X.dproj">
|
||||||
|
<Dependencies/>
|
||||||
|
</Projects>
|
||||||
|
</ItemGroup>
|
||||||
|
<ProjectExtensions>
|
||||||
|
<Borland.Personality>Default.Personality.12</Borland.Personality>
|
||||||
|
<Borland.ProjectType/>
|
||||||
|
<BorlandProject>
|
||||||
|
<Default.Personality/>
|
||||||
|
</BorlandProject>
|
||||||
|
</ProjectExtensions>
|
||||||
|
<Target Name="Apophysis7X">
|
||||||
|
<MSBuild Projects="Apophysis7X.dproj"/>
|
||||||
|
</Target>
|
||||||
|
<Target Name="Apophysis7X:Clean">
|
||||||
|
<MSBuild Projects="Apophysis7X.dproj" Targets="Clean"/>
|
||||||
|
</Target>
|
||||||
|
<Target Name="Apophysis7X:Make">
|
||||||
|
<MSBuild Projects="Apophysis7X.dproj" Targets="Make"/>
|
||||||
|
</Target>
|
||||||
|
<Target Name="Build">
|
||||||
|
<CallTarget Targets="Apophysis7X"/>
|
||||||
|
</Target>
|
||||||
|
<Target Name="Clean">
|
||||||
|
<CallTarget Targets="Apophysis7X:Clean"/>
|
||||||
|
</Target>
|
||||||
|
<Target Name="Make">
|
||||||
|
<CallTarget Targets="Apophysis7X:Make"/>
|
||||||
|
</Target>
|
||||||
|
<Import Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')" Project="$(BDS)\Bin\CodeGear.Group.Targets"/>
|
||||||
|
</Project>
|
BIN
Apophysis7X.res
Normal file
BIN
Apophysis7X.res
Normal file
Binary file not shown.
0
Apophysis7X.todo
Normal file
0
Apophysis7X.todo
Normal file
BIN
Apophysis7X_Icon.ico
Normal file
BIN
Apophysis7X_Icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
167
ColorMap/GradientHlpr.pas
Normal file
167
ColorMap/GradientHlpr.pas
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit GradientHlpr;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
windows, Graphics, Cmap;
|
||||||
|
|
||||||
|
const
|
||||||
|
PixelCountMax = 32768;
|
||||||
|
|
||||||
|
type
|
||||||
|
pRGBTripleArray = ^TRGBTripleArray;
|
||||||
|
TRGBTripleArray = array[0..PixelCountMax - 1] of TRGBTriple;
|
||||||
|
|
||||||
|
type
|
||||||
|
TGradientHelper = class
|
||||||
|
private
|
||||||
|
procedure RGBBlend(a, b: integer; var Palette: TColorMap);
|
||||||
|
public
|
||||||
|
function GetGradientBitmap(Index: integer; const hue_rotation: double): TBitmap;
|
||||||
|
function RandomGradient: TColorMap;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
GradientHelper: TGradientHelper;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Global;
|
||||||
|
|
||||||
|
{ TGradientHelper }
|
||||||
|
|
||||||
|
function TGradientHelper.GetGradientBitmap(Index: integer; const hue_rotation: double): TBitmap;
|
||||||
|
var
|
||||||
|
BitMap: TBitMap;
|
||||||
|
i, j: integer;
|
||||||
|
Row: pRGBTripleArray;
|
||||||
|
pal: TColorMap;
|
||||||
|
begin
|
||||||
|
GetCMap(index, hue_rotation, pal);
|
||||||
|
|
||||||
|
BitMap := TBitMap.create;
|
||||||
|
Bitmap.PixelFormat := pf24bit;
|
||||||
|
BitMap.Width := 256;
|
||||||
|
BitMap.Height := 2;
|
||||||
|
|
||||||
|
for j := 0 to Bitmap.Height - 1 do begin
|
||||||
|
Row := Bitmap.Scanline[j];
|
||||||
|
for i := 0 to Bitmap.Width - 1 do begin
|
||||||
|
Row[i].rgbtRed := Pal[i][0];
|
||||||
|
Row[i].rgbtGreen := Pal[i][1];
|
||||||
|
Row[i].rgbtBlue := Pal[i][2];
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
|
||||||
|
Result := BitMap;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function TGradientHelper.RandomGradient: TColorMap;
|
||||||
|
var
|
||||||
|
a, b, n, nodes: integer;
|
||||||
|
rgb: array[0..2] of double;
|
||||||
|
hsv: array[0..2] of double;
|
||||||
|
pal: TColorMap;
|
||||||
|
begin
|
||||||
|
rgb[0] := 0;
|
||||||
|
rgb[1] := 0;
|
||||||
|
rgb[2] := 0;
|
||||||
|
|
||||||
|
inc(MainSeed);
|
||||||
|
RandSeed := Mainseed;
|
||||||
|
nodes := random((MaxNodes - 1) - (MinNodes - 2)) + (MinNodes - 1);
|
||||||
|
n := 256 div nodes;
|
||||||
|
b := 0;
|
||||||
|
hsv[0] := 0.01 * (random(MaxHue - (MinHue - 1)) + MinHue);
|
||||||
|
hsv[1] := 0.01 * (random(MaxSat - (MinSat - 1)) + MinSat);
|
||||||
|
hsv[2] := 0.01 * (random(MaxLum - (MinLum - 1)) + MinLum);
|
||||||
|
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] := 0.01 * (random(MaxHue - (MinHue - 1)) + MinHue);
|
||||||
|
hsv[1] := 0.01 * (random(MaxSat - (MinSat - 1)) + MinSat);
|
||||||
|
hsv[2] := 0.01 * (random(MaxLum - (MinLum - 1)) + MinLum);
|
||||||
|
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 TGradientHelper.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;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
initialization
|
||||||
|
GradientHelper := TGradientHelper.create;
|
||||||
|
finalization
|
||||||
|
GradientHelper.Free;
|
||||||
|
end.
|
374
ColorMap/cmap.pas
Normal file
374
ColorMap/cmap.pas
Normal file
@ -0,0 +1,374 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit 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
|
||||||
|
// rgb[0] := 0;
|
||||||
|
// rgb[1] := 0;
|
||||||
|
// rgb[2] := 0;
|
||||||
|
|
||||||
|
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] := q; 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 CharInSet(test[1],[#32]) do
|
||||||
|
Delete(test, 1, 1);
|
||||||
|
if (Length(Test) = 0) then
|
||||||
|
exit;
|
||||||
|
token := '';
|
||||||
|
while (Length(Test) > 0) and (not CharInSet(test[1],[#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
|
||||||
|
try
|
||||||
|
index := StrToInt(Indices[i]);
|
||||||
|
while index < 0 do inc(index, 400);
|
||||||
|
index := Round(Index * (255 / 399));
|
||||||
|
indices[i] := IntToStr(index);
|
||||||
|
assert(index>=0);
|
||||||
|
assert(index<256);
|
||||||
|
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);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
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.
|
||||||
|
|
47741
ColorMap/cmapdata.pas
Normal file
47741
ColorMap/cmapdata.pas
Normal file
File diff suppressed because it is too large
Load Diff
210
Core/BaseVariation.pas
Normal file
210
Core/BaseVariation.pas
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit BaseVariation;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
type
|
||||||
|
TCalcFunction = procedure of object;
|
||||||
|
|
||||||
|
type
|
||||||
|
TBaseVariation = class
|
||||||
|
|
||||||
|
protected
|
||||||
|
procedure CalcFunction; virtual; abstract;
|
||||||
|
|
||||||
|
public
|
||||||
|
vvar: double;
|
||||||
|
FTx, FTy: ^double;
|
||||||
|
FPx, FPy: ^double;
|
||||||
|
FTz, FPz: ^double;
|
||||||
|
|
||||||
|
// more params :)
|
||||||
|
color : ^double;
|
||||||
|
a, b, c, d, e, f : double;
|
||||||
|
|
||||||
|
class function GetName: string; virtual; abstract;
|
||||||
|
class function GetInstance: TBaseVariation; virtual; abstract;
|
||||||
|
|
||||||
|
function GetNrVariables: integer; virtual;
|
||||||
|
function GetVariableNameAt(const Index: integer): string; virtual;
|
||||||
|
|
||||||
|
function GetVariable(const Name: string; var Value: double): boolean; virtual;
|
||||||
|
function SetVariable(const Name: string; var Value: double): boolean; virtual;
|
||||||
|
function ResetVariable(const Name: string): boolean; virtual;
|
||||||
|
|
||||||
|
function GetVariableStr(const Name: string): string; virtual;
|
||||||
|
function SetVariableStr(const Name: string; var strValue: string): boolean; virtual;
|
||||||
|
|
||||||
|
procedure Prepare; virtual;
|
||||||
|
|
||||||
|
procedure GetCalcFunction(var Delphi_Suxx: TCalcFunction); virtual;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TBaseVariationClass = class of TBaseVariation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TVariationLoader = class
|
||||||
|
public
|
||||||
|
Supports3D, SupportsDC : boolean;
|
||||||
|
|
||||||
|
function GetName: string; virtual; abstract;
|
||||||
|
function GetInstance: TBaseVariation; virtual; abstract;
|
||||||
|
function GetNrVariables: integer; virtual; abstract;
|
||||||
|
function GetVariableNameAt(const Index: integer): string; virtual; abstract;
|
||||||
|
end;
|
||||||
|
|
||||||
|
type
|
||||||
|
TVariationClassLoader = class (TVariationLoader)
|
||||||
|
public
|
||||||
|
constructor Create(varClass : TBaseVariationClass);
|
||||||
|
function GetName: string; override;
|
||||||
|
function GetInstance: TBaseVariation; override;
|
||||||
|
function GetNrVariables: integer; override;
|
||||||
|
function GetVariableNameAt(const Index: integer): string; override;
|
||||||
|
|
||||||
|
private
|
||||||
|
VariationClass : TBaseVariationClass;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function fmod(x, y: double) : double;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses SysUtils;
|
||||||
|
|
||||||
|
function fmod(x, y: double) : double;
|
||||||
|
begin
|
||||||
|
Result := frac(x / y) * y;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TBaseVariation }
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function TBaseVariation.GetNrVariables: integer;
|
||||||
|
begin
|
||||||
|
Result := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function TBaseVariation.GetVariable(const Name: string; var value: double): boolean;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TBaseVariation.SetVariable(const Name: string; var value: double): boolean;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TBaseVariation.ResetVariable(const Name: string): boolean;
|
||||||
|
var
|
||||||
|
zero: double;
|
||||||
|
begin
|
||||||
|
zero := 0;
|
||||||
|
Result := SetVariable(Name, zero);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function TBaseVariation.GetVariableStr(const Name: string): string;
|
||||||
|
var
|
||||||
|
value: double;
|
||||||
|
begin
|
||||||
|
if GetVariable(Name, value) then
|
||||||
|
Result := Format('%.6g', [value])
|
||||||
|
else
|
||||||
|
Result := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TBaseVariation.SetVariableStr(const Name: string; var strValue: string): boolean;
|
||||||
|
var
|
||||||
|
v, oldv: double;
|
||||||
|
begin
|
||||||
|
if GetVariable(Name, oldv) then begin
|
||||||
|
try
|
||||||
|
v := StrToFloat(strValue);
|
||||||
|
SetVariable(Name, v);
|
||||||
|
except
|
||||||
|
v := oldv;
|
||||||
|
end;
|
||||||
|
strValue := Format('%.6g', [v]);
|
||||||
|
Result := true;
|
||||||
|
end
|
||||||
|
else Result := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function TBaseVariation.GetVariableNameAt(const Index: integer): string;
|
||||||
|
begin
|
||||||
|
Result := ''
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TBaseVariation.Prepare;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TBaseVariation.GetCalcFunction(var Delphi_Suxx: TCalcFunction);
|
||||||
|
begin
|
||||||
|
Delphi_Suxx := CalcFunction; // -X- lol
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
{ TVariationClassLoader }
|
||||||
|
|
||||||
|
constructor TVariationClassLoader.Create(varClass : TBaseVariationClass);
|
||||||
|
begin
|
||||||
|
VariationClass := varClass;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TVariationClassLoader.GetName: string;
|
||||||
|
begin
|
||||||
|
Result := VariationClass.GetName();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TVariationClassLoader.GetInstance: TBaseVariation;
|
||||||
|
begin
|
||||||
|
Result := VariationClass.GetInstance();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TVariationClassLoader.GetNrVariables: integer;
|
||||||
|
var
|
||||||
|
hack : TBaseVariation;
|
||||||
|
begin
|
||||||
|
hack := GetInstance();
|
||||||
|
Result := hack.GetNrVariables();
|
||||||
|
hack.Free();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TVariationClassLoader.GetVariableNameAt(const Index: integer): string;
|
||||||
|
var
|
||||||
|
hack : TBaseVariation;
|
||||||
|
begin
|
||||||
|
hack := GetInstance();
|
||||||
|
Result := hack.GetVariableNameAt(Index);
|
||||||
|
hack.Free();
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
94
Core/Bezier.pas
Normal file
94
Core/Bezier.pas
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
unit Bezier;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses Math;
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
BezierPoint = record
|
||||||
|
x, y: double;
|
||||||
|
end;
|
||||||
|
BezierRect = record
|
||||||
|
x0, y0, x1, y1: double;
|
||||||
|
end;
|
||||||
|
|
||||||
|
BezierPoints = array [0..3] of BezierPoint;
|
||||||
|
BezierWeights = array [0..3] of double;
|
||||||
|
|
||||||
|
procedure BezierCopy(src: BezierPoints; var tgt: BezierPoints);
|
||||||
|
procedure BezierSetRect(var points: BezierPoints; flip: boolean; rect: BezierRect);
|
||||||
|
procedure BezierUnsetRect(var points: BezierPoints; flip: boolean; rect: BezierRect);
|
||||||
|
|
||||||
|
procedure BezierSolve(t: double; src: BezierPoints; w: BezierWeights; var solution: BezierPoint);
|
||||||
|
function BezierFunc(t: double; src: BezierPoints; w: BezierWeights): double;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
procedure BezierCopy(src: BezierPoints; var tgt: BezierPoints);
|
||||||
|
var
|
||||||
|
i, n: integer;
|
||||||
|
begin
|
||||||
|
n := Length(src);
|
||||||
|
for i := 0 to n - 1 do
|
||||||
|
tgt[i] := src[i];
|
||||||
|
end;
|
||||||
|
procedure BezierSetRect(var points: BezierPoints; flip: boolean; rect: BezierRect);
|
||||||
|
var
|
||||||
|
i, n: integer;
|
||||||
|
f: double;
|
||||||
|
begin
|
||||||
|
n := Length(points);
|
||||||
|
for i := 0 to n - 1 do
|
||||||
|
begin
|
||||||
|
if (flip) then f := 1 - points[i].y
|
||||||
|
else f := points[i].y;
|
||||||
|
|
||||||
|
points[i].x := points[i].x * (rect.x1 - rect.x0) + rect.x0;
|
||||||
|
points[i].y := f * (rect.y1 - rect.y0) + rect.y0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure BezierUnsetRect(var points: BezierPoints; flip: boolean; rect: BezierRect);
|
||||||
|
var
|
||||||
|
i, n: integer;
|
||||||
|
f: double;
|
||||||
|
begin
|
||||||
|
if ((rect.x1 - rect.x0) = 0) or ((rect.y1 - rect.y0) = 0) then Exit;
|
||||||
|
|
||||||
|
n := Length(points);
|
||||||
|
for i := 0 to n - 1 do
|
||||||
|
begin
|
||||||
|
points[i].x := (points[i].x - rect.x0) / (rect.x1 - rect.x0);
|
||||||
|
points[i].y := (points[i].y - rect.y0) / (rect.y1 - rect.y0);
|
||||||
|
|
||||||
|
if (flip) then points[i].y := 1 - points[i].y;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure BezierSolve(t: double; src: BezierPoints; w: BezierWeights; var solution: BezierPoint);
|
||||||
|
var
|
||||||
|
s, s2, s3, t2, t3, nom_x, nom_y, denom: double;
|
||||||
|
begin
|
||||||
|
s := 1 - t;
|
||||||
|
s2 := s * s; s3 := s * s * s;
|
||||||
|
t2 := t * t; t3 := t * t * t;
|
||||||
|
|
||||||
|
nom_x := w[0] * s3 * src[0].x + w[1] * s2 * 3 * t * src[1].x +
|
||||||
|
w[2] * s * 3 * t2 * src[2].x + w[3] * t3 * src[3].x;
|
||||||
|
nom_y := w[0] * s3 * src[0].y + w[1] * s2 * 3 * t * src[1].y +
|
||||||
|
w[2] * s * 3 * t2 * src[2].y + w[3] * t3 * src[3].y;
|
||||||
|
denom := w[0] * s3 + w[1] * s2 * 3 * t + w[2] * s * 3 * t2 + w[3] * t3;
|
||||||
|
|
||||||
|
if (IsNaN(nom_x)) or (IsNaN(nom_y)) or (IsNaN(denom)) then Exit;
|
||||||
|
if denom = 0 then Exit;
|
||||||
|
|
||||||
|
solution.x := nom_x / denom;
|
||||||
|
solution.y := nom_y / denom;
|
||||||
|
end;
|
||||||
|
function BezierFunc(t: double; src: BezierPoints; w: BezierWeights): double;
|
||||||
|
var
|
||||||
|
p: BezierPoint;
|
||||||
|
begin
|
||||||
|
BezierSolve(t, src, w, p);
|
||||||
|
Result := p.y;
|
||||||
|
end;
|
||||||
|
end.
|
268
Core/Chaotica.pas
Normal file
268
Core/Chaotica.pas
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
unit Chaotica;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses Global, RegularExpressionsCore, RegexHelper, Classes, SysUtils, XFormMan, Windows,
|
||||||
|
ShellAPI, Forms, ControlPoint, Translation;
|
||||||
|
|
||||||
|
function C_GetPathOf(filename: string; usex64: boolean): string;
|
||||||
|
function C_SupportsDllPlugins(usex64: boolean): boolean;
|
||||||
|
function C_IsDllPluginBlacklisted(filename: string; usex64: boolean): boolean;
|
||||||
|
function C_IsVariationNative(name: string; usex64: boolean): boolean;
|
||||||
|
function C_IsDllPluginInstalled(filename: string): boolean;
|
||||||
|
|
||||||
|
procedure C_SyncDllPlugins;
|
||||||
|
procedure C_InstallVariation(name: string);
|
||||||
|
procedure C_ExecuteChaotica(flamexml: string; plugins: TStringList; usex64: boolean);
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Main;
|
||||||
|
|
||||||
|
function CheckX64: Boolean;
|
||||||
|
var
|
||||||
|
SEInfo: TShellExecuteInfo;
|
||||||
|
ExitCode: DWORD;
|
||||||
|
ExecuteFile, ParamString, StartInString: string;
|
||||||
|
begin
|
||||||
|
{$ifdef Apo7X64}
|
||||||
|
Result := true;
|
||||||
|
exit;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
ExecuteFile:=ExtractFilePath(Application.ExeName)+'chk64.exe';
|
||||||
|
FillChar(SEInfo, SizeOf(SEInfo), 0);
|
||||||
|
SEInfo.cbSize := SizeOf(TShellExecuteInfo);
|
||||||
|
|
||||||
|
with SEInfo do begin
|
||||||
|
fMask := SEE_MASK_NOCLOSEPROCESS;
|
||||||
|
Wnd := Application.Handle;
|
||||||
|
lpFile := PChar(ExecuteFile) ;
|
||||||
|
nShow := SW_SHOWNORMAL;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if ShellExecuteEx(@SEInfo) then
|
||||||
|
begin
|
||||||
|
repeat
|
||||||
|
Application.ProcessMessages;
|
||||||
|
GetExitCodeProcess(SEInfo.hProcess, ExitCode);
|
||||||
|
until (ExitCode <> STILL_ACTIVE) or Application.Terminated;
|
||||||
|
Result := (ExitCode = 0);
|
||||||
|
end else begin
|
||||||
|
Result := false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function C_GetPathOf(filename: string; usex64: boolean): string;
|
||||||
|
var
|
||||||
|
subf: string;
|
||||||
|
begin
|
||||||
|
if usex64 then subf := '64bit'
|
||||||
|
else subf := '32bit';
|
||||||
|
Result := ChaoticaPath + '\' + subf + '\' + filename;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function C_SupportsDllPlugins(usex64: boolean): boolean;
|
||||||
|
const
|
||||||
|
re_root : string = '<variation_compatibility\s+(.*?)>.*?</variation_compatibility>';
|
||||||
|
re_attrib : string = 'supports_dll_plugins="(.*?)"';
|
||||||
|
var
|
||||||
|
xml_file : TStringList;
|
||||||
|
xml_text, attrib, value : string;
|
||||||
|
begin
|
||||||
|
if usex64 then begin
|
||||||
|
Result := false;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
xml_file := TStringList.Create;
|
||||||
|
xml_file.LoadFromFile(C_GetPathOf('variation_compatibility.xml', false));
|
||||||
|
xml_text := xml_file.Text;
|
||||||
|
xml_file.Destroy;
|
||||||
|
|
||||||
|
attrib := GetStringPart(xml_text, re_root, 1, 'supports_dll_plugins="false"');
|
||||||
|
value := GetStringPart(attrib, re_attrib, 1, 'false');
|
||||||
|
|
||||||
|
Result := (value = 'true');
|
||||||
|
end;
|
||||||
|
|
||||||
|
function C_IsDllPluginBlacklisted(filename: string; usex64: boolean): boolean;
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
blacklist: TStringList;
|
||||||
|
begin
|
||||||
|
blacklist := TStringList.Create;
|
||||||
|
blacklist.LoadFromFile(C_GetPathOf('plugin_dll_blacklist.txt', usex64));
|
||||||
|
|
||||||
|
for i := 0 to blacklist.Count - 1 do begin
|
||||||
|
if LowerCase(filename) = LowerCase(blacklist.Strings[i]) then begin
|
||||||
|
Result := true;
|
||||||
|
blacklist.Destroy;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
blacklist.Destroy;
|
||||||
|
Result := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function C_IsVariationNative(name: string; usex64: boolean): boolean;
|
||||||
|
const
|
||||||
|
re_root : string = '<variation_compatibility.*?>(.*?)</variation_compatibility>';
|
||||||
|
re_var : string = '<variation name="(.*?)".*?/>';
|
||||||
|
var
|
||||||
|
xml, var_name : string;
|
||||||
|
xml_file : TStringList;
|
||||||
|
find_var : TPerlRegEx;
|
||||||
|
found_var : boolean;
|
||||||
|
begin
|
||||||
|
|
||||||
|
xml_file := TStringList.Create;
|
||||||
|
xml_file.LoadFromFile(C_GetPathOf('variation_compatibility.xml', false));
|
||||||
|
xml := xml_file.Text;
|
||||||
|
xml_file.Destroy;
|
||||||
|
|
||||||
|
find_var := TPerlRegEx.Create;
|
||||||
|
find_var.RegEx := Utf8String(re_var);
|
||||||
|
find_var.Options := [preSingleLine, preCaseless];
|
||||||
|
find_var.Subject := Utf8String(GetStringPart(xml, re_root, 1, ''));
|
||||||
|
found_var := find_var.Match;
|
||||||
|
|
||||||
|
while found_var do begin
|
||||||
|
var_name := String(find_var.Groups[1]);
|
||||||
|
found_var := find_var.MatchAgain;
|
||||||
|
|
||||||
|
if LowerCase(name) = var_name then begin
|
||||||
|
find_var.Destroy;
|
||||||
|
Result := true;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
find_var.Destroy;
|
||||||
|
Result := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function C_IsDllPluginInstalled(filename: string): boolean;
|
||||||
|
var
|
||||||
|
path : string;
|
||||||
|
begin
|
||||||
|
path := C_GetPathOf('plugins\' + filename, false);
|
||||||
|
Result := FileExists(path);
|
||||||
|
end;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
procedure C_InstallVariation(name: string);
|
||||||
|
var
|
||||||
|
filename: string;
|
||||||
|
begin
|
||||||
|
filename := GetFileNameOfVariation(name);
|
||||||
|
|
||||||
|
if (filename = '') then Exit;
|
||||||
|
if C_IsDllPluginInstalled(filename) then Exit;
|
||||||
|
|
||||||
|
CopyFile(PCHAR(filename), PCHAR(C_GetPathOf('plugins\' +
|
||||||
|
ExtractFileName(filename), false)), false);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure C_SyncDllPlugins;
|
||||||
|
var
|
||||||
|
src_dir: string;
|
||||||
|
tgt_dir: string;
|
||||||
|
|
||||||
|
searchResult: TSearchRec;
|
||||||
|
begin
|
||||||
|
src_dir := PluginPath;
|
||||||
|
tgt_dir := C_GetPathOf('Plugins', false);
|
||||||
|
|
||||||
|
if (not DirectoryExists(src_dir)) then Exit;
|
||||||
|
if (not DirectoryExists(tgt_dir)) then Exit;
|
||||||
|
|
||||||
|
// First clear all plugins on Chaotica side
|
||||||
|
if FindFirst(tgt_dir + '\*.dll', faAnyFile, searchResult) = 0 then
|
||||||
|
begin
|
||||||
|
repeat
|
||||||
|
DeleteFile(PCHAR(tgt_dir + '\' + searchResult.Name)) ;
|
||||||
|
until (FindNext(searchResult) <> 0);
|
||||||
|
SysUtils.FindClose(searchResult);
|
||||||
|
end;
|
||||||
|
|
||||||
|
// Then copy all plugins from Apophysis to Chaotica
|
||||||
|
if FindFirst(src_dir + '*.dll', faAnyFile, searchResult) = 0 then
|
||||||
|
begin
|
||||||
|
repeat
|
||||||
|
if not C_IsDllPluginBlacklisted(searchResult.Name, false)
|
||||||
|
then CopyFile(
|
||||||
|
PCHAR(src_dir + '\' + searchResult.Name),
|
||||||
|
PCHAR(tgt_dir + '\' + searchResult.Name),
|
||||||
|
false);
|
||||||
|
until (FindNext(searchResult) <> 0);
|
||||||
|
SysUtils.FindClose(searchResult);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure C_ExecuteChaotica(flamexml: string; plugins: TStringList; usex64: boolean);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
name, fname: string;
|
||||||
|
fails: TStringList;
|
||||||
|
txt: TStringList;
|
||||||
|
fin_usex64: boolean;
|
||||||
|
begin
|
||||||
|
fails := TStringList.Create;
|
||||||
|
|
||||||
|
{$ifdef Apo7X64}
|
||||||
|
fin_usex64 := true;
|
||||||
|
{$else}
|
||||||
|
fin_usex64 := usex64 and CheckX64;
|
||||||
|
for i := 0 to plugins.Count - 1 do begin
|
||||||
|
name := GetFileNameOfVariation(plugins.Strings[i]);
|
||||||
|
if (name = '') then name := plugins.Strings[i];
|
||||||
|
fin_usex64 := fin_usex64 and C_IsVariationNative(name, usex64);
|
||||||
|
end;
|
||||||
|
|
||||||
|
for i := 0 to plugins.Count - 1 do begin
|
||||||
|
name := GetFileNameOfVariation(plugins.Strings[i]);
|
||||||
|
if (name = '') then name := plugins.Strings[i]; // assume built-in
|
||||||
|
|
||||||
|
if not C_IsVariationNative(name, fin_usex64) then begin // not native -> try install
|
||||||
|
if C_SupportsDllPlugins(fin_usex64) then // dll unsupported -> fail
|
||||||
|
fails.Add(plugins.Strings[i])
|
||||||
|
else if C_IsDllPluginBlacklisted(name, fin_usex64) then // dll supported and blacklisted -> fail
|
||||||
|
fails.Add(plugins.Strings[i])
|
||||||
|
;//else C_InstallVariation(plugins.Strings[i]); // dll supported and not blacklisted -> install
|
||||||
|
// ^^^ this is done on Apophysis startup now!
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
name := C_GetPathOf('chaotica.exe', fin_usex64);
|
||||||
|
if (not FileExists(name)) then begin
|
||||||
|
messagebox(0, PCHAR(TextByKey('main-status-nochaotica')),
|
||||||
|
PCHAR('Apophysis 7X'), MB_ICONHAND);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if (fails.Count > 0) then begin
|
||||||
|
messagebox(0, PCHAR(TextByKey('main-status-oldchaotica')),
|
||||||
|
PCHAR('Apophysis 7X'), MB_ICONHAND or MB_OK);
|
||||||
|
end;
|
||||||
|
|
||||||
|
fname := GetEnvironmentVariable('TEMP') + '\chaotica_export.flame';
|
||||||
|
txt := TStringList.Create;
|
||||||
|
|
||||||
|
txt.Text := flamexml;
|
||||||
|
txt.SaveToFile(fname);
|
||||||
|
|
||||||
|
txt.Destroy;
|
||||||
|
fails.Destroy;
|
||||||
|
|
||||||
|
//if fin_usex64 then MessageBox(0, PCHAR('DBG:x64'), PCHAR(''), MB_OK)
|
||||||
|
//else MessageBox(0, PCHAR('DBG:x86'), PCHAR(''), MB_OK) ;
|
||||||
|
|
||||||
|
ShellExecute(application.handle, PChar('open'), pchar(name),
|
||||||
|
PChar('"' + fname + '"'), PChar(ExtractFilePath(name)), SW_SHOWNORMAL);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
689
Core/Global.pas
Normal file
689
Core/Global.pas
Normal file
@ -0,0 +1,689 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit Global;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, SysUtils, Classes, SyncObjs, Controls, Graphics, Math,
|
||||||
|
cmap, ControlPoint, Xform, CommDlg;
|
||||||
|
|
||||||
|
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;
|
||||||
|
function OpenSaveFileDialog(Parent: TWinControl;
|
||||||
|
const DefExt,
|
||||||
|
Filter,
|
||||||
|
InitialDir,
|
||||||
|
Title: string;
|
||||||
|
var FileName: string;
|
||||||
|
MustExist,
|
||||||
|
OverwritePrompt,
|
||||||
|
NoChangeDir,
|
||||||
|
DoOpen: Boolean): Boolean;
|
||||||
|
procedure LoadThumbnailPlaceholder(ThumbnailSize : integer);
|
||||||
|
function GetEnvVarValue(const VarName: string): string;
|
||||||
|
|
||||||
|
|
||||||
|
const
|
||||||
|
APP_NAME: string = 'Apophysis 7x';
|
||||||
|
{$ifdef Apo7X64}
|
||||||
|
APP_BUILD: string = '64 bit';
|
||||||
|
{$else}
|
||||||
|
APP_BUILD: string = '32 bit';
|
||||||
|
{$endif}
|
||||||
|
MAX_TRANSFORMS: integer = 100;
|
||||||
|
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;
|
||||||
|
|
||||||
|
const
|
||||||
|
crEditArrow = 20;
|
||||||
|
crEditMove = 21;
|
||||||
|
crEditRotate = 22;
|
||||||
|
crEditScale = 23;
|
||||||
|
|
||||||
|
const
|
||||||
|
SingleBuffer : boolean =
|
||||||
|
{$ifdef Apo7X64}
|
||||||
|
false
|
||||||
|
{$else}
|
||||||
|
true
|
||||||
|
{$endif};
|
||||||
|
|
||||||
|
var
|
||||||
|
MainSeed: integer;
|
||||||
|
MainTriangles: TTriangles;
|
||||||
|
Transforms: integer; // Count of Tranforms
|
||||||
|
EnableFinalXform: boolean;
|
||||||
|
AppPath: string; // Path of applicatio file
|
||||||
|
OpenFile: string; // Name of currently open file
|
||||||
|
CanDrawOnResize: boolean;
|
||||||
|
PreserveWeights: boolean;
|
||||||
|
AlwaysCreateBlankFlame : boolean;
|
||||||
|
StartupCheckForUpdates : boolean;
|
||||||
|
TBWidth1 : integer;
|
||||||
|
TBWidth2 : integer;
|
||||||
|
TBWidth3 : integer;
|
||||||
|
TBWidth4 : integer;
|
||||||
|
TBWidth5 : integer;
|
||||||
|
ThumbnailPlaceholder : TBitmap;
|
||||||
|
WarnOnMissingPlugin : boolean;
|
||||||
|
EmbedThumbnails : boolean;
|
||||||
|
LanguageFile : string;
|
||||||
|
AvailableLanguages : TStringList;
|
||||||
|
PluginPath : string;
|
||||||
|
|
||||||
|
{ 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
|
||||||
|
cmap_index: integer; // Index to current gradient
|
||||||
|
Variation: TVariation; // Current variation
|
||||||
|
NumTries, TryLength: integer; // Settings for smooth palette
|
||||||
|
SmoothPaletteFile: string;
|
||||||
|
|
||||||
|
{ Editor }
|
||||||
|
|
||||||
|
UseFlameBackground, UseTransformColors: boolean;
|
||||||
|
HelpersEnabled: boolean;
|
||||||
|
EditorBkgColor, ReferenceTriangleColor: integer;
|
||||||
|
GridColor1, GridColor2, HelpersColor: integer;
|
||||||
|
ExtEditEnabled, TransformAxisLock, RebuildXaosLinks: boolean;
|
||||||
|
ShowAllXforms: boolean;
|
||||||
|
EditorPreviewTransparency: integer;
|
||||||
|
EnableEditorPreview: boolean;
|
||||||
|
|
||||||
|
{ Display }
|
||||||
|
|
||||||
|
defSampleDensity, defPreviewDensity: Double;
|
||||||
|
defGamma, defBrightness, defVibrancy,
|
||||||
|
defFilterRadius, defGammaThreshold: Double;
|
||||||
|
defOversample: integer;
|
||||||
|
|
||||||
|
{ Render }
|
||||||
|
|
||||||
|
renderDensity, renderFilterRadius: double;
|
||||||
|
renderOversample, renderWidth, renderHeight: integer;
|
||||||
|
renderBitsPerSample: integer;
|
||||||
|
renderPath: string;
|
||||||
|
JPEGQuality: integer;
|
||||||
|
renderFileFormat: integer;
|
||||||
|
InternalBitsPerSample: integer;
|
||||||
|
|
||||||
|
NrTreads: Integer;
|
||||||
|
UseNrThreads: integer;
|
||||||
|
|
||||||
|
PNGTransparency: integer;
|
||||||
|
ShowTransparency: boolean;
|
||||||
|
|
||||||
|
MainPreviewScale: double;
|
||||||
|
ExtendMainPreview: boolean;
|
||||||
|
|
||||||
|
StoreEXIF : boolean;
|
||||||
|
StoreParamsEXIF : boolean;
|
||||||
|
ExifAuthor : string;
|
||||||
|
|
||||||
|
{ Defaults }
|
||||||
|
|
||||||
|
LastOpenFile: string;
|
||||||
|
LastOpenFileEntry: integer;
|
||||||
|
RememberLastOpenFile: boolean;
|
||||||
|
UseSmallThumbnails: boolean;
|
||||||
|
ClassicListMode: boolean;
|
||||||
|
ConfirmDelete: boolean; // Flag confirmation of entry deletion
|
||||||
|
OldPaletteFormat: boolean;
|
||||||
|
ConfirmExit: boolean;
|
||||||
|
ConfirmStopRender: boolean;
|
||||||
|
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;
|
||||||
|
randGradientFile: string;
|
||||||
|
defFlameFile: string;
|
||||||
|
|
||||||
|
PlaySoundOnRenderComplete: boolean;
|
||||||
|
RenderCompleteSoundFile: string;
|
||||||
|
|
||||||
|
SaveIncompleteRenders: boolean;
|
||||||
|
ShowRenderStats: boolean;
|
||||||
|
LowerRenderPriority: boolean;
|
||||||
|
|
||||||
|
SymmetryType: integer;
|
||||||
|
SymmetryOrder: integer;
|
||||||
|
SymmetryNVars: integer;
|
||||||
|
Variations: array of boolean;
|
||||||
|
//VariationOptions: int64;
|
||||||
|
|
||||||
|
MainForm_RotationMode: integer;
|
||||||
|
PreserveQuality: boolean;
|
||||||
|
|
||||||
|
{ For random gradients }
|
||||||
|
|
||||||
|
MinNodes, MaxNodes, MinHue, MaxHue, MinSat, MaxSat, MinLum, MaxLum: integer;
|
||||||
|
//ReferenceMode: integer;
|
||||||
|
BatchSize: Integer;
|
||||||
|
Compatibility: integer; //0 = original, 1 = Drave's
|
||||||
|
Favorites: TStringList;
|
||||||
|
Script: string;
|
||||||
|
ScriptPath: string;
|
||||||
|
SheepServer, SheepNick, SheepURL, SheepPW, flam3Path, helpPath: string;
|
||||||
|
ExportBatches, ExportOversample, ExportWidth, ExportHeight, ExportFileFormat: Integer;
|
||||||
|
ExportFilter, ExportDensity: Double;
|
||||||
|
ExportEstimator, ExportEstimatorMin, ExportEstimatorCurve: double;
|
||||||
|
ExportJitters: integer;
|
||||||
|
ExportGammaTreshold: double;
|
||||||
|
OpenFileType: TFileType;
|
||||||
|
// ResizeOnLoad: Boolean;
|
||||||
|
ShowProgress: Boolean;
|
||||||
|
defLibrary: string;
|
||||||
|
LimitVibrancy: Boolean;
|
||||||
|
DefaultPalette: TColorMap;
|
||||||
|
|
||||||
|
AutoOpenLog: Boolean;
|
||||||
|
AutoSaveEnabled: Boolean;
|
||||||
|
AutoSaveFreq: integer;
|
||||||
|
AutoSavePath: string;
|
||||||
|
|
||||||
|
LineCenterColor : integer;
|
||||||
|
LineThirdsColor : integer;
|
||||||
|
LineGRColor : integer;
|
||||||
|
EnableGuides : boolean;
|
||||||
|
|
||||||
|
function Round6(x: double): double;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
function GetEnvVarValue(const VarName: string): string;
|
||||||
|
var
|
||||||
|
BufSize: Integer; // buffer size required for value
|
||||||
|
begin
|
||||||
|
// Get required buffer size (inc. terminal #0)
|
||||||
|
BufSize := GetEnvironmentVariable(
|
||||||
|
PChar(VarName), nil, 0);
|
||||||
|
if BufSize > 0 then
|
||||||
|
begin
|
||||||
|
// Read env var value into result string
|
||||||
|
SetLength(Result, BufSize - 1);
|
||||||
|
GetEnvironmentVariable(PChar(VarName),
|
||||||
|
PChar(Result), BufSize);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
// No such environment variable
|
||||||
|
Result := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure LoadThumbnailPlaceholder(ThumbnailSize : integer);
|
||||||
|
var
|
||||||
|
placeholder: TBitmap;
|
||||||
|
placeholderIcon: TBitmap;
|
||||||
|
const
|
||||||
|
pi_width = 48;
|
||||||
|
pi_height = 48;
|
||||||
|
begin
|
||||||
|
placeholder := TBitmap.Create;
|
||||||
|
placeholderIcon := TBitmap.Create;
|
||||||
|
|
||||||
|
placeholderIcon.Handle := LoadBitmap(hInstance, 'THUMB_PLACEHOLDER');
|
||||||
|
placeholder.PixelFormat := pf32bit;
|
||||||
|
placeholder.HandleType := bmDIB;
|
||||||
|
placeholder.Width := ThumbnailSize;
|
||||||
|
placeholder.Height := ThumbnailSize;
|
||||||
|
|
||||||
|
with placeholder.Canvas do begin
|
||||||
|
Brush.Color := $000000;
|
||||||
|
FillRect(Rect(0, 0, placeholder.Width, placeholder.Height));
|
||||||
|
Draw(round(ThumbnailSize / 2 - pi_width / 2), round(ThumbnailSize / 2 - pi_height / 2), placeholderIcon);
|
||||||
|
end;
|
||||||
|
|
||||||
|
placeholderIcon.Free;
|
||||||
|
ThumbnailPlaceholder := placeholder;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ IFS }
|
||||||
|
|
||||||
|
function det(a, b, c, d: double): double;
|
||||||
|
begin
|
||||||
|
Result := (a * d - b * c);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function Round6(x: double): double;
|
||||||
|
// Really ugly, but it works
|
||||||
|
begin
|
||||||
|
// --Z-- this is ridiculous:
|
||||||
|
// Result := StrToFloat(Format('%.6f', [x]));
|
||||||
|
// and yes, this is REALLY ugly :-\
|
||||||
|
Result := RoundTo(x, -6);
|
||||||
|
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);
|
||||||
|
*)
|
||||||
|
|
||||||
|
// --Z-- This is just amazing... :-\
|
||||||
|
// Someone needed an 'FDesign source' - to compute distance between two points??!?
|
||||||
|
|
||||||
|
Result := Hypot(x2-x1, y2-y1);
|
||||||
|
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;
|
||||||
|
|
||||||
|
{ 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;
|
||||||
|
*)
|
||||||
|
|
||||||
|
function ReplaceStr(Str, SearchStr, ReplaceStr: string): string;
|
||||||
|
begin
|
||||||
|
while Pos(SearchStr, Str) <> 0 do
|
||||||
|
begin
|
||||||
|
Insert(ReplaceStr, Str, Pos(SearchStr, Str));
|
||||||
|
system.Delete(Str, Pos(SearchStr, Str), Length(SearchStr));
|
||||||
|
end;
|
||||||
|
Result := Str;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function SplitFilter(const fText: String; const fSep: Char; fTrim: Boolean=false; fQuotes: Boolean=false):TStringList;
|
||||||
|
var vI: Integer;
|
||||||
|
vBuffer: String;
|
||||||
|
vOn: Boolean;
|
||||||
|
begin
|
||||||
|
Result:=TStringList.Create;
|
||||||
|
vBuffer:='';
|
||||||
|
vOn:=true;
|
||||||
|
for vI:=1 to Length(fText) do
|
||||||
|
begin
|
||||||
|
if (fQuotes and(fText[vI]=fSep)and vOn)or(Not(fQuotes) and (fText[vI]=fSep)) then
|
||||||
|
begin
|
||||||
|
if fTrim then vBuffer:=Trim(vBuffer);
|
||||||
|
if vBuffer='' then vBuffer:=fSep; // !!! e.g. split(',**',',')...
|
||||||
|
if vBuffer[1]=fSep then
|
||||||
|
vBuffer:=Copy(vBuffer,2,Length(vBuffer));
|
||||||
|
Result.Add(vBuffer);
|
||||||
|
vBuffer:='';
|
||||||
|
end;
|
||||||
|
if fQuotes then
|
||||||
|
begin
|
||||||
|
if fText[vI]='"' then
|
||||||
|
begin
|
||||||
|
vOn:=Not(vOn);
|
||||||
|
Continue;
|
||||||
|
end;
|
||||||
|
if (fText[vI]<>fSep)or((fText[vI]=fSep)and(vOn=false)) then
|
||||||
|
vBuffer:=vBuffer+fText[vI];
|
||||||
|
end else
|
||||||
|
if fText[vI]<>fSep then
|
||||||
|
vBuffer:=vBuffer+fText[vI];
|
||||||
|
end;
|
||||||
|
if vBuffer<>'' then
|
||||||
|
begin
|
||||||
|
if fTrim then vBuffer:=Trim(vBuffer);
|
||||||
|
Result.Add(vBuffer);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function OpenSaveFileDialog(Parent: TWinControl;
|
||||||
|
const DefExt,
|
||||||
|
Filter,
|
||||||
|
InitialDir,
|
||||||
|
Title: string;
|
||||||
|
var FileName: string;
|
||||||
|
MustExist,
|
||||||
|
OverwritePrompt,
|
||||||
|
NoChangeDir,
|
||||||
|
DoOpen: Boolean): Boolean;
|
||||||
|
// uses commdlg
|
||||||
|
var
|
||||||
|
ofn: TOpenFileName;
|
||||||
|
szFile: array[0..260] of Char;
|
||||||
|
fa, fa2: TStringList;
|
||||||
|
h,i,j,k,c : integer;
|
||||||
|
cs, s : string;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
FillChar(ofn, SizeOf(TOpenFileName), 0);
|
||||||
|
with ofn do
|
||||||
|
begin
|
||||||
|
lStructSize := SizeOf(TOpenFileName);
|
||||||
|
hwndOwner := Parent.Handle;
|
||||||
|
lpstrFile := szFile;
|
||||||
|
nMaxFile := SizeOf(szFile);
|
||||||
|
if (Title <> '') then
|
||||||
|
lpstrTitle := PChar(Title);
|
||||||
|
if (InitialDir <> '') then
|
||||||
|
lpstrInitialDir := PChar(InitialDir);
|
||||||
|
StrPCopy(lpstrFile, FileName);
|
||||||
|
lpstrFilter := PChar(ReplaceStr(Filter, '|', #0)+#0#0);
|
||||||
|
fa := splitFilter(Filter, '|');
|
||||||
|
|
||||||
|
k := 0;
|
||||||
|
c := (fa.Count div 2);
|
||||||
|
for i := 0 to c - 1 do begin
|
||||||
|
j := 2 * i + 1;
|
||||||
|
cs := LowerCase(fa.Strings[j]);
|
||||||
|
fa2 := splitFilter(cs, ';');
|
||||||
|
for h := 0 to fa2.Count - 1 do begin
|
||||||
|
cs := fa2.Strings[h];
|
||||||
|
s := '*.' + LowerCase(DefExt);
|
||||||
|
if (cs = s) then k := i;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
nFilterIndex := k + 1;
|
||||||
|
if DefExt <> '' then
|
||||||
|
lpstrDefExt := PChar(DefExt);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if MustExist then ofn.Flags := ofn.Flags or OFN_FILEMUSTEXIST;
|
||||||
|
if OverwritePrompt then ofn.Flags := ofn.Flags or OFN_OVERWRITEPROMPT;
|
||||||
|
if NoChangeDir then ofn.Flags := ofn.Flags or OFN_NOCHANGEDIR;
|
||||||
|
|
||||||
|
if DoOpen then
|
||||||
|
begin
|
||||||
|
if GetOpenFileName(ofn) then
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
FileName := StrPas(szFile);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if GetSaveFileName(ofn) then
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
FileName := StrPas(szFile);
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
end; // function OpenSaveFileDialog
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
754
Core/Translation.pas
Normal file
754
Core/Translation.pas
Normal file
@ -0,0 +1,754 @@
|
|||||||
|
unit Translation;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses Global, Classes, Forms, LibXmlParser, LibXmlComps, SysUtils, RegexHelper;
|
||||||
|
|
||||||
|
procedure ListLanguages;
|
||||||
|
procedure LanguageInfo(path: string; var name, localName: string);
|
||||||
|
function LanguageAuthor(path: string): string;
|
||||||
|
procedure Add(key, value: string);
|
||||||
|
procedure LoadLanguage(path:string);
|
||||||
|
procedure LoadEnglish();
|
||||||
|
function TextByKey(key:string):string;
|
||||||
|
|
||||||
|
type
|
||||||
|
TParser = class
|
||||||
|
public
|
||||||
|
constructor Create;
|
||||||
|
|
||||||
|
procedure ListXmlScannerStartTag(Sender: TObject; TagName: string; Attributes: TAttrList);
|
||||||
|
procedure ListXmlScannerEndTag(Sender: TObject; TagName: string);
|
||||||
|
procedure ListXmlScannerEmptyTag(Sender: TObject; TagName: string; Attributes: TAttrList);
|
||||||
|
procedure ListXmlScannerContent(Sender: TObject; Content: string);
|
||||||
|
private
|
||||||
|
currentTagname: string;
|
||||||
|
parentTagnames: TStringList;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TKeyValuePair = class
|
||||||
|
public
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TDictionary = array of TKeyValuePair;
|
||||||
|
var
|
||||||
|
language: TDictionary;
|
||||||
|
defaultlanguage: TDictionary;
|
||||||
|
tokenCount: integer;
|
||||||
|
ListXmlScanner: TEasyXmlScanner;
|
||||||
|
parser: TParser;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure ListLanguages;
|
||||||
|
var
|
||||||
|
searchResult: TSearchRec;
|
||||||
|
begin
|
||||||
|
if FindFirst(ExtractFilePath(Application.ExeName) + 'Languages\*.xml', faAnyFile, searchResult) = 0 then
|
||||||
|
begin
|
||||||
|
repeat
|
||||||
|
AvailableLanguages.Add(ExtractFilePath(Application.ExeName) + 'Languages\' + searchResult.Name);
|
||||||
|
until (FindNext(searchResult) <> 0);
|
||||||
|
SysUtils.FindClose(searchResult);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure LanguageInfo(path: string; var name, localName: string);
|
||||||
|
const
|
||||||
|
exp1 = '\stitle="([^"]*)"';
|
||||||
|
exp2 = '\slocalized-title="([^"]*)"';
|
||||||
|
var
|
||||||
|
langxml : string;
|
||||||
|
sl: TStringList;
|
||||||
|
begin
|
||||||
|
sl := TStringList.Create;
|
||||||
|
sl.LoadFromFile(path);
|
||||||
|
langxml := sl.Text;
|
||||||
|
sl.Destroy;
|
||||||
|
|
||||||
|
name := GetStringPart(langxml, exp1, 1, '');
|
||||||
|
localname := GetStringPart(langxml, exp2, 1, '');
|
||||||
|
end;
|
||||||
|
function LanguageAuthor(path: string): string;
|
||||||
|
const
|
||||||
|
exp = '\sauthor="([^"]*)"';
|
||||||
|
var
|
||||||
|
langxml : string;
|
||||||
|
sl: TStringList;
|
||||||
|
begin
|
||||||
|
sl := TStringList.Create;
|
||||||
|
sl.LoadFromFile(path);
|
||||||
|
langxml := sl.Text;
|
||||||
|
sl.Destroy;
|
||||||
|
|
||||||
|
Result := GetStringPart(langxml, exp, 1, '');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure LoadEnglish();
|
||||||
|
begin
|
||||||
|
//TODO:
|
||||||
|
//render-status-renderhibernated
|
||||||
|
|
||||||
|
Add('common-ok', 'OK');
|
||||||
|
Add('common-cancel', 'Cancel');
|
||||||
|
Add('common-apply', 'Apply');
|
||||||
|
Add('common-yes', 'Yes');
|
||||||
|
Add('common-no', 'No');
|
||||||
|
Add('common-lowquality', 'Low Quality');
|
||||||
|
Add('common-mediumquality', 'Medium Quality');
|
||||||
|
Add('common-highquality', 'High Quality');
|
||||||
|
Add('common-copy', 'Copy');
|
||||||
|
Add('common-paste', 'Paste');
|
||||||
|
Add('common-delete', 'Delete');
|
||||||
|
Add('common-rename', 'Rename');
|
||||||
|
Add('common-undo', 'Undo');
|
||||||
|
Add('common-redo', 'Redo');
|
||||||
|
Add('common-width', 'Width');
|
||||||
|
Add('common-height', 'Height');
|
||||||
|
Add('common-size', 'Size');
|
||||||
|
Add('common-pixels', 'Pixels');
|
||||||
|
Add('common-keepaspect', 'Maintain aspect ratio');
|
||||||
|
Add('common-destination', 'Destination');
|
||||||
|
Add('common-filename', 'File name');
|
||||||
|
Add('common-browse', 'Browse...');
|
||||||
|
Add('common-quality', 'Quality');
|
||||||
|
Add('common-filterradius', 'Filter Radius');
|
||||||
|
Add('common-density', 'Density');
|
||||||
|
Add('common-oversample', 'Oversample');
|
||||||
|
Add('common-gamma', 'Gamma');
|
||||||
|
Add('common-brightness', 'Brightness');
|
||||||
|
Add('common-contrast', 'Contrast');
|
||||||
|
Add('common-vibrancy', 'Vibrancy');
|
||||||
|
Add('common-background', 'Background');
|
||||||
|
Add('common-gammathreshold', 'Gamma Threshold');
|
||||||
|
Add('common-start', 'Start');
|
||||||
|
Add('common-pause', 'Pause');
|
||||||
|
Add('common-resume', 'Resume');
|
||||||
|
Add('common-close', 'Close');
|
||||||
|
Add('common-clear', 'Clear');
|
||||||
|
Add('common-enabled', 'Enabled');
|
||||||
|
Add('common-disabled', 'Disabled');
|
||||||
|
Add('common-minimum', 'Minimum');
|
||||||
|
Add('common-maximum', 'Maximum');
|
||||||
|
Add('common-resetlocation', 'Reset location');
|
||||||
|
Add('common-genericopenfailure', 'Unable to open "%s".');
|
||||||
|
Add('common-genericsavefailure', 'Unable to save "%s".');
|
||||||
|
Add('common-invalidformat', 'Invalid format.');
|
||||||
|
Add('common-confirmexit', 'Do you really want to exit? All unsaved data will be lost!');
|
||||||
|
Add('common-confirmdelete', 'Are you sure you want to permanently delete "%s"?');
|
||||||
|
Add('common-dragpanelhint', 'Click and drag to change value');
|
||||||
|
Add('common-trace-pausing', 'Pausing render');
|
||||||
|
Add('common-trace-resuming', 'Resuming render');
|
||||||
|
Add('common-trace-terminating', 'Terminating render');
|
||||||
|
Add('common-trace-stopping', 'Stopping render');
|
||||||
|
Add('common-trace-saving', 'Saving image...');
|
||||||
|
Add('common-trace-creating-simple', 'Creating image...');
|
||||||
|
Add('common-trace-creating-detailed', 'Creating image with quality: %f...');
|
||||||
|
Add('common-trace-rendering-oneslice', 'Rendering...');
|
||||||
|
Add('common-trace-rendering-multipleslices', 'Rendering slice %d of %d...');
|
||||||
|
Add('common-trace-allocating', 'Allocating %n Mb of memory...');
|
||||||
|
Add('common-trace-notenoughmemory', 'ERROR: Not enough memory for this render!');
|
||||||
|
Add('common-statistics-title-oneslice', 'Render Statistics:');
|
||||||
|
Add('common-statistics-title-multipleslices', 'Render Statistics for the last slice:');
|
||||||
|
Add('common-statistics-maxpossiblebits', 'Max possible bits: %2.3f');
|
||||||
|
Add('common-statistics-maxred', 'Max Red: %2.3f bits');
|
||||||
|
Add('common-statistics-maxgreen', 'Max Green: %2.3f bits');
|
||||||
|
Add('common-statistics-maxblue', 'Max Blue: %2.3f bits');
|
||||||
|
Add('common-statistics-maxcounter', 'Max Count: %2.3f bits');
|
||||||
|
Add('common-statistics-pointhitratio', 'Point hit ratio: %2.2f%%');
|
||||||
|
Add('common-statistics-averagespeed', 'Average speed: %n iterations per second');
|
||||||
|
Add('common-statistics-purerenderingtime', 'Pure rendering time:');
|
||||||
|
Add('common-seconds', 'second(s)');
|
||||||
|
Add('common-minutes', 'minute(s)');
|
||||||
|
Add('common-hours', 'hour(s)');
|
||||||
|
Add('common-days', 'day(s)');
|
||||||
|
Add('common-suspendtodisk', 'Suspend to disk');
|
||||||
|
Add('common-resumefromdisk', 'Resume from disk');
|
||||||
|
Add('common-filter-flamefiles', 'Apophysis Flame Library (*.flame;*.xml)');
|
||||||
|
Add('common-filter-gradientfiles', 'Gradient files (*.gradient;*.ugr)');
|
||||||
|
Add('common-filter-fractintfiles', 'Fractint maps (*.map)');
|
||||||
|
Add('common-filter-uprfiles', 'UltraFractal parameters (*.upr)');
|
||||||
|
Add('common-filter-script', 'Apophysis Script (*.aposcript;*.asc)');
|
||||||
|
Add('common-filter-allimages', 'All images (*.bmp;*.dib;*.jpg;*.jpeg)');
|
||||||
|
Add('common-filter-bitmap', 'Windows Bitmap (*.bmp;*.dib)');
|
||||||
|
Add('common-filter-jpeg', 'JPEG (*.jpg;*.jpeg)');
|
||||||
|
Add('common-filter-png', 'Portable Network Graphics (*.png)');
|
||||||
|
Add('common-filter-allfiles', 'All files (*.*)');
|
||||||
|
Add('splash-loadingui', 'Loading user interface...');
|
||||||
|
Add('splash-loadingsettings', 'Loading settings...');
|
||||||
|
Add('splash-loadingplugins', 'Loading plugins...');
|
||||||
|
Add('splash-initrenderer', 'Initializing renderer...');
|
||||||
|
Add('splash-initcolormap', 'Initializing gradients...');
|
||||||
|
Add('splash-initbatch', 'Creating random batch...');
|
||||||
|
Add('splash-execstartupscript', 'Executing "autoexec.asc"...');
|
||||||
|
Add('adjustment-title', 'Adjustment');
|
||||||
|
Add('adjustment-common-depthblur', 'Depth Blur');
|
||||||
|
Add('adjustment-common-pitch', 'Pitch');
|
||||||
|
Add('adjustment-common-yaw', 'Yaw');
|
||||||
|
Add('adjustment-common-height', 'Height');
|
||||||
|
Add('adjustment-common-perspective', 'Perspective');
|
||||||
|
Add('adjustment-common-scale', 'Scale');
|
||||||
|
Add('adjustment-tab-camera-title', 'Camera');
|
||||||
|
Add('adjustment-tab-camera-zoom', 'Zoom');
|
||||||
|
Add('adjustment-tab-camera-xpos', 'X-Position');
|
||||||
|
Add('adjustment-tab-camera-ypos', 'Y-Position');
|
||||||
|
Add('adjustment-tab-camera-rotation', 'Rotation');
|
||||||
|
Add('adjustment-tab-rendering-title', 'Rendering');
|
||||||
|
Add('adjustment-tab-rendering-istransparent', 'Transparent');
|
||||||
|
Add('adjustment-tab-gradient-title', 'Gradient');
|
||||||
|
Add('adjustment-tab-gradient-moderotate', 'Rotate');
|
||||||
|
Add('adjustment-tab-gradient-modehue', 'Hue');
|
||||||
|
Add('adjustment-tab-gradient-modesaturation', 'Saturation');
|
||||||
|
Add('adjustment-tab-gradient-modebrightness', 'Brightness');
|
||||||
|
Add('adjustment-tab-gradient-modecontrast', 'Contrast');
|
||||||
|
Add('adjustment-tab-gradient-modeblur', 'Blur');
|
||||||
|
Add('adjustment-tab-gradient-modefrequency', 'Frequency');
|
||||||
|
Add('adjustment-tab-gradient-preset', 'Preset');
|
||||||
|
Add('adjustment-tab-gradient-reset', 'Reset');
|
||||||
|
Add('adjustment-tab-gradient-modehint', 'Click for menu');
|
||||||
|
Add('adjustment-tab-gradient-presethint', 'Click to choose random preset');
|
||||||
|
Add('adjustment-tab-size-title', 'Image size');
|
||||||
|
Add('adjustment-tab-size-preset', 'Empty preset');
|
||||||
|
Add('adjustment-tab-size-resizemain', 'Resize main window');
|
||||||
|
Add('adjustment-tab-curves-title', 'Curves');
|
||||||
|
Add('adjustment-tab-curves-reset', 'Reset');
|
||||||
|
Add('adjustment-tab-curves-selected', 'Selected curve:');
|
||||||
|
Add('adjustment-tab-curves-overall', 'Overall');
|
||||||
|
Add('adjustment-tab-curves-red', 'Red');
|
||||||
|
Add('adjustment-tab-curves-green', 'Green');
|
||||||
|
Add('adjustment-tab-curves-blue', 'Blue');
|
||||||
|
Add('adjustment-popup-quality-instantpreview', 'Instant preview');
|
||||||
|
Add('adjustment-popup-gradient-randomize', 'Randomize');
|
||||||
|
Add('adjustment-popup-gradient-invert', 'Invert');
|
||||||
|
Add('adjustment-popup-gradient-reverse', 'Reverse');
|
||||||
|
Add('adjustment-popup-gradient-smooth', 'Smooth Palette...');
|
||||||
|
Add('adjustment-popup-gradient-browser', 'Gradient Browser...');
|
||||||
|
Add('adjustment-popup-gradient-saveasugr', 'Save Gradient...');
|
||||||
|
Add('adjustment-popup-gradient-saveasmap', 'Save as Map File...');
|
||||||
|
Add('adjustment-popup-gradient-saveasdefault', 'Save as default');
|
||||||
|
Add('editor-title', 'Editor');
|
||||||
|
Add('editor-common-transform', 'Transform:');
|
||||||
|
Add('editor-common-name', 'Name:');
|
||||||
|
Add('editor-common-weight', 'Weight:');
|
||||||
|
Add('editor-common-finalxformlistitem', 'Final');
|
||||||
|
Add('editor-common-fromprefix', 'from %d');
|
||||||
|
Add('editor-common-toprefix', 'to %d');
|
||||||
|
Add('editor-tab-variations-title', 'Variations');
|
||||||
|
Add('editor-tab-variations-name', 'Name');
|
||||||
|
Add('editor-tab-variations-value', 'Value');
|
||||||
|
Add('editor-tab-variations-togglehideunused', 'Hide unused variations');
|
||||||
|
Add('editor-tab-variables-title', 'Variables');
|
||||||
|
Add('editor-tab-variables-name', 'Name');
|
||||||
|
Add('editor-tab-variables-value', 'Value');
|
||||||
|
Add('editor-tab-variables-toggleshowall', 'Show all variables');
|
||||||
|
Add('editor-tab-chaos-title', 'Xaos');
|
||||||
|
Add('editor-tab-chaos-path', 'Path');
|
||||||
|
Add('editor-tab-chaos-modifier', 'Weight modifier');
|
||||||
|
Add('editor-tab-chaos-viewasto', 'View as "to"');
|
||||||
|
Add('editor-tab-chaos-viewasfrom', 'View as "from"');
|
||||||
|
Add('editor-tab-triangle-title', 'Triangle');
|
||||||
|
Add('editor-tab-triangle-pivot', 'Pivot');
|
||||||
|
Add('editor-tab-triangle-modelocal', 'Local');
|
||||||
|
Add('editor-tab-triangle-modeworld', 'World');
|
||||||
|
Add('editor-tab-triangle-resetpivot', 'Reset pivot point');
|
||||||
|
Add('editor-tab-triangle-pickpivot', 'Pick pivot point');
|
||||||
|
Add('editor-tab-triangle-rotateleft', 'Rotate triangle counter-clockwise');
|
||||||
|
Add('editor-tab-triangle-rotateright', 'Rotate triangle clockwise');
|
||||||
|
Add('editor-tab-triangle-moveup', 'Move triangle up');
|
||||||
|
Add('editor-tab-triangle-movedown', 'Move triangle down');
|
||||||
|
Add('editor-tab-triangle-moveleft', 'Move triangle left');
|
||||||
|
Add('editor-tab-triangle-moveright', 'Move triangle right');
|
||||||
|
Add('editor-tab-triangle-scaledown', 'Scale triangle down');
|
||||||
|
Add('editor-tab-triangle-scaleup', 'Scale triangle up');
|
||||||
|
Add('editor-tab-triangle-autoweight', 'Auto-balance weights');
|
||||||
|
Add('editor-tab-transform-title', 'Transform');
|
||||||
|
Add('editor-tab-transform-reset', 'Reset transform');
|
||||||
|
Add('editor-tab-transform-resethint', 'Reset all vectors to default position');
|
||||||
|
Add('editor-tab-transform-rectangular', 'Rectangular');
|
||||||
|
Add('editor-tab-transform-rectangularhint', 'Show vectors in rectangular (cartesian) corrdinates');
|
||||||
|
Add('editor-tab-transform-polar', 'Polar (deg)');
|
||||||
|
Add('editor-tab-transform-polarhint', 'Show vector in polar coordinates');
|
||||||
|
Add('editor-tab-transform-resetpost', 'Reset post transform');
|
||||||
|
Add('editor-tab-transform-resetposthint', 'Reset all post-transform vectors to default position');
|
||||||
|
Add('editor-tab-transform-autozscale', 'Auto-calculate pre_zscale');
|
||||||
|
Add('editor-tab-transform-resetxhint', 'Reset vector X');
|
||||||
|
Add('editor-tab-transform-resetyhint', 'Reset vector Y');
|
||||||
|
Add('editor-tab-transform-resetohint', 'Reset vector O');
|
||||||
|
Add('editor-tab-color-title', 'Colors');
|
||||||
|
Add('editor-tab-color-transformcolor', 'Transform color');
|
||||||
|
Add('editor-tab-color-colorspeed', 'Color speed');
|
||||||
|
Add('editor-tab-color-opacity', 'Opacity');
|
||||||
|
Add('editor-tab-color-directcolor', 'Direct color');
|
||||||
|
Add('editor-tab-color-togglesolo', 'Solo');
|
||||||
|
Add('editor-tab-color-togglesoloformat', 'Solo transform #%d');
|
||||||
|
Add('editor-tab-color-varpreview', 'Variation preview');
|
||||||
|
Add('editor-tab-color-previewrange', 'Range');
|
||||||
|
Add('editor-tab-color-previewdepth', 'Depth');
|
||||||
|
Add('editor-tab-color-previewdensity', 'Density');
|
||||||
|
Add('editor-tab-color-preview', 'Preview');
|
||||||
|
Add('editor-toolbar-newflame', 'New flame');
|
||||||
|
Add('editor-toolbar-newtransform', 'New transform');
|
||||||
|
Add('editor-toolbar-addlinkedtransform', 'Add linked transform');
|
||||||
|
Add('editor-toolbar-duplicatetransform', 'Duplicate transform');
|
||||||
|
Add('editor-toolbar-removetransform', 'Remove transform');
|
||||||
|
Add('editor-toolbar-modeselect', 'Selection mode');
|
||||||
|
Add('editor-toolbar-modemove', 'Movement mode');
|
||||||
|
Add('editor-toolbar-moderotate', 'Rotation mode');
|
||||||
|
Add('editor-toolbar-modescale', 'Scale mode');
|
||||||
|
Add('editor-toolbar-toggleworldpivot', 'Toggle world pivot');
|
||||||
|
Add('editor-toolbar-rotate90ccw', 'Rotate 90° counter-clockwise');
|
||||||
|
Add('editor-toolbar-rotate90cw', 'Rotate 90° clockwise');
|
||||||
|
Add('editor-toolbar-fliph', 'Flip horizontal');
|
||||||
|
Add('editor-toolbar-flipv', 'Flip vertical');
|
||||||
|
Add('editor-toolbar-togglevarpreview', 'Show variation preview');
|
||||||
|
Add('editor-toolbar-toggleposttransform', 'Enable/edit post-transform');
|
||||||
|
Add('editor-toolbar-togglefinaltransform', 'Enable final transform');
|
||||||
|
Add('editor-popup-panel-autozoom', 'Zoom automatically');
|
||||||
|
Add('editor-popup-panel-toggleextendededit', 'Toggle extended edit mode');
|
||||||
|
Add('editor-popup-panel-locktransformaxes', 'Lock transform axes');
|
||||||
|
Add('editor-popup-panel-allfliph', 'Flip all horizontally');
|
||||||
|
Add('editor-popup-panel-allflipv', 'Flip all vertically');
|
||||||
|
Add('editor-popup-quality-autoreset', 'Auto-reset location');
|
||||||
|
Add('editor-popup-transform-resetposition', 'Reset position');
|
||||||
|
Add('editor-popup-transform-resetrotation', 'Reset rotation');
|
||||||
|
Add('editor-popup-transform-resetscale', 'Reset scale');
|
||||||
|
Add('editor-popup-transform-copycoords', 'Copy triangle coordinates');
|
||||||
|
Add('editor-popup-transform-pastecoords', 'Paste triangle coordinates');
|
||||||
|
Add('editor-popup-transform-resetentiretriangle', 'Reset triangle');
|
||||||
|
Add('editor-popup-chaos-rebuildlinks', 'Rebuild links');
|
||||||
|
Add('editor-popup-chaos-clearall', 'Clear all');
|
||||||
|
Add('editor-popup-chaos-setall', 'Set all');
|
||||||
|
Add('editor-status-zoomformat', 'Zoom: %f');
|
||||||
|
Add('editor-status-xformat', 'X: %f');
|
||||||
|
Add('editor-status-yformat', 'Y: %f');
|
||||||
|
Add('editor-status-rotateformat', 'Rotate: %3.2f° Inner angle: %3.2f°');
|
||||||
|
Add('editor-status-rotateformat2', 'Rotate: %3.2f° Local axis: %3.2f°');
|
||||||
|
Add('editor-status-rotateformat3', 'Rotate: %3.2f°');
|
||||||
|
Add('editor-status-scaleformat', 'Distance: %3.3f Scale: %3.2f%%');
|
||||||
|
Add('editor-status-scaleformat2', 'Scale: %3.2f%%');
|
||||||
|
Add('editor-status-moveformat', 'Move: %3.3f ; %3.3f');
|
||||||
|
Add('editor-status-moveformat2', 'Move: %3.3f ; %3.3f');
|
||||||
|
Add('editor-status-transformformat', 'Transform #%d');
|
||||||
|
Add('editor-status-zoomformat', 'Zoom: %f');
|
||||||
|
Add('editor-status-selecton', 'Select ON');
|
||||||
|
Add('editor-status-selectoff', 'Select OFF');
|
||||||
|
Add('export-title', 'Export to flam3');
|
||||||
|
Add('export-paramoptions-title', 'Parameter options');
|
||||||
|
Add('export-paramoptions-bufferdepth', 'Buffer depth');
|
||||||
|
Add('export-paramoptions-strips', 'Strips');
|
||||||
|
Add('export-paramoptions-estimatorradius', 'DE radius');
|
||||||
|
Add('export-paramoptions-estimatorcurve', 'DE curve');
|
||||||
|
Add('export-paramoptions-estimatormin', 'DE minimum');
|
||||||
|
Add('export-paramoptions-dorender', 'Render');
|
||||||
|
Add('export-paramoptions-warningtitle', 'WARNING');
|
||||||
|
Add('export-paramoptions-warningtext', 'Fractals created with this version of Apophysis are not supported by flam3! To render 2D-only fractals, download the latest version of flam3 from http://www.flam3.com');
|
||||||
|
Add('favscripts-title', 'Favorite scripts');
|
||||||
|
Add('favscripts-add', 'Add');
|
||||||
|
Add('favscripts-remove', 'Remove');
|
||||||
|
Add('favscripts-moveup', 'Move up');
|
||||||
|
Add('favscripts-movedown', 'Move down');
|
||||||
|
Add('fullscreen-popup-rendermore', 'Render more');
|
||||||
|
Add('fullscreen-popup-stoprender', 'Stop render');
|
||||||
|
Add('gradientbrowser-title', 'Gradient Browser');
|
||||||
|
Add('postprocess-title', 'Post-process render');
|
||||||
|
Add('postprocess-save', 'Save');
|
||||||
|
Add('postprocess-fittowindow', 'Fit to window');
|
||||||
|
Add('render-title', 'Render flame');
|
||||||
|
Add('render-common-gotofolder', 'Open target folder...');
|
||||||
|
Add('render-tab-settings-title', 'Settings');
|
||||||
|
Add('render-tab-output-title', 'Output');
|
||||||
|
Add('render-resourceusage-title', 'Resource usage');
|
||||||
|
Add('render-resourceusage-infotext', 'The render process will use %u MB of %u MB available physical memory');
|
||||||
|
Add('render-resourceusage-infotext2', 'Apophysis will try to use %u processor cores (%u available) - change this in the options');
|
||||||
|
Add('render-resourceusage-limit', 'Memory limit');
|
||||||
|
Add('render-resourceusage-nolimit', 'No limit');
|
||||||
|
Add('render-resourceusage-bufferdepth', 'Buffer depth');
|
||||||
|
Add('render-output-title', 'Output options');
|
||||||
|
Add('render-output-saveparams', 'Save parameters');
|
||||||
|
Add('render-completion-title', 'Completion options');
|
||||||
|
Add('render-completion-postprocess', 'Post-process after rendering');
|
||||||
|
Add('render-completion-shutdown', 'Shut down after rendering');
|
||||||
|
Add('render-completion-saveincomplete', 'Save incomplete renders');
|
||||||
|
Add('render-status-rendererror-log', 'Rendering failed!');
|
||||||
|
Add('render-status-rendererror-message', 'Error while rendering!');
|
||||||
|
Add('render-status-saveerror-log', 'Error saving image!');
|
||||||
|
Add('render-status-saveerror-message1', 'An error occured while saving the image:');
|
||||||
|
Add('render-status-saveerror-message2', 'Check your free disk space and try again.');
|
||||||
|
Add('render-status-totaltime', 'Total time:');
|
||||||
|
Add('render-status-renderterminated', 'Rendering terminated!');
|
||||||
|
Add('render-status-renderhibernated', 'Rendering paused and progress saved!');
|
||||||
|
Add('render-status-elapsed', 'Elapsed');
|
||||||
|
Add('render-status-remaining', 'Remaining');
|
||||||
|
Add('render-status-slicestatus', 'Slice %d of %d');
|
||||||
|
Add('render-status-notenoughmemory1', 'You do not have enough memory for this render. Do you want to continue anyway?');
|
||||||
|
Add('render-status-notenoughmemory2', 'You do not have enough memory for this render. Please use a lower Maximum memory setting. Do you want to ignore this problem and continue?');
|
||||||
|
Add('render-status-nofilename', 'Please enter a file name.');
|
||||||
|
Add('render-status-fileexists-message1', '"%s" already exists');
|
||||||
|
Add('render-status-fileexists-message2', 'Do you want to replace it?');
|
||||||
|
Add('render-status-pathdoesnotexist', 'The directory does not exist.');
|
||||||
|
Add('render-status-invaliddensity', 'Invalid Sample Density value');
|
||||||
|
Add('render-status-invalidfilterradius', 'Invalid Filter Radius value');
|
||||||
|
Add('render-status-invalidoversample', 'Invalid Oversample value');
|
||||||
|
Add('render-status-invalidwidth', 'Invalid image width');
|
||||||
|
Add('render-status-invalidheight', 'Invalid image height');
|
||||||
|
Add('render-status-maxmemorytoosmall', 'Maximum memory value is too small. Do you want to continue anyway?');
|
||||||
|
Add('render-status-shuttingdownrender', 'Shutting down previous render...');
|
||||||
|
Add('render-status-log-title', 'Rendering "%s"');
|
||||||
|
Add('render-status-log-size', 'Size: %dx%d');
|
||||||
|
Add('render-status-log-quality', 'Quality: %g');
|
||||||
|
Add('render-status-log-oversampling', 'Oversample: %d, Filter: %g');
|
||||||
|
Add('render-status-log-bufferdepth', 'Buffer depth: %s');
|
||||||
|
Add('render-status-log-memorylimit', 'Memory limit: %d MB');
|
||||||
|
Add('render-status-log-largepng-message1', '*** WARNING *** You have selected PNG format and an image size which exceeds 20 megapixels');
|
||||||
|
Add('render-status-log-largepng-message2', 'PNG format with extreme high-resolution images is not recommended!');
|
||||||
|
Add('render-status-log-largepng-message3', 'To avoid slowdown (and possible memory problems) use BMP file format instead.');
|
||||||
|
Add('render-status-confirmstop', 'Do you want to stop the current render?');
|
||||||
|
Add('imagecoloring-title', 'Image coloring');
|
||||||
|
Add('imagecoloring-enable', 'Enable');
|
||||||
|
Add('imagecoloring-firstpalette', 'First palette');
|
||||||
|
Add('imagecoloring-secondpalette', 'Second palette');
|
||||||
|
Add('imagecoloring-preset', 'Preset');
|
||||||
|
Add('imagecoloring-image', 'Image');
|
||||||
|
Add('messages-title', 'Messages');
|
||||||
|
Add('messages-openautomatically', 'Automatically open this window');
|
||||||
|
Add('mutation-title', 'Mutation');
|
||||||
|
Add('mutation-directions', 'Directions');
|
||||||
|
Add('mutation-speed', 'Speed');
|
||||||
|
Add('mutation-trend', 'Trend');
|
||||||
|
Add('mutation-keepnumberoftransforms', 'Keep transform count');
|
||||||
|
Add('mutation-randomtrend', 'Random');
|
||||||
|
Add('mutation-maintainsymmetry', 'Maintain symmetry');
|
||||||
|
Add('mutation-previous', 'Previous');
|
||||||
|
Add('options-title', 'Settings ');
|
||||||
|
Add('options-restartnotice', 'You must restart Apophysis 7x to make your changes have effect');
|
||||||
|
Add('options-tab-general-title', 'General ');
|
||||||
|
Add('options-tab-general-language', 'Language file');
|
||||||
|
Add('options-tab-general-multithreading', 'Multithreading ');
|
||||||
|
Add('options-tab-general-multithreading-off', 'Off ');
|
||||||
|
Add('options-tab-general-bufferdepth', 'Buffer depth ');
|
||||||
|
Add('options-tab-general-jpegquality', 'JPEG quality ');
|
||||||
|
Add('options-tab-general-pngtransparency', 'PNG transparency ');
|
||||||
|
Add('options-tab-general-showextendedstatistics', 'Show extended render statistics ');
|
||||||
|
Add('options-tab-general-confirmdelete', 'Confirm delete ');
|
||||||
|
Add('options-tab-general-confirmexit', 'Confirm exit ');
|
||||||
|
Add('options-tab-general-confirmrenderstop', 'Confirm stop rendering ');
|
||||||
|
Add('options-tab-general-oldgradientformat', 'Use old gradient format ');
|
||||||
|
Add('options-tab-general-alwaysblankflame', 'Disable templates ');
|
||||||
|
Add('options-tab-general-enablemissingpluginswarning', 'Warn on missing plugins ');
|
||||||
|
Add('options-tab-general-enablethumbnailembedding', 'Enable thumbnail embedding ');
|
||||||
|
Add('options-tab-general-rotatemode', 'Rotate mode ');
|
||||||
|
Add('options-tab-general-rotateimage', 'Rotate image ');
|
||||||
|
Add('options-tab-general-rotateframe', 'Rotate frame ');
|
||||||
|
Add('options-tab-general-zoommode', 'Zoom mode ');
|
||||||
|
Add('options-tab-general-preservequality', 'Preserve quality ');
|
||||||
|
Add('options-tab-general-preservespeed', 'Preserve speed ');
|
||||||
|
Add('options-tab-general-guides', 'Guidelines ');
|
||||||
|
Add('options-tab-general-enableguides', 'Enable guides ');
|
||||||
|
Add('options-tab-general-guidecentercolor', 'Center ');
|
||||||
|
Add('options-tab-general-guidethirdscolor', 'Thirds ');
|
||||||
|
Add('options-tab-general-guidegoldenratiocolor', 'Golden ratio ');
|
||||||
|
Add('options-tab-general-singleprecision', 'Use single-precision buffers ');
|
||||||
|
Add('options-tab-general-pluginpath', 'Plugin folder ');
|
||||||
|
Add('options-tab-editor-title', 'Editor ');
|
||||||
|
Add('options-tab-editor-editorgraph', 'Graph ');
|
||||||
|
Add('options-tab-editor-editordefaults', 'Defaults ');
|
||||||
|
Add('options-tab-editor-referencetriangle', 'Reference triangle ');
|
||||||
|
Add('options-tab-editor-usetransformcolor', 'Use transform color ');
|
||||||
|
Add('options-tab-editor-helperlines', 'Show helper lines ');
|
||||||
|
Add('options-tab-editor-alwaysshowbothtransformtypes', 'Always show both transform types ');
|
||||||
|
Add('options-tab-editor-backgroundcolor', 'Background ');
|
||||||
|
Add('options-tab-editor-gridcolors', 'Grid ');
|
||||||
|
Add('options-tab-editor-referencecolor', 'Reference ');
|
||||||
|
Add('options-tab-editor-helpercolors', 'Helpers ');
|
||||||
|
Add('options-tab-editor-extendededit', 'Extended edit mode ');
|
||||||
|
Add('options-tab-editor-locktransformaxes', 'Lock transform axes ');
|
||||||
|
Add('options-tab-editor-rebuildxaoslinks', 'Rebuild links ');
|
||||||
|
Add('options-tab-editor-normalreference', 'Normal ');
|
||||||
|
Add('options-tab-editor-proportionalreference', 'Proportional ');
|
||||||
|
Add('options-tab-editor-wanderingreference', 'Wandering (old style) ');
|
||||||
|
Add('options-tab-editor-enablepreview', 'Enable editor preview');
|
||||||
|
Add('options-tab-editor-previewtransparency', 'Transparency');
|
||||||
|
Add('options-tab-display-title', 'Display ');
|
||||||
|
Add('options-tab-display-rendering', 'Rendering ');
|
||||||
|
Add('options-tab-display-previewdensity', 'Preview density ');
|
||||||
|
Add('options-tab-display-mainpreview', 'Main window preview ');
|
||||||
|
Add('options-tab-display-extendpreviewbuffer', 'Extend preview buffer ');
|
||||||
|
Add('options-tab-display-extenspreviewbufferlabel', 'Buffer extension ');
|
||||||
|
Add('options-tab-display-showtransparency', 'Show transparency ');
|
||||||
|
Add('options-tab-display-usesmallthumbs', 'Use small thumbnails (like Apophysis 2.09) ');
|
||||||
|
Add('options-tab-random-title', 'Random ');
|
||||||
|
Add('options-tab-random-numberoftransforms', 'Number of transforms ');
|
||||||
|
Add('options-tab-random-mutationtransforms', 'Mutation transforms ');
|
||||||
|
Add('options-tab-random-randombatch', 'Random batch ');
|
||||||
|
Add('options-tab-random-forcedsymmetry', 'Forced symmetry ');
|
||||||
|
Add('options-tab-random-batchsize', 'Batch size ');
|
||||||
|
Add('options-tab-random-titleprefix', 'Title prefix ');
|
||||||
|
Add('options-tab-random-keepbackground', 'Keep background color ');
|
||||||
|
Add('options-tab-random-symtype', 'Type ');
|
||||||
|
Add('options-tab-random-symorder', 'Order ');
|
||||||
|
Add('options-tab-random-symlimit', 'Limit ');
|
||||||
|
Add('options-tab-random-type-none', 'None ');
|
||||||
|
Add('options-tab-random-type-bilateral', 'Bilateral ');
|
||||||
|
Add('options-tab-random-type-rotational', 'Rotational ');
|
||||||
|
Add('options-tab-random-type-dihedral', 'Dihedral ');
|
||||||
|
Add('options-tab-random-onrandom', 'On random flame use... ');
|
||||||
|
Add('options-tab-random-userandom', 'Random preset ');
|
||||||
|
Add('options-tab-random-usedefault', 'Default gradient ');
|
||||||
|
Add('options-tab-random-usecurrent', 'Current gradient ');
|
||||||
|
Add('options-tab-random-randomcalculated', 'Random gradient ');
|
||||||
|
Add('options-tab-random-randomfromfile', 'Random from file ');
|
||||||
|
Add('options-tab-random-filetouse', 'Random file to use ');
|
||||||
|
Add('options-tab-variations-title', 'Variations ');
|
||||||
|
Add('options-tab-variations-setall', 'Set all ');
|
||||||
|
Add('options-tab-variations-clearall', 'Clear all ');
|
||||||
|
Add('options-tab-gradient-title', 'Gradient ');
|
||||||
|
Add('options-tab-gradient-numberofnodes', 'Number of nodes ');
|
||||||
|
Add('options-tab-gradient-smoothpalette', 'Smooth palette ');
|
||||||
|
Add('options-tab-gradient-huebetween', 'Hue range ');
|
||||||
|
Add('options-tab-gradient-satbetween', 'Saturation range ');
|
||||||
|
Add('options-tab-gradient-lumbetween', 'Luminance range ');
|
||||||
|
Add('options-tab-gradient-numtries', 'Number of tries ');
|
||||||
|
Add('options-tab-gradient-trylength', 'Try length ');
|
||||||
|
Add('options-tab-upr-title', 'UltraFractal ');
|
||||||
|
Add('options-tab-upr-paramdefaults', 'Parameter defaults ');
|
||||||
|
Add('options-tab-upr-coloralgorithm', 'Coloring algorithm ');
|
||||||
|
Add('options-tab-upr-uprsize', 'Image size ');
|
||||||
|
Add('options-tab-upr-formula', 'Formula ');
|
||||||
|
Add('options-tab-upr-identifier', 'Identifier ');
|
||||||
|
Add('options-tab-upr-adjustdensity', 'Adjust sample density ');
|
||||||
|
Add('options-tab-environment-title', 'Environment');
|
||||||
|
Add('options-tab-environment-defaultparams', 'Default parameters ');
|
||||||
|
Add('options-tab-environment-smoothpalette', 'Smooth palette ');
|
||||||
|
Add('options-tab-environment-functionlib', 'Scripting function library ');
|
||||||
|
Add('options-tab-environment-exportrenderer', 'Export renderer ');
|
||||||
|
Add('options-tab-environment-helpfile', 'Help file ');
|
||||||
|
Add('options-tab-environment-rememberlastopen', 'Remember last open parameters ');
|
||||||
|
Add('options-tab-environment-autosave', 'Enable autosave ');
|
||||||
|
Add('options-tab-environment-savefrequency', 'Save frequency ');
|
||||||
|
Add('preview-title', 'Preview');
|
||||||
|
Add('save-title', 'Save');
|
||||||
|
Add('save-name', 'Name');
|
||||||
|
Add('save-oldformat', 'Use old format');
|
||||||
|
Add('save-newformat', 'Use new format');
|
||||||
|
Add('save-type-parameters', 'Save Parameters');
|
||||||
|
Add('save-type-allparameters', 'Save All Parameters');
|
||||||
|
Add('save-type-gradient', 'Save Gradient');
|
||||||
|
Add('save-type-exportupr', 'Export UPR');
|
||||||
|
Add('save-status-notitle', 'No item name given.');
|
||||||
|
Add('save-status-invalidfilename', 'Invalid file name.');
|
||||||
|
Add('save-status-alreadyexists', '"%s" in "%s" already exists. Do you want to replace it?');
|
||||||
|
Add('save-status-alreadyexists2', '"%s" already exists. Do you want to replace it?');
|
||||||
|
Add('savepreset-title', 'Save preset');
|
||||||
|
Add('savepreset-name', 'Name');
|
||||||
|
Add('savepreset-notitle', 'No preset name given.');
|
||||||
|
Add('script-title', 'Script');
|
||||||
|
Add('script-rendering', 'Rendering...');
|
||||||
|
Add('script-break', 'Break');
|
||||||
|
Add('script-new', 'New');
|
||||||
|
Add('script-open', 'Open');
|
||||||
|
Add('script-save', 'Save');
|
||||||
|
Add('script-run', 'Run');
|
||||||
|
Add('script-stop', 'Stop');
|
||||||
|
Add('splash-loadingtext', 'Loading');
|
||||||
|
Add('template-title', 'Templates');
|
||||||
|
Add('main-common-title-lite', 'Lite Version');
|
||||||
|
Add('main-common-title-t500', 'High-Memory Version');
|
||||||
|
Add('main-common-randombatch', 'Random Batch');
|
||||||
|
Add('main-menu-file-title', 'File');
|
||||||
|
Add('main-menu-file-new', 'New');
|
||||||
|
Add('main-menu-file-open', 'Open...');
|
||||||
|
Add('main-menu-file-restoreautosave', 'Restore last autosave');
|
||||||
|
Add('main-menu-file-saveparams', 'Save parameters...');
|
||||||
|
Add('main-menu-file-saveallparams', 'Save all parameters...');
|
||||||
|
Add('main-menu-file-smoothpalette', 'Smooth palette...');
|
||||||
|
Add('main-menu-file-gradientbrowser', 'Gradient browser...');
|
||||||
|
Add('main-menu-file-exportupr', 'Export UPR...');
|
||||||
|
Add('main-menu-file-exportflame', 'Export to flam3...');
|
||||||
|
Add('main-menu-file-importgimp', 'Import GIMP parameters...');
|
||||||
|
Add('main-menu-file-submitsheep', 'Submit sheep');
|
||||||
|
Add('main-menu-file-randombatch', 'Random batch');
|
||||||
|
Add('main-menu-file-exit', 'Exit');
|
||||||
|
Add('main-menu-edit-title', 'Edit');
|
||||||
|
Add('main-menu-edit-saveundo', 'Save undo stack...');
|
||||||
|
Add('main-menu-edit-copyasupr', 'Copy as UPR');
|
||||||
|
Add('main-menu-view-title', 'View');
|
||||||
|
Add('main-menu-view-fullscreen', 'Full screen');
|
||||||
|
Add('main-menu-view-editor', 'Editor');
|
||||||
|
Add('main-menu-view-adjustment', 'Adjustment');
|
||||||
|
Add('main-menu-view-gradient', 'Gradient');
|
||||||
|
Add('main-menu-view-mutation', 'Mutation');
|
||||||
|
Add('main-menu-view-imagesize', 'Image size');
|
||||||
|
Add('main-menu-view-messages', 'Messages');
|
||||||
|
Add('main-menu-view-curves', 'Curves');
|
||||||
|
Add('main-menu-flame-title', 'Flame');
|
||||||
|
Add('main-menu-flame-reset', 'Reset location');
|
||||||
|
Add('main-menu-flame-randomize', 'Randomize');
|
||||||
|
Add('main-menu-flame-randomweights', 'Randomize weights');
|
||||||
|
Add('main-menu-flame-equalweights', 'Equalize weights');
|
||||||
|
Add('main-menu-flame-computeweights', 'Normalize weights');
|
||||||
|
Add('main-menu-flame-calculatecolors', 'Calculate colors');
|
||||||
|
Add('main-menu-flame-randomizecolors', 'Randomize colors');
|
||||||
|
Add('main-menu-flame-rendertodisk', 'Render flame...');
|
||||||
|
Add('main-menu-flame-renderallflames', 'Render all flames...');
|
||||||
|
Add('main-menu-flame-resumeunfinished', 'Resume unfinished render process...');
|
||||||
|
Add('main-menu-flame-generatereport', 'Summarize flame...');
|
||||||
|
Add('main-menu-variation-title', 'Variation');
|
||||||
|
Add('main-menu-variation-random', 'Random');
|
||||||
|
Add('main-menu-variation-builtin', 'Built-in');
|
||||||
|
Add('main-menu-variation-plugins', 'Plugins');
|
||||||
|
Add('main-menu-script-title', 'Script');
|
||||||
|
Add('main-menu-script-run', 'Run script');
|
||||||
|
Add('main-menu-script-run2', 'Run "%s"');
|
||||||
|
Add('main-menu-script-directory', 'Directory');
|
||||||
|
Add('main-menu-script-more', 'More');
|
||||||
|
Add('main-menu-script-stop', 'Stop script');
|
||||||
|
Add('main-menu-script-open', 'Open...');
|
||||||
|
Add('main-menu-script-edit', 'Edit script');
|
||||||
|
Add('main-menu-script-managefaves', 'Manage favorites...');
|
||||||
|
Add('main-menu-script-flametoscript', 'Generate script from flame');
|
||||||
|
Add('main-menu-options-title', 'Tools');
|
||||||
|
Add('main-menu-options-togglemaintoolbar', 'Show toolbar');
|
||||||
|
Add('main-menu-options-togglestatusbar', 'Show status bar');
|
||||||
|
Add('main-menu-options-togglefilelist', 'Show parameter list');
|
||||||
|
Add('main-menu-options-resetfilelistwidth', 'Reset layout');
|
||||||
|
Add('main-menu-options-showoptions', 'Settings...');
|
||||||
|
Add('main-menu-help-title', '?');
|
||||||
|
Add('main-menu-help-contents', 'Contents');
|
||||||
|
Add('main-menu-help-aboutalgorithm', 'About fractal flames...');
|
||||||
|
Add('main-menu-help-aboutapophysis', 'About Apophysis 7x...');
|
||||||
|
Add('main-toolbar-listviewmode-classic', 'Classic view');
|
||||||
|
Add('main-toolbar-listviewmode-icons', 'Thumbnail view');
|
||||||
|
Add('main-toolbar-togglealpha', 'Show transparency');
|
||||||
|
Add('main-toolbar-toggleguides', 'Show guidelines');
|
||||||
|
Add('main-toolbar-modemove', 'Pan camera');
|
||||||
|
Add('main-toolbar-moderotate', 'Rotate camera');
|
||||||
|
Add('main-toolbar-modezoomin', 'Zoom in');
|
||||||
|
Add('main-toolbar-modezoomout', 'Zoom out');
|
||||||
|
Add('main-status-batchgenerate', 'Generating %d of %s...');
|
||||||
|
Add('main-status-batcherror', 'Error creating batch.');
|
||||||
|
Add('main-status-calculatingpalette', 'Calculating palette (%d%)...');
|
||||||
|
Add('main-status-noflam3', 'Unable to find flam3 executable. Please verify your settings.');
|
||||||
|
Add('main-status-nohelpfile', 'Please specify a help file path in the options dialog first.');
|
||||||
|
Add('main-status-variationsorvariables', 'variations or variables');
|
||||||
|
Add('main-status-plugins', 'plugins');
|
||||||
|
Add('main-status-pluginpath-ioerror', 'Failed to write the setting for the plugin directory. Apophysis will use the default setting.');
|
||||||
|
Add('main-status-noloadingerrors', 'Flame loaded without errors');
|
||||||
|
Add('main-status-loadingerrorcount', '%d errors in flame');
|
||||||
|
Add('main-status-morepluginsneeded', 'The flame "%s" requires the following additional %s:');
|
||||||
|
Add('main-status-noautosave', 'No autosave present.');
|
||||||
|
Add('main-report-transformcount', 'Transform count: %d');
|
||||||
|
Add('main-report-finaltransform', 'Has final transform: %s');
|
||||||
|
Add('main-report-usedplugins', 'Used plugins:');
|
||||||
|
Add('main-report-noplugins', '(none)');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Add(key, value: string);
|
||||||
|
var entry : TKeyValuePair;
|
||||||
|
begin
|
||||||
|
Inc(tokenCount);
|
||||||
|
SetLength(language, tokenCount);
|
||||||
|
SetLength(defaultlanguage, tokenCount);
|
||||||
|
entry := TKeyValuePair.Create;
|
||||||
|
entry.key := key;
|
||||||
|
entry.value := value;
|
||||||
|
language[tokenCount - 1] := entry;
|
||||||
|
defaultlanguage[tokenCount - 1] := entry;
|
||||||
|
end;
|
||||||
|
procedure AddNoDefault(key, value: string);
|
||||||
|
var entry : TKeyValuePair;
|
||||||
|
begin
|
||||||
|
Inc(tokenCount);
|
||||||
|
SetLength(language, tokenCount);
|
||||||
|
entry := TKeyValuePair.Create;
|
||||||
|
entry.key := key;
|
||||||
|
entry.value := value;
|
||||||
|
language[tokenCount - 1] := entry;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure LoadLanguage(path:string);
|
||||||
|
begin
|
||||||
|
if (path = '') or (not FileExists(path)) then LoadEnglish()
|
||||||
|
else begin
|
||||||
|
tokenCount := 0;
|
||||||
|
if true then begin
|
||||||
|
parser := TParser.Create;
|
||||||
|
ListXmlScanner := TEasyXmlScanner.Create(nil);
|
||||||
|
|
||||||
|
ListXmlScanner.OnStartTag := parser.ListXmlScannerStartTag;
|
||||||
|
ListXmlScanner.OnEndTag := parser.ListXmlScannerEndTag;
|
||||||
|
ListXmlScanner.OnEmptyTag := parser.ListXmlScannerEmptyTag;
|
||||||
|
ListXmlScanner.OnContent := parser.ListXmlScannerContent;
|
||||||
|
|
||||||
|
ListXmlScanner.Filename := path;
|
||||||
|
ListXmlScanner.Execute;
|
||||||
|
|
||||||
|
ListXmlScanner.Destroy;
|
||||||
|
parser.Destroy;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TextByKey(key:string):string;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
|
||||||
|
Result := '#ERR_NO_TEXT#';
|
||||||
|
for i:=0 to tokenCount - 1 do begin
|
||||||
|
if LowerCase(language[i].key) = LowerCase(key) then begin
|
||||||
|
Result := language[i].value;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// maybe try default language?
|
||||||
|
for i:=0 to tokenCount - 1 do begin
|
||||||
|
if LowerCase(defaultlanguage[i].key) = LowerCase(key) then begin
|
||||||
|
Result := defaultlanguage[i].value;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TParser.Create;
|
||||||
|
begin
|
||||||
|
self.parentTagnames := TStringList.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TParser.ListXmlScannerStartTag(Sender: TObject; TagName: string; Attributes: TAttrList);
|
||||||
|
begin
|
||||||
|
self.parentTagnames.Add(self.currentTagname);
|
||||||
|
self.currentTagname := TagName;
|
||||||
|
end;
|
||||||
|
procedure TParser.ListXmlScannerEndTag(Sender: TObject; TagName: string);
|
||||||
|
var lastIndex : integer;
|
||||||
|
begin
|
||||||
|
lastIndex := self.parentTagnames.Count - 1;
|
||||||
|
self.currentTagname := self.parentTagnames.Strings[lastIndex];
|
||||||
|
self.parentTagnames.Delete(lastIndex);
|
||||||
|
end;
|
||||||
|
procedure TParser.ListXmlScannerEmptyTag(Sender: TObject; TagName: string; Attributes: TAttrList);
|
||||||
|
var lastIndex : integer;
|
||||||
|
begin
|
||||||
|
self.parentTagnames.Add(self.currentTagname);
|
||||||
|
self.currentTagname := TagName;
|
||||||
|
self.ListXmlScannerContent(Sender, '');
|
||||||
|
lastIndex := self.parentTagnames.Count - 1;
|
||||||
|
self.currentTagname := self.parentTagnames.Strings[lastIndex];
|
||||||
|
self.parentTagnames.Delete(lastIndex);
|
||||||
|
end;
|
||||||
|
procedure TParser.ListXmlScannerContent(Sender: TObject; Content: string);
|
||||||
|
const root: string = 'stringtable';
|
||||||
|
var key, tn: string; i: integer;
|
||||||
|
begin
|
||||||
|
for i:=0 to self.parentTagnames.Count - 1 do begin
|
||||||
|
tn := self.parentTagnames.Strings[i];
|
||||||
|
if not (tn = '') and not (tn = root) then key := key + tn + '-';
|
||||||
|
end;
|
||||||
|
key := key + self.currentTagname;
|
||||||
|
Add(key, Content);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
340
Core/XFormMan.pas
Normal file
340
Core/XFormMan.pas
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit XFormMan;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
BaseVariation, SysUtils, Forms, Windows;
|
||||||
|
|
||||||
|
const
|
||||||
|
NRLOCVAR = 29;
|
||||||
|
var
|
||||||
|
NumBuiltinVars: integer;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFNToVN = record
|
||||||
|
FileName: string;
|
||||||
|
VarName: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function NrVar: integer;
|
||||||
|
function Varnames(const index: integer): String;
|
||||||
|
procedure RegisterVariation(Variation: TVariationLoader; supports3D, supportsDC : boolean);
|
||||||
|
function GetNrRegisteredVariations: integer;
|
||||||
|
function GetRegisteredVariation(const Index: integer): TVariationLoader;
|
||||||
|
function GetNrVariableNames: integer;
|
||||||
|
function GetVariableNameAt(const Index: integer): string;
|
||||||
|
function GetVariationIndex(const str: string): integer;
|
||||||
|
function GetVariationIndexFromVariableNameIndex(const Index: integer): integer;
|
||||||
|
procedure VarSupports(index : integer; var supports3D : boolean; var supportsDC : boolean);
|
||||||
|
procedure InitializeXFormMan;
|
||||||
|
procedure DestroyXFormMan;
|
||||||
|
procedure RegisterVariationFile(filename, name: string);
|
||||||
|
function GetFileNameOfVariation(name: string): string;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes;
|
||||||
|
|
||||||
|
var
|
||||||
|
VariationList: TList;
|
||||||
|
VariableNames: TStringlist;
|
||||||
|
loaderNum : integer;
|
||||||
|
Variable2VariationIndex : array of integer;
|
||||||
|
FNToVNList : array of TFNToVN;
|
||||||
|
FNToVNCount: integer;
|
||||||
|
|
||||||
|
procedure InitializeXFormMan;
|
||||||
|
begin
|
||||||
|
VariationList := TList.Create;
|
||||||
|
VariableNames := TStringlist.create;
|
||||||
|
SetLength(Variable2VariationIndex,0);
|
||||||
|
SetLength(FNToVNList, 0);
|
||||||
|
FNToVNCount := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure VarSupports(index : integer; var supports3D : boolean; var supportsDC : boolean);
|
||||||
|
const
|
||||||
|
supports3D_arr: array[0..NRLOCVAR-1] of boolean = (
|
||||||
|
true, //'linear',
|
||||||
|
true, //'flatten',
|
||||||
|
true, //'sinusoidal',
|
||||||
|
true, //'spherical',
|
||||||
|
true, //'swirl',
|
||||||
|
true, //'horseshoe',
|
||||||
|
true, //'polar',
|
||||||
|
true, //'disc',
|
||||||
|
true, //'spiral',
|
||||||
|
true, //'hyperbolic',
|
||||||
|
true, //'diamond',
|
||||||
|
true, //'eyefish',
|
||||||
|
true, //'bubble',
|
||||||
|
true, //'cylinder',
|
||||||
|
true, //'noise',
|
||||||
|
true, //'blur',
|
||||||
|
true, //'gaussian_blur',
|
||||||
|
true, //'zblur',
|
||||||
|
true, //'blur3D',
|
||||||
|
true, //'pre_blur',
|
||||||
|
true, //'pre_zscale',
|
||||||
|
true, //'pre_ztranslate',
|
||||||
|
true, //'pre_rotate_x',
|
||||||
|
true, //'pre_rotate_y',
|
||||||
|
true, //'zscale',
|
||||||
|
true, //'ztranslate',
|
||||||
|
true, //'zcone',
|
||||||
|
true, //'post_rotate_x',
|
||||||
|
true //'post_rotate_y',
|
||||||
|
);
|
||||||
|
supportsDC_arr: array[0..NRLOCVAR-1] of boolean = (
|
||||||
|
false, //'linear3D',
|
||||||
|
false, //'linear',
|
||||||
|
false, //'sinusoidal',
|
||||||
|
false, //'spherical',
|
||||||
|
false, //'swirl',
|
||||||
|
false, //'horseshoe',
|
||||||
|
false, //'polar',
|
||||||
|
// false, // 'handkerchief',
|
||||||
|
// false, // 'heart',
|
||||||
|
false, //'disc',
|
||||||
|
false, //'spiral',
|
||||||
|
false, //'hyperbolic',
|
||||||
|
false, //'diamond',
|
||||||
|
// false, // 'ex',
|
||||||
|
// false, // 'julia',
|
||||||
|
// false, // 'bent',
|
||||||
|
// false, // 'waves',
|
||||||
|
// false, // 'fisheye',
|
||||||
|
// false, // 'popcorn',
|
||||||
|
// false, // 'exponential',
|
||||||
|
// false, // 'power',
|
||||||
|
// false, // 'cosine',
|
||||||
|
// false, // 'rings',
|
||||||
|
// false, // 'fan',
|
||||||
|
false, //'eyefish',
|
||||||
|
false, //'bubble',
|
||||||
|
false, //'cylinder',
|
||||||
|
false, //'noise',
|
||||||
|
false, //'blur',
|
||||||
|
false, //'gaussian_blur',
|
||||||
|
false, //'zblur',
|
||||||
|
false, //'blur3D',
|
||||||
|
|
||||||
|
false, //'pre_blur',
|
||||||
|
false, //'pre_zscale',
|
||||||
|
false, //'pre_ztranslate',
|
||||||
|
false, //'pre_rotate_x',
|
||||||
|
false, //'pre_rotate_y',
|
||||||
|
|
||||||
|
false, //'zscale',
|
||||||
|
false, //'ztranslate',
|
||||||
|
false, //'zcone',
|
||||||
|
|
||||||
|
false, //'post_rotate_x',
|
||||||
|
false //'post_rotate_y'
|
||||||
|
);
|
||||||
|
var
|
||||||
|
varl : TVariationLoader;
|
||||||
|
begin
|
||||||
|
|
||||||
|
if (index >= NRLOCVAR) then begin
|
||||||
|
supports3D := TVariationLoader(VariationList.Items[index - NRLOCVAR]).supports3D;
|
||||||
|
supportsDC := TVariationLoader(VariationList.Items[index - NRLOCVAR]).supportsDC;
|
||||||
|
end else begin
|
||||||
|
supports3D := supports3D_arr[index];
|
||||||
|
supportsDC := supportsDC_arr[index];
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure DestroyXFormMan;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
VariableNames.Free;
|
||||||
|
|
||||||
|
// The registered variation loaders are owned here, so we must free them.
|
||||||
|
for i := 0 to VariationList.Count-1 do
|
||||||
|
TVariationLoader(VariationList[i]).Free;
|
||||||
|
VariationList.Free;
|
||||||
|
|
||||||
|
Finalize(Variable2VariationIndex);
|
||||||
|
Finalize(FNToVNList);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function NrVar: integer;
|
||||||
|
begin
|
||||||
|
Result := NRLOCVAR + VariationList.Count;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
function GetVariationIndexFromVariableNameIndex(const Index: integer): integer;
|
||||||
|
begin
|
||||||
|
if (Index<0) or (Index > High(Variable2VariationIndex)) then
|
||||||
|
Result := -1
|
||||||
|
else
|
||||||
|
Result := Variable2VariationIndex[Index];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function Varnames(const index: integer): String;
|
||||||
|
const
|
||||||
|
cvarnames: array[0..NRLOCVAR-1] of string = (
|
||||||
|
'linear',
|
||||||
|
'flatten',
|
||||||
|
'sinusoidal',
|
||||||
|
'spherical',
|
||||||
|
'swirl',
|
||||||
|
'horseshoe',
|
||||||
|
'polar',
|
||||||
|
// 'handkerchief',
|
||||||
|
// 'heart',
|
||||||
|
'disc',
|
||||||
|
'spiral',
|
||||||
|
'hyperbolic',
|
||||||
|
'diamond',
|
||||||
|
// 'ex',
|
||||||
|
// 'julia',
|
||||||
|
// 'bent',
|
||||||
|
// 'waves',
|
||||||
|
// 'fisheye',
|
||||||
|
// 'popcorn',
|
||||||
|
// 'exponential',
|
||||||
|
// 'power',
|
||||||
|
// 'cosine',
|
||||||
|
// 'rings',
|
||||||
|
// 'fan',
|
||||||
|
'eyefish',
|
||||||
|
'bubble',
|
||||||
|
'cylinder',
|
||||||
|
'noise',
|
||||||
|
'blur',
|
||||||
|
'gaussian_blur',
|
||||||
|
'zblur',
|
||||||
|
'blur3D',
|
||||||
|
|
||||||
|
'pre_blur',
|
||||||
|
'pre_zscale',
|
||||||
|
'pre_ztranslate',
|
||||||
|
'pre_rotate_x',
|
||||||
|
'pre_rotate_y',
|
||||||
|
|
||||||
|
'zscale',
|
||||||
|
'ztranslate',
|
||||||
|
'zcone',
|
||||||
|
|
||||||
|
'post_rotate_x',
|
||||||
|
'post_rotate_y'
|
||||||
|
);
|
||||||
|
begin
|
||||||
|
if Index < NRLOCVAR then
|
||||||
|
Result := cvarnames[Index]
|
||||||
|
else
|
||||||
|
Result := TVariationLoader(VariationList[Index - NRLOCVAR]).GetName;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function GetVariationIndex(const str: string): integer;
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
i := NRVAR-1;
|
||||||
|
while (i >= 0) and (Varnames(i) <> str) do Dec(i);
|
||||||
|
Result := i;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
procedure RegisterVariationFile(filename, name: string);
|
||||||
|
begin
|
||||||
|
FNToVNCount := FNToVNCount + 1;
|
||||||
|
SetLength(FNToVNList, FNToVNCount);
|
||||||
|
FNToVNList[FNToVNCount - 1].FileName := filename;
|
||||||
|
FNToVNList[FNToVNCount - 1].VarName := name;
|
||||||
|
end;
|
||||||
|
function GetFileNameOfVariation(name: string): string;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to FNToVNCount - 1 do begin
|
||||||
|
if FNToVNList[i].VarName = name then begin
|
||||||
|
Result := FNToVNList[i].FileName;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure RegisterVariation(Variation: TVariationLoader; supports3D, supportsDC : boolean);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
prevNumVariables:integer;
|
||||||
|
begin
|
||||||
|
OutputDebugString(PChar(Variation.GetName));
|
||||||
|
|
||||||
|
VariationList.Add(Variation);
|
||||||
|
Variation.Supports3D := supports3D;
|
||||||
|
Variation.SupportsDC := supportsDC;
|
||||||
|
|
||||||
|
prevNumVariables := GetNrVariableNames;
|
||||||
|
setLength(Variable2VariationIndex, prevNumVariables + Variation.GetNrVariables);
|
||||||
|
for i := 0 to Variation.GetNrVariables - 1 do begin
|
||||||
|
VariableNames.Add(Variation.GetVariableNameAt(i));
|
||||||
|
Variable2VariationIndex[prevNumVariables + i] := NrVar-1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function GetNrRegisteredVariations: integer;
|
||||||
|
begin
|
||||||
|
Result := VariationList.count;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function GetRegisteredVariation(const Index: integer): TVariationLoader;
|
||||||
|
begin
|
||||||
|
Result := TVariationLoader(VariationList[Index]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function GetNrVariableNames: integer;
|
||||||
|
begin
|
||||||
|
Result := VariableNames.Count;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function GetVariableNameAt(const Index: integer): string;
|
||||||
|
begin
|
||||||
|
Result := VariableNames[Index];
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
initialization
|
||||||
|
InitializeXFormMan;
|
||||||
|
|
||||||
|
finalization
|
||||||
|
DestroyXFormMan;
|
||||||
|
|
||||||
|
end.
|
2833
Flame/ControlPoint.pas
Normal file
2833
Flame/ControlPoint.pas
Normal file
File diff suppressed because it is too large
Load Diff
589
Flame/RndFlame.pas
Normal file
589
Flame/RndFlame.pas
Normal file
@ -0,0 +1,589 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit RndFlame;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
ControlPoint, Xform;
|
||||||
|
|
||||||
|
function RandomFlame(SourceCP: TControlPoint= nil; algorithm: integer = 0): TControlPoint;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, Global, cmap, GradientHlpr, XFormMan, Classes;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
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 CreatePalette(strng: string): TColorMap;
|
||||||
|
{ Loads a palette from a gradient string }
|
||||||
|
var
|
||||||
|
Strings: TStringList;
|
||||||
|
index, i: integer;
|
||||||
|
Tokens: TStringList;
|
||||||
|
Indices, Colors: TStringList;
|
||||||
|
a, b: integer;
|
||||||
|
begin
|
||||||
|
Strings := TStringList.Create;
|
||||||
|
Tokens := TStringList.Create;
|
||||||
|
Indices := TStringList.Create;
|
||||||
|
Colors := TStringList.Create;
|
||||||
|
try
|
||||||
|
try
|
||||||
|
Strings.Text := strng;
|
||||||
|
if Pos('}', Strings.Text) = 0 then raise EFormatInvalid.Create('No closing brace');
|
||||||
|
if Pos('{', Strings[0]) = 0 then raise EFormatInvalid.Create('No opening brace.');
|
||||||
|
GetTokens(ReplaceTabs(strings.text), tokens);
|
||||||
|
Tokens.Text := Trim(Tokens.text);
|
||||||
|
i := 0;
|
||||||
|
while (Pos('}', Tokens[i]) = 0) and (Pos('opacity:', Lowercase(Tokens[i])) = 0) do
|
||||||
|
begin
|
||||||
|
if Pos('index=', LowerCase(Tokens[i])) <> 0 then
|
||||||
|
Indices.Add(GetVal(Tokens[i]))
|
||||||
|
else if Pos('color=', LowerCase(Tokens[i])) <> 0 then
|
||||||
|
Colors.Add(GetVal(Tokens[i]));
|
||||||
|
inc(i)
|
||||||
|
end;
|
||||||
|
for i := 0 to 255 do
|
||||||
|
begin
|
||||||
|
Result[i][0] := 0;
|
||||||
|
Result[i][1] := 0;
|
||||||
|
Result[i][2] := 0;
|
||||||
|
end;
|
||||||
|
if Indices.Count = 0 then raise EFormatInvalid.Create('No color info');
|
||||||
|
for i := 0 to Indices.Count - 1 do
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
index := StrToInt(Indices[i]);
|
||||||
|
while index < 0 do inc(index, 400);
|
||||||
|
index := Round(Index * (255 / 399));
|
||||||
|
indices[i] := IntToStr(index);
|
||||||
|
assert(index>=0);
|
||||||
|
assert(index<256);
|
||||||
|
Result[index][0] := StrToInt(Colors[i]) mod 256;
|
||||||
|
Result[index][1] := trunc(StrToInt(Colors[i]) / 256) mod 256;
|
||||||
|
Result[index][2] := trunc(StrToInt(Colors[i]) / 65536);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
i := 1;
|
||||||
|
repeat
|
||||||
|
a := StrToInt(Trim(Indices[i - 1]));
|
||||||
|
b := StrToInt(Trim(Indices[i]));
|
||||||
|
RGBBlend(a, b, Result);
|
||||||
|
inc(i);
|
||||||
|
until i = Indices.Count;
|
||||||
|
if (Indices[0] <> '0') or (Indices[Indices.Count - 1] <> '255') then
|
||||||
|
begin
|
||||||
|
a := StrToInt(Trim(Indices[Indices.Count - 1]));
|
||||||
|
b := StrToInt(Trim(Indices[0])) + 256;
|
||||||
|
RGBBlend(a, b, Result);
|
||||||
|
end;
|
||||||
|
except on EFormatInvalid do
|
||||||
|
begin
|
||||||
|
// Result := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Tokens.Free;
|
||||||
|
Strings.Free;
|
||||||
|
Indices.Free;
|
||||||
|
Colors.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure GetGradientFileGradientsNames(const filename: string; var NamesList: TStringList);
|
||||||
|
var
|
||||||
|
i, p: integer;
|
||||||
|
Title: string;
|
||||||
|
FStrings: TStringList;
|
||||||
|
begin
|
||||||
|
FStrings := TStringList.Create;
|
||||||
|
FStrings.LoadFromFile(filename);
|
||||||
|
try
|
||||||
|
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
|
||||||
|
NamesList.Add(Trim(Copy(FStrings[i], 1, p - 1)));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FStrings.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure RandomGradient(SourceCP, DestCP: TControlPoint);
|
||||||
|
var
|
||||||
|
tmpGrad: string;
|
||||||
|
tmpGrdList: TStringList;
|
||||||
|
begin
|
||||||
|
case randGradient of
|
||||||
|
0:
|
||||||
|
begin
|
||||||
|
cmap_index := Random(NRCMAPS);
|
||||||
|
GetCMap(cmap_index, 1, DestCP.cmap);
|
||||||
|
// cmap_index := DestCP.cmapindex;
|
||||||
|
DestCP.cmapIndex := cmap_index;
|
||||||
|
end;
|
||||||
|
1:
|
||||||
|
begin
|
||||||
|
DestCP.cmap := DefaultPalette;
|
||||||
|
DestCP.cmapIndex := cmap_index;
|
||||||
|
end;
|
||||||
|
2:
|
||||||
|
if assigned(SourceCP) then begin
|
||||||
|
DestCP.cmap := SourceCP.cmap;
|
||||||
|
DestCP.cmapIndex := SourceCP.cmapIndex;
|
||||||
|
end else begin
|
||||||
|
cmap_index := Random(NRCMAPS);
|
||||||
|
GetCMap(cmap_index, 1, DestCP.cmap);
|
||||||
|
DestCP.cmapIndex := cmap_index;
|
||||||
|
end;
|
||||||
|
3:
|
||||||
|
DestCP.cmap := GradientHelper.RandomGradient;
|
||||||
|
4:
|
||||||
|
if FileExists(randGradientFile) then
|
||||||
|
begin
|
||||||
|
tmpGrdList := TStringList.Create;
|
||||||
|
GetGradientFileGradientsNames(randGradientFile, tmpGrdList);
|
||||||
|
tmpGrad := GetGradient(randGradientFile, tmpGrdList.Strings[random(tmpGrdList.Count)]);
|
||||||
|
DestCP.cmap := CreatePalette(tmpGrad);
|
||||||
|
tmpGrdList.Free;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
cmap_index := Random(NRCMAPS);
|
||||||
|
GetCMap(cmap_index, 1, DestCP.cmap);
|
||||||
|
DestCP.cmapIndex := cmap_index;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure RandomVariation(cp: TControlPoint);
|
||||||
|
{ Randomise variation parameters }
|
||||||
|
var
|
||||||
|
a, b, i, j: integer;
|
||||||
|
VarPossible: boolean;
|
||||||
|
begin
|
||||||
|
inc(MainSeed);
|
||||||
|
RandSeed := MainSeed;
|
||||||
|
|
||||||
|
VarPossible := false;
|
||||||
|
for j := 0 to NRVAR - 1 do begin
|
||||||
|
VarPossible := VarPossible or Variations[j];
|
||||||
|
end;
|
||||||
|
|
||||||
|
for i := 0 to cp.NumXForms - 1 do begin
|
||||||
|
for j := 0 to NRVAR - 1 do
|
||||||
|
cp.xform[i].SetVariation(j, 0);
|
||||||
|
|
||||||
|
if VarPossible then begin
|
||||||
|
repeat
|
||||||
|
a := random(NRVAR);
|
||||||
|
until Variations[a];
|
||||||
|
|
||||||
|
repeat
|
||||||
|
b := random(NRVAR);
|
||||||
|
until Variations[b];
|
||||||
|
end else begin
|
||||||
|
a := 0;
|
||||||
|
b := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if (a = b) then begin
|
||||||
|
cp.xform[i].SetVariation(a, 1);
|
||||||
|
end else begin
|
||||||
|
cp.xform[i].SetVariation(a, random);
|
||||||
|
cp.xform[i].SetVariation(b, 1 - cp.xform[i].GetVariation(a));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure SetVariation(cp: TControlPoint);
|
||||||
|
{ Set the current Variation }
|
||||||
|
var
|
||||||
|
i, j: integer;
|
||||||
|
begin
|
||||||
|
if Variation = vRandom then begin
|
||||||
|
RandomVariation(cp);
|
||||||
|
end else
|
||||||
|
for i := 0 to cp.NumXForms - 1 do begin
|
||||||
|
for j := 0 to NRVAR - 1 do
|
||||||
|
cp.xform[i].SetVariation(j, 0);
|
||||||
|
cp.xform[i].SetVariation(integer(Variation), 1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
(* --Z-- hmm, exactly the same function exists in module Main
|
||||||
|
|
||||||
|
function TrianglesFromCP(const cp1: TControlPoint; var Triangles: TTriangles): integer;
|
||||||
|
{ Sets up the triangles from the IFS code }
|
||||||
|
var
|
||||||
|
xforms: integer;
|
||||||
|
i, j: integer;
|
||||||
|
temp_x, temp_y, xset, yset: double;
|
||||||
|
left, top, bottom, right: double;
|
||||||
|
a, b, c, d, e, f: double;
|
||||||
|
begin
|
||||||
|
top := 0; bottom := 0; right := 0; left := 0;
|
||||||
|
xforms := NumXForms(cp1);
|
||||||
|
Result := xforms;
|
||||||
|
if not FixedReference then
|
||||||
|
begin
|
||||||
|
for i := 0 to xforms - 1 do
|
||||||
|
begin
|
||||||
|
a := cp1.xform[i].c[0][0];
|
||||||
|
b := cp1.xform[i].c[0][1];
|
||||||
|
c := cp1.xform[i].c[1][0];
|
||||||
|
d := cp1.xform[i].c[1][1];
|
||||||
|
e := cp1.xform[i].c[2][0];
|
||||||
|
f := cp1.xform[i].c[2][1];
|
||||||
|
xset := 1.0;
|
||||||
|
yset := 1.0;
|
||||||
|
for j := 0 to 5 do
|
||||||
|
begin
|
||||||
|
temp_x := xset * a + yset * c + e;
|
||||||
|
temp_y := xset * b + yset * d + f;
|
||||||
|
xset := temp_x;
|
||||||
|
yset := temp_y;
|
||||||
|
end;
|
||||||
|
if (i = 0) then
|
||||||
|
begin
|
||||||
|
left := xset;
|
||||||
|
right := xset;
|
||||||
|
top := yset;
|
||||||
|
bottom := yset;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if (xset < left) then left := xset;
|
||||||
|
if (xset > right) then right := xset;
|
||||||
|
if (yset < top) then top := yset;
|
||||||
|
if (yset > bottom) then bottom := yset;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Triangles[-1].x[0] := left;
|
||||||
|
Triangles[-1].x[1] := right;
|
||||||
|
Triangles[-1].x[2] := right;
|
||||||
|
Triangles[-1].y[0] := bottom;
|
||||||
|
Triangles[-1].y[1] := bottom;
|
||||||
|
Triangles[-1].y[2] := top;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Triangles[-1].x[0] := 0; Triangles[-1].y[0] := 0;
|
||||||
|
Triangles[-1].x[1] := 1; Triangles[-1].y[1] := 0;
|
||||||
|
Triangles[-1].x[2] := 1; Triangles[-1].y[2] := 1.5;
|
||||||
|
end;
|
||||||
|
|
||||||
|
for j := 0 to xforms - 1 do
|
||||||
|
begin
|
||||||
|
a := cp1.xform[j].c[0][0];
|
||||||
|
b := cp1.xform[j].c[0][1];
|
||||||
|
c := cp1.xform[j].c[1][0];
|
||||||
|
d := cp1.xform[j].c[1][1];
|
||||||
|
e := cp1.xform[j].c[2][0];
|
||||||
|
f := cp1.xform[j].c[2][1];
|
||||||
|
for i := 0 to 2 do
|
||||||
|
begin
|
||||||
|
triangles[j].x[i] := Triangles[-1].x[i] * a + Triangles[-1].y[i] *
|
||||||
|
c + e;
|
||||||
|
triangles[j].y[i] := Triangles[-1].x[i] * b + Triangles[-1].y[i] *
|
||||||
|
d + f;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
for i := -1 to xforms - 1 do
|
||||||
|
for j := 0 to 2 do
|
||||||
|
triangles[i].y[j] := -triangles[i].y[j];
|
||||||
|
end;
|
||||||
|
*)
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure EqualizeWeights(var cp: TControlPoint);
|
||||||
|
var
|
||||||
|
t, i: integer;
|
||||||
|
begin
|
||||||
|
t := cp.NumXForms;
|
||||||
|
for i := 0 to t - 1 do
|
||||||
|
cp.xform[i].density := 1.0 / t;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure NormalizeWeights(var cp: TControlPoint);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
td: double;
|
||||||
|
begin
|
||||||
|
td := 0.0;
|
||||||
|
for i := 0 to cp.NumXForms - 1 do
|
||||||
|
td := td + cp.xform[i].Density;
|
||||||
|
if (td < 0.001) then
|
||||||
|
EqualizeWeights(cp)
|
||||||
|
else
|
||||||
|
for i := 0 to cp.NumXForms - 1 do
|
||||||
|
cp.xform[i].Density := cp.xform[i].Density / td;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure ComputeWeights(var cp1: TControlPoint; Triangles: TTriangles; t: integer);
|
||||||
|
{ Caclulates transform weight from triangles }
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
total_area: double;
|
||||||
|
begin
|
||||||
|
total_area := 0.0;
|
||||||
|
for i := 0 to t - 1 do
|
||||||
|
begin
|
||||||
|
cp1.xform[i].Density := triangle_area(Triangles[i]);
|
||||||
|
total_area := total_area + cp1.xform[i].Density;
|
||||||
|
end;
|
||||||
|
for i := 0 to t - 1 do
|
||||||
|
begin
|
||||||
|
cp1.xform[i].Density := cp1.xform[i].Density / total_area;
|
||||||
|
end;
|
||||||
|
NormalizeWeights(cp1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure RandomWeights(var cp1: TControlPoint);
|
||||||
|
{ Randomizes xform weights }
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to Transforms - 1 do
|
||||||
|
cp1.xform[i].Density := random;
|
||||||
|
NormalizeWeights(cp1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
function RandomFlame(SourceCP: TControlPoint; algorithm: integer): TControlPoint;
|
||||||
|
var
|
||||||
|
Min, Max, i, j, rnd: integer;
|
||||||
|
Triangles: TTriangles;
|
||||||
|
r, s, theta, phi: double;
|
||||||
|
skip: boolean;
|
||||||
|
begin
|
||||||
|
if Assigned(SourceCP) then
|
||||||
|
Result := SourceCP.clone
|
||||||
|
else
|
||||||
|
Result := TControlPoint.Create;
|
||||||
|
|
||||||
|
Min := randMinTransforms;
|
||||||
|
Max := randMaxTransforms;
|
||||||
|
|
||||||
|
inc(MainSeed);
|
||||||
|
RandSeed := MainSeed;
|
||||||
|
transforms := random(Max - (Min - 1)) + Min;
|
||||||
|
repeat
|
||||||
|
try
|
||||||
|
inc(MainSeed);
|
||||||
|
RandSeed := MainSeed;
|
||||||
|
Result.clear;
|
||||||
|
Result.RandomCP(transforms, transforms, false);
|
||||||
|
Result.SetVariation(Variation);
|
||||||
|
inc(MainSeed);
|
||||||
|
RandSeed := MainSeed;
|
||||||
|
|
||||||
|
case algorithm of
|
||||||
|
1: rnd := 0;
|
||||||
|
2: rnd := 7;
|
||||||
|
3: rnd := 9;
|
||||||
|
else
|
||||||
|
if (Variation = vLinear) or (Variation = vRandom) then
|
||||||
|
rnd := random(10)
|
||||||
|
else
|
||||||
|
rnd := 9;
|
||||||
|
end;
|
||||||
|
case rnd of
|
||||||
|
0..6:
|
||||||
|
begin
|
||||||
|
for i := 0 to Transforms - 1 do
|
||||||
|
begin
|
||||||
|
if Random(10) < 9 then
|
||||||
|
Result.xform[i].c[0, 0] := 1
|
||||||
|
else
|
||||||
|
Result.xform[i].c[0, 0] := -1;
|
||||||
|
Result.xform[i].c[0, 1] := 0;
|
||||||
|
Result.xform[i].c[1, 0] := 0;
|
||||||
|
Result.xform[i].c[1, 1] := 1;
|
||||||
|
Result.xform[i].c[2, 0] := 0;
|
||||||
|
Result.xform[i].c[2, 1] := 0;
|
||||||
|
Result.xform[i].color := 0;
|
||||||
|
Result.xform[i].symmetry := 0;
|
||||||
|
Result.xform[i].SetVariation(0, 1);
|
||||||
|
for j := 1 to NRVAR - 1 do
|
||||||
|
Result.xform[i].SetVariation(j, 0);
|
||||||
|
Result.xform[i].Translate(random * 2 - 1, random * 2 - 1);
|
||||||
|
Result.xform[i].Rotate(random * 360);
|
||||||
|
if i > 0 then
|
||||||
|
Result.xform[i].Scale(random * 0.8 + 0.2)
|
||||||
|
else
|
||||||
|
Result.xform[i].Scale(random * 0.4 + 0.6);
|
||||||
|
if Random(2) = 0 then
|
||||||
|
Result.xform[i].Multiply(1, random - 0.5, random - 0.5, 1);
|
||||||
|
end;
|
||||||
|
SetVariation(Result);
|
||||||
|
end;
|
||||||
|
7, 8:
|
||||||
|
begin
|
||||||
|
{ From the source to Chaos: The Software }
|
||||||
|
for i := 0 to Transforms - 1 do begin
|
||||||
|
r := random * 2 - 1;
|
||||||
|
if ((0 <= r) and (r < 0.2)) then
|
||||||
|
r := r + 0.2;
|
||||||
|
if ((r > -0.2) and (r <= 0)) then
|
||||||
|
r := r - 0.2;
|
||||||
|
s := random * 2 - 1;
|
||||||
|
if ((0 <= s) and (s < 0.2)) then
|
||||||
|
s := s + 0.2;
|
||||||
|
if ((s > -0.2) and (s <= 0)) then
|
||||||
|
s := s - -0.2;
|
||||||
|
theta := PI * random;
|
||||||
|
phi := (2 + random) * PI / 4;
|
||||||
|
Result.xform[i].c[0][0] := r * cos(theta);
|
||||||
|
Result.xform[i].c[1][0] := s * (cos(theta) * cos(phi) - sin(theta));
|
||||||
|
Result.xform[i].c[0][1] := r * sin(theta);
|
||||||
|
Result.xform[i].c[1][1] := s * (sin(theta) * cos(phi) + cos(theta));
|
||||||
|
{ the next bit didn't translate so well, so I fudge it}
|
||||||
|
Result.xform[i].c[2][0] := random * 2 - 1;
|
||||||
|
Result.xform[i].c[2][1] := random * 2 - 1;
|
||||||
|
end;
|
||||||
|
for i := 0 to NXFORMS-1 do //NXFORMS - 1 do
|
||||||
|
Result.xform[i].density := 0;
|
||||||
|
for i := 0 to Transforms - 1 do
|
||||||
|
Result.xform[i].density := 1 / Transforms;
|
||||||
|
SetVariation(Result);
|
||||||
|
end;
|
||||||
|
9: begin
|
||||||
|
for i := 0 to NXFORMS-1 do //NXFORMS - 1 do
|
||||||
|
Result.xform[i].density := 0;
|
||||||
|
for i := 0 to Transforms - 1 do
|
||||||
|
Result.xform[i].density := 1 / Transforms;
|
||||||
|
end;
|
||||||
|
end; // case
|
||||||
|
Result.TrianglesFromCp(Triangles);
|
||||||
|
if Random(2) > 0 then
|
||||||
|
ComputeWeights(Result, Triangles, transforms)
|
||||||
|
else
|
||||||
|
EqualizeWeights(Result);
|
||||||
|
except on E: EmathError do
|
||||||
|
begin
|
||||||
|
Continue;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
for i := 0 to Transforms - 1 do
|
||||||
|
Result.xform[i].color := i / (transforms - 1);
|
||||||
|
if Result.xform[0].density = 1 then
|
||||||
|
Continue;
|
||||||
|
case SymmetryType of
|
||||||
|
{ Bilateral }
|
||||||
|
1: add_symmetry_to_control_point(Result, -1);
|
||||||
|
{ Rotational }
|
||||||
|
2: add_symmetry_to_control_point(Result, SymmetryOrder);
|
||||||
|
{ Rotational and Reflective }
|
||||||
|
3: add_symmetry_to_control_point(Result, -SymmetryOrder);
|
||||||
|
end;
|
||||||
|
{ elimate flames with transforms that aren't affine }
|
||||||
|
skip := false;
|
||||||
|
for i := 0 to Transforms - 1 do begin
|
||||||
|
if not transform_affine(Triangles[i], Triangles) then
|
||||||
|
skip := True;
|
||||||
|
end;
|
||||||
|
if skip then
|
||||||
|
continue;
|
||||||
|
until not Result.BlowsUP(5000) and (Result.xform[0].density <> 0);
|
||||||
|
|
||||||
|
RandomGradient(SourceCP, Result);
|
||||||
|
|
||||||
|
Result.brightness := defBrightness;
|
||||||
|
Result.gamma := defGamma;
|
||||||
|
Result.gamma_threshold := defGammaThreshold;
|
||||||
|
Result.vibrancy := defVibrancy;
|
||||||
|
Result.sample_density := defSampleDensity;
|
||||||
|
Result.spatial_oversample := defOversample;
|
||||||
|
Result.spatial_filter_radius := defFilterRadius;
|
||||||
|
if KeepBackground and assigned(SourceCP) then begin
|
||||||
|
Result.background[0] := SourceCP.background[0];
|
||||||
|
Result.background[1] := SourceCP.background[1];
|
||||||
|
Result.background[2] := SourceCP.background[2];
|
||||||
|
end else begin
|
||||||
|
Result.background[0] := 0;
|
||||||
|
Result.background[1] := 0;
|
||||||
|
Result.background[2] := 0;
|
||||||
|
end;
|
||||||
|
Result.zoom := 0;
|
||||||
|
Result.Nick := SheepNick;
|
||||||
|
Result.URl := SheepURL;
|
||||||
|
|
||||||
|
Result.xform[Result.NumXForms].Clear;
|
||||||
|
Result.xform[Result.NumXForms].symmetry := 1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
1525
Flame/XForm.pas
Normal file
1525
Flame/XForm.pas
Normal file
File diff suppressed because it is too large
Load Diff
1756
Forms/About.dfm
Normal file
1756
Forms/About.dfm
Normal file
File diff suppressed because it is too large
Load Diff
113
Forms/About.pas
Normal file
113
Forms/About.pas
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit About;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
StdCtrls, ExtCtrls, Global, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TAboutForm = class(TForm)
|
||||||
|
btnOK: TButton;
|
||||||
|
Label3: TLabel;
|
||||||
|
Label4: TLabel;
|
||||||
|
Label10: TLabel;
|
||||||
|
Label11: TLabel;
|
||||||
|
lblFlamecom: TLabel;
|
||||||
|
Bevel1: TBevel;
|
||||||
|
Label7: TLabel;
|
||||||
|
Label8: TLabel;
|
||||||
|
Label9: TLabel;
|
||||||
|
Label12: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label14: TLabel;
|
||||||
|
Bevel3: TBevel;
|
||||||
|
Label17: TLabel;
|
||||||
|
Label16: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Bevel2: TBevel;
|
||||||
|
Label19: TLabel;
|
||||||
|
Label5: TLabel;
|
||||||
|
Image1: TImage;
|
||||||
|
procedure btnOKClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure lblCreditClick(Sender: TObject);
|
||||||
|
procedure DevelopersClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
URL :String;
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
AboutForm: TAboutForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Main, ShellAPI;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TAboutForm.btnOKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := mrOK;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAboutForm.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//lblCredit.Caption := MainCp.Nick;
|
||||||
|
//URL := MainCp.URL;
|
||||||
|
//if URL <> '' then lblCredit.Font.color := clBlue else lblCredit.Font.color := clBlack;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAboutForm.lblCreditClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if URL <> '' then
|
||||||
|
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar(URL),
|
||||||
|
nil, nil, SW_SHOWNORMAL);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAboutForm.DevelopersClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar(TLabel(Sender).Hint),
|
||||||
|
nil, nil, SW_SHOWNORMAL);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TAboutForm.FormCreate(Sender: TObject);
|
||||||
|
var s1, s2, s3:string;
|
||||||
|
begin
|
||||||
|
btnOK.Caption := TextByKey('common-close');
|
||||||
|
if (LanguageFile <> AvailableLanguages.Strings[0]) and (LanguageFile <> '') then
|
||||||
|
begin
|
||||||
|
LanguageInfo(LanguageFile, s1, s2);
|
||||||
|
s3 := LanguageAuthor(LanguageFile);
|
||||||
|
Label5.Visible := (s1 <> '') and (s3 <> '');
|
||||||
|
Label5.Caption := s1 + ' translation contributed by: ' + s3;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
1765
Forms/Adjust.dfm
Normal file
1765
Forms/Adjust.dfm
Normal file
File diff suppressed because it is too large
Load Diff
2733
Forms/Adjust.pas
Normal file
2733
Forms/Adjust.pas
Normal file
File diff suppressed because it is too large
Load Diff
872
Forms/Browser.dfm
Normal file
872
Forms/Browser.dfm
Normal file
@ -0,0 +1,872 @@
|
|||||||
|
object GradientBrowser: TGradientBrowser
|
||||||
|
Left = 494
|
||||||
|
Top = 299
|
||||||
|
Width = 544
|
||||||
|
Height = 335
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
|
Caption = 'Gradient Browser'
|
||||||
|
Color = clBtnFace
|
||||||
|
Constraints.MinHeight = 120
|
||||||
|
Constraints.MinWidth = 380
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
Icon.Data = {
|
||||||
|
0000010001001010000001002000680400001600000028000000100000002000
|
||||||
|
0000010020000000000040040000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000045C6F00100000000000000002DA5D654247EACE51F89B8FD1F7D
|
||||||
|
A8FC2385AFFA209DD2A01DA9DF53000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000003AB6E247228CC1F143C2EAFF48C3E7FF4EC9
|
||||||
|
ECFF44C1E2F538A3C7FB1A7CABF9199BD1830000000000000000000000000000
|
||||||
|
000063D2F201000000000000000020B5E9FF34B0DBCE59D2F0FF5CD4F0FF5CD7
|
||||||
|
F2FF5AD6F2FD51CFECFB37AED7F4187BA9FD1A94C98F00000000000000000000
|
||||||
|
000070D8F302000000000000000022B3E7FE1C97C9E751CAE9FF5FD7F2FF0AB3
|
||||||
|
67FF006F00FF008825FF53D1EEFA2E9FCCEE187DACFE0B87BD020000000082DF
|
||||||
|
F4027CDCF40700000000000000006AD4F36C1181B2FD52CAE8FE62DAF3FF23D9
|
||||||
|
71FF00912BFF006000FF62D9F3FF49C3E5EF1280B0FE1B9BCE73000000000000
|
||||||
|
000089E2F42084DFF4421D99C2FD37A4C9FF46C2EBFF65D4F0FB66DAF3FE3EDB
|
||||||
|
8CFF00BA50FF00AB67FF63D9F3FF51CBEBF41E8BB9F81D95C8A7000000000000
|
||||||
|
000076DCF4693BB4DCF78BE2F4B59AE7F7E895E6F6FE95E8F6FE8CE3F5FF85E3
|
||||||
|
F4FF70DEF4FF68DCF4FF6ADBF4FF5CD4EFF4208BB9F72297C9AB000000000000
|
||||||
|
000054CBF3F98EE3F5CFB6F1F8FFB6F1F8FF9EEAF6FE93E9F6FF94E8F6FFB359
|
||||||
|
23FFB30F00FFAB2B00FF73DEF4FB63D7EFEE1D84B4F8279DCE94000000000000
|
||||||
|
000070D4F5FFA4EDF6E6B6F1F8FF2959F3FF00007AFF001FDBFF93E9F6FFB08C
|
||||||
|
64FFB03A00FF610000FF73DEF4F45CC3E3DE2781AEEF64D3F23E000000000000
|
||||||
|
000070D4F5FFACF0F7EBB6F1F8FF5490FFFF0022D9FF000058FFB2F0F8FFB4B6
|
||||||
|
97FFB38D64FFB6AB8CFF78D3ECE8359AC9EC51B6DB8F00000000000000000000
|
||||||
|
00007AD8F5F89EEAF6E6B6F1F8FF6DAFFFFF5590FFFF6DB0FFFFB6F1F8FFA5EC
|
||||||
|
F7FEA7ECF7FE98E7F5F14DB0D9F55DBBDDAB84DFF44000000000000000000000
|
||||||
|
0000A9EFF7786BD4F4FB9DEAF6EEAFF1F7F4B6F1F8FFB6F1F8FFB6F1F8FFA6EE
|
||||||
|
F6F9A0EAF6EF70D2EDE354C6EDF895E7F5580000000000000000000000000000
|
||||||
|
000000000000AAEFF78F5ACFF3F998E8F6E0B6F1F8FFB6F1F8FFB6F1F8FF92E7
|
||||||
|
F6E46CD4F4FA65D2F4E984D4E874000000000000000000000000000000000000
|
||||||
|
00000000000000000000A9EFF7737CD9F6F476D6F5FA72D4F5FD75D6F5FB5ECF
|
||||||
|
F4F190E6F5930000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000000000000000000000000000FFFF
|
||||||
|
0000D80F0000F0070000B0030000B00100003001000080010000800100008001
|
||||||
|
000080010000800300008003000080070000C00F0000E03F0000FFFF0000}
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnResize = FormResize
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
536
|
||||||
|
306)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object btnDefGradient: TSpeedButton
|
||||||
|
Left = 411
|
||||||
|
Top = 7
|
||||||
|
Width = 23
|
||||||
|
Height = 21
|
||||||
|
Hint = 'Open...'
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
|
||||||
|
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
|
||||||
|
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
|
||||||
|
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
|
||||||
|
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
|
||||||
|
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
|
||||||
|
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
|
||||||
|
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
|
||||||
|
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
|
||||||
|
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
|
||||||
|
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
|
||||||
|
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
|
||||||
|
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
|
||||||
|
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
|
||||||
|
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
|
||||||
|
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
|
||||||
|
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnDefGradientClick
|
||||||
|
end
|
||||||
|
object ListView: TListView
|
||||||
|
Left = 7
|
||||||
|
Top = 7
|
||||||
|
Width = 398
|
||||||
|
Height = 234
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
Caption = 'Title'
|
||||||
|
Width = 150
|
||||||
|
end>
|
||||||
|
HideSelection = False
|
||||||
|
LargeImages = LargeImages
|
||||||
|
ReadOnly = True
|
||||||
|
RowSelect = True
|
||||||
|
ParentShowHint = False
|
||||||
|
PopupMenu = PopupMenu
|
||||||
|
ShowHint = True
|
||||||
|
SmallImages = SmallImages
|
||||||
|
SortType = stText
|
||||||
|
TabOrder = 1
|
||||||
|
ViewStyle = vsList
|
||||||
|
OnChange = ListViewChange
|
||||||
|
OnDblClick = SpeedButton1Click
|
||||||
|
OnEdited = ListViewEdited
|
||||||
|
OnInfoTip = ListViewInfoTip
|
||||||
|
OnKeyPress = ListViewKeyPress
|
||||||
|
end
|
||||||
|
object pnlMain: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 536
|
||||||
|
Height = 4
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object pnlPreview: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 268
|
||||||
|
Width = 487
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object Image: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 485
|
||||||
|
Height = 23
|
||||||
|
Align = alClient
|
||||||
|
Stretch = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object SmallImages: TImageList
|
||||||
|
Left = 8
|
||||||
|
Top = 16
|
||||||
|
Bitmap = {
|
||||||
|
494C010101000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||||
|
0000000000003600000028000000400000001000000001002000000000000010
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00808080008080
|
||||||
|
8000808080008080800080808000FFFFFF000000000000808000008080000080
|
||||||
|
8000000000007F7F7F0000000000000000007F7F7F0000000000000000007F7F
|
||||||
|
7F000000000000000000BBCCD500BBCCD5000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000007F7F
|
||||||
|
7F0000000000000000007F7F7F00000000000080800000808000000000000000
|
||||||
|
0000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFF5F000FFF1
|
||||||
|
E900FFEFE600FFEFE600FFF0E700FFF1E800FFF1E900FFF3EB00FFF3EC00FFF4
|
||||||
|
ED00FFF6F0000000000000000000000000000000000000808000008080000080
|
||||||
|
8000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFF4ED00FFEE
|
||||||
|
E400FFEBDF00FFEBDF00FFEBE000FFECE200FFEDE200FFEEE400FFEFE500FFEF
|
||||||
|
E600FFF1EA00000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFF1E900CD52
|
||||||
|
0800CD520800CD520800CD520800CD520800CD520800CD520800CD520800CD52
|
||||||
|
0800FFEDE300000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00000000007F7F
|
||||||
|
7F000000000000000000BBCCD500BBCCD5000000000000000000FFEFE600CD52
|
||||||
|
0800E2651800EB7A3700FFA77200FFD1B200FFF7ED00C2E9FF0042ADF700CD52
|
||||||
|
0800FFE9DC00000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFEDE200CD52
|
||||||
|
0800E1651900E9783500FFA77000FFD1B200FFF7EC00C2E9FF0040ADF700CD52
|
||||||
|
0800FFE5D6000000000000000000000000000000000000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000688DA200688D
|
||||||
|
A200688DA200688DA200688DA200688DA200FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFEBDF00CD52
|
||||||
|
0800E1651800EB783600FFA77000FFD1B200FFF7EC00C2E9FF0042ADF700CD52
|
||||||
|
0800FFE1D000000000000000000000000000FFF1EA0000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF0000000000FFF5F000FFF1E900FFEFE600FFEFE600FFF0E700FFF1
|
||||||
|
E800FFF1E900FFF3EB00FFF3EC00FFF4ED00FFF6F00000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000FFE9DB00CD52
|
||||||
|
0800E1651900EC793500FFA77000FFD0B200FFF7EC00C2E9FF0040AEF700CD52
|
||||||
|
0800FFDFCD00000000000000000000000000FFE9DC0000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF0000000000FFF1E900CD520800CD520800CD520800CD520800CD52
|
||||||
|
0800CD520800CD520800CD520800CD520800FFEDE30000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00688DA200688DA200688D
|
||||||
|
A200688DA200688DA200688DA200688DA2000000000000000000FFE7D800CD52
|
||||||
|
0800E1651900EB793500FFA57000FFD1B200FFF7EC00C2E9FF0040ADF700CD52
|
||||||
|
0800FFE1D000000000000000000000000000FFE1D00000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00688D
|
||||||
|
A200FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF0000000000FFEDE200CD520800E1651900E9783500FFA77000FFD1
|
||||||
|
B200FFF7EC00C2E9FF0040ADF700CD520800FFE5D60000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00BBCCD500000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000FFE4D500CD52
|
||||||
|
0800E3651A00EB7A3900FFA87400FFD1B300FFF7EC00C4E9FF0044AEF700CD52
|
||||||
|
0800FFE9DC00000000000000000000000000FFE1D00000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF0000000000FFE9DB00CD520800E1651900EC793500FFA77000FFD0
|
||||||
|
B200FFF7EC00C2E9FF0040AEF700CD520800FFDFCD0000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000FFE3D100CD52
|
||||||
|
0800ED793500F9945700FFBC8D00FFE1C500FFFFF90000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00688D
|
||||||
|
A200FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF0000000000FFE4D500CD520800E3651A00EB7A3900FFA87400FFD1
|
||||||
|
B300FFF7EC00C4E9FF0044AEF700CD520800FFE9DC0000000000FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000FFE1CF00CD52
|
||||||
|
0800CD520800CD520800CD520800CD520800CD52080000000000E17D4100EB92
|
||||||
|
5E0000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF0000000000FFE1CF00CD520800CD520800CD520800CD520800CD52
|
||||||
|
0800CD52080000000000E17D4100EB925E0000000000FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00BBCCD500BBCCD5000000000000000000FFE2D100FFD7
|
||||||
|
BF00FFD0B400FFCEB100FFCFB300FFD0B400FFD3B80000000000F5A779000000
|
||||||
|
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF0000000000FFE7DA00FFE2D000FFDECB00FFDECA00FFDDC900FFDE
|
||||||
|
CA00FFDFCD000000000000000000FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000FFE7DA00FFE2
|
||||||
|
D000FFDECB00FFDECA00FFDDC900FFDECA00FFDFCD0000000000000000000000
|
||||||
|
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00BBCCD500BBCCD500424D3E000000000000003E000000
|
||||||
|
2800000040000000100000000100010000000000800000000000000000000000
|
||||||
|
000000000000000000000000FFFFFF00FFFFCD00000000008003C900FFDECA00
|
||||||
|
8003CB00FFDECA008003DA00FFE2D0008003EA00000000008003EA00DDE6EA00
|
||||||
|
8003EA00DDE6EA008003EA00DDE6EA0080030000000000008003000000000000
|
||||||
|
800300000000000080030000000000008007EA0000000000800F000000000000
|
||||||
|
801F000020000000803F8F1F0000000000000000000000000000000000000000
|
||||||
|
000000000000}
|
||||||
|
end
|
||||||
|
object PopupMenu: TPopupMenu
|
||||||
|
Left = 40
|
||||||
|
Top = 16
|
||||||
|
object DeleteItem: TMenuItem
|
||||||
|
Caption = 'Delete'
|
||||||
|
ShortCut = 16430
|
||||||
|
OnClick = DeleteItemClick
|
||||||
|
end
|
||||||
|
object RenameItem: TMenuItem
|
||||||
|
Caption = 'Rename'
|
||||||
|
ShortCut = 113
|
||||||
|
OnClick = RenameItemClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object OpenDialog: TOpenDialog
|
||||||
|
DefaultExt = 'ugr'
|
||||||
|
Filter = 'Gradient files (*.ugr)|*.ugr|Fractint map files (*.map)|*.map'
|
||||||
|
Left = 72
|
||||||
|
Top = 16
|
||||||
|
end
|
||||||
|
object LargeImages: TImageList
|
||||||
|
Height = 32
|
||||||
|
Width = 32
|
||||||
|
Left = 104
|
||||||
|
Top = 16
|
||||||
|
Bitmap = {
|
||||||
|
494C010101000400040020002000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
|
||||||
|
0000000000003600000028000000800000002000000001002000000000000040
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000DDE6EA00DDE6EA0000000000FDEB
|
||||||
|
E000FDE2D300FCCFB300B3644B00C06D5300BB695000BC6A4F00BC6A5100BC6A
|
||||||
|
5100A35B4500B9886F00FCC8A800FCC9AA00FCCAAC00FCD0B600FDD6BC00FDD9
|
||||||
|
C100FEDFCC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEB
|
||||||
|
E000FDE2D300FCCFB300FBC8AA00FAC6A500FAC5A400FBC5A400FBC5A400FBC6
|
||||||
|
A500FBC7A600FBC7A600FCC8A800FCC9AA00FCCAAC00FCD0B600FDD6BC00FDD9
|
||||||
|
C100FEDFCC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F4DA
|
||||||
|
CA00F2D2BD00ECBC9F00EAB59400E9B29000E8AF8D00E9AF8D00E9B08C00E9AF
|
||||||
|
8D00E8AF8D00E9B08D00E8B08D00E8B18E00EAB28F00EAB79900EDBDA000EDC1
|
||||||
|
A600F0C8B00000000000DDE6EA00DDE6EA0023232300BAEBFF00B3EAFF00B0E8
|
||||||
|
FF00ACE7FF00A8E6FF00A5E6FF00A4E4FF009FE1FF009DE1FF009BE2FF0097E0
|
||||||
|
FF0095DFFF0092DDFF008FDDFF008DDDFF008BDBFF0087D9FF0084D8FF0083D8
|
||||||
|
FF007ED6FF007ED3FF0078D1FF00262626000000000000000000000000000000
|
||||||
|
0000FFFEFB00FFFEFA00FFFEF800FFFEF700FFFDF700FFFDF600FFFEF600FFFE
|
||||||
|
F700FFFFF700FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFA00FFFFFB00FFFF
|
||||||
|
FC00FFFFFC00FFFFFC00FFFFFD00FFFFFE000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000E7A88300EBB69600EDC1A700F0C9
|
||||||
|
B300F3D4C10000000000DDE6EA00DDE6EA002323230023232300232323002323
|
||||||
|
2300232323002323230023232300232323002323230023232300232323002323
|
||||||
|
2300232323002323230023232300232323002323230023232300232323002323
|
||||||
|
2300232323002323230023232300DDE6EA00DDE6EA00DDE6EA0000000000FDEA
|
||||||
|
DF00FCE1D000FBCCB000ED886800F38C6B00E8856500E9856600E9856600EB86
|
||||||
|
6600D97C5F00DCA18300FBC5A400FBC7A700FBC9AA00FCD3B800FDDAC400FDDF
|
||||||
|
CD00FEE7D80000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEA
|
||||||
|
DF00FCE1D000FBCCB000FAC6A700F9C3A200FAC19F00FAC2A000FBC3A100FBC3
|
||||||
|
A300FAC4A300FBC4A300FBC5A400FBC7A700FBC9AA00FCD3B800FDDAC400FDDF
|
||||||
|
CD00FEE7D80000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F4D7
|
||||||
|
C600F1CDB800EBB69600E8AE8C00E7AB8600E7A98200E6A88300E7A98300E7A8
|
||||||
|
8300E6A98200E7A88300E7A98300E7AA86000000000000000000000000000000
|
||||||
|
0000FFFDFA00FFFCF800FFFBF500FFFBF400FFFBF300FFFAF200FFFBF300FFFB
|
||||||
|
F300FFFCF400FFFCF400FFFDF500FFFEF500FFFDF500FFFEF600FFFEF600FFFF
|
||||||
|
F700FFFFF800FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFB00FFFFFC00FFFF
|
||||||
|
FC0000000000000000000000000000000000F9BE9D00F8BF9E00F9C09E00F9C0
|
||||||
|
9F00F9C19F00F9C1A000F9C2A200F9C5A500F9C8AB00F9833C00FF985A00FFAC
|
||||||
|
770000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F1CF
|
||||||
|
BB00EEC5AB00E8AA8500E6A37B00E49F7400E39B7000E39C7100E49B7000E39C
|
||||||
|
7100E39C7100E39B7000E39C7200E49F7500E5A37A00F9833C00FF985A00FFAC
|
||||||
|
770000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00BAEEFC00B7ED
|
||||||
|
FD00B6ECFC00B2E9FB00B0E8FC00ADE8FB00AAE7FC00A7E6FC00A6E5FC003740
|
||||||
|
4500DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDE9
|
||||||
|
DE00FCE0CF00FACAAD00FAC3A400F9C09E00F9BF9C00F9C09D00F9C09D00FAC1
|
||||||
|
A000FAC1A000F9C1A100FAC3A200FAC5A500FBC7A900FCD4BC00FDDDCA00FDE4
|
||||||
|
D500FEECE20000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDE9
|
||||||
|
DE00FCE0CF00FACAAD00FAC3A400F9C09E000000000000000000000000000000
|
||||||
|
0000FFFCF800FFFBF600FFFAF200FFF9F000FFF8EF00FFF7EE00FFF9EE00FFF9
|
||||||
|
EF00FFF9EF00FFF9F000FFFAF000FFFAF200FFFBF200FFFCF300FFFCF300FFFC
|
||||||
|
F400FFFCF400FFFDF500FFFEF500FFFFF600FFFFF700FFFFF700FFFFF700FFFF
|
||||||
|
FA0000000000000000000000000000000000DDE6EA00DDE6EA0000000000FCEA
|
||||||
|
DF00FBE2D200F9CEB400F8C8AB00F9C6A700F9C5A500F9C5A500F9C6A500F8C6
|
||||||
|
A700F9C6A800F9C6A700F9C8A900FAC9AC00FACDB100FF9F6400FFB38100FFC8
|
||||||
|
9F00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FCEA
|
||||||
|
DF00FBE2D200F9CEB400F8C8AB00F9C6A700F9C5A500F9C5A500F9C6A500F8C6
|
||||||
|
A700F9C6A800F9C6A700F9C8A900FAC9AC00FACDB100FF9F6400FFB38100FFC8
|
||||||
|
9F00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F1CE
|
||||||
|
B900EEC4AB00E7AC8800E5A57F00E4A17900E49F7600E49F7600E49F7500E59F
|
||||||
|
7600E49F7700E49F7600E49F7700E5A17900E5A57E00FF9F6400FFB38100FFC8
|
||||||
|
9F00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0023232300C1F1
|
||||||
|
FD00BFEFFD00BAEEFC00B9EDFC00B6ECFC00B2EAFB00AFE9FB00ADE8FB00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000FFFBF700FFFAF300FFF8EF00FFF6EC00FFF6EB00FFF5EB00FFF5EA00FFF6
|
||||||
|
EB00FFF6EB00FFF7EB00FFF7ED00FFF8ED00FFF8EE00FFF9EE00FFF9F000FFFA
|
||||||
|
F000FFFAF000FFFAF200FFFBF200FFFBF200FFFCF300FFFCF300FFFDF400FFFD
|
||||||
|
F60000000000000000000000000000000000EEC3A90000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEB
|
||||||
|
E200FCE5D700FAD5BF00F9D1B800F9CEB400F9CDB300F9CDB300F9CEB300F9CF
|
||||||
|
B500F9CFB500FACFB500F9D0B600FAD1B800FAD4BC00FFBA8B00FFCFA9000000
|
||||||
|
0000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDEB
|
||||||
|
E200FCE5D700FAD5BF00F9D1B800F9CEB400F9CDB300F9CDB300F9CEB300F9CF
|
||||||
|
B500F9CFB500FACFB500F9D0B600FAD1B800FAD4BC00FFBA8B00FFCFA9000000
|
||||||
|
0000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000F1CE
|
||||||
|
B900EEC6AE00E9B29200E7AD8800E6A98400E6A78100E7A88100E6A78100E7A7
|
||||||
|
8200E7A78200E6A78200E6A78200E6A984000000000000000000000000000000
|
||||||
|
0000FFFAF600FFF8F200FFF6ED00FFF4E900FFF4E600FFF3E600FFF3E600FFF4
|
||||||
|
E700FFF4E700FFF5E800FFF5E800FFF5E900FFF5E900FFF5EB00FFF6EB00FFF7
|
||||||
|
EB00FFF7EC00FFF8ED00FFF8EE00FFF8EE00FFF9EF00FFF9F000FFFAF000FFFA
|
||||||
|
F200000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDF1
|
||||||
|
E900FDEEE500FCE8DC00FCE6D900FCE5D800FCE5D700FCE5D700FCE5D700FCE6
|
||||||
|
D800FCE6D800FCE6D900FCE6D900FCE7DA00FCE8DC0000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FDF1
|
||||||
|
E900FDEEE500FCE8DC00FCE6D900FCE5D8000000000000000000000000000000
|
||||||
|
0000FFFAF400FFF7F000FFF4EA00FFF2E600FFF1E300FFF0E200FFF0E200FFF1
|
||||||
|
E200FFF2E300FFF2E400FFF2E500FFF3E500FFF3E500FFF4E600FFF5E700FFF4
|
||||||
|
E700FFF5E800FFF5E900FFF5E900FFF5EA00FFF5EA00FFF6EB00FFF7ED00FFF8
|
||||||
|
EF0000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
00000000000000000000DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000FFF9F300FFF6EE00FFF2E800FFF0E300FFEEE000FFEEDF00FFEEDE00FFEE
|
||||||
|
DF00FFEEE000FFEFE000FFEFE000FFEFE100FFF0E100FFF1E200FFF1E200FFF2
|
||||||
|
E400FFF2E400FFF2E400FFF3E600FFF3E600FFF4E600FFF5E700FFF5E900FFF6
|
||||||
|
EB0000000000000000000000000000000000FFFFF000FFFFF200FFFFF200FFFF
|
||||||
|
F400FFFFF500FFFFF500FFFFF60000000000DDE6EA00DDE6EA0000000000FFFC
|
||||||
|
F800FFFBF600FFF9F000FFF8EF00FFF7EE00FFF9EF00FFF9EF00FFF9F000FFFA
|
||||||
|
F200FFFBF200FFFCF300FFFCF400FFFCF400FFFDF500FFFFF600FFFFF700FFFF
|
||||||
|
F700FFFFFA0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FFFD
|
||||||
|
FA00FFFCF800FFFBF400FFFBF300FFFAF200FFFBF300FFFCF400FFFCF400FFFE
|
||||||
|
F500FFFDF500FFFEF600FFFFF700FFFFF800FFFFF800FFFFF900FFFFFA00FFFF
|
||||||
|
FB00FFFFFC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA0000000000FFFD
|
||||||
|
FA00FFFCF800FFFBF400FFFBF300FFFAF200FFFBF300FFFCF400FFFCF400FFFE
|
||||||
|
F500FFFDF500FFFEF600FFFFF700FFFFF800FFFFF800FFFFF900FFFFFA00FFFF
|
||||||
|
FB00FFFFFC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFF800FFFEF600FFFFF400FFFF
|
||||||
|
F200FFFFF300FFFFF300FFFFF400FFFFF4000000000000000000000000000000
|
||||||
|
0000FFF8F200FFF5EC00FFF0E500FFEDDF00CD520800CD520800CD520800CD52
|
||||||
|
0800CD520800CD520800CD520800CD520800CD520800CD520800CD520800CD52
|
||||||
|
0800CD520800CD520800CD520800CD520800FFF1E300FFF2E300FFF2E400FFF3
|
||||||
|
E60000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000FFF7F100FFF3EA00FFEEE300FFECDD00CD520800DA804A00DC7E4400E285
|
||||||
|
4C00EB956200F5AA7D00FEBE9700FFCCB000FFDCC800FFEFE300F7F8F800CEEA
|
||||||
|
FD0092CEF70060B8F3003CA3F000CD520800FFEEDF00FFEEDF00FFF0E100FFF0
|
||||||
|
E30000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000FFFEFB00FFFEFA00FFFEF800FFFEF700FFFDF700FFFDF600FFFEF600FFFE
|
||||||
|
F700FFFFF700FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFA00FFFFFB00FFFF
|
||||||
|
FC00FFFFFC00FFFFFC00FFFFFD00FFFFFE00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000BADDF900ABD5F80097CBF60089C4F5007EBFF40077BCF30076BBF30075BA
|
||||||
|
F30074BAF30075BAF20075BAF30075BAF30074BAF40075BBF40075BAF40074BB
|
||||||
|
F40074BAF40075BBF40075BAF40074BBF40074BBF40076BBF40078BCF4007EBF
|
||||||
|
F50000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000FFF6EF00FFF1E900FFECDF00FFE9D900CD520800DD855200DB7C4000E282
|
||||||
|
4800EA925E00F4A77900FDBC9400FFCCAE00FFDCC700FFEFE400F7F8F900CDEA
|
||||||
|
FD008FCDF7005CB5F30038A1F000CD520800FFEBDB00FFECDC00FFEDDD00FFEF
|
||||||
|
E00000000000000000000000000000000000BBCCD500BBCCD500DDE6EA000000
|
||||||
|
0000FFFDFA00FFFCF800FFFBF500FFFBF400FFFBF300FFFAF200FFFBF300FFFB
|
||||||
|
F300FFFCF400FFFCF400FFFDF500FFFEF500FFFDF500FFFEF600FFFEF600FFFF
|
||||||
|
F700FFFFF800FFFFF800FFFFF900FFFFF900FFFFFA00FFFFFB00FFFFFC00FFFF
|
||||||
|
FC0000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000C1DFF900B2D8F9009FCFF70091C8F60087C3F40080C0F4007FBFF4007EBF
|
||||||
|
F3007DBFF4007DBFF3007EBFF3007DBFF3007EBFF3007EBFF3007DBFF4007EBF
|
||||||
|
F4007EBFF4007DBFF4007DBEF3007EBFF4007DBEF3007EBFF40080C0F50086C2
|
||||||
|
F60000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00214F4A00214F4A00214F
|
||||||
|
4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F
|
||||||
|
4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F
|
||||||
|
4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F4A00214F
|
||||||
|
4A00214F4A00214F4A00214F4A00DDE6EA000000000000000000000000000000
|
||||||
|
0000FFF5EE00FFF1E700FFEADD00FFE7D600CD520800DC855000DB7B4100E180
|
||||||
|
4700EA905C00F4A67800FDBC9400FFCBAE00FFDBC700FFEFE300F7F8F800CDEA
|
||||||
|
FD008FCDF7005BB5F40037A1EF00CD520800FFE9D700FFE9D700FFEAD900FFEC
|
||||||
|
DC0000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000FFFCF800FFFBF60000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF7F100FFF3EA00FFF3EA00FFEEE300FFEEE300FFECDD00FFECDD00CD52
|
||||||
|
0800CD520800FBE6DA00FBE6DA00FBDED100FBDED100FBD0B900FBD0B900FBD3
|
||||||
|
C000FBC4A300FBC4A300FBB99100FBB99100FBFAFB00FBFAFB00FBF6F600FBF6
|
||||||
|
F600FBE6DA00FBE6DA00FB996400FB996400FBA87B00FBA87B00FB823F00FBDC
|
||||||
|
CB00FBDCCB00F7C2A500F7C2A500CD520800CD520800FFEEDF00FFEEDF00FFEE
|
||||||
|
DF00FFEEDF00FFF0E100FFF0E100FFF0E300FFF0E30000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500DDE6
|
||||||
|
EA00BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000000000000000
|
||||||
|
0000FFF4ED00FFEFE500FFE9DB00FFE5D300CD520800DC855000DB7C4100E181
|
||||||
|
4800EA905C00F4A67800FDBC9400FFCCAE00FFDCC700FFEFE300F7F8F800CDEA
|
||||||
|
FD008FCDF7005BB5F30037A1EF00CD520800FFE5D300FFE6D400FFE7D500FFE9
|
||||||
|
D80000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF6EF00FFF1E900FFF1E900FFECDF00FFECDF00FFE9D900FFE9D900CD52
|
||||||
|
0800CD520800FEE6DB00FEE6DB00FEDBC800FEDBC800FED9C200FED9C200FED1
|
||||||
|
B700FEAF8100FEAF8100FEF9F800FEF9F800FEF3EE00FEF3EE00FEFEFE00FEFE
|
||||||
|
FE00FEAB7B00FEAB7B00FEAB7A00FEAB7A00FE975F00FE975F00FE9C6200FEF3
|
||||||
|
F100FEF3F100FBB08600FBB08600CD520800CD520800FFEBDB00FFEBDB00FFEC
|
||||||
|
DC00FFECDC00FFEDDD00FFEDDD00FFEFE000FFEFE00000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
|
||||||
|
EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
|
||||||
|
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
|
||||||
|
A200688DA200688DA200BBCCD500DDE6EA000000000000000000000000000000
|
||||||
|
0000FFF3EC00FFEEE300FFE7D800FFE3D000CD520800DC855000DB7C4000E281
|
||||||
|
4800EA905C00F4A67800FEBC9400FFCCAE00FFDCC700FFEFE300F7F8F800CDEA
|
||||||
|
FD008FCDF7005CB5F30037A1EF00CD520800FFE3CF00FFE3CF00FFE5D100FFE6
|
||||||
|
D50000000000000000000000000000000000FEDBC800FED9C200FED9C200FED1
|
||||||
|
B700FEAF8100FEAF8100FEF9F800FEF9F800FEF3EE00FEF3EE00FEFEFE00FEFE
|
||||||
|
FE00FEAB7B00FEAB7B00FEAB7A00FEAB7A00FE975F00FE975F00FE9C6200FEF3
|
||||||
|
F100FEF3F100FBB08600FBB08600CD520800CD520800FFEBDB00FFEBDB00FFEC
|
||||||
|
DC00FFECDC00FFEDDD00FFEDDD00FFEFE000FFEFE00000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
|
||||||
|
EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
|
||||||
|
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
|
||||||
|
D500BBCCD500BBCCD500688DA200BBCCD500688DA200DDE6EA00BBCCD500BBCC
|
||||||
|
D500688DA200DDE6EA00688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCC
|
||||||
|
D500688DA200DDE6EA00688DA200DDE6EA000000000000000000000000000000
|
||||||
|
0000FFF2EA00FFEDE200FFE5D500FFE0CD00CD520800DC865100DB7C4000E281
|
||||||
|
4700EA905C00F4A67800FEBC9400FFCBAE00FFDCC700FFEFE300F7F8F800CDEA
|
||||||
|
FD008FCDF7005CB5F30036A1EF00CD520800FFE0CC00FFE0CC00FFE1CE00FFE3
|
||||||
|
D10000000000000000000000000000000000FE823900FE823900FEDAC200FED8
|
||||||
|
C300FED8C300FBA27300FBA27300CD520800CD520800FFE9D700FFE9D700FFE9
|
||||||
|
D700FFE9D700FFEAD900FFEAD900FFECDC00FFECDC0000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
|
||||||
|
EA00BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
|
||||||
|
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCCD500BBCC
|
||||||
|
D500688DA200DDE6EA00688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCC
|
||||||
|
D500688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD50053C7
|
||||||
|
FF0051C6FF004FC5FF004CC4FF0049C4FF0047C2FF0044C1FF0042C0FF003FC0
|
||||||
|
FF003DBDFF003AB9FF0038B6FF00214F4A000000000000000000000000000000
|
||||||
|
0000FFF1E900FFEBDF00FFE3D200FFDEC900CD520800DC865100DB7B4100E281
|
||||||
|
4800EB915C00F5A67800FEBB9400FFCCAE00FFDCC700FFEFE400F7F8F900CDEA
|
||||||
|
FD008FCDF7005CB5F40036A1EF00CD520800FFDDC700FFDEC800FFDFCB00FFE2
|
||||||
|
CE0000000000000000000000000000000000FFE9D80000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00BBCCD500688DA200DDE6EA00688DA200DDE6
|
||||||
|
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCCD500BBCC
|
||||||
|
D500688DA200DDE6EA00688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCC
|
||||||
|
D500688DA200DDE6EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD5008BDB
|
||||||
|
FF0082D9FF007BD7FF0077D5FF0073D4FF0071D2FF006ED1FF006AD0FF0068CF
|
||||||
|
FF0065CFFF0063CDFF0061CDFF005FCCFF005DCAFF005AC9FF0058C9FF0055C8
|
||||||
|
FF0053C7FF0050C5FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000FFF1E800FFEADE00FFE2D000FFDBC600CD520800DC855100DB7C4100E281
|
||||||
|
4800EB915C00F5A77800FDBC9400FFCBAE00FFDBC700FFEFE300F6F8F800CCEA
|
||||||
|
FD008FCDF7005BB6F30037A1EF00CD520800FFDBC300FFDBC400FFDDC700FFDF
|
||||||
|
CA0000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
|
||||||
|
A200688DA200688DA200BBCCD500BBCCD500688DA200DDE6EA00688DA200DDE6
|
||||||
|
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500688DA200BBCCD500DDE6EA00DDE6
|
||||||
|
EA00688DA200BBCCD500688DA200DDE6EA00688DA200BBCCD500DDE6EA00DDE6
|
||||||
|
EA00688DA200BBCCD500688DA200DDE6EA00DDE6EA00BBCCD500DDE6EA00D9EB
|
||||||
|
FA00D9EAF900D9EAFA00D9EAFA00D9EAFA00D9EBFA00D9EBFA00DAEBF900DBEC
|
||||||
|
FA0000000000DDE6EA00DDE6EA00DDE6EA00232323009FE2FF0098E0FF008DDD
|
||||||
|
FF0084D9FF007ED6FF0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF4ED00FFEFE500FFEFE500FFE9DB00FFE9DB00FFE5D300FFE5D300CD52
|
||||||
|
0800CD520800FEE1CE00FEE1CE00FEE4D8000000000000000000000000000000
|
||||||
|
0000FFF0E700FFE9DC00FFE0CD00FED9C300CD520800DC855000DB7C4100E181
|
||||||
|
4700EA915C00F5A77800FEBB9400FFCCAE00FFDCC800FFEFE300F6F8F800CCEA
|
||||||
|
FD008FCDF7005BB5F30036A1EF00CD520800FFD7BF00FFD8C000FFDAC200FFDC
|
||||||
|
C70000000000000000000000000000000000688DA200BBCCD500688DA200DDE6
|
||||||
|
EA00688DA200DDE6EA00BBCCD500BBCCD500BBCCD500688DA200DDE6EA00BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688DA200688D
|
||||||
|
A200BBCCD500BBCCD500688DA200DDE6EA00BBCCD500688DA200688DA200688D
|
||||||
|
A200BBCCD500BBCCD500688DA200688DA200BBCCD500688DA200BBCCD5000000
|
||||||
|
0000F4F9FE00F1F8FD00EFF5FC00EBF5FC00EAF3FA00EAF2FA00E9F2FA007478
|
||||||
|
7D003A3C3F003A3D3F003A3D3F003A3D3F003A3D3F003A3D3F003A3D3F003A3D
|
||||||
|
3F003A3D3F00E9F3FB0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF4ED00FFEFE500FFEFE500FFE9DB00FFE9DB00FFE5D300FFE5D300CD52
|
||||||
|
0800CD520800FEE1CE00FEE1CE00FEE4D800FEE4D800FEB89000FEB89000FECA
|
||||||
|
A900FEFEFE00FEFEFE00FEEBE100FEEBE100FEFDFE00FEFDFE00FEB78C00FEB7
|
||||||
|
8C00FEA16D00FEA16D00FE975C00FE975C000000000000000000000000000000
|
||||||
|
0000FFEFE500FFE8DA00FEDDCB00FDD7C000CD520800DD855100DB7B4000E181
|
||||||
|
4700EB915C00F5A67700FEBB9400FFCCAE00FFDBC700FFEFE400F6F8F900CCEA
|
||||||
|
FD008FCDF7005BB5F30036A1F000CD520800FFD5BB00FFD5BD00FFD8BF00FFDA
|
||||||
|
C20000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500688DA200DDE6EA00BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500100F
|
||||||
|
0E0000000000CFBEB000FFEAD900FFEBDB00FFEBDB00FFECDC00FFEDDD00FFEF
|
||||||
|
E00000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000FCFDFE00FBFCFE0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF3EC00FFEEE300FFEEE300FFE7D800FFE7D800FFE3D000FFE3D000CD52
|
||||||
|
0800CD520800FEE4D300FEE4D300FEE1D100FEE1D100FEA67500FEA67500FEF6
|
||||||
|
F100FEEFE900FEEFE900FEEBE200FEEBE200FEFBFA00FEFBFA00FE945900FE94
|
||||||
|
5900FEA97C00FEA97C00FE925000FE925000FEFEFE00FEFEFE00FEB98D00FEC3
|
||||||
|
A100FEC3A100FBBC9200FBBC9200CD520800CD520800FFE3CF00FFE3CF00FFE3
|
||||||
|
CF00FFE3CF00FFE5D100FFE5D100FFE6D5000000000000000000000000000000
|
||||||
|
0000FEEEE400FEE6D800FEDDC800FDD5BC00CD520800DD865200DB7C4200E183
|
||||||
|
4900EA925F00F4A77A00FDBD9500FFCCAE00FFDCC800FFEFE400F6F8F800CDEA
|
||||||
|
FD0090CDF7005DB6F30038A1F000CD520800FFD3B800FFD3BA00FFD6BC00FFD8
|
||||||
|
C00000000000000000000000000000000000BBCCD500BBCCD500BBCCD5000000
|
||||||
|
0000FFF5EE00FFF1E700FFEADD00FFE7D600FFE4D100FFE2CF00FFE2CE00FFE2
|
||||||
|
CF00CFB8A80040393400EFD6C300FFE5D100FFE5D200FFE5D200FFE5D300EFD8
|
||||||
|
C700403A3500BFADA00000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF3EC00FFEEE300FFEEE300FFE7D800FFE7D800FFE3D000FFE3D000CD52
|
||||||
|
0800CD520800FEE4D300FEE4D300FEE1D100FEE1D100FEA67500FEA67500FEF6
|
||||||
|
F100FEEFE900FEEFE900FEEBE200FEEBE200FEFBFA00FEFBFA00FE945900FE94
|
||||||
|
5900FEA97C00FEA97C00FE925000FE925000FEFEFE00FEFEFE00FEB98D00FEC3
|
||||||
|
A100FEC3A100FBBC9200FBBC9200CD520800CD520800FFE3CF00FFE3CF00FFE3
|
||||||
|
CF00FFE3CF00FFE5D100FFE5D100FFE6D500FFE6D50000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD5000000000000000000000000000000
|
||||||
|
0000FEEDE200FEE5D600FDDBC500FDD3BA00CD520800DD885600DD804800E388
|
||||||
|
5000EB976600F5AB8100FDBF9B00FFCEB200FFDECB00FFF0E400F6F8F800CFEB
|
||||||
|
FD0096D0F70064B9F30041A6F000CD520800FED2B700FED3BB00FED5BD00FED8
|
||||||
|
C1000000000000000000000000000000000000000000FFFFFF00000000000000
|
||||||
|
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF2EA00FFEDE200FFEDE200FFE5D500FFE5D500FFE0CD00FFE0CD00CD52
|
||||||
|
0800CD520800FEEADD00FEEADD00FEC7A700FEC7A700FEC09B00FEC09B00FEFB
|
||||||
|
FB00FEEAE000FEEAE000FEEFE700FEEFE700FEF0EB00FEF0EB00FE844100FE84
|
||||||
|
4100FEA97800FEA97800FEC8AA00FEC8AA00FEFAFA00FEFAFA00FEAF7F00FEBD
|
||||||
|
9A00FEBD9A00FBB07B00FBB07B00CD520800CD520800FFE0CC00FFE0CC00FFE0
|
||||||
|
CC00FFE0CC00FFE1CE00FFE1CE00FFE3D100FFE3D10000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000FEECE100FDE3D500FCD9C300FCD1B500CD520800DE8A5700DF885400E593
|
||||||
|
6000EEA17400F8B38D00FEC6A500FFD3BA00FFE1D000FFF2E700F7F8F900D4ED
|
||||||
|
FE00A0D5F80073C0F50054B0F100CD520800FED2B800FDD4BC00FDD7C000FEDA
|
||||||
|
C50000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF2EA00FFEDE200FFEDE200FFE5D500FFE5D500FFE0CD00FFE0CD00CD52
|
||||||
|
0800CD520800FEEADD00FEEADD00FEC7A700FEC7A700FEC09B00FEC09B00FEFB
|
||||||
|
FB00FEEAE000FEEAE000FEEFE700FEEFE700FEF0EB00FEF0EB00FE844100FE84
|
||||||
|
4100FEA97800FEA97800FEC8AA00FEC8AA00FEFAFA00FEFAFA00FEAF7F00FEBD
|
||||||
|
9A00FEBD9A00FBB07B00FBB07B00CD520800CD520800FFE0CC00FFE0CC00FFE0
|
||||||
|
CC00FFE0CC00FFE1CE00FFE1CE00FFE3D100FFE3D10000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
|
||||||
|
A200688DA200688DA200688DA200BBCCD500688DA200BBCCD500688DA200BBCC
|
||||||
|
D500688DA200BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200688D
|
||||||
|
A200688DA200688DA200BBCCD500BBCCD5000000000000000000000000000000
|
||||||
|
0000FDEBE000FDE2D300FCD7C100FCCFB300CD520800E2966A00E3976800EA9F
|
||||||
|
7000F1B28D00F8C1A100FED0B400FFD9C500FFE5D700FFF4EC00F8F6F600DBEC
|
||||||
|
F600B2DAF5008DC6EE0073BCEF00CD520800FDD6BC00FDD9C100FDDCC700FEDF
|
||||||
|
CC0000000000000000000000000000000000FEB08600FEDFCB00FEDFCB00FEF7
|
||||||
|
F300FEE7DA00FEE7DA00FEF0EA00FEF0EA00FEEBE100FEEBE100FE813A00FE81
|
||||||
|
3A00FEAD7800FEAD7800FEE4D900FEE4D900FEE3DB00FEE3DB00FED1B000EFC5
|
||||||
|
B400EFC5B400E99B7300E99B7300CD520800CD520800FFDDC700FFDDC700FFDE
|
||||||
|
C800FFDEC800FFDFCB00FFDFCB00FFE2CE00FFE2CE0000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000000000000000
|
||||||
|
0000FDEADF00FCE1D000FBD5BE00FBCCB000CD520800CD520800CD520800CD52
|
||||||
|
0800CD520800CD520800CD520800CD520800CD520800CD520800CD520800CD52
|
||||||
|
0800CD520800CD520800CD520800CD520800FDDAC400FDDFCD00FDE3D300FEE7
|
||||||
|
D80000000000000000000000000000000000FEE3DB00FEE3DB00FED1B000EFC5
|
||||||
|
B400EFC5B400E99B7300E99B7300CD520800CD520800FFDDC700FFDDC700FFDE
|
||||||
|
C800FFDEC800FFDFCB00FFDFCB00FFE2CE00FFE2CE0000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD5000000
|
||||||
|
0000000000000000000000000000000000005BCAFF0058C9FF0056C7FF0053C7
|
||||||
|
FF0051C4FF004DBFFF0049BBFF00214F4A000000000000000000000000000000
|
||||||
|
0000FDE9DE00FCE0CF00FAD4BB00FACAAD00FAC3A400F9C09E00F9BF9C00F9BF
|
||||||
|
9C00F9C09D00F9C09D00FAC09F00FAC1A000FAC1A000F9C1A100F9C2A100FAC3
|
||||||
|
A200FAC5A500FBC7A900FCCCB100FCD4BC00FDDDCA00FDE4D500FDE9DC00FEEC
|
||||||
|
E20000000000000000000000000000000000FFDFCA0000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD5000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000000000000000000000000000
|
||||||
|
0000FCE9DD00FBDFCD00FAD2BB00F9C9AB00F9C2A200F8BF9D00F8BE9A00F8BD
|
||||||
|
9A00F8BE9B00F8BE9C00F9BF9D00F8C09D00F9C09E00F9C09F00F9C09F00F9C2
|
||||||
|
A100FAC4A400FBC7A80000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500FFF7
|
||||||
|
EB00FFF7EC00FFF8ED00FFF8EE00FFF8EE00FFF9EF00FFF9F000FFFAF000FFFA
|
||||||
|
F20000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000FFFBF700FFFAF30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF1E800FFEADE00FFEADE00FFE2D000FFE2D000FFDBC600FFDBC600CD52
|
||||||
|
0800CD520800FEE9DD00FEE9DD00FEA56E000000000000000000000000000000
|
||||||
|
0000FDE9DD00FCE0CF00FAD4BC00F8CAAD00F8C4A400F8C09F00F8BF9D00F9BE
|
||||||
|
9D00F8BF9E00F9C09E00F9C09F00F9C09F00F9C19F00F9C1A000F9C1A000F9C2
|
||||||
|
A200F9C5A500F9C8AB0000000000F9833C00FF985A00FFAC7700FFC195000000
|
||||||
|
000000000000000000000000000000000000BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD5000000
|
||||||
|
0000FFF7F100FFF3EA00FFEEE300FFECDD00CD520800FBE6DA00FBDED100FBD0
|
||||||
|
B900FBD3C000FBC4A300FBB99100FBFAFB00FBF6F600FBE6DA00FB996400FBA8
|
||||||
|
7B00FB823F00FBDCCB0000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF1E800FFEADE00FFEADE00FFE2D000FFE2D000FFDBC600FFDBC600CD52
|
||||||
|
0800CD520800FEE9DD00FEE9DD00FEA56E00FEA56E00FEE5D900FEE5D900FEF6
|
||||||
|
F500FEE4D400FEE4D400FEEBE400FEEBE400FEEEE400FEEEE400FE7A3200FE7A
|
||||||
|
3200FEAB7500FEAB7500FED1B800FED1B8000000000000000000000000000000
|
||||||
|
0000FCEADF00FBE2D200FAD6C100F9CEB400F8C8AB00F9C6A700F8C4A500F9C5
|
||||||
|
A500F9C5A500F9C6A500F8C6A600F8C6A700F9C6A800F9C6A700F9C6A800F9C8
|
||||||
|
A900FAC9AC00FACDB10000000000FF9F6400FFB38100FFC89F00000000000000
|
||||||
|
000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FEFA
|
||||||
|
FA00FEAF7F00FEBD9A00FBB07B00CD520800FFE0CC00FFE0CC00FFE1CE00FFE3
|
||||||
|
D10000000000DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000FFF3EC00FFEEE30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF0E700FFE9DC00FFE9DC00FFE0CD00FFE0CD00FED9C300FED9C300CD52
|
||||||
|
0800CD520800FEE4D600FEE4D600FEA16D00FEA16D00FEE9E100FEE9E100FEF6
|
||||||
|
F300FEEBDF00FEEBDF00FEF1EB00FEF1EB00FEF9FB00FEF9FB00FE824200FE82
|
||||||
|
4200FEA96F00FEA96F00FEBC8D00FEBC8D00FEFEFE00FEFEFE00FEFDFE00FEE2
|
||||||
|
D500FEE2D500FBDED200FBDED200CD520800CD520800FFD7BF00FFD7BF00FFD8
|
||||||
|
C000FFD8C000FFDAC200FFDAC200FFDCC7000000000000000000000000000000
|
||||||
|
0000FDEBE200FCE5D700FADCC900FAD5BF00F9D1B800F9CEB400F9CEB300F9CD
|
||||||
|
B300F9CDB300F9CEB300F9CEB400F9CFB500F9CFB500FACFB500FACFB500F9D0
|
||||||
|
B600FAD1B800FAD4BC0000000000FFBA8B00FFCFA90000000000000000000000
|
||||||
|
000000000000000000000000000000000000BBCCD500BBCCD500BBCCD5000000
|
||||||
|
0000FFEFE500FFE8DA00FEDDCB00FDD7C000CD520800FEE4D700FE9F6600FEE9
|
||||||
|
DD00FEF0E900FEE7DB00FEE7DF00FEFEFE00FEA37300FE8B3D00FEC69200FEE0
|
||||||
|
D600FDFEFE00FEE2D30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFF0E700FFE9DC00FFE9DC00FFE0CD00FFE0CD00FED9C300FED9C300CD52
|
||||||
|
0800CD520800FEE4D600FEE4D600FEA16D00FEA16D00FEE9E100FEE9E100FEF6
|
||||||
|
F300FEEBDF00FEEBDF00FEF1EB00FEF1EB00FEF9FB00FEF9FB00FE824200FE82
|
||||||
|
4200FEA96F00FEA96F00FEBC8D00FEBC8D00FEFEFE00FEFEFE00FEFDFE00FEE2
|
||||||
|
D500FEE2D500FBDED200FBDED200CD520800CD520800FFD7BF00FFD7BF00FFD8
|
||||||
|
C000FFD8C000FFDAC200FFDAC200FFDCC700FFDCC70000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD5000000000000000000000000000000
|
||||||
|
0000FDEEE600FCEADF00FCE4D600FBE0CF00FBDDCB00FADBC800FADBC700FADB
|
||||||
|
C700FADBC800FADBC800FADBC800FADCC900FBDCC900FADCC900FADCC900FADC
|
||||||
|
CA00FBDDCB00FBE0CE0000000000FFD6B3000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000DDE6EA00DDE6EA00DDE6EA000000
|
||||||
|
0000FDEBE000FDE2D30000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFEFE500FFE8DA00FFE8DA00FEDDCB00FEDDCB00FDD7C000FDD7C000CD52
|
||||||
|
0800CD520800FEE4D700FEE4D700FE9F6600FE9F6600FEE9DD00FEE9DD00FEF0
|
||||||
|
E900FEE7DB00FEE7DB00FEE7DF00FEE7DF00FEFEFE00FEFEFE00FEA37300FEA3
|
||||||
|
7300FE8B3D00FE8B3D00FEC69200FEC69200FEE0D600FEE0D600FDFEFE00FEE2
|
||||||
|
D300FEE2D300F1A98A00F1A98A00CD520800CD520800FFD5BB00FFD5BB00FFD5
|
||||||
|
BD00FFD5BD00FFD8BF00FFD8BF00FFDAC200FFDAC20000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA200BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD5000000000000000000000000000000
|
||||||
|
0000FDF1E900FDEEE500FCEAE000FCE8DC00FCE6D900FCE5D800FCE5D700FCE5
|
||||||
|
D700FCE5D700FCE5D700FCE5D800FCE6D800FCE6D800FCE6D900FCE6D900FCE6
|
||||||
|
D900FCE7DA00FCE8DC0000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000DDE6EA00DDE6EA00000000000000
|
||||||
|
0000FFEFE500FFE8DA00FFE8DA00FEDDCB00FEDDCB00FDD7C000FDD7C000CD52
|
||||||
|
0800CD520800FEE4D700FEE4D700FE9F6600FE9F6600FEE9DD00FEE9DD00FEF0
|
||||||
|
E900FEE7DB00FEE7DB00FEE7DF00FEE7DF00FEFEFE00FEFEFE00FEA37300FEA3
|
||||||
|
7300FE8B3D00FE8B3D00FEC69200FEC69200FEE0D600FEE0D600FDFEFE00FEE2
|
||||||
|
D300FEE2D300F1A98A00F1A98A00CD520800CD520800FFD5BB00FFD5BB00FFD5
|
||||||
|
BD00FFD5BD00FFD8BF00FFD8BF00FFDAC200FFDAC20000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA20000000000FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000FE9B6000FEDFCD00FEDFCD00FEF2
|
||||||
|
EF00FEE3D900FEE3D900FEE0D300FEE0D300FEF8F800FEF8F800FEE8E300FEE8
|
||||||
|
E300FE833B00FE833B00FEBB7300FEBB7300FEDFC000FEDFC000F9CEC200FED8
|
||||||
|
CA00FED8CA00FBD2BF00FBD2BF00CD520800CD520800FFD3B800FFD3B800FFD3
|
||||||
|
BA00FFD3BA00FFD6BC00FFD6BC00FFD8C000FFD8C00000000000DDE6EA00DDE6
|
||||||
|
EA00DDE6EA00DDE6EA00DDE6EA00DDE6EA00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00BBCCD500DDE6EA00BBCCD500BBCCD500BBCCD500BBCCD500BBCC
|
||||||
|
D500BBCCD500BBCCD500BBCCD500BBCCD500BBCCD500688DA20000000000FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00424D3E000000000000003E000000
|
||||||
|
2800000080000000200000000100010000000000000200000000000000000000
|
||||||
|
000000000000000000000000FFFFFF00E0000007000000000000000000000000
|
||||||
|
E00000F7000000000000000000000000E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007FFFFFF00FFFFFF00FFFFFF00
|
||||||
|
E00000070000000000000000FFFFFF00E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007FFFFFF00FFFFFF00FFFFFF00
|
||||||
|
E00000070000000000000000FFFFFF00E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E0000007FFFFFF00FFFFFF00FFFFFF00
|
||||||
|
E00000070000000000000000FFFFFF00E0000007000000000000000000000000
|
||||||
|
E0000007000000000000000000000000E000000F000000000000000000000000
|
||||||
|
E000001F000000000000000000000000E000003F000000000000000000000000
|
||||||
|
E000007F000000000000000000000000E00000FFFFFFFF00FFFFFF00FFFFFF00
|
||||||
|
E00001FF10022F031F022F0320FFFF0000000000000000000000000000000000
|
||||||
|
000000000000}
|
||||||
|
end
|
||||||
|
object TooltipTimer: TTimer
|
||||||
|
OnTimer = TooltipTimerTimer
|
||||||
|
Left = 8
|
||||||
|
Top = 52
|
||||||
|
end
|
||||||
|
end
|
621
Forms/Browser.pas
Normal file
621
Forms/Browser.pas
Normal file
@ -0,0 +1,621 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit Browser;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
ExtCtrls, ComCtrls, ControlPoint, ToolWin, ImgList, StdCtrls,
|
||||||
|
Cmap, Menus, Global, Buttons, Translation,
|
||||||
|
RenderingInterface;
|
||||||
|
|
||||||
|
const
|
||||||
|
PixelCountMax = 32768;
|
||||||
|
PaletteTooltipTimeout = 1500;
|
||||||
|
|
||||||
|
type
|
||||||
|
TGradientBrowser = class(TForm)
|
||||||
|
SmallImages: TImageList;
|
||||||
|
pnlMain: TPanel;
|
||||||
|
PopupMenu: TPopupMenu;
|
||||||
|
DeleteItem: TMenuItem;
|
||||||
|
RenameItem: TMenuItem;
|
||||||
|
OpenDialog: TOpenDialog;
|
||||||
|
LargeImages: TImageList;
|
||||||
|
TooltipTimer: TTimer;
|
||||||
|
ListView: TListView;
|
||||||
|
pnlPreview: TPanel;
|
||||||
|
Image: TImage;
|
||||||
|
btnDefGradient: TSpeedButton;
|
||||||
|
procedure FormResize(Sender: TObject);
|
||||||
|
procedure ListViewChange(Sender: TObject; Item: TListItem;
|
||||||
|
Change: TItemChange);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure DeleteItemClick(Sender: TObject);
|
||||||
|
procedure RenameItemClick(Sender: TObject);
|
||||||
|
procedure ListViewEdited(Sender: TObject; Item: TListItem;
|
||||||
|
var S: string);
|
||||||
|
procedure btnDefGradientClick(Sender: TObject);
|
||||||
|
procedure SpeedButton1Click(Sender: TObject);
|
||||||
|
procedure ListViewKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure ListViewInfoTip(Sender: TObject; Item: TListItem;
|
||||||
|
var InfoTip: String);
|
||||||
|
procedure TooltipTimerTimer(Sender: TObject);
|
||||||
|
private
|
||||||
|
procedure DrawPalette;
|
||||||
|
procedure Apply;
|
||||||
|
public
|
||||||
|
PreviewDensity: double;
|
||||||
|
FlameIndex, GradientIndex: Integer;
|
||||||
|
Extension, Identifier, Filename: string;
|
||||||
|
cp: TControlPoint;
|
||||||
|
Palette: TColorMap;
|
||||||
|
zoom: double;
|
||||||
|
Center: array[0..1] of double;
|
||||||
|
Render: TRenderer;
|
||||||
|
procedure ListFileContents;
|
||||||
|
function LoadFractintMap(filen: string): TColorMap;
|
||||||
|
end;
|
||||||
|
|
||||||
|
type
|
||||||
|
EFormatInvalid = class(Exception);
|
||||||
|
pRGBTripleArray = ^TRGBTripleArray;
|
||||||
|
TRGBTripleArray = array[0..PixelCountMax - 1] of TRGBTriple;
|
||||||
|
|
||||||
|
var
|
||||||
|
GradientBrowser: TGradientBrowser;
|
||||||
|
FlameString: string;
|
||||||
|
|
||||||
|
function CreatePalette(strng: string): TColorMap;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Main, Options, Editor, {Gradient,} Registry, Adjust, Mutate;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
|
||||||
|
procedure RGBBlend(a, b: integer; var Palette: TColorMap);
|
||||||
|
{ Linear blend between to indices of a palette }
|
||||||
|
var
|
||||||
|
c, v: real;
|
||||||
|
vrange, range: real;
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if a = b then
|
||||||
|
begin
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
range := b - a;
|
||||||
|
vrange := Palette[b mod 256][0] - Palette[a mod 256][0];
|
||||||
|
c := Palette[a mod 256][0];
|
||||||
|
v := vrange / range;
|
||||||
|
for i := (a + 1) to (b - 1) do
|
||||||
|
begin
|
||||||
|
c := c + v;
|
||||||
|
Palette[i mod 256][0] := Round(c);
|
||||||
|
end;
|
||||||
|
vrange := Palette[b mod 256][1] - Palette[a mod 256][1];
|
||||||
|
c := Palette[a mod 256][1];
|
||||||
|
v := vrange / range;
|
||||||
|
for i := a + 1 to b - 1 do
|
||||||
|
begin
|
||||||
|
c := c + v;
|
||||||
|
Palette[i mod 256][1] := Round(c);
|
||||||
|
end;
|
||||||
|
vrange := Palette[b mod 256][2] - Palette[a mod 256][2];
|
||||||
|
c := Palette[a mod 256][2];
|
||||||
|
v := vrange / range;
|
||||||
|
for i := a + 1 to b - 1 do
|
||||||
|
begin
|
||||||
|
c := c + v;
|
||||||
|
Palette[i mod 256][2] := Round(c);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetVal(token: string): string;
|
||||||
|
var
|
||||||
|
p: integer;
|
||||||
|
begin
|
||||||
|
p := Pos('=', token);
|
||||||
|
Delete(Token, 1, p);
|
||||||
|
Result := Token;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function ReplaceTabs(str: string): string;
|
||||||
|
{Changes tab characters in a string to spaces}
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
for i := 1 to Length(str) do
|
||||||
|
begin
|
||||||
|
if str[i] = #9 then
|
||||||
|
begin
|
||||||
|
Delete(str, i, 1);
|
||||||
|
Insert(#32, str, i);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result := str;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TGradientBrowser.LoadFractintMap(filen: string): TColorMap;
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
s: string;
|
||||||
|
pal: TColorMap;
|
||||||
|
MapFile: TextFile;
|
||||||
|
begin
|
||||||
|
{ Load a map file }
|
||||||
|
AssignFile(MapFile, Filen);
|
||||||
|
try
|
||||||
|
Reset(MapFile);
|
||||||
|
for i := 0 to 255 do
|
||||||
|
begin
|
||||||
|
Read(MapFile, Pal[i][0]);
|
||||||
|
Read(MapFile, Pal[i][1]);
|
||||||
|
Read(MapFile, Pal[i][2]);
|
||||||
|
Read(MapFile, s);
|
||||||
|
end;
|
||||||
|
CloseFile(MapFile);
|
||||||
|
Result := Pal;
|
||||||
|
except
|
||||||
|
on EInOutError do Application.MessageBox(PChar(Format(TextByKey('common-genericopenfailure'), [FileName])), PCHAR('Apophysis'), 16);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function CreatePalette(strng: string): TColorMap;
|
||||||
|
{ Loads a palette from a gradient string }
|
||||||
|
var
|
||||||
|
Strings: TStringList;
|
||||||
|
index, i: integer;
|
||||||
|
Tokens: TStringList;
|
||||||
|
Indices, Colors: TStringList;
|
||||||
|
a, b: integer;
|
||||||
|
begin
|
||||||
|
Strings := TStringList.Create;
|
||||||
|
Tokens := TStringList.Create;
|
||||||
|
Indices := TStringList.Create;
|
||||||
|
Colors := TStringList.Create;
|
||||||
|
try
|
||||||
|
try
|
||||||
|
Strings.Text := strng;
|
||||||
|
if Pos('}', Strings.Text) = 0 then raise EFormatInvalid.Create('No closing brace');
|
||||||
|
if Pos('{', Strings[0]) = 0 then raise EFormatInvalid.Create('No opening brace.');
|
||||||
|
GetTokens(ReplaceTabs(strings.text), tokens);
|
||||||
|
Tokens.Text := Trim(Tokens.text);
|
||||||
|
i := 0;
|
||||||
|
while (Pos('}', Tokens[i]) = 0) and (Pos('opacity:', Lowercase(Tokens[i])) = 0) do
|
||||||
|
begin
|
||||||
|
if Pos('index=', LowerCase(Tokens[i])) <> 0 then
|
||||||
|
Indices.Add(GetVal(Tokens[i]))
|
||||||
|
else if Pos('color=', LowerCase(Tokens[i])) <> 0 then
|
||||||
|
Colors.Add(GetVal(Tokens[i]));
|
||||||
|
inc(i)
|
||||||
|
end;
|
||||||
|
for i := 0 to 255 do
|
||||||
|
begin
|
||||||
|
Result[i][0] := 0;
|
||||||
|
Result[i][1] := 0;
|
||||||
|
Result[i][2] := 0;
|
||||||
|
end;
|
||||||
|
if Indices.Count = 0 then raise EFormatInvalid.Create('No color info');
|
||||||
|
for i := 0 to Indices.Count - 1 do
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
index := StrToInt(Indices[i]);
|
||||||
|
while index < 0 do inc(index, 400);
|
||||||
|
index := Round(Index * (255 / 399));
|
||||||
|
indices[i] := IntToStr(index);
|
||||||
|
assert(index>=0);
|
||||||
|
assert(index<256);
|
||||||
|
Result[index][0] := StrToInt(Colors[i]) mod 256;
|
||||||
|
Result[index][1] := trunc(StrToInt(Colors[i]) / 256) mod 256;
|
||||||
|
Result[index][2] := trunc(StrToInt(Colors[i]) / 65536);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
i := 1;
|
||||||
|
repeat
|
||||||
|
a := StrToInt(Trim(Indices[i - 1]));
|
||||||
|
b := StrToInt(Trim(Indices[i]));
|
||||||
|
RGBBlend(a, b, Result);
|
||||||
|
inc(i);
|
||||||
|
until i = Indices.Count;
|
||||||
|
if (Indices[0] <> '0') or (Indices[Indices.Count - 1] <> '255') then
|
||||||
|
begin
|
||||||
|
a := StrToInt(Trim(Indices[Indices.Count - 1]));
|
||||||
|
b := StrToInt(Trim(Indices[0])) + 256;
|
||||||
|
RGBBlend(a, b, Result);
|
||||||
|
end;
|
||||||
|
except on EFormatInvalid do
|
||||||
|
begin
|
||||||
|
// Result := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Tokens.Free;
|
||||||
|
Strings.Free;
|
||||||
|
Indices.Free;
|
||||||
|
Colors.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.DrawPalette;
|
||||||
|
var
|
||||||
|
i, j: integer;
|
||||||
|
Row: pRGBTripleArray;
|
||||||
|
BitMap: TBitMap;
|
||||||
|
begin
|
||||||
|
BitMap := TBitMap.Create;
|
||||||
|
try
|
||||||
|
Bitmap.PixelFormat := pf24bit;
|
||||||
|
BitMap.Width := 256;
|
||||||
|
BitMap.Height := 1;
|
||||||
|
for j := 0 to Bitmap.Height - 1 do
|
||||||
|
begin
|
||||||
|
Row := Bitmap.Scanline[j];
|
||||||
|
for i := 0 to Bitmap.Width - 1 do
|
||||||
|
begin
|
||||||
|
with Row[i] do
|
||||||
|
begin
|
||||||
|
rgbtRed := Palette[i][0];
|
||||||
|
rgbtGreen := Palette[i][1];
|
||||||
|
rgbtBlue := Palette[i][2];
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
Image.Picture.Graphic := Bitmap;
|
||||||
|
Image.Refresh;
|
||||||
|
finally
|
||||||
|
BitMap.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.ListFileContents;
|
||||||
|
{ List identifiers in file }
|
||||||
|
var
|
||||||
|
i, p: integer;
|
||||||
|
Title: string;
|
||||||
|
ListItem: TListItem;
|
||||||
|
FStrings: TStringList;
|
||||||
|
begin
|
||||||
|
FStrings := TStringList.Create;
|
||||||
|
FStrings.LoadFromFile(filename);
|
||||||
|
try
|
||||||
|
ListView.Items.BeginUpdate;
|
||||||
|
ListView.Items.Clear;
|
||||||
|
if Lowercase(ExtractFileExt(filename)) = '.map' then
|
||||||
|
begin
|
||||||
|
ListItem := ListView.Items.Add;
|
||||||
|
Listitem.Caption := Trim(filename);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if (Pos('{', FStrings.Text) <> 0) then
|
||||||
|
begin
|
||||||
|
for i := 0 to FStrings.Count - 1 do
|
||||||
|
begin
|
||||||
|
p := Pos('{', FStrings[i]);
|
||||||
|
if (p <> 0) and (Pos('(3D)', FStrings[i]) = 0) then
|
||||||
|
begin
|
||||||
|
Title := Trim(Copy(FStrings[i], 1, p - 1));
|
||||||
|
if Title <> '' then
|
||||||
|
begin { Otherwise bad format }
|
||||||
|
ListItem := ListView.Items.Add;
|
||||||
|
Listitem.Caption := Trim(Copy(FStrings[i], 1, p - 1));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
ListView.Items.EndUpdate;
|
||||||
|
ListView.Selected := ListView.Items[0];
|
||||||
|
finally
|
||||||
|
FStrings.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.ListViewChange(Sender: TObject; Item: TListItem;
|
||||||
|
Change: TItemChange);
|
||||||
|
var
|
||||||
|
Tokens, FStrings: TStringList;
|
||||||
|
EntryStrings: TStringList;
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
Application.ProcessMessages;
|
||||||
|
FStrings := TStringList.Create;
|
||||||
|
EntryStrings := TStringList.Create;
|
||||||
|
Tokens := TStringList.Create;
|
||||||
|
try
|
||||||
|
if Lowercase(ExtractFileExt(filename)) = '.map' then
|
||||||
|
begin
|
||||||
|
Palette := LoadFractintMap(filename);
|
||||||
|
DrawPalette;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if (ListView.SelCount <> 0) and (ListView.Selected.Caption <> Identifier) then
|
||||||
|
begin
|
||||||
|
Identifier := ListView.Selected.Caption;
|
||||||
|
FStrings.LoadFromFile(Filename);
|
||||||
|
for i := 0 to FStrings.count - 1 do
|
||||||
|
if Pos(Lowercase(ListView.Selected.Caption) + ' ', Trim(Lowercase(FStrings[i]))) = 1 then break;
|
||||||
|
EntryStrings.Add(FStrings[i]);
|
||||||
|
repeat
|
||||||
|
inc(i);
|
||||||
|
EntryStrings.Add(FStrings[i]);
|
||||||
|
until Pos('}', FStrings[i]) <> 0;
|
||||||
|
Palette := CreatePalette(EntryStrings.Text);
|
||||||
|
DrawPalette;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
EntryStrings.Free;
|
||||||
|
FStrings.Free;
|
||||||
|
Tokens.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
self.Caption := TextByKey('gradientbrowser-title');
|
||||||
|
btnDefGradient.Hint := TextByKey('common-browse');
|
||||||
|
DeleteItem.Caption := TextByKey('common-delete');
|
||||||
|
RenameItem.Caption := TextByKey('common-rename');
|
||||||
|
PreviewDensity := prevMediumQuality;
|
||||||
|
cp := TControlPoint.Create;
|
||||||
|
cp.gamma := defGamma;
|
||||||
|
cp.brightness := defBrightness;
|
||||||
|
cp.vibrancy := defVibrancy;
|
||||||
|
cp.spatial_oversample := defOversample;
|
||||||
|
cp.spatial_filter_radius := defFilterRadius;
|
||||||
|
Render := TRenderer.Create;
|
||||||
|
FlameIndex := 0;
|
||||||
|
GradientIndex := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Render.Free;
|
||||||
|
cp.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Read posution from registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Browser', False) then
|
||||||
|
begin
|
||||||
|
if Registry.ValueExists('Left') then
|
||||||
|
GradientBrowser.Left := Registry.ReadInteger('Left');
|
||||||
|
if Registry.ValueExists('Top') then
|
||||||
|
GradientBrowser.Top := Registry.ReadInteger('Top');
|
||||||
|
if Registry.ValueExists('Width') then
|
||||||
|
GradientBrowser.Width := Registry.ReadInteger('Width');
|
||||||
|
if Registry.ValueExists('Height') then
|
||||||
|
GradientBrowser.Height := Registry.ReadInteger('Height');
|
||||||
|
end;
|
||||||
|
Registry.CloseKey;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
if FileExists(filename) then ListFileContents;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.DeleteItemClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
c: boolean;
|
||||||
|
begin
|
||||||
|
if ListView.SelCount <> 0 then
|
||||||
|
begin
|
||||||
|
if ConfirmDelete then
|
||||||
|
c := Application.MessageBox(
|
||||||
|
PChar(Format(TextByKey('common-confirmdelete'), [ListView.Selected.Caption])), 'Apophysis', 36) = IDYES
|
||||||
|
else
|
||||||
|
c := True;
|
||||||
|
if c then
|
||||||
|
if ListView.Focused and (ListView.SelCount <> 0) then
|
||||||
|
begin
|
||||||
|
Application.ProcessMessages;
|
||||||
|
if DeleteEntry(ListView.Selected.Caption, Filename) then
|
||||||
|
begin
|
||||||
|
ListView.Items.Delete(ListView.Selected.Index);
|
||||||
|
ListView.Selected := ListView.ItemFocused;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.RenameItemClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if ListView.SelCount <> 0 then
|
||||||
|
ListView.Items[ListView.Selected.Index].EditCaption;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.ListViewEdited(Sender: TObject; Item: TListItem;
|
||||||
|
var S: string);
|
||||||
|
begin
|
||||||
|
// if s <> Item.Caption then
|
||||||
|
// if not RenameIFS(Item.Caption, s, Filename) then
|
||||||
|
// s := Item.Caption;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.btnDefGradientClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fn:string;
|
||||||
|
begin
|
||||||
|
OpenDialog.InitialDir := BrowserPath;
|
||||||
|
OpenDialog.Filter := Format('%s|*.gradient;*.ugr|%s|*.map|%s|*.*',
|
||||||
|
[TextByKey('common-filter-gradientfiles'),
|
||||||
|
TextByKey('common-filter-fractintfiles'),
|
||||||
|
TextByKey('common-filter-allfiles')]);
|
||||||
|
OpenDialog.FileName := '';
|
||||||
|
if OpenSaveFileDialog(GradientBrowser, OpenDialog.DefaultExt, OpenDialog.Filter, OpenDialog.InitialDir, TextByKey('common-browse'), fn, true, false, false, true) then
|
||||||
|
//if OpenDialog.Execute then
|
||||||
|
begin
|
||||||
|
Filename := fn; //OpenDialog.FileName;
|
||||||
|
GradientFile := Filename;
|
||||||
|
BrowserPath := ExtractFilePath(fn); //ExtractFilePath(OpenDialog.FileName);
|
||||||
|
ListFileContents;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.Apply;
|
||||||
|
begin
|
||||||
|
MainForm.StopThread;
|
||||||
|
MainForm.UpdateUndo;
|
||||||
|
MainCp.cmap := Palette;
|
||||||
|
MainCP.cmapindex := -1;
|
||||||
|
if EditForm.Visible then EditForm.UpdateDisplay;
|
||||||
|
if AdjustForm.Visible then AdjustForm.UpdateDisplay;
|
||||||
|
if MutateForm.Visible then MutateForm.UpdateDisplay;
|
||||||
|
MainForm.RedrawTimer.enabled := true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.SpeedButton1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Apply;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.ListViewKeyPress(Sender: TObject;
|
||||||
|
var Key: Char);
|
||||||
|
begin
|
||||||
|
if Key = #13 then Apply;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Write position to registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
{ Defaults }
|
||||||
|
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Browser', True) then
|
||||||
|
begin
|
||||||
|
Registry.WriteInteger('Top', GradientBrowser.Top);
|
||||||
|
Registry.WriteInteger('Left', GradientBrowser.Left);
|
||||||
|
Registry.WriteInteger('Width', GradientBrowser.Width);
|
||||||
|
Registry.WriteInteger('Height', GradientBrowser.Height);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.ListViewInfoTip(Sender: TObject;
|
||||||
|
Item: TListItem; var InfoTip: String);
|
||||||
|
var
|
||||||
|
i, j: integer;
|
||||||
|
Row: pRGBTripleArray;
|
||||||
|
Bitmap: TBitmap;
|
||||||
|
pal: TColorMap;
|
||||||
|
EntryStrings, FStrings: TStringList;
|
||||||
|
rect: TRect;
|
||||||
|
begin
|
||||||
|
BitMap := TBitMap.create;
|
||||||
|
Bitmap.PixelFormat := pf24bit;
|
||||||
|
BitMap.Width := 256;
|
||||||
|
BitMap.Height := 100;
|
||||||
|
|
||||||
|
FStrings := TStringList.Create;
|
||||||
|
EntryStrings := TStringList.Create;
|
||||||
|
try
|
||||||
|
if Lowercase(ExtractFileExt(filename)) = '.map' then
|
||||||
|
begin
|
||||||
|
pal := LoadFractintMap(filename);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
Identifier := Item.Caption;
|
||||||
|
FStrings.LoadFromFile(Filename);
|
||||||
|
for i := 0 to FStrings.count - 1 do
|
||||||
|
if Pos(Lowercase(Item.Caption) + ' ', Trim(Lowercase(FStrings[i]))) = 1 then break;
|
||||||
|
EntryStrings.Add(FStrings[i]);
|
||||||
|
repeat
|
||||||
|
inc(i);
|
||||||
|
EntryStrings.Add(FStrings[i]);
|
||||||
|
until Pos('}', FStrings[i]) <> 0;
|
||||||
|
pal := CreatePalette(EntryStrings.Text);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
EntryStrings.Free;
|
||||||
|
FStrings.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
for j := 0 to Bitmap.Height - 1 do
|
||||||
|
begin
|
||||||
|
Row := Bitmap.Scanline[j];
|
||||||
|
for i := 0 to Bitmap.Width - 1 do
|
||||||
|
begin
|
||||||
|
with Row[i] do
|
||||||
|
begin
|
||||||
|
rgbtRed := pal[i][0];
|
||||||
|
rgbtGreen := pal[i][1];
|
||||||
|
rgbtBlue := pal[i][2];
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
rect.TopLeft := Item.Position;
|
||||||
|
rect.BottomRight.X := rect.TopLeft.X + 100;
|
||||||
|
rect.BottomRight.Y := rect.TopLeft.Y + 16;
|
||||||
|
with ListView do
|
||||||
|
begin
|
||||||
|
Canvas.Rectangle(Rect);
|
||||||
|
//Canvas.TextOut(Rect.Left, Rect.Top, Item.Caption);
|
||||||
|
//Rect.Left := (Rect.Left + rect.Right) div 3;
|
||||||
|
Canvas.StretchDraw(Rect, Bitmap);
|
||||||
|
end;
|
||||||
|
BitMap.Free;
|
||||||
|
InfoTip := '';
|
||||||
|
TooltipTimer.Interval := PaletteTooltipTimeout;
|
||||||
|
TooltipTimer.Enabled := true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.TooltipTimerTimer(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ListView.Repaint;
|
||||||
|
TooltipTimer.Enabled := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TGradientBrowser.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Listview.Width := self.ClientWidth - 4;
|
||||||
|
btnDefGradient.Left := self.ClientWidth - 2 - btnDefGradient.Width;
|
||||||
|
ListView.Height := self.ClientHeight - pnlPreview.Height - 6;
|
||||||
|
btnDefGradient.Top := self.ClientHeight - pnlPreview.Height - 2 + pnlPreview.Height div 2 - btnDefGradient.Height div 2;
|
||||||
|
ListView.Top := 2;
|
||||||
|
ListView.Left := 2;
|
||||||
|
pnlPreview.Top := self.ClientHeight - pnlPreview.Height - 2;
|
||||||
|
pnlPreview.Left := 2;
|
||||||
|
pnlPreview.Width := self.ClientWidth - btnDefGradient.Width - 6;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
125
Forms/Curves.dfm
Normal file
125
Forms/Curves.dfm
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
object CurvesForm: TCurvesForm
|
||||||
|
Left = 197
|
||||||
|
Top = 111
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Curves'
|
||||||
|
ClientHeight = 492
|
||||||
|
ClientWidth = 489
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'System'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 16
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 16
|
||||||
|
Width = 75
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Selected curve:'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object CurvesPanel: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 68
|
||||||
|
Width = 473
|
||||||
|
Height = 414
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clBlack
|
||||||
|
ParentBackground = False
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object cbChannel: TComboBox
|
||||||
|
Left = 8
|
||||||
|
Top = 35
|
||||||
|
Width = 185
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ItemIndex = 0
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'Overall'
|
||||||
|
OnChange = cbChannelChange
|
||||||
|
Items.Strings = (
|
||||||
|
'Overall'
|
||||||
|
'Red'
|
||||||
|
'Green'
|
||||||
|
'Blue')
|
||||||
|
end
|
||||||
|
object tbWeightLeft: TScrollBar
|
||||||
|
Left = 326
|
||||||
|
Top = 8
|
||||||
|
Width = 155
|
||||||
|
Height = 21
|
||||||
|
Max = 160
|
||||||
|
PageSize = 0
|
||||||
|
Position = 80
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = tbWeightChange
|
||||||
|
OnScroll = tbWeightScroll
|
||||||
|
end
|
||||||
|
object tbWeightRight: TScrollBar
|
||||||
|
Left = 326
|
||||||
|
Top = 35
|
||||||
|
Width = 155
|
||||||
|
Height = 21
|
||||||
|
Max = 160
|
||||||
|
PageSize = 0
|
||||||
|
Position = 80
|
||||||
|
TabOrder = 3
|
||||||
|
OnChange = tbWeightChange
|
||||||
|
OnScroll = tbWeightScroll
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 199
|
||||||
|
Top = 8
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = ' First CP weight:'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 199
|
||||||
|
Top = 35
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = ' Second CP weight:'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
end
|
123
Forms/Curves.pas
Normal file
123
Forms/Curves.pas
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
unit Curves;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses Windows, Classes, Graphics, Forms, Controls, CurvesControl, Vcl.ExtCtrls,
|
||||||
|
Vcl.StdCtrls, Vcl.ComCtrls, ControlPoint, Registry, Global;
|
||||||
|
|
||||||
|
type
|
||||||
|
TCurvesForm = class(TForm)
|
||||||
|
CurvesPanel: TPanel;
|
||||||
|
cbChannel: TComboBox;
|
||||||
|
tbWeightLeft: TScrollBar;
|
||||||
|
tbWeightRight: TScrollBar;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure cbChannelChange(Sender: TObject);
|
||||||
|
procedure tbWeightChange(Sender: TObject);
|
||||||
|
procedure tbWeightScroll(Sender: TObject; ScrollCode: TScrollCode;
|
||||||
|
var ScrollPos: Integer);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
published
|
||||||
|
CurvesControl: TCurvesControl;
|
||||||
|
public
|
||||||
|
procedure SetCp(cp: TControlPoint);
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
CurvesForm: TCurvesForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Main;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TCurvesForm.tbWeightScroll(Sender: TObject; ScrollCode: TScrollCode;
|
||||||
|
var ScrollPos: Integer);
|
||||||
|
begin
|
||||||
|
if ScrollCode = scEndScroll then
|
||||||
|
CurvesControl.UpdateFlame;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCurvesForm.SetCp(cp: TControlPoint);
|
||||||
|
begin
|
||||||
|
if CurvesControl = nil then Exit;
|
||||||
|
CurvesControl.SetCp(cp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCurvesForm.cbChannelChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CurvesControl = nil then Exit;
|
||||||
|
CurvesControl.ActiveChannel := TCurvesChannel(cbChannel.ItemIndex);
|
||||||
|
tbWeightLeft.Position := Round(CurvesControl.WeightLeft * 10);
|
||||||
|
tbWeightRight.Position := Round(CurvesControl.WeightRight * 10);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCurvesForm.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Write position to registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Curves', True) then
|
||||||
|
begin
|
||||||
|
Registry.WriteInteger('Top', self.Top);
|
||||||
|
Registry.WriteInteger('Left', self.Left);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
// bStop := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCurvesForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCurvesForm.FormShow(Sender: TObject);
|
||||||
|
var Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
if not (assigned(curvesControl)) then
|
||||||
|
begin
|
||||||
|
CurvesControl := TCurvesControl.Create(self);
|
||||||
|
CurvesControl.Align := alClient;
|
||||||
|
CurvesControl.Parent := CurvesPanel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Curves', False) then
|
||||||
|
begin
|
||||||
|
if Registry.ValueExists('Left') then
|
||||||
|
self.Left := Registry.ReadInteger('Left');
|
||||||
|
if Registry.ValueExists('Top') then
|
||||||
|
self.Top := Registry.ReadInteger('Top');
|
||||||
|
Registry.CloseKey;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
tbWeightLeft.Position := Round(CurvesControl.WeightLeft * 10);
|
||||||
|
tbWeightRight.Position := Round(CurvesControl.WeightRight * 10);
|
||||||
|
|
||||||
|
SetCp(MainCp);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCurvesForm.tbWeightChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CurvesControl.WeightLeft := tbWeightLeft.Position / 10.0;
|
||||||
|
CurvesControl.WeightRight := tbWeightRight.Position / 10.0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
3543
Forms/Editor.dfm
Normal file
3543
Forms/Editor.dfm
Normal file
File diff suppressed because it is too large
Load Diff
5995
Forms/Editor.pas
Normal file
5995
Forms/Editor.pas
Normal file
File diff suppressed because it is too large
Load Diff
553
Forms/FormExport.dfm
Normal file
553
Forms/FormExport.dfm
Normal file
@ -0,0 +1,553 @@
|
|||||||
|
object ExportDialog: TExportDialog
|
||||||
|
Left = 313
|
||||||
|
Top = 276
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Export Flame'
|
||||||
|
ClientHeight = 392
|
||||||
|
ClientWidth = 496
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
496
|
||||||
|
392)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object btnOK: TButton
|
||||||
|
Left = 398
|
||||||
|
Top = 182
|
||||||
|
Width = 89
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = '&OK'
|
||||||
|
Default = True
|
||||||
|
ModalResult = 1
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = btnOKClick
|
||||||
|
end
|
||||||
|
object btnCancel: TButton
|
||||||
|
Left = 398
|
||||||
|
Top = 210
|
||||||
|
Width = 89
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Cancel'
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 5
|
||||||
|
Width = 481
|
||||||
|
Height = 57
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = ' Destination '
|
||||||
|
TabOrder = 2
|
||||||
|
DesignSize = (
|
||||||
|
481
|
||||||
|
57)
|
||||||
|
object btnBrowse: TSpeedButton
|
||||||
|
Left = 448
|
||||||
|
Top = 19
|
||||||
|
Width = 24
|
||||||
|
Height = 24
|
||||||
|
Hint = 'Browse...'
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
|
||||||
|
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
|
||||||
|
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
|
||||||
|
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
|
||||||
|
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
|
||||||
|
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
|
||||||
|
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
|
||||||
|
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
|
||||||
|
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
|
||||||
|
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
|
||||||
|
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
|
||||||
|
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
|
||||||
|
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
|
||||||
|
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
|
||||||
|
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
|
||||||
|
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
|
||||||
|
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnBrowseClick
|
||||||
|
end
|
||||||
|
object Label10: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'File name'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object txtFilename: TEdit
|
||||||
|
Left = 112
|
||||||
|
Top = 20
|
||||||
|
Width = 337
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox3: TGroupBox
|
||||||
|
Left = 256
|
||||||
|
Top = 66
|
||||||
|
Width = 233
|
||||||
|
Height = 105
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = ' Quality '
|
||||||
|
TabOrder = 3
|
||||||
|
DesignSize = (
|
||||||
|
233
|
||||||
|
105)
|
||||||
|
object udOversample: TUpDown
|
||||||
|
Left = 212
|
||||||
|
Top = 68
|
||||||
|
Width = 12
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Associate = txtOversample
|
||||||
|
Min = 1
|
||||||
|
Max = 4
|
||||||
|
Position = 2
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Label4: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Density'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object txtDensity: TEdit
|
||||||
|
Left = 120
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = txtDensityChange
|
||||||
|
end
|
||||||
|
object Label5: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 44
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Filter radius'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object txtFilterRadius: TEdit
|
||||||
|
Left = 120
|
||||||
|
Top = 44
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = txtFilterRadiusChange
|
||||||
|
end
|
||||||
|
object Label3: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 68
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Oversample'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object txtOversample: TEdit
|
||||||
|
Left = 120
|
||||||
|
Top = 68
|
||||||
|
Width = 92
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 2
|
||||||
|
Text = '2'
|
||||||
|
OnChange = txtOversampleChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox2: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 66
|
||||||
|
Width = 241
|
||||||
|
Height = 105
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = ' Size '
|
||||||
|
TabOrder = 4
|
||||||
|
DesignSize = (
|
||||||
|
241
|
||||||
|
105)
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 184
|
||||||
|
Top = 36
|
||||||
|
Width = 26
|
||||||
|
Height = 13
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'pixels'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label16: TLabel
|
||||||
|
Left = 168
|
||||||
|
Top = 22
|
||||||
|
Width = 15
|
||||||
|
Height = 36
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = '}'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -32
|
||||||
|
Font.Name = 'Times New Roman'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object chkMaintain: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 76
|
||||||
|
Width = 225
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Maintain aspect ratio'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = chkMaintainClick
|
||||||
|
end
|
||||||
|
object Label1: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Width'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Label2: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 44
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Height'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object cbHeight: TComboBox
|
||||||
|
Left = 112
|
||||||
|
Top = 44
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = txtHeightChange
|
||||||
|
Items.Strings = (
|
||||||
|
'200'
|
||||||
|
'240'
|
||||||
|
'480'
|
||||||
|
'600'
|
||||||
|
'768'
|
||||||
|
'1024'
|
||||||
|
'1200'
|
||||||
|
'2048'
|
||||||
|
'2400')
|
||||||
|
end
|
||||||
|
object cbWidth: TComboBox
|
||||||
|
Left = 112
|
||||||
|
Top = 20
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = txtWidthChange
|
||||||
|
Items.Strings = (
|
||||||
|
'320'
|
||||||
|
'640'
|
||||||
|
'800'
|
||||||
|
'1024'
|
||||||
|
'1280'
|
||||||
|
'1600'
|
||||||
|
'1920'
|
||||||
|
'2048'
|
||||||
|
'2560'
|
||||||
|
'3200')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox4: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 176
|
||||||
|
Width = 377
|
||||||
|
Height = 113
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = ' Parameters '
|
||||||
|
TabOrder = 5
|
||||||
|
DesignSize = (
|
||||||
|
377
|
||||||
|
113)
|
||||||
|
object udStrips: TUpDown
|
||||||
|
Left = 172
|
||||||
|
Top = 52
|
||||||
|
Width = 12
|
||||||
|
Height = 21
|
||||||
|
Associate = txtStrips
|
||||||
|
Min = 1
|
||||||
|
Max = 512
|
||||||
|
Position = 1
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Label7: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Buffer depth'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object Label8: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 52
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Strips'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
object Label9: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 84
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'DE Radius'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
object txtEstimator: TEdit
|
||||||
|
Left = 112
|
||||||
|
Top = 84
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 3
|
||||||
|
Text = '5'
|
||||||
|
OnChange = txtEstimatorChange
|
||||||
|
end
|
||||||
|
object txtStrips: TEdit
|
||||||
|
Left = 112
|
||||||
|
Top = 52
|
||||||
|
Width = 60
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 1
|
||||||
|
Text = '1'
|
||||||
|
OnChange = txtBatchesChange
|
||||||
|
end
|
||||||
|
object cmbDepth: TComboBox
|
||||||
|
Left = 112
|
||||||
|
Top = 20
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = cmbDepthChange
|
||||||
|
Items.Strings = (
|
||||||
|
'16-bit'
|
||||||
|
'32-bit'
|
||||||
|
'32-bit float'
|
||||||
|
'64-bit')
|
||||||
|
end
|
||||||
|
object Label14: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Gamma threshold'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 10
|
||||||
|
end
|
||||||
|
object Label12: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 52
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'DE Curve'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 11
|
||||||
|
end
|
||||||
|
object Label11: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 84
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'DE Minimum'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 12
|
||||||
|
end
|
||||||
|
object txtGammaTreshold: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 20
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 6
|
||||||
|
Text = '0.01'
|
||||||
|
OnChange = txtGammaTresholdChange
|
||||||
|
end
|
||||||
|
object txtEstimatorCurve: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 52
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 5
|
||||||
|
Text = '0.6'
|
||||||
|
OnChange = txtEstimatorCurveChange
|
||||||
|
end
|
||||||
|
object txtEstimatorMin: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 84
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 4
|
||||||
|
Text = '0'
|
||||||
|
OnChange = txtEstimatorMinChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object chkRender: TCheckBox
|
||||||
|
Left = 400
|
||||||
|
Top = 246
|
||||||
|
Width = 89
|
||||||
|
Height = 43
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Render'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 296
|
||||||
|
Width = 481
|
||||||
|
Height = 89
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
BevelKind = bkSoft
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clInfoBk
|
||||||
|
TabOrder = 7
|
||||||
|
OnResize = Panel1Resize
|
||||||
|
DesignSize = (
|
||||||
|
477
|
||||||
|
85)
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 4
|
||||||
|
Width = 453
|
||||||
|
Height = 24
|
||||||
|
Alignment = taCenter
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
AutoSize = False
|
||||||
|
Caption = 'WARNING!'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clInfoText
|
||||||
|
Font.Height = -19
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label15: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 25
|
||||||
|
Width = 447
|
||||||
|
Height = 26
|
||||||
|
Alignment = taCenter
|
||||||
|
Anchors = [akLeft, akRight]
|
||||||
|
Caption =
|
||||||
|
'Fractals created with this version of Apophysis are not supporte' +
|
||||||
|
'd by the external renderer! To render 2D-only fractals, download' +
|
||||||
|
' the latest version of FLAM3 from http://www.flam3.com'
|
||||||
|
Color = clInfoBk
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clInfoText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object SaveDialog: TSaveDialog
|
||||||
|
DefaultExt = 'jpg'
|
||||||
|
Filter =
|
||||||
|
'JPEG Image (*.jpg)|*.jpg|PPM Image (*.ppm)|*.ppm|PNG Images (*.p' +
|
||||||
|
'ng)|*.png'
|
||||||
|
Left = 464
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
end
|
346
Forms/FormExport.pas
Normal file
346
Forms/FormExport.pas
Normal file
@ -0,0 +1,346 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit FormExport;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
StdCtrls, Buttons, ComCtrls, ExtCtrls, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TExportDialog = class(TForm)
|
||||||
|
btnOK: TButton;
|
||||||
|
btnCancel: TButton;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
btnBrowse: TSpeedButton;
|
||||||
|
txtFilename: TEdit;
|
||||||
|
SaveDialog: TSaveDialog;
|
||||||
|
GroupBox3: TGroupBox;
|
||||||
|
txtOversample: TEdit;
|
||||||
|
txtFilterRadius: TEdit;
|
||||||
|
txtDensity: TEdit;
|
||||||
|
udOversample: TUpDown;
|
||||||
|
GroupBox2: TGroupBox;
|
||||||
|
chkMaintain: TCheckBox;
|
||||||
|
cbWidth: TComboBox;
|
||||||
|
cbHeight: TComboBox;
|
||||||
|
GroupBox4: TGroupBox;
|
||||||
|
cmbDepth: TComboBox;
|
||||||
|
chkRender: TCheckBox;
|
||||||
|
txtStrips: TEdit;
|
||||||
|
udStrips: TUpDown;
|
||||||
|
txtEstimator: TEdit;
|
||||||
|
txtEstimatorMin: TEdit;
|
||||||
|
txtEstimatorCurve: TEdit;
|
||||||
|
txtGammaTreshold: TEdit;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label15: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label16: TLabel;
|
||||||
|
Label4: TPanel;
|
||||||
|
Label5: TPanel;
|
||||||
|
Label3: TPanel;
|
||||||
|
Label1: TPanel;
|
||||||
|
Label2: TPanel;
|
||||||
|
Label7: TPanel;
|
||||||
|
Label8: TPanel;
|
||||||
|
Label9: TPanel;
|
||||||
|
Label14: TPanel;
|
||||||
|
Label12: TPanel;
|
||||||
|
Label11: TPanel;
|
||||||
|
Label10: TPanel;
|
||||||
|
procedure Panel1Resize(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure btnBrowseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure btnOKClick(Sender: TObject);
|
||||||
|
procedure txtWidthChange(Sender: TObject);
|
||||||
|
procedure chkMaintainClick(Sender: TObject);
|
||||||
|
procedure txtHeightChange(Sender: TObject);
|
||||||
|
procedure txtDensityChange(Sender: TObject);
|
||||||
|
procedure txtFilterRadiusChange(Sender: TObject);
|
||||||
|
procedure txtOversampleChange(Sender: TObject);
|
||||||
|
procedure txtBatchesChange(Sender: TObject);
|
||||||
|
procedure cmbDepthChange(Sender: TObject);
|
||||||
|
procedure txtEstimatorChange(Sender: TObject);
|
||||||
|
procedure txtEstimatorMinChange(Sender: TObject);
|
||||||
|
procedure txtEstimatorCurveChange(Sender: TObject);
|
||||||
|
procedure txtJittersChange(Sender: TObject);
|
||||||
|
procedure txtGammaTresholdChange(Sender: TObject);
|
||||||
|
procedure lblFlam3LinkClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
FloatFormatSettings: TFormatSettings;
|
||||||
|
public
|
||||||
|
Filename: string;
|
||||||
|
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
|
||||||
|
Sample_Density, Filter_Radius: double;
|
||||||
|
Estimator, EstimatorMin, EstimatorCurve: double;
|
||||||
|
GammaTreshold: double;
|
||||||
|
Jitters: integer;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
ExportDialog: TExportDialog;
|
||||||
|
Ratio: double;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses Global, Main, ShellAPI;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TExportDialog.btnBrowseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SaveDialog.InitialDir := ExtractFileDir(txtFilename.text);
|
||||||
|
SaveDialog.Filename := txtFilename.Text;
|
||||||
|
case ExportFileFormat of
|
||||||
|
0: SaveDialog.DefaultExt := 'jpg';
|
||||||
|
1: SaveDialog.DefaultExt := 'ppm';
|
||||||
|
end;
|
||||||
|
SaveDialog.filterIndex := ExportFileFormat;
|
||||||
|
SaveDialog.Filter := Format('Portable Pixmap (*.ppm)|*.ppm|%s|*.jpg;*.jpeg|%s|*.png|%s|*.*',
|
||||||
|
[TextByKey('common-filter-jpeg'), TextByKey('common-filter-png'),
|
||||||
|
TextByKey('common-filter-allfiles')]);
|
||||||
|
if SaveDialog.Execute then
|
||||||
|
begin
|
||||||
|
case SaveDialog.FilterIndex of
|
||||||
|
1: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.jpg');
|
||||||
|
2: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.ppm');
|
||||||
|
3: txtFilename.Text := ChangeFileExt(SaveDialog.Filename, '.png');
|
||||||
|
end;
|
||||||
|
ExportFileFormat := SaveDialog.FilterIndex;
|
||||||
|
renderPath := ExtractFilePath(SaveDialog.Filename);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
txtFilename.Text := Filename;
|
||||||
|
cbWidth.Text := IntToStr(MainCp.Width);
|
||||||
|
cbHeight.Text := IntToStr(MainCp.Height);
|
||||||
|
ImageWidth := MainCp.Width;
|
||||||
|
ImageHeight := MainCp.Height;
|
||||||
|
txtDensity.text := FloatToStr(Sample_density);
|
||||||
|
// if cmbDepth.ItemIndex <> 2 then
|
||||||
|
// txtBatches.text := IntToStr(Round(Sample_density / 4));
|
||||||
|
txtFilterRadius.text := FloatToStr(Filter_Radius);
|
||||||
|
txtOversample.text := IntToSTr(Oversample);
|
||||||
|
udOversample.Position := Oversample;
|
||||||
|
Ratio := ImageWidth / ImageHeight;
|
||||||
|
Batches := 1;
|
||||||
|
Estimator := 9.0;
|
||||||
|
EstimatorMin := 0.0;
|
||||||
|
EstimatorCurve := 0.4;
|
||||||
|
Jitters := 1;
|
||||||
|
GammaTreshold := MainCP.gamma_threshold; //0.01;
|
||||||
|
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
|
||||||
|
txtEstimator.Text := FloatToStr(Estimator, FloatFormatSettings);
|
||||||
|
txtEstimatorMin.Text := FloatToStr(EstimatorMin, FloatFormatSettings);
|
||||||
|
txtEstimatorCurve.Text := FloatToStr(EstimatorCurve, FloatFormatSettings);
|
||||||
|
// txtJitters.Text := IntToStr(Jitters);
|
||||||
|
txtGammaTreshold.Text := FloatToStr(GammaTreshold, FloatFormatSettings);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.btnOKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Filename := txtFilename.text;
|
||||||
|
ImageWidth := StrToInt(cbWidth.Text);
|
||||||
|
ImageHeight := StrToInt(cbHeight.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtWidthChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ImageWidth := StrToInt(cbWidth.Text);
|
||||||
|
if chkMaintain.checked and cbWidth.Focused then
|
||||||
|
begin
|
||||||
|
ImageHeight := Round(ImageWidth / ratio);
|
||||||
|
cbHeight.Text := IntToStr(ImageHeight)
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.chkMaintainClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Ratio := ImageWidth / ImageHeight;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtHeightChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ImageHeight := StrToInt(cbHeight.Text);
|
||||||
|
if chkMaintain.checked and cbHeight.Focused then
|
||||||
|
begin
|
||||||
|
ImageWidth := Round(ImageHeight * ratio);
|
||||||
|
cbWidth.Text := IntToStr(ImageWidth)
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtDensityChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Sample_Density := StrToFloat(txtDensity.Text);
|
||||||
|
// if cmbDepth.ItemIndex <> 2 then
|
||||||
|
// txtBatches.text := IntToStr(Round(Sample_density / 4));
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtFilterRadiusChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Filter_Radius := StrToFloat(txtFilterRadius.Text);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtOversampleChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if StrToInt(txtOversample.Text) > udOversample.Max then
|
||||||
|
txtOversample.Text := IntToStr(udOversample.Max);
|
||||||
|
if StrToInt(txtOversample.Text) < udOversample.Min then
|
||||||
|
txtOversample.Text := IntToStr(udOversample.Min);
|
||||||
|
try
|
||||||
|
Oversample := StrToInt(txtOversample.Text);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtBatchesChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{
|
||||||
|
if StrToInt(txtBatches.Text) > udBatches.Max then
|
||||||
|
txtBatches.Text := IntToStr(udBatches.Max);
|
||||||
|
if StrToInt(txtBatches.Text) < udBatches.Min then
|
||||||
|
txtBatches.Text := IntToStr(udBatches.Min);
|
||||||
|
try
|
||||||
|
Batches := StrToInt(txtBatches.Text);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.cmbDepthChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{
|
||||||
|
if cmbDepth.ItemIndex <> 2 then
|
||||||
|
txtBatches.text := IntToStr(Round(Sample_density / 4))
|
||||||
|
else
|
||||||
|
txtBatches.text := IntToStr(1);
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtEstimatorChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Estimator := 0;
|
||||||
|
try
|
||||||
|
Estimator := StrToFloat(txtEstimator.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtEstimatorMinChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
EstimatorMin := 0;
|
||||||
|
try
|
||||||
|
EstimatorMin := StrToFloat(txtEstimatorMin.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtEstimatorCurveChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
EstimatorCurve := 0;
|
||||||
|
try
|
||||||
|
EstimatorCurve := StrToFloat(txtEstimatorCurve.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtJittersChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{
|
||||||
|
Jitters := 0;
|
||||||
|
try
|
||||||
|
Jitters := StrToInt(txtJitters.Text);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtGammaTresholdChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//GammaTreshold := 0.01;
|
||||||
|
try
|
||||||
|
GammaTreshold := StrToFloat(txtGammaTreshold.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.lblFlam3LinkClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ShellExecute(ValidParentForm(Self).Handle, 'open', PChar(TLabel(Sender).Hint),
|
||||||
|
nil, nil, SW_SHOWNORMAL);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
btnOK.Caption := TextByKey('common-ok');
|
||||||
|
btnCancel.Caption := TextByKey('common-cancel');
|
||||||
|
Label1.Caption := TextByKey('common-width');
|
||||||
|
Label2.Caption := TextByKey('common-height');
|
||||||
|
GroupBox2.Caption := TextByKey('common-size');
|
||||||
|
Label13.Caption := TextByKey('common-pixels');
|
||||||
|
chkMaintain.Caption := TextByKey('common-keepaspect');
|
||||||
|
GroupBox1.Caption := TextByKey('common-destination');
|
||||||
|
Label10.Caption := TextByKey('common-filename');
|
||||||
|
btnBrowse.Hint := TextByKey('common-browse');
|
||||||
|
GroupBox3.Caption := TextByKey('common-quality');
|
||||||
|
Label5.Caption := TextByKey('common-filterradius');
|
||||||
|
Label4.Caption := TextByKey('common-density');
|
||||||
|
Label3.Caption := TextByKey('common-oversample');
|
||||||
|
Label14.Caption := TextByKey('common-gammathreshold');
|
||||||
|
self.Caption := TextByKey('main-menu-file-exportflame');
|
||||||
|
GroupBox4.Caption := TextByKey('export-paramoptions-title');
|
||||||
|
Label7.Caption := TextByKey('export-paramoptions-bufferdepth');
|
||||||
|
Label8.Caption := TextByKey('export-paramoptions-strips');
|
||||||
|
Label9.Caption := TextByKey('export-paramoptions-estimatorradius');
|
||||||
|
Label12.Caption := TextByKey('export-paramoptions-estimatorcurve');
|
||||||
|
Label11.Caption := TextByKey('export-paramoptions-estimatormin');
|
||||||
|
chkRender.Caption := TextByKey('export-paramoptions-dorender');
|
||||||
|
Label6.Caption := TextByKey('export-paramoptions-warningtitle');
|
||||||
|
Label15.Caption := TextByKey('export-paramoptions-warningtext');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.Panel1Resize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Label15.Top := (Panel1.Height - 30) div 2 - Label15.Height div 2 + 25;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
553
Forms/FormExportC.dfm
Normal file
553
Forms/FormExportC.dfm
Normal file
@ -0,0 +1,553 @@
|
|||||||
|
object ExportCDialog: TExportCDialog
|
||||||
|
Left = 313
|
||||||
|
Top = 276
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Export Flame'
|
||||||
|
ClientHeight = 134
|
||||||
|
ClientWidth = 496
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
496
|
||||||
|
134)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object btnOK: TButton
|
||||||
|
Left = 254
|
||||||
|
Top = 98
|
||||||
|
Width = 115
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = '&OK'
|
||||||
|
Default = True
|
||||||
|
ModalResult = 1
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = btnOKClick
|
||||||
|
end
|
||||||
|
object btnCancel: TButton
|
||||||
|
Left = 376
|
||||||
|
Top = 98
|
||||||
|
Width = 111
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Cancel'
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 237
|
||||||
|
Width = 481
|
||||||
|
Height = 57
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = ' Destination '
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
DesignSize = (
|
||||||
|
481
|
||||||
|
57)
|
||||||
|
object btnBrowse: TSpeedButton
|
||||||
|
Left = 448
|
||||||
|
Top = 19
|
||||||
|
Width = 24
|
||||||
|
Height = 24
|
||||||
|
Hint = 'Browse...'
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
|
||||||
|
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
|
||||||
|
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
|
||||||
|
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
|
||||||
|
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
|
||||||
|
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
|
||||||
|
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
|
||||||
|
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
|
||||||
|
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
|
||||||
|
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
|
||||||
|
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
|
||||||
|
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
|
||||||
|
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
|
||||||
|
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
|
||||||
|
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
|
||||||
|
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
|
||||||
|
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnBrowseClick
|
||||||
|
end
|
||||||
|
object Label10: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'File name'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object txtFilename: TEdit
|
||||||
|
Left = 112
|
||||||
|
Top = 20
|
||||||
|
Width = 337
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox3: TGroupBox
|
||||||
|
Left = 256
|
||||||
|
Top = 10
|
||||||
|
Width = 233
|
||||||
|
Height = 79
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = ' Quality '
|
||||||
|
TabOrder = 3
|
||||||
|
DesignSize = (
|
||||||
|
233
|
||||||
|
79)
|
||||||
|
object udOversample: TUpDown
|
||||||
|
Left = 212
|
||||||
|
Top = 44
|
||||||
|
Width = 12
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Associate = txtOversample
|
||||||
|
Min = 1
|
||||||
|
Max = 4
|
||||||
|
Position = 2
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Label5: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Filter radius'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object txtFilterRadius: TEdit
|
||||||
|
Left = 120
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = txtFilterRadiusChange
|
||||||
|
end
|
||||||
|
object Label3: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 44
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Oversample'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object txtOversample: TEdit
|
||||||
|
Left = 120
|
||||||
|
Top = 44
|
||||||
|
Width = 92
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 1
|
||||||
|
Text = '2'
|
||||||
|
OnChange = txtOversampleChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox2: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 10
|
||||||
|
Width = 241
|
||||||
|
Height = 111
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = ' Size '
|
||||||
|
TabOrder = 4
|
||||||
|
DesignSize = (
|
||||||
|
241
|
||||||
|
111)
|
||||||
|
object Label13: TLabel
|
||||||
|
Left = 184
|
||||||
|
Top = 36
|
||||||
|
Width = 26
|
||||||
|
Height = 13
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'pixels'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label16: TLabel
|
||||||
|
Left = 168
|
||||||
|
Top = 22
|
||||||
|
Width = 15
|
||||||
|
Height = 36
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = '}'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -32
|
||||||
|
Font.Name = 'Times New Roman'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object chkMaintain: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 76
|
||||||
|
Width = 225
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Maintain aspect ratio'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = chkMaintainClick
|
||||||
|
end
|
||||||
|
object Label1: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Width'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object Label2: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 44
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Height'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object cbHeight: TComboBox
|
||||||
|
Left = 112
|
||||||
|
Top = 44
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = txtHeightChange
|
||||||
|
Items.Strings = (
|
||||||
|
'200'
|
||||||
|
'240'
|
||||||
|
'480'
|
||||||
|
'600'
|
||||||
|
'768'
|
||||||
|
'1024'
|
||||||
|
'1200'
|
||||||
|
'2048'
|
||||||
|
'2400')
|
||||||
|
end
|
||||||
|
object cbWidth: TComboBox
|
||||||
|
Left = 112
|
||||||
|
Top = 20
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = txtWidthChange
|
||||||
|
Items.Strings = (
|
||||||
|
'320'
|
||||||
|
'640'
|
||||||
|
'800'
|
||||||
|
'1024'
|
||||||
|
'1280'
|
||||||
|
'1600'
|
||||||
|
'1920'
|
||||||
|
'2048'
|
||||||
|
'2560'
|
||||||
|
'3200')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox4: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 392
|
||||||
|
Width = 377
|
||||||
|
Height = 113
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = ' Parameters '
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
DesignSize = (
|
||||||
|
377
|
||||||
|
113)
|
||||||
|
object udStrips: TUpDown
|
||||||
|
Left = 172
|
||||||
|
Top = 52
|
||||||
|
Width = 12
|
||||||
|
Height = 21
|
||||||
|
Associate = txtStrips
|
||||||
|
Min = 1
|
||||||
|
Max = 512
|
||||||
|
Position = 1
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object Label7: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Buffer depth'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object Label8: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 52
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Strips'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 8
|
||||||
|
end
|
||||||
|
object Label9: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 84
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'DE Radius'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 9
|
||||||
|
end
|
||||||
|
object txtEstimator: TEdit
|
||||||
|
Left = 112
|
||||||
|
Top = 84
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 3
|
||||||
|
Text = '5'
|
||||||
|
end
|
||||||
|
object txtStrips: TEdit
|
||||||
|
Left = 112
|
||||||
|
Top = 52
|
||||||
|
Width = 60
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 1
|
||||||
|
Text = '1'
|
||||||
|
end
|
||||||
|
object cmbDepth: TComboBox
|
||||||
|
Left = 112
|
||||||
|
Top = 20
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 0
|
||||||
|
Items.Strings = (
|
||||||
|
'16-bit'
|
||||||
|
'32-bit'
|
||||||
|
'32-bit float'
|
||||||
|
'64-bit')
|
||||||
|
end
|
||||||
|
object Label14: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Gamma threshold'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 10
|
||||||
|
end
|
||||||
|
object Label12: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 52
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'DE Curve'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 11
|
||||||
|
end
|
||||||
|
object Label11: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 84
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'DE Minimum'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 12
|
||||||
|
end
|
||||||
|
object txtGammaTreshold: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 20
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 6
|
||||||
|
Text = '0.01'
|
||||||
|
OnChange = txtGammaTresholdChange
|
||||||
|
end
|
||||||
|
object txtEstimatorCurve: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 52
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 5
|
||||||
|
Text = '0.6'
|
||||||
|
end
|
||||||
|
object txtEstimatorMin: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 84
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 4
|
||||||
|
Text = '0'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object chkRender: TCheckBox
|
||||||
|
Left = 392
|
||||||
|
Top = 398
|
||||||
|
Width = 89
|
||||||
|
Height = 43
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Render'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 6
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 296
|
||||||
|
Width = 481
|
||||||
|
Height = 89
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
BevelKind = bkSoft
|
||||||
|
BevelOuter = bvNone
|
||||||
|
Color = clInfoBk
|
||||||
|
TabOrder = 7
|
||||||
|
Visible = False
|
||||||
|
DesignSize = (
|
||||||
|
477
|
||||||
|
85)
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 4
|
||||||
|
Width = 453
|
||||||
|
Height = 24
|
||||||
|
Alignment = taCenter
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
AutoSize = False
|
||||||
|
Caption = 'WARNING!'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clInfoText
|
||||||
|
Font.Height = -19
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
|
object Label15: TLabel
|
||||||
|
Left = 8
|
||||||
|
Top = 25
|
||||||
|
Width = 447
|
||||||
|
Height = 26
|
||||||
|
Alignment = taCenter
|
||||||
|
Anchors = [akLeft, akRight]
|
||||||
|
Caption =
|
||||||
|
'Fractals created with this version of Apophysis are not supporte' +
|
||||||
|
'd by the external renderer! To render 2D-only fractals, download' +
|
||||||
|
' the latest version of FLAM3 from http://www.flam3.com'
|
||||||
|
Color = clInfoBk
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clInfoText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object txtDensity: TEdit
|
||||||
|
Left = 120
|
||||||
|
Top = 212
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 8
|
||||||
|
Visible = False
|
||||||
|
OnChange = txtDensityChange
|
||||||
|
end
|
||||||
|
object Label4: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 212
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Density'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 9
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object SaveDialog: TSaveDialog
|
||||||
|
DefaultExt = 'jpg'
|
||||||
|
Filter =
|
||||||
|
'JPEG Image (*.jpg)|*.jpg|PPM Image (*.ppm)|*.ppm|PNG Images (*.p' +
|
||||||
|
'ng)|*.png'
|
||||||
|
Left = 464
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
end
|
257
Forms/FormExportC.pas
Normal file
257
Forms/FormExportC.pas
Normal file
@ -0,0 +1,257 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit FormExportC;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
StdCtrls, Buttons, ComCtrls, ExtCtrls, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TExportCDialog = class(TForm)
|
||||||
|
btnOK: TButton;
|
||||||
|
btnCancel: TButton;
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
btnBrowse: TSpeedButton;
|
||||||
|
txtFilename: TEdit;
|
||||||
|
SaveDialog: TSaveDialog;
|
||||||
|
GroupBox3: TGroupBox;
|
||||||
|
txtOversample: TEdit;
|
||||||
|
txtFilterRadius: TEdit;
|
||||||
|
udOversample: TUpDown;
|
||||||
|
GroupBox2: TGroupBox;
|
||||||
|
chkMaintain: TCheckBox;
|
||||||
|
cbWidth: TComboBox;
|
||||||
|
cbHeight: TComboBox;
|
||||||
|
GroupBox4: TGroupBox;
|
||||||
|
cmbDepth: TComboBox;
|
||||||
|
chkRender: TCheckBox;
|
||||||
|
txtStrips: TEdit;
|
||||||
|
udStrips: TUpDown;
|
||||||
|
txtEstimator: TEdit;
|
||||||
|
txtEstimatorMin: TEdit;
|
||||||
|
txtEstimatorCurve: TEdit;
|
||||||
|
txtGammaTreshold: TEdit;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Label6: TLabel;
|
||||||
|
Label15: TLabel;
|
||||||
|
Label13: TLabel;
|
||||||
|
Label16: TLabel;
|
||||||
|
Label5: TPanel;
|
||||||
|
Label3: TPanel;
|
||||||
|
Label1: TPanel;
|
||||||
|
Label2: TPanel;
|
||||||
|
Label7: TPanel;
|
||||||
|
Label8: TPanel;
|
||||||
|
Label9: TPanel;
|
||||||
|
Label14: TPanel;
|
||||||
|
Label12: TPanel;
|
||||||
|
Label11: TPanel;
|
||||||
|
Label10: TPanel;
|
||||||
|
txtDensity: TEdit;
|
||||||
|
Label4: TPanel;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure btnBrowseClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure btnOKClick(Sender: TObject);
|
||||||
|
procedure txtWidthChange(Sender: TObject);
|
||||||
|
procedure chkMaintainClick(Sender: TObject);
|
||||||
|
procedure txtHeightChange(Sender: TObject);
|
||||||
|
procedure txtDensityChange(Sender: TObject);
|
||||||
|
procedure txtFilterRadiusChange(Sender: TObject);
|
||||||
|
procedure txtOversampleChange(Sender: TObject);
|
||||||
|
procedure txtGammaTresholdChange(Sender: TObject);
|
||||||
|
private
|
||||||
|
FloatFormatSettings: TFormatSettings;
|
||||||
|
Estimator, EstimatorMin, EstimatorCurve: double;
|
||||||
|
Jitters, Batches, Strips: integer;
|
||||||
|
public
|
||||||
|
Filename: string;
|
||||||
|
ImageWidth, ImageHeight, Oversample: Integer;
|
||||||
|
Sample_Density, Filter_Radius: double;
|
||||||
|
GammaTreshold: double;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
ExportCDialog: TExportCDialog;
|
||||||
|
Ratio: double;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
uses Global, Main, ShellAPI;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TExportCDialog.btnBrowseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
SaveDialog.InitialDir := ExtractFileDir(txtFilename.text);
|
||||||
|
SaveDialog.Filename := txtFilename.Text;
|
||||||
|
SaveDialog.DefaultExt := 'png';
|
||||||
|
SaveDialog.filterIndex := ExportFileFormat;
|
||||||
|
SaveDialog.Filter := Format('%s|*.png|%s|*.*',
|
||||||
|
[TextByKey('common-filter-png'),
|
||||||
|
TextByKey('common-filter-allfiles')]);
|
||||||
|
if SaveDialog.Execute then
|
||||||
|
begin
|
||||||
|
ExportFileFormat := SaveDialog.FilterIndex;
|
||||||
|
renderPath := ExtractFilePath(SaveDialog.Filename);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
txtFilename.Text := Filename;
|
||||||
|
cbWidth.Text := IntToStr(MainCp.Width);
|
||||||
|
cbHeight.Text := IntToStr(MainCp.Height);
|
||||||
|
ImageWidth := MainCp.Width;
|
||||||
|
ImageHeight := MainCp.Height;
|
||||||
|
txtDensity.text := FloatToStr(Sample_density);
|
||||||
|
// if cmbDepth.ItemIndex <> 2 then
|
||||||
|
// txtBatches.text := IntToStr(Round(Sample_density / 4));
|
||||||
|
txtFilterRadius.text := FloatToStr(Filter_Radius);
|
||||||
|
txtOversample.text := IntToSTr(Oversample);
|
||||||
|
udOversample.Position := Oversample;
|
||||||
|
Ratio := ImageWidth / ImageHeight;
|
||||||
|
Batches := 1;
|
||||||
|
Estimator := 9.0;
|
||||||
|
EstimatorMin := 0.0;
|
||||||
|
EstimatorCurve := 0.4;
|
||||||
|
Jitters := 1;
|
||||||
|
GammaTreshold := MainCP.gamma_threshold; //0.01;
|
||||||
|
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
|
||||||
|
txtEstimator.Text := FloatToStr(Estimator, FloatFormatSettings);
|
||||||
|
txtEstimatorMin.Text := FloatToStr(EstimatorMin, FloatFormatSettings);
|
||||||
|
txtEstimatorCurve.Text := FloatToStr(EstimatorCurve, FloatFormatSettings);
|
||||||
|
// txtJitters.Text := IntToStr(Jitters);
|
||||||
|
txtGammaTreshold.Text := FloatToStr(GammaTreshold, FloatFormatSettings);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.btnOKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Filename := txtFilename.text;
|
||||||
|
ImageWidth := StrToInt(cbWidth.Text);
|
||||||
|
ImageHeight := StrToInt(cbHeight.Text);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.txtWidthChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ImageWidth := StrToInt(cbWidth.Text);
|
||||||
|
if chkMaintain.checked and cbWidth.Focused then
|
||||||
|
begin
|
||||||
|
ImageHeight := Round(ImageWidth / ratio);
|
||||||
|
cbHeight.Text := IntToStr(ImageHeight)
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.chkMaintainClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Ratio := ImageWidth / ImageHeight;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.txtHeightChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
ImageHeight := StrToInt(cbHeight.Text);
|
||||||
|
if chkMaintain.checked and cbHeight.Focused then
|
||||||
|
begin
|
||||||
|
ImageWidth := Round(ImageHeight * ratio);
|
||||||
|
cbWidth.Text := IntToStr(ImageWidth)
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.txtDensityChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Sample_Density := StrToFloat(txtDensity.Text);
|
||||||
|
// if cmbDepth.ItemIndex <> 2 then
|
||||||
|
// txtBatches.text := IntToStr(Round(Sample_density / 4));
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.txtFilterRadiusChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Filter_Radius := StrToFloat(txtFilterRadius.Text);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.txtOversampleChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if StrToInt(txtOversample.Text) > udOversample.Max then
|
||||||
|
txtOversample.Text := IntToStr(udOversample.Max);
|
||||||
|
if StrToInt(txtOversample.Text) < udOversample.Min then
|
||||||
|
txtOversample.Text := IntToStr(udOversample.Min);
|
||||||
|
try
|
||||||
|
Oversample := StrToInt(txtOversample.Text);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.txtGammaTresholdChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//GammaTreshold := 0.01;
|
||||||
|
try
|
||||||
|
GammaTreshold := StrToFloat(txtGammaTreshold.Text, FloatFormatSettings);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportCDialog.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
btnOK.Caption := TextByKey('common-ok');
|
||||||
|
btnCancel.Caption := TextByKey('common-cancel');
|
||||||
|
Label1.Caption := TextByKey('common-width');
|
||||||
|
Label2.Caption := TextByKey('common-height');
|
||||||
|
GroupBox2.Caption := TextByKey('common-size');
|
||||||
|
Label13.Caption := TextByKey('common-pixels');
|
||||||
|
chkMaintain.Caption := TextByKey('common-keepaspect');
|
||||||
|
GroupBox1.Caption := TextByKey('common-destination');
|
||||||
|
Label10.Caption := TextByKey('common-filename');
|
||||||
|
btnBrowse.Hint := TextByKey('common-browse');
|
||||||
|
GroupBox3.Caption := TextByKey('common-quality');
|
||||||
|
Label5.Caption := TextByKey('common-filterradius');
|
||||||
|
Label4.Caption := TextByKey('common-density');
|
||||||
|
Label3.Caption := TextByKey('common-oversample');
|
||||||
|
Label14.Caption := TextByKey('common-gammathreshold');
|
||||||
|
self.Caption := TextByKey('main-menu-file-exportchaotica');
|
||||||
|
GroupBox4.Caption := TextByKey('export-paramoptions-title');
|
||||||
|
Label7.Caption := TextByKey('export-paramoptions-bufferdepth');
|
||||||
|
Label8.Caption := TextByKey('export-paramoptions-strips');
|
||||||
|
Label9.Caption := TextByKey('export-paramoptions-estimatorradius');
|
||||||
|
Label12.Caption := TextByKey('export-paramoptions-estimatorcurve');
|
||||||
|
Label11.Caption := TextByKey('export-paramoptions-estimatormin');
|
||||||
|
chkRender.Caption := TextByKey('export-paramoptions-dorender');
|
||||||
|
Label6.Caption := TextByKey('export-paramoptions-warningtitle');
|
||||||
|
Label15.Caption := TextByKey('export-paramoptions-warningtext');
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
115
Forms/FormFavorites.dfm
Normal file
115
Forms/FormFavorites.dfm
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
object FavoritesForm: TFavoritesForm
|
||||||
|
Left = 493
|
||||||
|
Top = 541
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Favorite Scripts'
|
||||||
|
ClientHeight = 275
|
||||||
|
ClientWidth = 352
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poScreenCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
352
|
||||||
|
275)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object PageControl1: TPageControl
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 338
|
||||||
|
Height = 231
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object ListView: TListView
|
||||||
|
Left = 16
|
||||||
|
Top = 16
|
||||||
|
Width = 218
|
||||||
|
Height = 215
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
Columns = <
|
||||||
|
item
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Name'
|
||||||
|
end>
|
||||||
|
HideSelection = False
|
||||||
|
ReadOnly = True
|
||||||
|
RowSelect = True
|
||||||
|
ShowColumnHeaders = False
|
||||||
|
TabOrder = 1
|
||||||
|
ViewStyle = vsReport
|
||||||
|
OnChange = ListViewChange
|
||||||
|
end
|
||||||
|
object btnAdd: TButton
|
||||||
|
Left = 241
|
||||||
|
Top = 16
|
||||||
|
Width = 99
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = '&Add'
|
||||||
|
TabOrder = 2
|
||||||
|
TabStop = False
|
||||||
|
OnClick = btnAddClick
|
||||||
|
end
|
||||||
|
object btnRemove: TButton
|
||||||
|
Left = 241
|
||||||
|
Top = 48
|
||||||
|
Width = 99
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = '&Remove'
|
||||||
|
TabOrder = 3
|
||||||
|
TabStop = False
|
||||||
|
OnClick = btnRemoveClick
|
||||||
|
end
|
||||||
|
object btnMoveUp: TButton
|
||||||
|
Left = 241
|
||||||
|
Top = 80
|
||||||
|
Width = 99
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Move &Up'
|
||||||
|
TabOrder = 4
|
||||||
|
TabStop = False
|
||||||
|
OnClick = btnMoveUpClick
|
||||||
|
end
|
||||||
|
object btnMoveDown: TButton
|
||||||
|
Left = 241
|
||||||
|
Top = 112
|
||||||
|
Width = 99
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Move &Down'
|
||||||
|
TabOrder = 5
|
||||||
|
TabStop = False
|
||||||
|
OnClick = btnMoveDownClick
|
||||||
|
end
|
||||||
|
object btnOK: TButton
|
||||||
|
Left = 193
|
||||||
|
Top = 246
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = '&OK'
|
||||||
|
TabOrder = 6
|
||||||
|
OnClick = btnOKClick
|
||||||
|
end
|
||||||
|
object btnCancel: TButton
|
||||||
|
Left = 273
|
||||||
|
Top = 246
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = '&Cancel'
|
||||||
|
TabOrder = 7
|
||||||
|
OnClick = btnCancelClick
|
||||||
|
end
|
||||||
|
end
|
224
Forms/FormFavorites.pas
Normal file
224
Forms/FormFavorites.pas
Normal file
@ -0,0 +1,224 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit FormFavorites;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
StdCtrls, ExtCtrls, ComCtrls, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFavoritesForm = class(TForm)
|
||||||
|
PageControl1: TPageControl;
|
||||||
|
ListView: TListView;
|
||||||
|
btnAdd: TButton;
|
||||||
|
btnRemove: TButton;
|
||||||
|
btnMoveUp: TButton;
|
||||||
|
btnMoveDown: TButton;
|
||||||
|
btnOK: TButton;
|
||||||
|
btnCancel: TButton;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure btnCancelClick(Sender: TObject);
|
||||||
|
procedure btnOKClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure btnAddClick(Sender: TObject);
|
||||||
|
procedure btnRemoveClick(Sender: TObject);
|
||||||
|
procedure ListViewChange(Sender: TObject; Item: TListItem;
|
||||||
|
Change: TItemChange);
|
||||||
|
procedure btnMoveUpClick(Sender: TObject);
|
||||||
|
procedure btnMoveDownClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
Faves: TStringList;
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
FavoritesForm: TFavoritesForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Global, ScriptForm;
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TFavoritesForm.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
ListItem: TListItem;
|
||||||
|
i: integer;
|
||||||
|
s: string;
|
||||||
|
begin
|
||||||
|
Faves.Text := Favorites.text;
|
||||||
|
ListView.Items.Clear;
|
||||||
|
for i := 0 to Favorites.Count - 1 do
|
||||||
|
begin
|
||||||
|
ListItem := ListView.Items.Add;
|
||||||
|
s := ExtractFileName(Favorites[i]);
|
||||||
|
s := Copy(s, 0, length(s) - Length(ExtractFileExt(s)));
|
||||||
|
Listitem.Caption := s;
|
||||||
|
end;
|
||||||
|
if Favorites.Count <> 0 then ListView.Selected := ListView.Items[0]
|
||||||
|
else
|
||||||
|
btnRemove.Enabled := False;
|
||||||
|
if ListView.Items.Count <= 1 then
|
||||||
|
begin
|
||||||
|
btnMoveUp.Enabled := False;
|
||||||
|
btnMoveDown.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.btnCancelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.btnOKClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := mrOK;
|
||||||
|
Faves.SaveToFile(AppPath + scriptFavsFilename);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
btnOK.Caption := TextByKey('common-ok');
|
||||||
|
btnCancel.Caption := TextByKey('common-cancel');
|
||||||
|
self.Caption := TextByKey('favscripts-title');
|
||||||
|
btnAdd.Caption := TextByKey('favscripts-add');
|
||||||
|
btnRemove.Caption := TextByKey('favscripts-remove');
|
||||||
|
btnMoveUp.Caption := TextByKey('favscripts-moveup');
|
||||||
|
btnMoveDown.Caption := TextByKey('favscripts-movedown');
|
||||||
|
|
||||||
|
Faves := TStringList.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Faves.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.btnAddClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
ListItem: TListItem;
|
||||||
|
i : integer;
|
||||||
|
s: string;
|
||||||
|
begin
|
||||||
|
ScriptEditor.MainOpenDialog.InitialDir := ScriptPath;
|
||||||
|
ScriptEditor.MainOpenDialog.Filter := Format('%s|*.aposcript;*.asc|%s|*.*',
|
||||||
|
[TextByKey('common-filter-script'),
|
||||||
|
TextByKey('common-filter-allfiles')]);
|
||||||
|
if ScriptEditor.mainOpenDialog.Execute then
|
||||||
|
begin
|
||||||
|
for i := 0 to Faves.Count - 1 do
|
||||||
|
begin
|
||||||
|
if ScriptEditor.MainOpenDialog.Filename = Faves[i] then exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Faves.add(ScriptEditor.MainOpenDialog.Filename);
|
||||||
|
ListItem := ListView.Items.Add;
|
||||||
|
s := ExtractFileName(ScriptEditor.MainOpenDialog.Filename);
|
||||||
|
s := Copy(s, 0, length(s) - Length(ExtractFileExt(s)));
|
||||||
|
Listitem.Caption := s;
|
||||||
|
ListView.Selected := ListView.Items[ListView.Items.Count - 1];
|
||||||
|
btnRemove.Enabled := True;
|
||||||
|
end;
|
||||||
|
if ListView.Items.Count <= 1 then
|
||||||
|
begin
|
||||||
|
btnMoveUp.Enabled := False;
|
||||||
|
btnMoveDown.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.btnRemoveClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
i := ListView.Selected.Index;
|
||||||
|
Faves.Delete(i);
|
||||||
|
ListView.Items[i].delete;
|
||||||
|
if ListView.Items.Count <> 0 then
|
||||||
|
if i < ListView.Items.Count then
|
||||||
|
ListView.Selected := ListView.Items[i]
|
||||||
|
else
|
||||||
|
ListView.Selected := ListView.Items[ListView.Items.Count - 1]
|
||||||
|
else
|
||||||
|
btnRemove.Enabled := False;
|
||||||
|
if ListView.Items.Count <= 1 then
|
||||||
|
begin
|
||||||
|
btnMoveUp.Enabled := False;
|
||||||
|
btnMoveDown.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.ListViewChange(Sender: TObject; Item: TListItem;
|
||||||
|
Change: TItemChange);
|
||||||
|
begin
|
||||||
|
if (Item.Index = ListView.Items.Count - 1) then
|
||||||
|
btnMoveDown.Enabled := False
|
||||||
|
else
|
||||||
|
btnMoveDown.Enabled := True;
|
||||||
|
if (Item.Index = 0) then
|
||||||
|
btnMoveUp.Enabled := False
|
||||||
|
else
|
||||||
|
btnMoveUp.Enabled := True;
|
||||||
|
|
||||||
|
if (ListView.Items.Count <= 1) then
|
||||||
|
begin
|
||||||
|
btnMoveDown.Enabled := False;
|
||||||
|
btnMoveUp.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.btnMoveUpClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
s: string;
|
||||||
|
begin
|
||||||
|
i := ListView.Selected.Index;
|
||||||
|
s := faves[i];
|
||||||
|
Faves[i] := Faves[i - 1];
|
||||||
|
Faves[i - 1] := s;
|
||||||
|
s := ListView.Selected.Caption;
|
||||||
|
ListView.Selected.Caption := Listview.Items[i - 1].Caption;
|
||||||
|
ListView.Items[i - 1].Caption := s;
|
||||||
|
ListView.Selected := ListView.Items[i - 1];
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFavoritesForm.btnMoveDownClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
s: string;
|
||||||
|
begin
|
||||||
|
i := ListView.Selected.Index;
|
||||||
|
s := faves[i];
|
||||||
|
Faves[i] := Faves[i + 1];
|
||||||
|
Faves[i + 1] := s;
|
||||||
|
s := ListView.Selected.Caption;
|
||||||
|
ListView.Selected.Caption := Listview.Items[i + 1].Caption;
|
||||||
|
ListView.Items[i + 1].Caption := s;
|
||||||
|
ListView.Selected := ListView.Items[i + 1];
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
723
Forms/FormRender.dfm
Normal file
723
Forms/FormRender.dfm
Normal file
@ -0,0 +1,723 @@
|
|||||||
|
object RenderForm: TRenderForm
|
||||||
|
Left = 851
|
||||||
|
Top = 205
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
Caption = 'Render to Disk'
|
||||||
|
ClientHeight = 469
|
||||||
|
ClientWidth = 497
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCloseQuery = FormCloseQuery
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
497
|
||||||
|
469)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object btnRender: TButton
|
||||||
|
Left = 256
|
||||||
|
Top = 420
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Start'
|
||||||
|
Default = True
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = btnRenderClick
|
||||||
|
end
|
||||||
|
object btnCancel: TButton
|
||||||
|
Left = 416
|
||||||
|
Top = 420
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Close'
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = btnCancelClick
|
||||||
|
end
|
||||||
|
object btnPause: TButton
|
||||||
|
Left = 336
|
||||||
|
Top = 420
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Pause'
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = btnPauseClick
|
||||||
|
end
|
||||||
|
object PageCtrl: TPageControl
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 481
|
||||||
|
Height = 373
|
||||||
|
ActivePage = TabSettings
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
Images = MainForm.Buttons
|
||||||
|
TabOrder = 3
|
||||||
|
object TabSettings: TTabSheet
|
||||||
|
Caption = 'Settings'
|
||||||
|
ImageIndex = 18
|
||||||
|
DesignSize = (
|
||||||
|
473
|
||||||
|
344)
|
||||||
|
object btnBrowse: TSpeedButton
|
||||||
|
Left = 416
|
||||||
|
Top = 11
|
||||||
|
Width = 24
|
||||||
|
Height = 24
|
||||||
|
Hint = 'Browse...'
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
|
||||||
|
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
|
||||||
|
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
|
||||||
|
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
|
||||||
|
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
|
||||||
|
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
|
||||||
|
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
|
||||||
|
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
|
||||||
|
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
|
||||||
|
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
|
||||||
|
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
|
||||||
|
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
|
||||||
|
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
|
||||||
|
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
|
||||||
|
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
|
||||||
|
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
|
||||||
|
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnBrowseClick
|
||||||
|
end
|
||||||
|
object btnGoTo: TSpeedButton
|
||||||
|
Left = 440
|
||||||
|
Top = 11
|
||||||
|
Width = 24
|
||||||
|
Height = 24
|
||||||
|
Hint = 'Browse...'
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FF964924EADBD3FF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF9D
|
||||||
|
4D259D4E28EADBD3FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFCF835D9247239A4B25A24F27AB5429BF6A3FA0502AEADBD3FF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFD78B65FDB089F7905CEC8856DE
|
||||||
|
7F4FD17648C46E42A25631EADBD3FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFDE926CFCB997FDA578FC935EF28C59E58453D87B4CC66E41AE582BFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFE49872FBC3A6FDBE9EFEAE85FF
|
||||||
|
A87DF89D6FE58351AE582BF4E7E1FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFE89C76E29670DA8E68D1855FDB906AF79A6BAE582BF4E7E1FF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFE5
|
||||||
|
9973C5764EF3E6DFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFE89C76F8EDE8FF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnGoToClick
|
||||||
|
end
|
||||||
|
object GroupBox5: TGroupBox
|
||||||
|
Left = 464
|
||||||
|
Top = 16
|
||||||
|
Width = 425
|
||||||
|
Height = 57
|
||||||
|
Caption = 'Preset'
|
||||||
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
|
object btnSavePreset: TSpeedButton
|
||||||
|
Left = 368
|
||||||
|
Top = 18
|
||||||
|
Width = 24
|
||||||
|
Height = 24
|
||||||
|
Hint = 'Save Preset'
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnSavePresetClick
|
||||||
|
end
|
||||||
|
object btnDeletePreset: TSpeedButton
|
||||||
|
Left = 392
|
||||||
|
Top = 18
|
||||||
|
Width = 24
|
||||||
|
Height = 24
|
||||||
|
Hint = 'Delete Preset'
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnDeletePresetClick
|
||||||
|
end
|
||||||
|
object cmbPreset: TComboBox
|
||||||
|
Left = 10
|
||||||
|
Top = 20
|
||||||
|
Width = 351
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = cmbPresetChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox2: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 42
|
||||||
|
Width = 233
|
||||||
|
Height = 95
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Size'
|
||||||
|
TabOrder = 1
|
||||||
|
DesignSize = (
|
||||||
|
233
|
||||||
|
95)
|
||||||
|
object Label6: TLabel
|
||||||
|
Left = 144
|
||||||
|
Top = 22
|
||||||
|
Width = 15
|
||||||
|
Height = 36
|
||||||
|
Caption = '}'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -32
|
||||||
|
Font.Name = 'Times New Roman'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label7: TLabel
|
||||||
|
Left = 160
|
||||||
|
Top = 36
|
||||||
|
Width = 26
|
||||||
|
Height = 13
|
||||||
|
Caption = 'pixels'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object chkMaintain: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 70
|
||||||
|
Width = 217
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Keep aspect ratio'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = chkMaintainClick
|
||||||
|
end
|
||||||
|
object pnlWidth: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Width'
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object pnlHeight: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 44
|
||||||
|
Width = 113
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Height'
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object cbHeight: TComboBox
|
||||||
|
Left = 120
|
||||||
|
Top = 44
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
BiDiMode = bdLeftToRight
|
||||||
|
Enabled = False
|
||||||
|
ParentBiDiMode = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnChange = txtHeightChange
|
||||||
|
Items.Strings = (
|
||||||
|
'200'
|
||||||
|
'240'
|
||||||
|
'480'
|
||||||
|
'600'
|
||||||
|
'768'
|
||||||
|
'1024'
|
||||||
|
'1200'
|
||||||
|
'1920'
|
||||||
|
'2048'
|
||||||
|
'2400')
|
||||||
|
end
|
||||||
|
object cbWidth: TComboBox
|
||||||
|
Left = 120
|
||||||
|
Top = 20
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
BiDiMode = bdLeftToRight
|
||||||
|
Enabled = False
|
||||||
|
ParentBiDiMode = False
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = txtWidthChange
|
||||||
|
Items.Strings = (
|
||||||
|
'320'
|
||||||
|
'640'
|
||||||
|
'800'
|
||||||
|
'1024'
|
||||||
|
'1280'
|
||||||
|
'1600'
|
||||||
|
'1920'
|
||||||
|
'2048'
|
||||||
|
'2560'
|
||||||
|
'3200')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox3: TGroupBox
|
||||||
|
Left = 248
|
||||||
|
Top = 42
|
||||||
|
Width = 218
|
||||||
|
Height = 95
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'Quality settings'
|
||||||
|
TabOrder = 2
|
||||||
|
DesignSize = (
|
||||||
|
218
|
||||||
|
95)
|
||||||
|
object udOversample: TUpDown
|
||||||
|
Left = 196
|
||||||
|
Top = 68
|
||||||
|
Width = 13
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Associate = txtOversample
|
||||||
|
Min = 1
|
||||||
|
Max = 16
|
||||||
|
Position = 1
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object pnlDensity: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 20
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Density'
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object pnlFilter: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 44
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Filter radius'
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object pnlOversample: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 68
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Oversample'
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object txtDensity: TComboBox
|
||||||
|
Left = 128
|
||||||
|
Top = 20
|
||||||
|
Width = 82
|
||||||
|
Height = 21
|
||||||
|
AutoComplete = False
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = txtDensityChange
|
||||||
|
OnCloseUp = txtDensityChange
|
||||||
|
Items.Strings = (
|
||||||
|
'200'
|
||||||
|
'500'
|
||||||
|
'1000'
|
||||||
|
'2000'
|
||||||
|
'4000')
|
||||||
|
end
|
||||||
|
object txtFilterRadius: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 44
|
||||||
|
Width = 82
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
BiDiMode = bdRightToLeft
|
||||||
|
ParentBiDiMode = False
|
||||||
|
TabOrder = 1
|
||||||
|
Text = '0.1'
|
||||||
|
OnChange = txtFilterRadiusChange
|
||||||
|
end
|
||||||
|
object txtOversample: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 68
|
||||||
|
Width = 68
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
BiDiMode = bdRightToLeft
|
||||||
|
Enabled = False
|
||||||
|
ParentBiDiMode = False
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 2
|
||||||
|
Text = '1'
|
||||||
|
OnChange = txtOversampleChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox4: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 142
|
||||||
|
Width = 458
|
||||||
|
Height = 99
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Resource usage'
|
||||||
|
TabOrder = 3
|
||||||
|
DesignSize = (
|
||||||
|
458
|
||||||
|
99)
|
||||||
|
object lblApproxMem: TLabel
|
||||||
|
Left = 439
|
||||||
|
Top = 100
|
||||||
|
Width = 42
|
||||||
|
Height = 13
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = '0000 Mb'
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object lblPhysical: TLabel
|
||||||
|
Left = 439
|
||||||
|
Top = 96
|
||||||
|
Width = 42
|
||||||
|
Height = 13
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = '0000 Mb'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object lblMaxbits: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 116
|
||||||
|
Width = 33
|
||||||
|
Height = 13
|
||||||
|
Hint = '- No render stats -'
|
||||||
|
Alignment = taRightJustify
|
||||||
|
Caption = '99.999'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object Label9: TLabel
|
||||||
|
Left = 440
|
||||||
|
Top = 108
|
||||||
|
Width = 96
|
||||||
|
Height = 13
|
||||||
|
Hint = '- No render stats -'
|
||||||
|
Caption = 'Max bits per sample:'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object lblMemory: TLabel
|
||||||
|
Left = 11
|
||||||
|
Top = 18
|
||||||
|
Width = 442
|
||||||
|
Height = 24
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
AutoSize = False
|
||||||
|
Caption =
|
||||||
|
'The render process will use 0000 Mb of 0000MB available physical' +
|
||||||
|
' memory'
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Layout = tlCenter
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object lblCPUCores: TLabel
|
||||||
|
Left = 11
|
||||||
|
Top = 43
|
||||||
|
Width = 442
|
||||||
|
Height = 14
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
AutoSize = False
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
Layout = tlCenter
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
|
object chkLimitMem: TCheckBox
|
||||||
|
Left = 444
|
||||||
|
Top = 134
|
||||||
|
Width = 125
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Limit memory usage to:'
|
||||||
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object pnlLimit: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 68
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Memory limit'
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object cbMaxMemory: TComboBox
|
||||||
|
Left = 128
|
||||||
|
Top = 68
|
||||||
|
Width = 97
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
BiDiMode = bdLeftToRight
|
||||||
|
ItemIndex = 0
|
||||||
|
ParentBiDiMode = False
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'No limit'
|
||||||
|
OnChange = cbMaxMemoryChange
|
||||||
|
Items.Strings = (
|
||||||
|
'No limit'
|
||||||
|
'32'
|
||||||
|
'64'
|
||||||
|
'128'
|
||||||
|
'256'
|
||||||
|
'512'
|
||||||
|
'1024'
|
||||||
|
'1536')
|
||||||
|
end
|
||||||
|
object PBMem: TProgressBar
|
||||||
|
Left = 232
|
||||||
|
Top = 68
|
||||||
|
Width = 217
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 253
|
||||||
|
Width = 217
|
||||||
|
Height = 81
|
||||||
|
Caption = 'Output options'
|
||||||
|
TabOrder = 5
|
||||||
|
DesignSize = (
|
||||||
|
217
|
||||||
|
81)
|
||||||
|
object chkSave: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 24
|
||||||
|
Width = 201
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Save parameters'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object chkSaveIncompleteRenders: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 48
|
||||||
|
Width = 201
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Save incomplete renders'
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = chkSaveIncompleteRendersClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox6: TGroupBox
|
||||||
|
Left = 232
|
||||||
|
Top = 253
|
||||||
|
Width = 234
|
||||||
|
Height = 81
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Completion options'
|
||||||
|
TabOrder = 6
|
||||||
|
DesignSize = (
|
||||||
|
234
|
||||||
|
81)
|
||||||
|
object chkPostProcess: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 24
|
||||||
|
Width = 217
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Post-process after completion'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object chkShutdown: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 48
|
||||||
|
Width = 217
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Shut down computer when complete'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object pnlTarget: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 12
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Destination'
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
object txtFilename: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 12
|
||||||
|
Width = 288
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = txtFilenameChange
|
||||||
|
end
|
||||||
|
object chkBinary: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 349
|
||||||
|
Width = 457
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption =
|
||||||
|
'Write raw data (WARNING: this is experimental and slows down the' +
|
||||||
|
' rendering!!!)'
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 8
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object TabOutput: TTabSheet
|
||||||
|
Caption = 'Output'
|
||||||
|
ImageIndex = 38
|
||||||
|
object Output: TMemo
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 473
|
||||||
|
Height = 344
|
||||||
|
Align = alClient
|
||||||
|
BorderStyle = bsNone
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBtnText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object StatusBar: TStatusBar
|
||||||
|
Left = 0
|
||||||
|
Top = 450
|
||||||
|
Width = 497
|
||||||
|
Height = 19
|
||||||
|
Panels = <
|
||||||
|
item
|
||||||
|
Width = 161
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 150
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Width = 50
|
||||||
|
end>
|
||||||
|
end
|
||||||
|
object btnSaveLog: TButton
|
||||||
|
Left = 8
|
||||||
|
Top = 419
|
||||||
|
Width = 73
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
Caption = 'Save log'
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 5
|
||||||
|
Visible = False
|
||||||
|
OnClick = btnSaveLogClick
|
||||||
|
end
|
||||||
|
object ProgressBar2: TProgressBar
|
||||||
|
Left = 8
|
||||||
|
Top = 388
|
||||||
|
Width = 481
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object SaveDialog: TSaveDialog
|
||||||
|
Left = 168
|
||||||
|
Top = 464
|
||||||
|
end
|
||||||
|
end
|
1311
Forms/FormRender.pas
Normal file
1311
Forms/FormRender.pas
Normal file
File diff suppressed because it is too large
Load Diff
59
Forms/Fullscreen.dfm
Normal file
59
Forms/Fullscreen.dfm
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
object FullscreenForm: TFullscreenForm
|
||||||
|
Left = 439
|
||||||
|
Top = 325
|
||||||
|
BorderStyle = bsNone
|
||||||
|
Caption = 'FullscreenForm'
|
||||||
|
ClientHeight = 131
|
||||||
|
ClientWidth = 186
|
||||||
|
Color = clBlack
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
PopupMenu = FullscreenPopup
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDblClick = ImageDblClick
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnKeyPress = FormKeyPress
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object Image: TImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 186
|
||||||
|
Height = 131
|
||||||
|
PopupMenu = FullscreenPopup
|
||||||
|
OnDblClick = ImageDblClick
|
||||||
|
end
|
||||||
|
object Timelimiter: TTimer
|
||||||
|
Enabled = False
|
||||||
|
Interval = 2000
|
||||||
|
OnTimer = TimelimiterOnTimer
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
end
|
||||||
|
object FullscreenPopup: TPopupMenu
|
||||||
|
Left = 40
|
||||||
|
Top = 8
|
||||||
|
object RenderStop: TMenuItem
|
||||||
|
Caption = '&Stop Render'
|
||||||
|
OnClick = RenderStopClick
|
||||||
|
end
|
||||||
|
object RenderMore: TMenuItem
|
||||||
|
Caption = 'Render &More'
|
||||||
|
ShortCut = 114
|
||||||
|
OnClick = RenderMoreClick
|
||||||
|
end
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object Exit1: TMenuItem
|
||||||
|
Caption = '&Close'
|
||||||
|
OnClick = ImageDblClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
343
Forms/Fullscreen.pas
Normal file
343
Forms/Fullscreen.pas
Normal file
@ -0,0 +1,343 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit Fullscreen;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
Menus, ExtCtrls, ControlPoint, RenderThread, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TFullscreenForm = class(TForm)
|
||||||
|
Image: TImage;
|
||||||
|
Timelimiter: TTimer;
|
||||||
|
FullscreenPopup: TPopupMenu;
|
||||||
|
RenderStop: TMenuItem;
|
||||||
|
N1: TMenuItem;
|
||||||
|
Exit1: TMenuItem;
|
||||||
|
RenderMore: TMenuItem;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure ImageDblClick(Sender: TObject);
|
||||||
|
procedure TimelimiterOnTimer(Sender: TObject);
|
||||||
|
procedure RenderStopClick(Sender: TObject);
|
||||||
|
procedure RenderMoreClick(Sender: TObject);
|
||||||
|
|
||||||
|
private
|
||||||
|
Remainder, StartTime, t: double;
|
||||||
|
imgLeft, imgTop,
|
||||||
|
imgWidth, imgHeight: integer;
|
||||||
|
Closing: boolean;
|
||||||
|
|
||||||
|
Renderer: TRenderThread;
|
||||||
|
|
||||||
|
procedure showTaskbar;
|
||||||
|
procedure hideTaskbar;
|
||||||
|
procedure DrawFlame;
|
||||||
|
procedure OnProgress(prog: double);
|
||||||
|
procedure HandleThreadCompletion(var Message: TMessage);
|
||||||
|
message WM_THREAD_COMPLETE;
|
||||||
|
procedure HandleThreadTermination(var Message: TMessage);
|
||||||
|
message WM_THREAD_TERMINATE;
|
||||||
|
|
||||||
|
public
|
||||||
|
Calculate : boolean;
|
||||||
|
cp: TControlPoint;
|
||||||
|
Zoom: double;
|
||||||
|
center: array[0..1] of double;
|
||||||
|
|
||||||
|
ActiveForm: TForm;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
FullscreenForm: TFullscreenForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Main, Math, Global,
|
||||||
|
Tracer;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure Trace1(const str: string);
|
||||||
|
begin
|
||||||
|
if TraceLevel >= 1 then
|
||||||
|
TraceForm.FullscreenTrace.Lines.Add('. ' + str);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Trace2(const str: string);
|
||||||
|
begin
|
||||||
|
if TraceLevel >= 2 then
|
||||||
|
TraceForm.FullscreenTrace.Lines.Add('. . ' + str);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.DrawFlame;
|
||||||
|
var
|
||||||
|
r: double;
|
||||||
|
begin
|
||||||
|
if (cp.width / cp.height) > (ClientWidth / ClientHeight) then
|
||||||
|
begin
|
||||||
|
imgWidth := ClientWidth;
|
||||||
|
r := cp.width / imgWidth;
|
||||||
|
imgHeight := round(cp.height / r);
|
||||||
|
imgLeft := 1;
|
||||||
|
imgTop := (ClientHeight - imgHeight) div 2;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
imgHeight := ClientHeight;
|
||||||
|
r := cp.height / imgHeight;
|
||||||
|
imgWidth := round(cp.Width / r);
|
||||||
|
imgTop := 1;
|
||||||
|
imgLeft := (ClientWidth - ImgWidth) div 2;
|
||||||
|
end;
|
||||||
|
cp.AdjustScale(imgWidth, imgHeight);
|
||||||
|
|
||||||
|
// cp.Zoom := MainForm.Zoom;
|
||||||
|
// cp.center[0] := MainForm.center[0];
|
||||||
|
// cp.center[1] := MainForm.center[1];
|
||||||
|
cp.sample_density := defSampleDensity;
|
||||||
|
StartTime := Now;
|
||||||
|
t := now;
|
||||||
|
Remainder := 1;
|
||||||
|
|
||||||
|
if Assigned(Renderer) then begin // hmm...
|
||||||
|
Trace2('Killing previous RenderThread #' + inttostr(Renderer.ThreadID));
|
||||||
|
Renderer.Terminate;
|
||||||
|
Renderer.WaitFor;
|
||||||
|
|
||||||
|
while Renderer <> nil do
|
||||||
|
Application.ProcessMessages; // HandleThreadTermination kinda should be called here...(?)
|
||||||
|
end;
|
||||||
|
|
||||||
|
assert(not assigned(renderer), 'Render thread is still running!?');
|
||||||
|
|
||||||
|
Renderer := TRenderThread.Create; // Hmm... Why do we use RenderThread here, anyway? :-\
|
||||||
|
Renderer.TargetHandle := Handle;
|
||||||
|
Renderer.OnProgress := OnProgress;
|
||||||
|
Renderer.NrThreads := NrTreads;
|
||||||
|
if TraceLevel > 0 then Renderer.Output := TraceForm.FullscreenTrace.Lines;
|
||||||
|
Renderer.SetCP(cp);
|
||||||
|
|
||||||
|
Renderer.WaitForMore := true;
|
||||||
|
RenderStop.Enabled := true;
|
||||||
|
RenderMore.Enabled := false;
|
||||||
|
|
||||||
|
Renderer.Resume;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.HandleThreadCompletion(var Message: TMessage);
|
||||||
|
var
|
||||||
|
bm: TBitmap;
|
||||||
|
begin
|
||||||
|
Trace2(MsgComplete + IntToStr(message.LParam));
|
||||||
|
if not Assigned(Renderer) then begin
|
||||||
|
Trace2(MsgNotAssigned);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if Renderer.ThreadID <> message.LParam then begin
|
||||||
|
Trace2(MsgAnotherRunning);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if Assigned(Renderer) then
|
||||||
|
begin
|
||||||
|
bm := TBitmap.Create;
|
||||||
|
bm.assign(Renderer.GetImage);
|
||||||
|
Image.SetBounds(imgLeft, imgTop, imgWidth, imgHeight);
|
||||||
|
Image.Picture.Graphic := bm;
|
||||||
|
bm.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
RenderStop.Enabled := false;
|
||||||
|
RenderMore.Enabled := true;
|
||||||
|
|
||||||
|
TimeLimiter.Enabled := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.HandleThreadTermination(var Message: TMessage);
|
||||||
|
var
|
||||||
|
bm: TBitmap;
|
||||||
|
begin
|
||||||
|
Trace2(MsgTerminated + IntToStr(message.LParam));
|
||||||
|
if not Assigned(Renderer) then begin
|
||||||
|
Trace2(MsgNotAssigned);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
if Renderer.ThreadID <> message.LParam then begin
|
||||||
|
Trace2(MsgAnotherRunning);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
RenderStop.Enabled := false;
|
||||||
|
RenderMore.Enabled := false;
|
||||||
|
|
||||||
|
TimeLimiter.Enabled := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.OnProgress(prog: double);
|
||||||
|
begin
|
||||||
|
prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
|
||||||
|
Canvas.Lock;
|
||||||
|
try
|
||||||
|
if prog >= 1 then
|
||||||
|
begin
|
||||||
|
Canvas.Brush.Color := clBlack;
|
||||||
|
Canvas.FillRect(Rect(5, ClientHeight - 15, ClientWidth - 5, ClientHeight - 5));
|
||||||
|
end
|
||||||
|
else if prog >= 0 then begin
|
||||||
|
Canvas.Brush.Color := clTeal;
|
||||||
|
Canvas.FrameRect(Rect(5, ClientHeight - 15, ClientWidth - 5, ClientHeight - 5));
|
||||||
|
Canvas.Brush.Color := clTeal;
|
||||||
|
Canvas.Fillrect(Rect(7, ClientHeight - 13, 7 + Round(prog * (ClientWidth - 14)), ClientHeight - 7));
|
||||||
|
Canvas.Brush.Color := clBlack;
|
||||||
|
Canvas.Fillrect(Rect(7 + Round(prog * (ClientWidth - 14)), ClientHeight - 13, ClientWidth - 7, ClientHeight - 7));
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Canvas.Unlock;
|
||||||
|
end;
|
||||||
|
//Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.hideTaskbar;
|
||||||
|
var wndHandle: THandle;
|
||||||
|
wndClass: array[0..50] of Char;
|
||||||
|
begin
|
||||||
|
StrPCopy(@wndClass[0], 'Shell_TrayWnd');
|
||||||
|
wndHandle := FindWindow(@wndClass[0], nil);
|
||||||
|
ShowWindow(wndHandle, SW_HIDE);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.showTaskbar;
|
||||||
|
var wndHandle: THandle;
|
||||||
|
wndClass: array[0..50] of Char;
|
||||||
|
begin
|
||||||
|
StrPCopy(@wndClass[0], 'Shell_TrayWnd');
|
||||||
|
wndHandle := FindWindow(@wndClass[0], nil);
|
||||||
|
ShowWindow(wndHandle, SW_RESTORE);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Trace1('--- Opening Fullscreen View ---');
|
||||||
|
|
||||||
|
if Image.Width < ClientWidth then
|
||||||
|
Image.Left := (ClientWidth - Image.Width) div 2;
|
||||||
|
if Image.Height < ClientHeight then
|
||||||
|
Image.Top := (ClientHeight - Image.Height) div 2;
|
||||||
|
|
||||||
|
Closing := false;
|
||||||
|
TimeLimiter.Enabled := false;
|
||||||
|
|
||||||
|
RenderStop.Enabled := false;
|
||||||
|
RenderMore.Enabled := false;
|
||||||
|
|
||||||
|
MainForm.mnuFullScreen.enabled := true;
|
||||||
|
HideTaskbar;
|
||||||
|
|
||||||
|
if calculate then
|
||||||
|
DrawFlame;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Closing := true;
|
||||||
|
if Assigned(Renderer) then begin
|
||||||
|
if Renderer.Suspended then begin
|
||||||
|
Renderer.WaitForMore := false;
|
||||||
|
Renderer.Resume;
|
||||||
|
end;
|
||||||
|
Trace2('Form closing: killing RenderThread #' + inttostr(Renderer.ThreadID));
|
||||||
|
Renderer.Terminate;
|
||||||
|
Renderer.WaitFor;
|
||||||
|
|
||||||
|
Trace2('Destroying RenderThread #' + IntToStr(Renderer.ThreadID));
|
||||||
|
Renderer.Free;
|
||||||
|
Renderer := nil;
|
||||||
|
end;
|
||||||
|
Trace1('--- Closing Fullscreen View ---');
|
||||||
|
Trace1('');
|
||||||
|
ShowTaskbar;
|
||||||
|
|
||||||
|
ActiveForm.SetFocus;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Exit1.Caption := TextByKey('common-close');
|
||||||
|
RenderMore.Caption := TextByKey('fullscreen-popup-rendermore');
|
||||||
|
RenderStop.Caption := TextByKey('fullscreen-popup-stoprender');
|
||||||
|
cp := TControlPoint.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if assigned(Renderer) then begin
|
||||||
|
Renderer.Terminate;
|
||||||
|
Renderer.WaitFor;
|
||||||
|
Renderer.Free;
|
||||||
|
end;
|
||||||
|
cp.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.FormKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
if key = ' ' then begin
|
||||||
|
if RenderStop.Enabled then RenderStop.Click
|
||||||
|
else if RenderMore.Enabled then RenderMore.Click;
|
||||||
|
end
|
||||||
|
else Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.ImageDblClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.TimelimiterOnTimer(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//if assigned(Renderer) then Renderer.Break;
|
||||||
|
TimeLimiter.Enabled := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.RenderStopClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if assigned(Renderer) then Renderer.BreakRender;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TFullscreenForm.RenderMoreClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if assigned(Renderer) and Renderer.Suspended then begin
|
||||||
|
Renderer.Resume;
|
||||||
|
RenderStop.Enabled := true;
|
||||||
|
RenderMore.Enabled := false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
315
Forms/ImageColoring.dfm
Normal file
315
Forms/ImageColoring.dfm
Normal file
@ -0,0 +1,315 @@
|
|||||||
|
object frmImageColoring: TfrmImageColoring
|
||||||
|
Left = 419
|
||||||
|
Top = 408
|
||||||
|
Width = 581
|
||||||
|
Height = 365
|
||||||
|
Caption = 'Image coloring'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object Label1: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 40
|
||||||
|
Width = 54
|
||||||
|
Height = 13
|
||||||
|
Caption = 'First Palete'
|
||||||
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 168
|
||||||
|
Width = 72
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Second palette'
|
||||||
|
end
|
||||||
|
object Label3: TLabel
|
||||||
|
Left = 296
|
||||||
|
Top = 36
|
||||||
|
Width = 30
|
||||||
|
Height = 13
|
||||||
|
Caption = 'Image'
|
||||||
|
end
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 107
|
||||||
|
Width = 57
|
||||||
|
Height = 13
|
||||||
|
Alignment = taCenter
|
||||||
|
AutoSize = False
|
||||||
|
Caption = 'Preset'
|
||||||
|
end
|
||||||
|
object Label5: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 235
|
||||||
|
Width = 57
|
||||||
|
Height = 13
|
||||||
|
Alignment = taCenter
|
||||||
|
AutoSize = False
|
||||||
|
Caption = 'Preset'
|
||||||
|
end
|
||||||
|
object cbEnable: TCheckBox
|
||||||
|
Left = 16
|
||||||
|
Top = 8
|
||||||
|
Width = 133
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Enable image coloring'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 16
|
||||||
|
Top = 56
|
||||||
|
Width = 258
|
||||||
|
Height = 40
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 1
|
||||||
|
object imgPal1: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 256
|
||||||
|
Height = 38
|
||||||
|
Align = alClient
|
||||||
|
Stretch = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 16
|
||||||
|
Top = 188
|
||||||
|
Width = 258
|
||||||
|
Height = 40
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 2
|
||||||
|
object imgpal2: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 256
|
||||||
|
Height = 38
|
||||||
|
Align = alClient
|
||||||
|
Stretch = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 292
|
||||||
|
Top = 60
|
||||||
|
Width = 258
|
||||||
|
Height = 258
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object cmbPalette1: TComboBox
|
||||||
|
Left = 80
|
||||||
|
Top = 106
|
||||||
|
Width = 177
|
||||||
|
Height = 19
|
||||||
|
Style = csOwnerDrawFixed
|
||||||
|
Color = clBlack
|
||||||
|
DropDownCount = 20
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWhite
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 13
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = False
|
||||||
|
TabOrder = 4
|
||||||
|
OnChange = cmbPalette1Change
|
||||||
|
OnDrawItem = cmbPalette1DrawItem
|
||||||
|
Items.Strings = (
|
||||||
|
'south-sea-bather'
|
||||||
|
'sky-flesh'
|
||||||
|
'blue-bather'
|
||||||
|
'no-name'
|
||||||
|
'pillows'
|
||||||
|
'mauve-splat'
|
||||||
|
'facial-treescape 6'
|
||||||
|
'fasion-bug'
|
||||||
|
'leafy-face'
|
||||||
|
'mouldy-sun'
|
||||||
|
'sunny-harvest'
|
||||||
|
'peach-tree'
|
||||||
|
'fire-dragon'
|
||||||
|
'ice-dragon'
|
||||||
|
'german-landscape'
|
||||||
|
'no-name'
|
||||||
|
'living-mud-bomb'
|
||||||
|
'cars'
|
||||||
|
'unhealthy-tan'
|
||||||
|
'daffodil'
|
||||||
|
'rose'
|
||||||
|
'healthy-skin'
|
||||||
|
'orange'
|
||||||
|
'white-ivy'
|
||||||
|
'summer-makeup'
|
||||||
|
'glow-buzz'
|
||||||
|
'deep-water'
|
||||||
|
'afternoon-beach'
|
||||||
|
'dim-beach'
|
||||||
|
'cloudy-brick'
|
||||||
|
'burning-wood'
|
||||||
|
'aquatic-garden'
|
||||||
|
'no-name'
|
||||||
|
'fall-quilt'
|
||||||
|
'night-blue-sky'
|
||||||
|
'shadow-iris'
|
||||||
|
'solid-sky'
|
||||||
|
'misty-field'
|
||||||
|
'wooden-highlight'
|
||||||
|
'jet-tundra'
|
||||||
|
'pastel-lime'
|
||||||
|
'hell'
|
||||||
|
'indian-coast'
|
||||||
|
'dentist-decor'
|
||||||
|
'greenland'
|
||||||
|
'purple-dress'
|
||||||
|
'no-name'
|
||||||
|
'spring-flora'
|
||||||
|
'andi'
|
||||||
|
'gig-o835'
|
||||||
|
'rie02'
|
||||||
|
'rie05'
|
||||||
|
'rie11'
|
||||||
|
'etretat.ppm'
|
||||||
|
'the-hollow-needle-at-etretat.ppm'
|
||||||
|
'rouen-cathedral-sunset.ppm'
|
||||||
|
'the-houses-of-parliament.ppm'
|
||||||
|
'starry-night.ppm'
|
||||||
|
'water-lilies-sunset.ppm'
|
||||||
|
'gogh.chambre-arles.ppm'
|
||||||
|
'gogh.entrance.ppm'
|
||||||
|
'gogh.the-night-cafe.ppm'
|
||||||
|
'gogh.vegetable-montmartre.ppm'
|
||||||
|
'matisse.bonheur-vivre.ppm'
|
||||||
|
'matisse.flowers.ppm'
|
||||||
|
'matisse.lecon-musique.ppm'
|
||||||
|
'modigliani.nude-caryatid.ppm'
|
||||||
|
'braque.instruments.ppm'
|
||||||
|
'calcoast09.ppm'
|
||||||
|
'dodge102.ppm'
|
||||||
|
'ernst.anti-pope.ppm'
|
||||||
|
'ernst.ubu-imperator.ppm'
|
||||||
|
'fighting-forms.ppm'
|
||||||
|
'fog25.ppm'
|
||||||
|
'geyser27.ppm'
|
||||||
|
'gris.josette.ppm'
|
||||||
|
'gris.landscape-ceret.ppm'
|
||||||
|
'kandinsky.comp-9.ppm'
|
||||||
|
'kandinsky.yellow-red-blue.ppm'
|
||||||
|
'klee.insula-dulcamara.ppm'
|
||||||
|
'nile.ppm'
|
||||||
|
'picasso.jfille-chevre.ppm'
|
||||||
|
'pollock.lavender-mist.ppm'
|
||||||
|
'yngpaint.ppm')
|
||||||
|
end
|
||||||
|
object cmbPalette2: TComboBox
|
||||||
|
Left = 80
|
||||||
|
Top = 234
|
||||||
|
Width = 177
|
||||||
|
Height = 19
|
||||||
|
Style = csOwnerDrawFixed
|
||||||
|
Color = clBlack
|
||||||
|
DropDownCount = 20
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWhite
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
ItemHeight = 13
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = False
|
||||||
|
TabOrder = 5
|
||||||
|
OnChange = cmbPalette2Change
|
||||||
|
OnDrawItem = cmbPalette1DrawItem
|
||||||
|
Items.Strings = (
|
||||||
|
'south-sea-bather'
|
||||||
|
'sky-flesh'
|
||||||
|
'blue-bather'
|
||||||
|
'no-name'
|
||||||
|
'pillows'
|
||||||
|
'mauve-splat'
|
||||||
|
'facial-treescape 6'
|
||||||
|
'fasion-bug'
|
||||||
|
'leafy-face'
|
||||||
|
'mouldy-sun'
|
||||||
|
'sunny-harvest'
|
||||||
|
'peach-tree'
|
||||||
|
'fire-dragon'
|
||||||
|
'ice-dragon'
|
||||||
|
'german-landscape'
|
||||||
|
'no-name'
|
||||||
|
'living-mud-bomb'
|
||||||
|
'cars'
|
||||||
|
'unhealthy-tan'
|
||||||
|
'daffodil'
|
||||||
|
'rose'
|
||||||
|
'healthy-skin'
|
||||||
|
'orange'
|
||||||
|
'white-ivy'
|
||||||
|
'summer-makeup'
|
||||||
|
'glow-buzz'
|
||||||
|
'deep-water'
|
||||||
|
'afternoon-beach'
|
||||||
|
'dim-beach'
|
||||||
|
'cloudy-brick'
|
||||||
|
'burning-wood'
|
||||||
|
'aquatic-garden'
|
||||||
|
'no-name'
|
||||||
|
'fall-quilt'
|
||||||
|
'night-blue-sky'
|
||||||
|
'shadow-iris'
|
||||||
|
'solid-sky'
|
||||||
|
'misty-field'
|
||||||
|
'wooden-highlight'
|
||||||
|
'jet-tundra'
|
||||||
|
'pastel-lime'
|
||||||
|
'hell'
|
||||||
|
'indian-coast'
|
||||||
|
'dentist-decor'
|
||||||
|
'greenland'
|
||||||
|
'purple-dress'
|
||||||
|
'no-name'
|
||||||
|
'spring-flora'
|
||||||
|
'andi'
|
||||||
|
'gig-o835'
|
||||||
|
'rie02'
|
||||||
|
'rie05'
|
||||||
|
'rie11'
|
||||||
|
'etretat.ppm'
|
||||||
|
'the-hollow-needle-at-etretat.ppm'
|
||||||
|
'rouen-cathedral-sunset.ppm'
|
||||||
|
'the-houses-of-parliament.ppm'
|
||||||
|
'starry-night.ppm'
|
||||||
|
'water-lilies-sunset.ppm'
|
||||||
|
'gogh.chambre-arles.ppm'
|
||||||
|
'gogh.entrance.ppm'
|
||||||
|
'gogh.the-night-cafe.ppm'
|
||||||
|
'gogh.vegetable-montmartre.ppm'
|
||||||
|
'matisse.bonheur-vivre.ppm'
|
||||||
|
'matisse.flowers.ppm'
|
||||||
|
'matisse.lecon-musique.ppm'
|
||||||
|
'modigliani.nude-caryatid.ppm'
|
||||||
|
'braque.instruments.ppm'
|
||||||
|
'calcoast09.ppm'
|
||||||
|
'dodge102.ppm'
|
||||||
|
'ernst.anti-pope.ppm'
|
||||||
|
'ernst.ubu-imperator.ppm'
|
||||||
|
'fighting-forms.ppm'
|
||||||
|
'fog25.ppm'
|
||||||
|
'geyser27.ppm'
|
||||||
|
'gris.josette.ppm'
|
||||||
|
'gris.landscape-ceret.ppm'
|
||||||
|
'kandinsky.comp-9.ppm'
|
||||||
|
'kandinsky.yellow-red-blue.ppm'
|
||||||
|
'klee.insula-dulcamara.ppm'
|
||||||
|
'nile.ppm'
|
||||||
|
'picasso.jfille-chevre.ppm'
|
||||||
|
'pollock.lavender-mist.ppm'
|
||||||
|
'yngpaint.ppm')
|
||||||
|
end
|
||||||
|
end
|
161
Forms/ImageColoring.pas
Normal file
161
Forms/ImageColoring.pas
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit ImageColoring;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, StdCtrls, cmap;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmImageColoring = class(TForm)
|
||||||
|
cbEnable: TCheckBox;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Panel3: TPanel;
|
||||||
|
Label1: TLabel;
|
||||||
|
Label2: TLabel;
|
||||||
|
Label3: TLabel;
|
||||||
|
cmbPalette1: TComboBox;
|
||||||
|
Label4: TLabel;
|
||||||
|
imgPal1: TImage;
|
||||||
|
imgpal2: TImage;
|
||||||
|
Label5: TLabel;
|
||||||
|
cmbPalette2: TComboBox;
|
||||||
|
procedure cmbPalette2Change(Sender: TObject);
|
||||||
|
procedure cmbPalette1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
|
||||||
|
procedure cmbPalette1Change(Sender: TObject);
|
||||||
|
private
|
||||||
|
FPal1: TColorMap;
|
||||||
|
FPal2: TColorMap;
|
||||||
|
FBkuPal1: TColorMap;
|
||||||
|
FBkuPal2: TColorMap;
|
||||||
|
Index1: integer;
|
||||||
|
Index2: integer;
|
||||||
|
|
||||||
|
procedure DrawPalette1;
|
||||||
|
procedure DrawPalette2;
|
||||||
|
|
||||||
|
procedure Apply;
|
||||||
|
public
|
||||||
|
procedure Update; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmImageColoring: TfrmImageColoring;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Main, Editor, Mutate, GradientHlpr;
|
||||||
|
|
||||||
|
{ TfrmImageColoring }
|
||||||
|
|
||||||
|
procedure TfrmImageColoring.Update;
|
||||||
|
begin
|
||||||
|
// FPal1 := MainCP.Pal;
|
||||||
|
FBkuPal1 := FPal1;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmImageColoring.cmbPalette1Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Index1 := cmbPalette1.ItemIndex;
|
||||||
|
GetCmap(Index1, 1, FPal1);
|
||||||
|
FBkuPal1 := FPal1;
|
||||||
|
// ScrollBar.Position := 0;
|
||||||
|
DrawPalette1;
|
||||||
|
Apply;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmImageColoring.Apply;
|
||||||
|
begin
|
||||||
|
MainForm.StopThread;
|
||||||
|
MainForm.UpdateUndo;
|
||||||
|
|
||||||
|
MainCp.CmapIndex := cmbPalette1.ItemIndex;
|
||||||
|
MainCp.cmap := FPal1;
|
||||||
|
|
||||||
|
if EditForm.visible then EditForm.UpdateDisplay;
|
||||||
|
if MutateForm.Visible then MutateForm.UpdateDisplay;
|
||||||
|
|
||||||
|
MainForm.RedrawTimer.enabled := true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmImageColoring.cmbPalette1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
|
||||||
|
var
|
||||||
|
Bitmap: TBitmap;
|
||||||
|
PalName: string;
|
||||||
|
begin
|
||||||
|
BitMap := GradientHelper.GetGradientBitmap(Index, 1);
|
||||||
|
|
||||||
|
GetCmapName(index, PalName);
|
||||||
|
|
||||||
|
with Control as TComboBox do begin
|
||||||
|
Canvas.Rectangle(Rect);
|
||||||
|
|
||||||
|
Canvas.TextOut(4, Rect.Top, PalName);
|
||||||
|
Rect.Left := (Rect.Left + rect.Right) div 2;
|
||||||
|
Canvas.StretchDraw(Rect, Bitmap);
|
||||||
|
end;
|
||||||
|
BitMap.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmImageColoring.DrawPalette1;
|
||||||
|
var
|
||||||
|
Bitmap: TBitmap;
|
||||||
|
begin
|
||||||
|
BitMap := GradientHelper.GetGradientBitmap(Index1, 1);
|
||||||
|
|
||||||
|
imgPal1.Picture.Graphic := Bitmap;
|
||||||
|
imgPal1.Refresh;
|
||||||
|
|
||||||
|
BitMap.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmImageColoring.DrawPalette2;
|
||||||
|
var
|
||||||
|
Bitmap: TBitmap;
|
||||||
|
begin
|
||||||
|
BitMap := GradientHelper.GetGradientBitmap(Index2, 1);
|
||||||
|
|
||||||
|
imgPal2.Picture.Graphic := Bitmap;
|
||||||
|
imgPal2.Refresh;
|
||||||
|
|
||||||
|
BitMap.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmImageColoring.cmbPalette2Change(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Index2 := cmbPalette2.ItemIndex;
|
||||||
|
GetCmap(Index2, 1, FPal2);
|
||||||
|
FBkuPal2 := FPal2;
|
||||||
|
// ScrollBar.Position := 0;
|
||||||
|
DrawPalette2;
|
||||||
|
Apply;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
120
Forms/LoadTracker.dfm
Normal file
120
Forms/LoadTracker.dfm
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
object LoadForm: TLoadForm
|
||||||
|
Left = 443
|
||||||
|
Top = 274
|
||||||
|
ActiveControl = Button1
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
Caption = 'Messages'
|
||||||
|
ClientHeight = 388
|
||||||
|
ClientWidth = 662
|
||||||
|
Color = clBtnFace
|
||||||
|
Constraints.MinHeight = 275
|
||||||
|
Constraints.MinWidth = 550
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
FormStyle = fsStayOnTop
|
||||||
|
Icon.Data = {
|
||||||
|
0000010001001010000001002000680400001600000028000000100000002000
|
||||||
|
0000010020000000000040040000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000006349
|
||||||
|
35146349352E927A69FF8C7563FF87705EFF6349352E7F6654FF7A624FFF755D
|
||||||
|
4AFF6349352E6E5441FF6A513EFF674E3AFF6349352E00000000000000006349
|
||||||
|
352EAE9888FFEFE3DDFFF2E7E1FFEDDFD7FF836B59FFB79B8BFFDBBDADFFD9B7
|
||||||
|
A6FF725946FFAE8B77FFD0A692FFCC9E87FF654B38FF6349352E00000000B7A2
|
||||||
|
93FFFBF8F7FFF9F4F2FFF7F0ECFFF4EBE6FFF1E5DFFF7F6754FF7A624FFF765D
|
||||||
|
4AFF735946FF6E5542FF6B523EFF674E3AFF654B38FF634935FF00000000B7A2
|
||||||
|
93FFFDFCFBFFFBF9F7FFFAF5F2FFF7EFEDFFF4EAE6FFF2E5DFFFDDDCD7FFDFD7
|
||||||
|
CEFFDECDC0FFDEC5B6FFDEBFACFFDBBAA6FFD8B5A3FF634935FF00000000B7A2
|
||||||
|
93FFFFFFFFFFB47F65FFB47F64FFEDDDD5FFB37E63FFF4EBE6FFF1E5DFFFEFDF
|
||||||
|
D7FFEBD9D1FFE8D3C9FFE5CDC1FFE1C6B9FFD6B3A1FF634A35FF00000000B9A4
|
||||||
|
95FFFFFFFFFFFFFFFFFFFDFCFCFFFCF9F7FFFAF4F2FFF6F0ECFFF4EBE5FFF2E5
|
||||||
|
DFFFEEDFD8FFEBD9D0FFE8D3C8FFE5CCC1FFDBBDADFF634A36FF00000000BDA7
|
||||||
|
98FFFFFFFFFF968E88FFEEDED7FF968E87FFEDDDD6FF968D86FF958C85FFF4EB
|
||||||
|
E6FFF2E5DFFFEFDFD8FFECD9D0FFE8D3C9FFE0C7BAFF634A35FF00000000C1AB
|
||||||
|
9CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFBF8F7FFFAF4F2FFF7F0
|
||||||
|
ECFFF4EAE6FFF1E5DFFFEEDFD7FFEBD9D0FFE6D1C6FF634A35FF00000000C5AF
|
||||||
|
A0FFFFFFFFFFB48065FFB48065FF968E88FFC2B0A3FF968E87FF968E86FFF9F4
|
||||||
|
F2FFF7EFECFFF4EBE6FFF2E5DFFFEFDFD8FFEADBD1FF634936FF00000000C8B2
|
||||||
|
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFCF8
|
||||||
|
F7FFF9F5F2FFF7F0ECFFF4EBE6FFF1E5DFFFEEE2DAFF644A36FF00000000C9B4
|
||||||
|
A5FFFFFFFFFFFFFFFFFF66A365FF66A365FF66A365FFC0B4ADFF66A365FF66A3
|
||||||
|
65FF66A264FFFAF5F2FFF7F0ECFFF4EBE6FFEEE2DAFF644A36FF00000000C8B2
|
||||||
|
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFEFCFBFFFBF9F7FFFAF4F2FFF7F0EDFFF3EAE4FF644A36FF00000000C8B2
|
||||||
|
A3FFCAB4A5FFCBB5A6FFCAB4A5FFC9B3A4FFC7B2A3FFC6B0A1FFC3AE9FFFC1AC
|
||||||
|
9DFFBFAA9BFFBDA899FFBBA697FFB9A495FFB8A394FFB7A293FF000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000000000000000000000000000FFFF
|
||||||
|
0000FFFF00000003000000010000000100000001000000010000000100000001
|
||||||
|
0000000100000001000000010000000100000001000000010000FFFF0000}
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnResize = FormResize
|
||||||
|
DesignSize = (
|
||||||
|
662
|
||||||
|
388)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object Bevel1: TBevel
|
||||||
|
Left = 7
|
||||||
|
Top = 7
|
||||||
|
Width = 533
|
||||||
|
Height = 308
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
Style = bsRaised
|
||||||
|
end
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 527
|
||||||
|
Top = 359
|
||||||
|
Width = 112
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Close'
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
object CheckBox1: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 360
|
||||||
|
Width = 384
|
||||||
|
Height = 24
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
Caption = 'Automatically open this window when loading flame'
|
||||||
|
TabOrder = 1
|
||||||
|
WordWrap = True
|
||||||
|
OnClick = CheckBox1Click
|
||||||
|
end
|
||||||
|
object Button2: TButton
|
||||||
|
Left = 406
|
||||||
|
Top = 359
|
||||||
|
Width = 113
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Clear'
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = Button2Click
|
||||||
|
end
|
||||||
|
object Output: TMemo
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 528
|
||||||
|
Height = 303
|
||||||
|
BevelOuter = bvRaised
|
||||||
|
BorderStyle = bsNone
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBtnText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
end
|
104
Forms/LoadTracker.pas
Normal file
104
Forms/LoadTracker.pas
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit LoadTracker;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, Global, Settings, ExtCtrls, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TLoadForm = class(TForm)
|
||||||
|
Button1: TButton;
|
||||||
|
CheckBox1: TCheckBox;
|
||||||
|
Button2: TButton;
|
||||||
|
Bevel1: TBevel;
|
||||||
|
Output: TMemo;
|
||||||
|
procedure FormResize(Sender: TObject);
|
||||||
|
procedure Button1Click(Sender: TObject);
|
||||||
|
procedure CheckBox1Click(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure Button2Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
LoadForm: TLoadForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TLoadForm.Button1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TLoadForm.CheckBox1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
AutoOpenLog := CheckBox1.Checked;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TLoadForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Button2.Caption := TextByKey('common-clear');
|
||||||
|
Button1.Caption := TextByKey('common-close');
|
||||||
|
self.Caption := TextByKey('messages-title');
|
||||||
|
CheckBox1.Caption := TextByKey('messages-openautomatically');
|
||||||
|
CheckBox1.Checked := AutoOpenLog;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TLoadForm.Button2Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Output.Text := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TLoadForm.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CheckBox1.Left := 2;
|
||||||
|
Checkbox1.Top := self.ClientHeight - Checkbox1.Height - 2;
|
||||||
|
CheckBox1.Width := self.ClientWidth - button1.Width - button2.Width - 8;
|
||||||
|
|
||||||
|
Button1.Left := self.ClientWidth - button1.Width - button2.Width - 4;
|
||||||
|
Button1.Top := self.ClientHeight - Checkbox1.Height - 2 + Checkbox1.Height div 2 - Button1.Height div 2;
|
||||||
|
|
||||||
|
Button2.Left := self.ClientWidth - button2.Width - 2;
|
||||||
|
Button2.Top := Button1.Top;
|
||||||
|
|
||||||
|
Bevel1.Left := 2;
|
||||||
|
Bevel1.Top := 2;
|
||||||
|
Bevel1.Width := self.ClientWidth - 4;
|
||||||
|
Bevel1.Height := self.ClientHeight - 6 - checkbox1.Height;
|
||||||
|
|
||||||
|
Output.Left := Bevel1.Left + 2;
|
||||||
|
Output.Top := Bevel1.Top + 2;
|
||||||
|
Output.Width := Bevel1.Width - 4;
|
||||||
|
Output.Height := Bevel1.Height -4;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
5974
Forms/Main.dfm
Normal file
5974
Forms/Main.dfm
Normal file
File diff suppressed because it is too large
Load Diff
7015
Forms/Main.pas
Normal file
7015
Forms/Main.pas
Normal file
File diff suppressed because it is too large
Load Diff
421
Forms/Mutate.dfm
Normal file
421
Forms/Mutate.dfm
Normal file
@ -0,0 +1,421 @@
|
|||||||
|
object MutateForm: TMutateForm
|
||||||
|
Left = 589
|
||||||
|
Top = 326
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
Caption = 'Mutation'
|
||||||
|
ClientHeight = 398
|
||||||
|
ClientWidth = 422
|
||||||
|
Color = clBtnFace
|
||||||
|
Constraints.MinHeight = 400
|
||||||
|
Constraints.MinWidth = 400
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
Icon.Data = {
|
||||||
|
0000010001001010000001002000680400001600000028000000100000002000
|
||||||
|
0000010020000000000040040000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF0000
|
||||||
|
00003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF000000000000
|
||||||
|
00000000000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF0000
|
||||||
|
000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF000000000000
|
||||||
|
000000000000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF0000
|
||||||
|
0000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF000000000000
|
||||||
|
00000000000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF0000
|
||||||
|
000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF000000000000
|
||||||
|
00000000000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF0000
|
||||||
|
000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF000000000000
|
||||||
|
000000000000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF0000
|
||||||
|
0000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF0000
|
||||||
|
00003E3937FF48403BFF39322FFF28231FFF1B1714FF000000FF000000000000
|
||||||
|
00000000000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF0000
|
||||||
|
000089766CFFFCF7F3FFFBECDDFFE5D7C8FFD3C5B6FF181412FF000000000000
|
||||||
|
000000000000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF0000
|
||||||
|
0000898079FFFCF7F3FFE27239FFC8622FFFE5D7C8FF231E1BFF000000000000
|
||||||
|
00000000000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF0000
|
||||||
|
000089807CFFFEFBFAFFF58250FFCD6531FFFBECDDFF322C29FF000000000000
|
||||||
|
00000000000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF0000
|
||||||
|
000088807CFFFFFFFFFFFDFBFAFFFCF7F3FFFCF7F3FF3F3835FF000000000000
|
||||||
|
000000000000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF0000
|
||||||
|
0000887F7AFF89807CFF89807CFF898079FF89766CFF35312EFF000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000000000000000000000000000FFFF
|
||||||
|
0000FFFF0000C0810000C0810000C0810000C0810000C0810000C0810000FFFF
|
||||||
|
0000C0810000C0810000C0810000C0810000C0810000C0810000FFFF0000}
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poDefault
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
422
|
||||||
|
398)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object GroupBox1: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 409
|
||||||
|
Height = 273
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
Caption = 'Directions'
|
||||||
|
TabOrder = 0
|
||||||
|
DesignSize = (
|
||||||
|
409
|
||||||
|
273)
|
||||||
|
object Panel10: TPanel
|
||||||
|
Left = 12
|
||||||
|
Top = 20
|
||||||
|
Width = 384
|
||||||
|
Height = 238
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 0
|
||||||
|
OnResize = Panel10Resize
|
||||||
|
object Panel6: TPanel
|
||||||
|
Left = 112
|
||||||
|
Top = 168
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 0
|
||||||
|
object Image6: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel7: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 168
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 1
|
||||||
|
object Image7: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel4: TPanel
|
||||||
|
Left = 224
|
||||||
|
Top = 84
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 2
|
||||||
|
object Image4: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel0: TPanel
|
||||||
|
Left = 112
|
||||||
|
Top = 84
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
HelpContext = 2003
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 3
|
||||||
|
object Image0: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = Image0Click
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel8: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 84
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 4
|
||||||
|
object Image8: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel3: TPanel
|
||||||
|
Left = 224
|
||||||
|
Top = 0
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 5
|
||||||
|
object Image3: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel2: TPanel
|
||||||
|
Left = 112
|
||||||
|
Top = 0
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 6
|
||||||
|
object Image2: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 7
|
||||||
|
object Image1: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel5: TPanel
|
||||||
|
Left = 224
|
||||||
|
Top = 168
|
||||||
|
Width = 108
|
||||||
|
Height = 80
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'PrevPnl3'
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 8
|
||||||
|
object Image5: TImage
|
||||||
|
Left = 1
|
||||||
|
Top = 1
|
||||||
|
Width = 106
|
||||||
|
Height = 78
|
||||||
|
Align = alClient
|
||||||
|
PopupMenu = QualityPopup
|
||||||
|
Stretch = True
|
||||||
|
OnClick = MutantClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object GroupBox2: TGroupBox
|
||||||
|
Left = 8
|
||||||
|
Top = 288
|
||||||
|
Width = 409
|
||||||
|
Height = 105
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
TabOrder = 1
|
||||||
|
DesignSize = (
|
||||||
|
409
|
||||||
|
105)
|
||||||
|
object scrollTime: TScrollBar
|
||||||
|
Left = 120
|
||||||
|
Top = 20
|
||||||
|
Width = 202
|
||||||
|
Height = 20
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
LargeChange = 5
|
||||||
|
Max = 50
|
||||||
|
Min = 1
|
||||||
|
PageSize = 0
|
||||||
|
Position = 1
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = scrollTimeChange
|
||||||
|
end
|
||||||
|
object cmbTrend: TComboBox
|
||||||
|
Left = 119
|
||||||
|
Top = 48
|
||||||
|
Width = 282
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
DropDownCount = 16
|
||||||
|
TabOrder = 1
|
||||||
|
OnChange = cmbTrendChange
|
||||||
|
Items.Strings = (
|
||||||
|
'Random'
|
||||||
|
'Linear'
|
||||||
|
'Sinusoidal'
|
||||||
|
'Spherical'
|
||||||
|
'Swirl'
|
||||||
|
'Horseshoe'
|
||||||
|
'Polar'
|
||||||
|
'Handkerchief'
|
||||||
|
'Heart'
|
||||||
|
'Disc'
|
||||||
|
'Spiral'
|
||||||
|
'Hyperbolic'
|
||||||
|
'Diamond'
|
||||||
|
'Ex'
|
||||||
|
'Julia'
|
||||||
|
'Bent'
|
||||||
|
'Waves'
|
||||||
|
'Fisheye'
|
||||||
|
'Popcorn')
|
||||||
|
end
|
||||||
|
object chkSameNum: TCheckBox
|
||||||
|
Left = 12
|
||||||
|
Top = 78
|
||||||
|
Width = 389
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Same no. of transforms'
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = chkSameNumClick
|
||||||
|
end
|
||||||
|
object pnlSpeed: TPanel
|
||||||
|
Left = 12
|
||||||
|
Top = 20
|
||||||
|
Width = 101
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Speed'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object txtTime: TEdit
|
||||||
|
Left = 328
|
||||||
|
Top = 20
|
||||||
|
Width = 73
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
ReadOnly = True
|
||||||
|
TabOrder = 4
|
||||||
|
Text = '0'
|
||||||
|
end
|
||||||
|
object pnlTrend: TPanel
|
||||||
|
Left = 12
|
||||||
|
Top = 48
|
||||||
|
Width = 101
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Trend'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Timer: TTimer
|
||||||
|
Enabled = False
|
||||||
|
Interval = 100
|
||||||
|
OnTimer = TimerTimer
|
||||||
|
Left = 168
|
||||||
|
Top = 80
|
||||||
|
end
|
||||||
|
object QualityPopup: TPopupMenu
|
||||||
|
Images = MainForm.Buttons
|
||||||
|
Left = 144
|
||||||
|
Top = 40
|
||||||
|
object mnuLowQuality: TMenuItem
|
||||||
|
Caption = 'Low Quality'
|
||||||
|
RadioItem = True
|
||||||
|
OnClick = mnuLowQualityClick
|
||||||
|
end
|
||||||
|
object mnuMediumQuality: TMenuItem
|
||||||
|
Caption = 'Medium Quality'
|
||||||
|
Checked = True
|
||||||
|
RadioItem = True
|
||||||
|
OnClick = mnuMediumQualityClick
|
||||||
|
end
|
||||||
|
object mnuHighQuality: TMenuItem
|
||||||
|
Caption = 'High Quality'
|
||||||
|
RadioItem = True
|
||||||
|
OnClick = mnuHighQualityClick
|
||||||
|
end
|
||||||
|
object N3: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object mnuBack: TMenuItem
|
||||||
|
Caption = 'Previous'
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 4
|
||||||
|
OnClick = mnuBackClick
|
||||||
|
end
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object mnuMaintainSym: TMenuItem
|
||||||
|
Caption = 'Maintain Symmetry'
|
||||||
|
Checked = True
|
||||||
|
OnClick = mnuMaintainSymClick
|
||||||
|
end
|
||||||
|
object N2: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object mnuResetLocation: TMenuItem
|
||||||
|
Caption = 'Reset Location'
|
||||||
|
Checked = True
|
||||||
|
OnClick = mnuResetLocationClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
695
Forms/Mutate.pas
Normal file
695
Forms/Mutate.pas
Normal file
@ -0,0 +1,695 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit Mutate;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
ExtCtrls, StdCtrls, ControlPoint, ComCtrls, Menus, Buttons, Cmap,
|
||||||
|
RenderingInterface, Translation, Curves;
|
||||||
|
|
||||||
|
type
|
||||||
|
TMutateForm = class(TForm)
|
||||||
|
GroupBox1: TGroupBox;
|
||||||
|
Timer: TTimer;
|
||||||
|
GroupBox2: TGroupBox;
|
||||||
|
scrollTime: TScrollBar;
|
||||||
|
cmbTrend: TComboBox;
|
||||||
|
chkSameNum: TCheckBox;
|
||||||
|
QualityPopup: TPopupMenu;
|
||||||
|
mnuLowQuality: TMenuItem;
|
||||||
|
mnuMediumQuality: TMenuItem;
|
||||||
|
mnuHighQuality: TMenuItem;
|
||||||
|
N3: TMenuItem;
|
||||||
|
mnuResetLocation: TMenuItem;
|
||||||
|
mnuBack: TMenuItem;
|
||||||
|
N1: TMenuItem;
|
||||||
|
mnuMaintainSym: TMenuItem;
|
||||||
|
N2: TMenuItem;
|
||||||
|
Panel10: TPanel;
|
||||||
|
Panel6: TPanel;
|
||||||
|
Image6: TImage;
|
||||||
|
Panel7: TPanel;
|
||||||
|
Image7: TImage;
|
||||||
|
Panel4: TPanel;
|
||||||
|
Image4: TImage;
|
||||||
|
Panel0: TPanel;
|
||||||
|
Image0: TImage;
|
||||||
|
Panel8: TPanel;
|
||||||
|
Image8: TImage;
|
||||||
|
Panel3: TPanel;
|
||||||
|
Image3: TImage;
|
||||||
|
Panel2: TPanel;
|
||||||
|
Image2: TImage;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Image1: TImage;
|
||||||
|
Panel5: TPanel;
|
||||||
|
Image5: TImage;
|
||||||
|
pnlSpeed: TPanel;
|
||||||
|
txtTime: TEdit;
|
||||||
|
pnlTrend: TPanel;
|
||||||
|
procedure Panel10Resize(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure Image0Click(Sender: TObject);
|
||||||
|
procedure MutantClick(Sender: TObject);
|
||||||
|
procedure sbTimeChange(Sender: TObject);
|
||||||
|
procedure TimerTimer(Sender: TObject);
|
||||||
|
procedure scrollTimeChange(Sender: TObject);
|
||||||
|
procedure cmbTrendChange(Sender: TObject);
|
||||||
|
procedure btnCancelClick(Sender: TObject);
|
||||||
|
procedure mnuHighQualityClick(Sender: TObject);
|
||||||
|
procedure mnuLowQualityClick(Sender: TObject);
|
||||||
|
procedure mnuMediumQualityClick(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure chkSameNumClick(Sender: TObject);
|
||||||
|
procedure mnuResetLocationClick(Sender: TObject);
|
||||||
|
procedure mnuBackClick(Sender: TObject);
|
||||||
|
procedure mnuMaintainSymClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
name, nick, url: string;
|
||||||
|
bm: TBitmap;
|
||||||
|
PreviewDensity: double;
|
||||||
|
Updating: boolean;
|
||||||
|
cps: array[0..8] of TControlPoint;
|
||||||
|
Mutants: array[0..8] of TControlPoint;
|
||||||
|
Render: TRenderer;
|
||||||
|
Time: double;
|
||||||
|
bstop: boolean;
|
||||||
|
brightness, gamma, vibrancy: double;
|
||||||
|
seed, InitSeed: integer;
|
||||||
|
procedure RandomSet;
|
||||||
|
procedure ShowMain;
|
||||||
|
procedure ShowMutants;
|
||||||
|
procedure Interpolate;
|
||||||
|
public
|
||||||
|
Zoom: Double;
|
||||||
|
Center: array[0..1] of double;
|
||||||
|
cmap: TColorMap;
|
||||||
|
procedure UpdateDisplay;
|
||||||
|
procedure UpdateFlame;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
MutateForm: TMutateForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Main, Global, Registry, Editor, Adjust, XFormMan;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TMutateForm.UpdateFlame;
|
||||||
|
begin
|
||||||
|
MainForm.StopThread;
|
||||||
|
MainForm.UpdateUndo;
|
||||||
|
MainCp.Copy(cps[0]);
|
||||||
|
Transforms := MainCp.TrianglesFromCP(MainTriangles);
|
||||||
|
MainCp.cmap := cmap;
|
||||||
|
MainCp.name := name; // this is kinda funny,
|
||||||
|
MainCp.nick := nick; // like author's nick can change during mutation?
|
||||||
|
mainCp.url := url; // hee-heheee :-)
|
||||||
|
if mnuResetLocation.checked then
|
||||||
|
begin
|
||||||
|
MainForm.Mainzoom := cps[0].zoom;
|
||||||
|
MainForm.Center[0] := cps[0].Center[0];
|
||||||
|
MainForm.Center[1] := cps[0].Center[1];
|
||||||
|
end;
|
||||||
|
MainForm.RedrawTimer.enabled := true;
|
||||||
|
if EditForm.Visible then EditForm.UpdateDisplay;
|
||||||
|
// if AdjustForm.Visible then AdjustForm.UpdateDisplay;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.UpdateDisplay;
|
||||||
|
begin
|
||||||
|
cps[0].copy(MainCp);
|
||||||
|
cps[0].AdjustScale(Image0.Width, Image0.Height);
|
||||||
|
cps[0].cmap := MainCp.cmap;
|
||||||
|
cmap := MainCp.cmap;
|
||||||
|
name := Maincp.name;
|
||||||
|
nick := maincp.nick;
|
||||||
|
url := maincp.url;
|
||||||
|
zoom := MainCp.zoom;
|
||||||
|
center[0] := MainCp.center[0];
|
||||||
|
center[1] := MainCp.center[1];
|
||||||
|
vibrancy := cps[0].vibrancy;
|
||||||
|
gamma := cps[0].gamma;
|
||||||
|
brightness := cps[0].brightness;
|
||||||
|
Interpolate;
|
||||||
|
ShowMain;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.ShowMain;
|
||||||
|
begin
|
||||||
|
cps[0].Width := Image0.Width;
|
||||||
|
cps[0].Height := Image0.Height;
|
||||||
|
cps[0].spatial_oversample := defOversample;
|
||||||
|
cps[0].spatial_filter_radius := defFilterRadius;
|
||||||
|
cps[0].sample_density := PreviewDensity;
|
||||||
|
cps[0].brightness := brightness;
|
||||||
|
cps[0].gamma := gamma;
|
||||||
|
cps[0].vibrancy := vibrancy;
|
||||||
|
cps[0].sample_density := PreviewDensity;
|
||||||
|
cps[0].cmap := cmap;
|
||||||
|
cps[0].background := MainCp.background;
|
||||||
|
if mnuResetLocation.checked then begin
|
||||||
|
cps[0].CalcBoundbox;
|
||||||
|
zoom := 0;
|
||||||
|
center[0] := cps[0].center[0];
|
||||||
|
center[1] := cps[0].Center[1];
|
||||||
|
end;
|
||||||
|
cps[0].zoom := zoom;
|
||||||
|
cps[0].center[0] := center[0];
|
||||||
|
cps[0].center[1] := center[1];
|
||||||
|
// Render.Compatibility := compatibility;
|
||||||
|
Render.SetCP(cps[0]);
|
||||||
|
Render.Render;
|
||||||
|
BM.Assign(Render.GetImage);
|
||||||
|
Image0.Picture.Graphic := bm;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.ShowMutants;
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if Visible = false then exit;
|
||||||
|
|
||||||
|
Updating := true;
|
||||||
|
for i := 1 to 8 do
|
||||||
|
begin
|
||||||
|
mutants[i].Width := Image1.Width;
|
||||||
|
mutants[i].Height := Image1.Height;
|
||||||
|
mutants[i].spatial_filter_radius := defFilterRadius;
|
||||||
|
mutants[i].spatial_oversample := defOversample;
|
||||||
|
mutants[i].sample_density := PreviewDensity;
|
||||||
|
mutants[i].brightness := brightness;
|
||||||
|
mutants[i].gamma := gamma;
|
||||||
|
mutants[i].vibrancy := vibrancy;
|
||||||
|
|
||||||
|
{ mutants[i].zoom := 0;
|
||||||
|
mutants[i].CalcBoundbox;
|
||||||
|
if not mnuResetLocation.checked then begin
|
||||||
|
mutants[i].zoom := MainCp.zoom;
|
||||||
|
mutants[i].CalcBoundbox;
|
||||||
|
mutants[i].center[0] := MainCp.Center[0];
|
||||||
|
mutants[i].center[1] := MainCp.Center[1];
|
||||||
|
end;
|
||||||
|
{ if mnuResetLocation.checked then begin
|
||||||
|
mutants[i].CalcBoundbox;
|
||||||
|
zoom := 0;
|
||||||
|
center[0] := cps[0].center[0];
|
||||||
|
center[1] := cps[0].Center[1];
|
||||||
|
end;
|
||||||
|
}
|
||||||
|
|
||||||
|
if mnuResetLocation.checked then
|
||||||
|
begin
|
||||||
|
mutants[i].CalcBoundbox;
|
||||||
|
mutants[i].zoom := 0;
|
||||||
|
// center[0] := cps[0].center[0];
|
||||||
|
// center[1] := cps[0].Center[1];
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
mutants[i].zoom := zoom;
|
||||||
|
mutants[i].center[0] := center[0];
|
||||||
|
mutants[i].center[1] := center[1];
|
||||||
|
end;
|
||||||
|
|
||||||
|
// Render.Compatibility := compatibility;
|
||||||
|
Render.SetCP(mutants[i]);
|
||||||
|
Render.Render;
|
||||||
|
BM.Assign(Render.GetImage);
|
||||||
|
case i of
|
||||||
|
1: begin
|
||||||
|
Image1.Picture.Graphic := bm;
|
||||||
|
Image1.Refresh;
|
||||||
|
end;
|
||||||
|
2: begin
|
||||||
|
Image2.Picture.Graphic := bm;
|
||||||
|
Image2.Refresh;
|
||||||
|
end;
|
||||||
|
3: begin
|
||||||
|
Image3.Picture.Graphic := bm;
|
||||||
|
Image3.Refresh;
|
||||||
|
end;
|
||||||
|
4: begin
|
||||||
|
Image4.Picture.Graphic := bm;
|
||||||
|
Image4.Refresh;
|
||||||
|
end;
|
||||||
|
5: begin
|
||||||
|
Image5.Picture.Graphic := bm;
|
||||||
|
Image5.Refresh;
|
||||||
|
end;
|
||||||
|
6: begin
|
||||||
|
Image6.Picture.Graphic := bm;
|
||||||
|
Image6.Refresh;
|
||||||
|
end;
|
||||||
|
7: begin
|
||||||
|
Image7.Picture.Graphic := bm;
|
||||||
|
Image7.Refresh;
|
||||||
|
end;
|
||||||
|
8: begin
|
||||||
|
Image8.Picture.Graphic := bm;
|
||||||
|
Image8.Refresh;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Updating := false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.Interpolate;
|
||||||
|
var i, j, k: Integer;
|
||||||
|
begin
|
||||||
|
if MainCp = nil then Exit;
|
||||||
|
|
||||||
|
for i := 1 to 8 do
|
||||||
|
begin
|
||||||
|
if bstop then exit;
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[i].Time := 1;
|
||||||
|
(* -X- something is not right here...
|
||||||
|
Mutants[i] may be destroyed already
|
||||||
|
Investigate? *)
|
||||||
|
Mutants[i].clear;
|
||||||
|
Mutants[i].InterpolateX(cps[0], cps[i], Time / 100);
|
||||||
|
Mutants[i].cmapindex := cps[0].cmapindex;
|
||||||
|
Mutants[i].cmap := cps[0].cmap;
|
||||||
|
Mutants[i].background := MainCp.background;
|
||||||
|
if mnuMaintainSym.Checked then // maintain symmetry
|
||||||
|
begin
|
||||||
|
for j := 0 to transforms - 1 do
|
||||||
|
begin
|
||||||
|
if cps[0].xform[j].Symmetry = 1 then
|
||||||
|
begin
|
||||||
|
mutants[i].xform[j].Assign(cps[0].xform[j]);
|
||||||
|
{
|
||||||
|
mutants[i].xform[j].Symmetry := 1;
|
||||||
|
mutants[i].xform[j].Color := cps[0].xform[j].color;
|
||||||
|
mutants[i].xform[j].Density := cps[0].xform[j].Density;
|
||||||
|
mutants[i].xform[j].c[0][0] := cps[0].xform[j].c[0][0];
|
||||||
|
mutants[i].xform[j].c[0][1] := cps[0].xform[j].c[0][1];
|
||||||
|
mutants[i].xform[j].c[1][0] := cps[0].xform[j].c[1][0];
|
||||||
|
mutants[i].xform[j].c[1][1] := cps[0].xform[j].c[1][1];
|
||||||
|
mutants[i].xform[j].c[2][0] := cps[0].xform[j].c[2][0];
|
||||||
|
mutants[i].xform[j].c[2][1] := cps[0].xform[j].c[2][1];
|
||||||
|
for k := 0 to NRVAR - 1 do
|
||||||
|
mutants[i].xform[j].vars[k] := cps[0].xform[j].vars[k];
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.RandomSet;
|
||||||
|
var i: Integer;
|
||||||
|
begin
|
||||||
|
RandSeed := seed;
|
||||||
|
for i := 1 to 8 do
|
||||||
|
begin
|
||||||
|
cps[i].clear;
|
||||||
|
if chkSameNum.checked then
|
||||||
|
cps[i].RandomCP(transforms, transforms, false)
|
||||||
|
else
|
||||||
|
cps[i].RandomCP(mutantMinTransforms, mutantMaxTransforms, false);
|
||||||
|
cps[i].SetVariation(TVariation(cmbTrend.Items.Objects[cmbTrend.ItemIndex]));
|
||||||
|
if cps[0].HasFinalXForm = false then
|
||||||
|
begin
|
||||||
|
cps[i].xform[cps[i].NumXForms].Clear;
|
||||||
|
cps[i].xform[cps[i].NumXForms].symmetry := 1;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Interpolate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Read posution from registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Mutate', False) then
|
||||||
|
begin
|
||||||
|
if Registry.ValueExists('Left') then
|
||||||
|
MutateForm.Left := Registry.ReadInteger('Left');
|
||||||
|
if Registry.ValueExists('Top') then
|
||||||
|
MutateForm.Top := Registry.ReadInteger('Top');
|
||||||
|
end;
|
||||||
|
Registry.CloseKey;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
if (cps[0].xform[0].density <> 0) and Assigned(MainCp) then begin // hmm...!?
|
||||||
|
Interpolate;
|
||||||
|
ShowMain;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.FormCreate(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
self.Caption := TextByKey('mutation-title');
|
||||||
|
GroupBox1.Caption := TextByKey('mutation-directions');
|
||||||
|
pnlSpeed.Caption := TextByKey('mutation-speed');
|
||||||
|
pnlTrend.Caption := TextByKey('mutation-trend');
|
||||||
|
chkSameNum.Caption := TextByKey('mutation-keepnumberoftransforms');
|
||||||
|
mnuLowQuality.Caption := TextByKey('common-lowquality');
|
||||||
|
mnuMediumQuality.Caption := TextByKey('common-mediumquality');
|
||||||
|
mnuHighQuality.Caption := TextByKey('common-highquality');
|
||||||
|
mnuResetLocation.Caption := TextByKey('common-resetlocation');
|
||||||
|
mnuMaintainSym.Caption := TextByKey('mutation-maintainsymmetry');
|
||||||
|
mnuBack.Caption := TextByKey('mutation-previous');
|
||||||
|
cmbTrend.Items.clear;
|
||||||
|
cmbTrend.AddItem(TextByKey('mutation-randomtrend'), Tobject(vRandom));
|
||||||
|
for i:= 0 to NRVAR -1 do begin
|
||||||
|
cmbTrend.AddItem(varnames(i), Tobject(i));
|
||||||
|
end;
|
||||||
|
|
||||||
|
bm := TBitMap.Create;
|
||||||
|
case MutatePrevQual of
|
||||||
|
0: begin
|
||||||
|
mnuLowQuality.Checked := true;
|
||||||
|
PreviewDensity := prevLowQuality;
|
||||||
|
end;
|
||||||
|
1: begin
|
||||||
|
mnuMediumQuality.Checked := true;
|
||||||
|
PreviewDensity := prevMediumQuality;
|
||||||
|
end;
|
||||||
|
2: begin
|
||||||
|
mnuHighQuality.Checked := true;
|
||||||
|
PreviewDensity := prevHighQuality;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Render := TRenderer.Create;
|
||||||
|
for i := 0 to 8 do
|
||||||
|
begin
|
||||||
|
cps[i] := TControlPoint.Create;
|
||||||
|
Mutants[i] := TControlPoint.Create;
|
||||||
|
end;
|
||||||
|
Time := 35;
|
||||||
|
scrollTime.Position := 25;
|
||||||
|
cmbTrend.ItemIndex := 0;
|
||||||
|
InitSeed := random(1234567890);
|
||||||
|
seed := InitSeed;
|
||||||
|
RandomSet;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.FormDestroy(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
Render.Stop;
|
||||||
|
Render.Free;
|
||||||
|
for i := 0 to 8 do
|
||||||
|
begin
|
||||||
|
cps[i].Free;
|
||||||
|
Mutants[i].Free;
|
||||||
|
end;
|
||||||
|
bm.free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.Image0Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Render.Stop;
|
||||||
|
mnuBack.Enabled := true;
|
||||||
|
inc(seed);
|
||||||
|
RandomSet;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.MutantClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
i, j: integer;
|
||||||
|
cpt: TControlPoint;
|
||||||
|
begin
|
||||||
|
cpt := TControlPoint.Create;
|
||||||
|
cpt.Copy(cps[0]);
|
||||||
|
bstop := true;
|
||||||
|
if sender = Image1 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[1].Time := 1;
|
||||||
|
cps[0].Interpolatex(cps[0], cps[1], Time / 100);
|
||||||
|
end
|
||||||
|
else if sender = Image2 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[2].Time := 1;
|
||||||
|
cps[0].Interpolatex(cps[0], cps[2], Time / 100);
|
||||||
|
end
|
||||||
|
else if sender = Image3 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[3].Time := 1;
|
||||||
|
cps[0].InterpolateX(cps[0], cps[3], Time / 100);
|
||||||
|
end
|
||||||
|
else if sender = Image4 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[4].Time := 1;
|
||||||
|
cps[0].Interpolatex(cps[0], cps[4], Time / 100);
|
||||||
|
end
|
||||||
|
else if sender = Image5 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[5].Time := 1;
|
||||||
|
cps[0].Interpolatex(cps[0], cps[5], Time / 100);
|
||||||
|
end
|
||||||
|
else if sender = Image6 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[6].Time := 1;
|
||||||
|
cps[0].Interpolatex(cps[0], cps[6], Time / 100);
|
||||||
|
end
|
||||||
|
else if sender = Image7 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[7].Time := 1;
|
||||||
|
cps[0].Interpolatex(cps[0], cps[7], Time / 100);
|
||||||
|
end
|
||||||
|
else if sender = Image8 then
|
||||||
|
begin
|
||||||
|
cps[0].Time := 0;
|
||||||
|
cps[8].Time := 1;
|
||||||
|
cps[0].Interpolatex(cps[0], cps[8], Time / 100);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if mnuMaintainSym.Checked then // maintain symmetry
|
||||||
|
begin
|
||||||
|
for i := 0 to transforms - 1 do
|
||||||
|
begin
|
||||||
|
if cpt.xform[i].Symmetry = 1 then
|
||||||
|
begin
|
||||||
|
cps[0].xform[i].Assign(cpt.xform[i]);
|
||||||
|
{
|
||||||
|
cps[0].xform[i].Symmetry := 1;
|
||||||
|
cps[0].xform[i].Color := cpt.xform[i].color;
|
||||||
|
cps[0].xform[i].Density := cpt.xform[i].Density;
|
||||||
|
cps[0].xform[i].c[0][0] := cpt.xform[i].c[0][0];
|
||||||
|
cps[0].xform[i].c[0][1] := cpt.xform[i].c[0][1];
|
||||||
|
cps[0].xform[i].c[1][0] := cpt.xform[i].c[1][0];
|
||||||
|
cps[0].xform[i].c[1][1] := cpt.xform[i].c[1][1];
|
||||||
|
cps[0].xform[i].c[2][0] := cpt.xform[i].c[2][0];
|
||||||
|
cps[0].xform[i].c[2][1] := cpt.xform[i].c[2][1];
|
||||||
|
for j := 0 to NRVAR - 1 do
|
||||||
|
cps[0].xform[i].vars[j] := cpt.xform[i].vars[j];
|
||||||
|
}
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
bstop := false;
|
||||||
|
ShowMain;
|
||||||
|
Interpolate;
|
||||||
|
ShowMutants;
|
||||||
|
UpdateFlame;
|
||||||
|
cpt.free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.sbTimeChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
bstop := true;
|
||||||
|
Render.Stop;
|
||||||
|
Time := scrollTime.Position;
|
||||||
|
bstop := false;
|
||||||
|
Interpolate;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.TimerTimer(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Timer.Enabled := false;
|
||||||
|
if (Time <> scrollTime.Position) and (not updating) then
|
||||||
|
begin
|
||||||
|
Time := scrollTime.Position;
|
||||||
|
Interpolate;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.scrollTimeChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Timer.Enabled := true;
|
||||||
|
txtTime.Text := FloatToStr(scrollTime.Position / 100);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.cmbTrendChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
for i := 1 to 8 do begin
|
||||||
|
cps[i].SetVariation(TVariation(cmbTrend.Items.Objects[cmbTrend.ItemIndex]));
|
||||||
|
end;
|
||||||
|
|
||||||
|
Interpolate;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.btnCancelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := mrCancel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.mnuHighQualityClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
mnuHighQuality.Checked := True;
|
||||||
|
PreviewDensity := prevHighQuality;
|
||||||
|
MutatePrevQual := 2;
|
||||||
|
ShowMain;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.mnuLowQualityClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
mnuLowQuality.Checked := True;
|
||||||
|
PreviewDensity := prevLowQuality;
|
||||||
|
MutatePrevQual := 0;
|
||||||
|
ShowMain;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.mnuMediumQualityClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
mnuMediumQuality.Checked := True;
|
||||||
|
PreviewDensity := prevMediumQuality;
|
||||||
|
MutatePrevQual := 1;
|
||||||
|
ShowMain;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Write position to registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Mutate', True) then
|
||||||
|
begin
|
||||||
|
Registry.WriteInteger('Top', MutateForm.Top);
|
||||||
|
Registry.WriteInteger('Left', MutateForm.Left);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.chkSameNumClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
RandomSet;
|
||||||
|
Interpolate;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.mnuResetLocationClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
mnuResetLocation.Checked := not mnuResetLocation.Checked;
|
||||||
|
if not mnuResetLocation.checked then
|
||||||
|
begin
|
||||||
|
cps[0].width := MainCp.width;
|
||||||
|
cps[0].height := MainCp.height;
|
||||||
|
cps[0].pixels_per_unit := MainCp.pixels_per_unit;
|
||||||
|
cps[0].AdjustScale(Image0.width, Image0.Height);
|
||||||
|
cps[0].zoom := MainCp.zoom;
|
||||||
|
cps[0].center[0] := MainCp.center[0];
|
||||||
|
cps[0].center[1] := MainCp.center[1];
|
||||||
|
zoom := cps[0].zoom;
|
||||||
|
center[0] := cps[0].center[0];
|
||||||
|
center[1] := cps[0].center[1];
|
||||||
|
end;
|
||||||
|
ShowMain;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.mnuBackClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Render.Stop;
|
||||||
|
if seed > InitSeed then
|
||||||
|
dec(seed);
|
||||||
|
if seed = InitSeed then mnuBack.enabled := false;
|
||||||
|
RandomSet;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.mnuMaintainSymClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
mnuMaintainSym.Checked := not mnuMaintainSym.Checked;
|
||||||
|
Interpolate;
|
||||||
|
ShowMutants;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMutateForm.Panel10Resize(Sender: TObject);
|
||||||
|
const gap:integer = 4 ;
|
||||||
|
var
|
||||||
|
w, h : integer;
|
||||||
|
begin
|
||||||
|
w := (Panel10.Width - 2*gap) div 3;
|
||||||
|
h := (Panel10.Height - 2*gap) div 3;
|
||||||
|
|
||||||
|
Panel0.Width := w; Panel1.Width := w; Panel2.Width := w;
|
||||||
|
Panel3.Width := w; Panel4.Width := w; Panel5.Width := w;
|
||||||
|
Panel6.Width := w; Panel7.Width := w; Panel8.Width := w;
|
||||||
|
Panel0.Height := h; Panel1.Height := h; Panel2.Height := h;
|
||||||
|
Panel3.Height := h; Panel4.Height := h; Panel5.Height := h;
|
||||||
|
Panel6.Height := h; Panel7.Height := h; Panel8.Height := h;
|
||||||
|
|
||||||
|
Panel2.Left := w + gap; Panel0.Left := w + gap; Panel6.Left := w + gap;
|
||||||
|
Panel3.Left := 2*(w + gap); Panel4.Left := 2*(w + gap); Panel5.Left := 2*(w + gap);
|
||||||
|
|
||||||
|
Panel8.Top := h + gap; Panel0.Top := h + gap; Panel4.Top := h + gap;
|
||||||
|
Panel7.Top := 2*(h + gap); Panel6.Top := 2*(h + gap); Panel5.Top := 2*(h + gap);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
2848
Forms/Options.dfm
Normal file
2848
Forms/Options.dfm
Normal file
File diff suppressed because it is too large
Load Diff
1398
Forms/Options.pas
Normal file
1398
Forms/Options.pas
Normal file
File diff suppressed because it is too large
Load Diff
42
Forms/Preview.dfm
Normal file
42
Forms/Preview.dfm
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
object PreviewForm: TPreviewForm
|
||||||
|
Left = 541
|
||||||
|
Top = 357
|
||||||
|
Width = 212
|
||||||
|
Height = 181
|
||||||
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
|
BorderStyle = bsSizeToolWin
|
||||||
|
Caption = 'Preview'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnKeyPress = FormKeyPress
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object BackPanel: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 204
|
||||||
|
Height = 152
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvLowered
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clBlack
|
||||||
|
TabOrder = 0
|
||||||
|
object Image: TImage
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 200
|
||||||
|
Height = 153
|
||||||
|
Align = alClient
|
||||||
|
AutoSize = True
|
||||||
|
Stretch = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
94
Forms/Preview.pas
Normal file
94
Forms/Preview.pas
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit Preview;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
ExtCtrls, ControlPoint, RenderingInterface, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TPreviewForm = class(TForm)
|
||||||
|
BackPanel: TPanel;
|
||||||
|
Image: TImage;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
private
|
||||||
|
public
|
||||||
|
cp: TControlPoint;
|
||||||
|
Render: TRenderer;
|
||||||
|
procedure DrawFlame;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
PreviewForm: TPreviewForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Main, Global, ScriptForm;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TPreviewForm.DrawFlame;
|
||||||
|
begin
|
||||||
|
Render.Stop;
|
||||||
|
// ScriptEditor.GetCpFromFlame(cp);
|
||||||
|
cp.width := Image.width;
|
||||||
|
cp.Height := Image.Height;
|
||||||
|
// Render.Compatibility := Compatibility;
|
||||||
|
Render.SetCP(cp);
|
||||||
|
Render.Render;
|
||||||
|
Image.Picture.Bitmap.Assign(Render.GetImage);
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TPreviewForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
self.Caption := TextbyKey('preview-title');
|
||||||
|
cp := TControlPoint.Create;
|
||||||
|
Render := TRenderer.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPreviewForm.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Render.Free;
|
||||||
|
cp.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPreviewForm.FormKeyPress(Sender: TObject; var Key: Char);
|
||||||
|
begin
|
||||||
|
ScriptEditor.Stopped := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TPreviewForm.FormClose(Sender: TObject;
|
||||||
|
var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
ScriptEditor.Stopped := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
152
Forms/Save.dfm
Normal file
152
Forms/Save.dfm
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
object SaveForm: TSaveForm
|
||||||
|
Left = 434
|
||||||
|
Top = 432
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Save Parameters'
|
||||||
|
ClientHeight = 153
|
||||||
|
ClientWidth = 517
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -14
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
Position = poOwnerFormCenter
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
517
|
||||||
|
153)
|
||||||
|
PixelsPerInch = 120
|
||||||
|
TextHeight = 16
|
||||||
|
object btnDefGradient: TSpeedButton
|
||||||
|
Left = 480
|
||||||
|
Top = 9
|
||||||
|
Width = 30
|
||||||
|
Height = 29
|
||||||
|
Hint = 'Browse...'
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Flat = True
|
||||||
|
Font.Charset = ANSI_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -15
|
||||||
|
Font.Name = 'Arial'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
Glyph.Data = {
|
||||||
|
36030000424D3603000000000000360000002800000010000000100000000100
|
||||||
|
18000000000000030000120B0000120B00000000000000000000FF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF75848F66808F
|
||||||
|
607987576E7B4E626F4456613948522E3A43252E351B222914191E0E12160E13
|
||||||
|
18FF00FFFF00FFFF00FF77879289A1AB6AB2D4008FCD008FCD008FCD048CC708
|
||||||
|
88BE0F82B4157CA91B779F1F7296224B5C87A2ABFF00FFFF00FF7A8A957EBED3
|
||||||
|
8AA4AE7EDCFF5FCFFF55CBFF4CC4FA41BCF537B3F02EAAEB24A0E5138CD42367
|
||||||
|
805E696DFF00FFFF00FF7D8E9879D2EC8BA4AD89C2CE71D8FF65D3FF5CCEFF51
|
||||||
|
C9FE49C1FA3FB9F534B0EE29A8E91085CD224B5B98B2BAFF00FF80919C81D7EF
|
||||||
|
7DC5E08CA6B080DDFE68D3FF67D4FF62D1FF58CDFF4EC7FC46BEF73BB6F231AC
|
||||||
|
EC2569817A95A1FF00FF83959F89DCF18CE2FF8DA8B18CBAC774D8FF67D4FF67
|
||||||
|
D4FF67D4FF5FD0FF54CDFF4BC5FC41BBF72EA2DB51677498B2BA869AA392E1F2
|
||||||
|
98E8FD80C4DE8EA7B081DEFD84E0FF84E0FF84E0FF84E0FF81DFFF7BDDFF74D8
|
||||||
|
FF6BD6FF56A9D18F9BA4889CA59AE6F39FEBFB98E8FE8BACB98BACB98AAAB788
|
||||||
|
A6B386A3AF839FAA819AA67F95A17C919D7A8E99798B957788938BA0A8A0EAF6
|
||||||
|
A6EEF99FEBFB98E8FE7ADAFF67D4FF67D4FF67D4FF67D4FF67D4FF67D4FF7788
|
||||||
|
93FF00FFFF00FFFF00FF8EA2ABA7EEF6ABF0F7A6EEF99FEBFB98E8FD71D4FB89
|
||||||
|
9EA78699A382949F7E909A7A8C97778893FF00FFFF00FFFF00FF8FA4ACA0D2DA
|
||||||
|
ABF0F7ABF0F7A6EEF99FEBFB8DA1AAB5CBD0FF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFBDCED48FA4AC8FA4AC8FA4AC8FA4AC8FA4ACB5CBD0FF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||||
|
FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
|
||||||
|
FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
|
||||||
|
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
|
||||||
|
ParentFont = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
OnClick = btnDefGradientClick
|
||||||
|
end
|
||||||
|
object btnSave: TButton
|
||||||
|
Left = 322
|
||||||
|
Top = 116
|
||||||
|
Width = 93
|
||||||
|
Height = 30
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = '&Save'
|
||||||
|
Default = True
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = btnSaveClick
|
||||||
|
end
|
||||||
|
object btnCancel: TButton
|
||||||
|
Left = 421
|
||||||
|
Top = 116
|
||||||
|
Width = 92
|
||||||
|
Height = 30
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Cancel'
|
||||||
|
TabOrder = 3
|
||||||
|
OnClick = btnCancelClick
|
||||||
|
end
|
||||||
|
object pnlTarget: TPanel
|
||||||
|
Left = 10
|
||||||
|
Top = 10
|
||||||
|
Width = 124
|
||||||
|
Height = 26
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Destination'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object pnlName: TPanel
|
||||||
|
Left = 10
|
||||||
|
Top = 39
|
||||||
|
Width = 124
|
||||||
|
Height = 26
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Name'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object txtFilename: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 10
|
||||||
|
Width = 353
|
||||||
|
Height = 24
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'txtFilename'
|
||||||
|
end
|
||||||
|
object txtTitle: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 39
|
||||||
|
Width = 383
|
||||||
|
Height = 24
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'txtTitle'
|
||||||
|
end
|
||||||
|
object optUseOldFormat: TRadioButton
|
||||||
|
Left = 10
|
||||||
|
Top = 79
|
||||||
|
Width = 304
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Use classic flame format'
|
||||||
|
Checked = True
|
||||||
|
TabOrder = 6
|
||||||
|
TabStop = True
|
||||||
|
end
|
||||||
|
object optUseNewFormat: TRadioButton
|
||||||
|
Left = 10
|
||||||
|
Top = 101
|
||||||
|
Width = 304
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
Caption = 'Use new flame format'
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 7
|
||||||
|
end
|
||||||
|
end
|
225
Forms/Save.pas
Normal file
225
Forms/Save.pas
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit Save;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
StdCtrls, Buttons, ExtCtrls, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
ESaveType = (stSaveParameters, stSaveAllParameters, stSaveGradient, stExportUPR);
|
||||||
|
TSaveForm = class(TForm)
|
||||||
|
txtFilename: TEdit;
|
||||||
|
txtTitle: TEdit;
|
||||||
|
btnSave: TButton;
|
||||||
|
btnCancel: TButton;
|
||||||
|
btnDefGradient: TSpeedButton;
|
||||||
|
pnlTarget: TPanel;
|
||||||
|
pnlName: TPanel;
|
||||||
|
optUseOldFormat: TRadioButton;
|
||||||
|
optUseNewFormat: TRadioButton;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure btnSaveClick(Sender: TObject);
|
||||||
|
procedure btnCancelClick(Sender: TObject);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure btnDefGradientClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
public
|
||||||
|
Title: string;
|
||||||
|
Filename: string;
|
||||||
|
SaveType : ESaveType;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
SaveForm: TSaveForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Main, Global, cmap;
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
function EntryExists(En, Fl: string): boolean;
|
||||||
|
{ Searches for existing identifier in parameter files }
|
||||||
|
var
|
||||||
|
FStrings: TStringList;
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
if FileExists(Fl) then
|
||||||
|
begin
|
||||||
|
FStrings := TStringList.Create;
|
||||||
|
try
|
||||||
|
FStrings.LoadFromFile(Fl);
|
||||||
|
for i := 0 to FStrings.Count - 1 do
|
||||||
|
if Pos(LowerCase(En) + ' {', Lowercase(FStrings[i])) = 1 then
|
||||||
|
Result := True;
|
||||||
|
finally
|
||||||
|
FStrings.Free;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function SaveTypeTextKey(st : ESaveType) : string;
|
||||||
|
begin
|
||||||
|
case st of
|
||||||
|
stSaveParameters: Result := 'save-type-parameters';
|
||||||
|
stSaveAllParameters: Result := 'save-type-allparameters';
|
||||||
|
stSaveGradient: Result := 'save-type-gradient';
|
||||||
|
stExportUPR: Result := 'save-type-exportupr';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function SaveDefaultExt(st : ESaveType) : string;
|
||||||
|
begin
|
||||||
|
case st of
|
||||||
|
stSaveParameters: Result := 'flame';
|
||||||
|
stSaveAllParameters: Result := 'flame';
|
||||||
|
stSaveGradient: Result := 'gradient';
|
||||||
|
stExportUPR: Result := 'upr';
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function SaveFilter(st : ESaveType): string;
|
||||||
|
begin
|
||||||
|
case st of
|
||||||
|
stSaveParameters: Result := Format('%s|*.flame;*.xml|%s|*.*',
|
||||||
|
[TextByKey('common-filter-flamefiles'), TextByKey('common-filter-allfiles')]);
|
||||||
|
stSaveAllParameters: Result := Format('%s|*.flame;*.xml|%s|*.*',
|
||||||
|
[TextByKey('common-filter-flamefiles'), TextByKey('common-filter-allfiles')]);
|
||||||
|
stSaveGradient: Result := Format('%s|*.gradient;*.ugr|%s|*.*',
|
||||||
|
[TextByKey('common-filter-gradientfiles'), TextByKey('common-filter-allfiles')]);
|
||||||
|
stExportUPR: Result := Format('%s|*.upr|%s|*.*',
|
||||||
|
[TextByKey('common-filter-uprfiles'), TextByKey('common-filter-allfiles')]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSaveForm.btnSaveClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
t, f: string;
|
||||||
|
check, onestr: boolean;
|
||||||
|
begin
|
||||||
|
t := Trim(txtTitle.Text);
|
||||||
|
f := Trim(txtFilename.Text);
|
||||||
|
|
||||||
|
if ((t = '') and txtTitle.Enabled) then
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar(TextByKey('save-status-notitle')), 'Apophysis', 48);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if f = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar(TextByKey('save-status-invalidfilename')), 'Apophysis', 48);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if ExtractFileExt(f) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar(TextByKey('save-status-invalidfilename')), 'Apophysis', 48);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if SaveType = stSaveParameters then
|
||||||
|
begin
|
||||||
|
check := XMLEntryExists(t, f);
|
||||||
|
onestr := false;
|
||||||
|
end
|
||||||
|
else if SaveType = stSaveAllParameters then
|
||||||
|
begin
|
||||||
|
onestr := true;
|
||||||
|
check := FileExists(f);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
onestr := false;
|
||||||
|
t := CleanIdentifier(t);
|
||||||
|
check := EntryExists(t, f);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if check then begin if onestr then begin
|
||||||
|
if Application.MessageBox(PChar(Format(TextByKey('save-status-alreadyexists2'), [f])),
|
||||||
|
'Apophysis', 52) = ID_NO then exit;
|
||||||
|
end else begin
|
||||||
|
if Application.MessageBox(PChar(Format(TextByKey('save-status-alreadyexists'), [t, f])),
|
||||||
|
'Apophysis', 52) = ID_NO then exit;
|
||||||
|
end end;
|
||||||
|
|
||||||
|
if (t = '*') then t := '';
|
||||||
|
Title := t;
|
||||||
|
Filename := f;
|
||||||
|
ModalResult := mrOK;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSaveForm.btnCancelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ModalResult := mrCancel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSaveForm.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
txtFilename.Text := Filename;
|
||||||
|
txtTitle.Text := Title;
|
||||||
|
//btnSave.SetFocus;
|
||||||
|
self.Caption := TextByKey(SaveTypeTextKey(SaveType));
|
||||||
|
{if (SaveType = stSaveParameters) or (SaveType = stSaveAllParameters) then
|
||||||
|
self.Height := 160
|
||||||
|
else self.Height := 120; }
|
||||||
|
|
||||||
|
if (SaveType = stSaveAllParameters) then txtTitle.Text := '';
|
||||||
|
txtTitle.Enabled := (SaveType = stSaveParameters) or (SaveType = stExportUPR) or (SaveType = stSaveGradient);
|
||||||
|
if (not txtTitle.Enabled) then pnlName.Font.Color := clGrayText
|
||||||
|
else pnlName.Font.Color := clWindowText;
|
||||||
|
|
||||||
|
optUseOldFormat.Visible := (SaveType = stSaveParameters) or (SaveType = stSaveAllParameters);
|
||||||
|
optUseNewFormat.Visible := (SaveType = stSaveParameters) or (SaveType = stSaveAllParameters);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSaveForm.btnDefGradientClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fn:string;
|
||||||
|
promptOverwrite: boolean;
|
||||||
|
begin
|
||||||
|
promptOverwrite := (SaveType <> stSaveParameters);
|
||||||
|
if OpenSaveFileDialog(self, SaveDefaultExt(SaveType), SaveFilter(SaveType),
|
||||||
|
ExtractFilePath(txtFilename.Text), TextByKey('common-browse'), fn, false,
|
||||||
|
(*promptOverwrite*)false, false, false) then
|
||||||
|
txtFileName.Text := fn;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSaveForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
btnCancel.Caption := TextByKey('common-cancel');
|
||||||
|
btnSave.Caption := TextByKey('common-ok');
|
||||||
|
btnDefGradient.Hint := TextByKey('common-browse');
|
||||||
|
pnlTarget.Caption := TextByKey('common-destination');
|
||||||
|
pnlName.Caption := TextByKey('save-name');
|
||||||
|
optUseOldFormat.Caption := TextByKey('save-oldformat');
|
||||||
|
optUseNewFormat.Caption := TextByKey('save-newformat');
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
63
Forms/SavePreset.dfm
Normal file
63
Forms/SavePreset.dfm
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
object SavePresetForm: TSavePresetForm
|
||||||
|
Left = 295
|
||||||
|
Top = 331
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'Save Preset'
|
||||||
|
ClientHeight = 66
|
||||||
|
ClientWidth = 349
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnCreate = FormCreate
|
||||||
|
DesignSize = (
|
||||||
|
349
|
||||||
|
66)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object Button1: TButton
|
||||||
|
Left = 190
|
||||||
|
Top = 37
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'OK'
|
||||||
|
Default = True
|
||||||
|
ModalResult = 1
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = Button1Click
|
||||||
|
end
|
||||||
|
object Button2: TButton
|
||||||
|
Left = 270
|
||||||
|
Top = 37
|
||||||
|
Width = 75
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'Cancel'
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object pnlName: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 101
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Name'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object txtPresetName: TEdit
|
||||||
|
Left = 104
|
||||||
|
Top = 8
|
||||||
|
Width = 239
|
||||||
|
Height = 21
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
69
Forms/SavePreset.pas
Normal file
69
Forms/SavePreset.pas
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit SavePreset;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
StdCtrls, ExtCtrls, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TSavePresetForm = class(TForm)
|
||||||
|
txtPresetName: TEdit;
|
||||||
|
Button1: TButton;
|
||||||
|
Button2: TButton;
|
||||||
|
pnlName: TPanel;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure Button1Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
SavePresetForm: TSavePresetForm;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TSavePresetForm.Button1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if txtPresetName.Text = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox(PChar(TextByKey('savepreset-notitle')), 'Apophysis', 48);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSavePresetForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
self.Caption := TextBykey('savepreset-title');
|
||||||
|
button1.Caption := TextByKey('common-ok');
|
||||||
|
button2.Caption := TextByKey('common-cancel');
|
||||||
|
pnlName.Caption := TextByKey('savepreset-name');
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
625
Forms/ScriptForm.dfm
Normal file
625
Forms/ScriptForm.dfm
Normal file
@ -0,0 +1,625 @@
|
|||||||
|
object ScriptEditor: TScriptEditor
|
||||||
|
Left = 312
|
||||||
|
Top = 383
|
||||||
|
Caption = 'Script Editor'
|
||||||
|
ClientHeight = 485
|
||||||
|
ClientWidth = 583
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
Icon.Data = {
|
||||||
|
0000010001001010000001002000680400001600000028000000100000002000
|
||||||
|
0000010020000000000040040000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000006349
|
||||||
|
35146349352E927A69FF8C7563FF87705EFF6349352E7F6654FF7A624FFF755D
|
||||||
|
4AFF6349352E6E5441FF6A513EFF674E3AFF6349352E00000000000000006349
|
||||||
|
352EAE9888FFEFE3DDFFF2E7E1FFEDDFD7FF836B59FFB79B8BFFDBBDADFFD9B7
|
||||||
|
A6FF725946FFAE8B77FFD0A692FFCC9E87FF654B38FF6349352E00000000B7A2
|
||||||
|
93FFFBF8F7FFF9F4F2FFF7F0ECFFF4EBE6FFF1E5DFFF7F6754FF7A624FFF765D
|
||||||
|
4AFF735946FF6E5542FF6B523EFF674E3AFF654B38FF634935FF00000000B7A2
|
||||||
|
93FFFDFCFBFFFBF9F7FFFAF5F2FFF7EFEDFFF4EAE6FFF2E5DFFFDDDCD7FFDFD7
|
||||||
|
CEFFDECDC0FFDEC5B6FFDEBFACFFDBBAA6FFD8B5A3FF634935FF00000000B7A2
|
||||||
|
93FFFFFFFFFFB47F65FFB47F64FFEDDDD5FFB37E63FFF4EBE6FFF1E5DFFFEFDF
|
||||||
|
D7FFEBD9D1FFE8D3C9FFE5CDC1FFE1C6B9FFD6B3A1FF634A35FF00000000B9A4
|
||||||
|
95FFFFFFFFFFFFFFFFFFFDFCFCFFFCF9F7FFFAF4F2FFF6F0ECFFF4EBE5FFF2E5
|
||||||
|
DFFFEEDFD8FFEBD9D0FFE8D3C8FFE5CCC1FFDBBDADFF634A36FF00000000BDA7
|
||||||
|
98FFFFFFFFFF968E88FFEEDED7FF968E87FFEDDDD6FF968D86FF958C85FFF4EB
|
||||||
|
E6FFF2E5DFFFEFDFD8FFECD9D0FFE8D3C9FFE0C7BAFF634A35FF00000000C1AB
|
||||||
|
9CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFBF8F7FFFAF4F2FFF7F0
|
||||||
|
ECFFF4EAE6FFF1E5DFFFEEDFD7FFEBD9D0FFE6D1C6FF634A35FF00000000C5AF
|
||||||
|
A0FFFFFFFFFFB48065FFB48065FF968E88FFC2B0A3FF968E87FF968E86FFF9F4
|
||||||
|
F2FFF7EFECFFF4EBE6FFF2E5DFFFEFDFD8FFEADBD1FF634936FF00000000C8B2
|
||||||
|
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFCFFFCF8
|
||||||
|
F7FFF9F5F2FFF7F0ECFFF4EBE6FFF1E5DFFFEEE2DAFF644A36FF00000000C9B4
|
||||||
|
A5FFFFFFFFFFFFFFFFFF66A365FF66A365FF66A365FFC0B4ADFF66A365FF66A3
|
||||||
|
65FF66A264FFFAF5F2FFF7F0ECFFF4EBE6FFEEE2DAFF644A36FF00000000C8B2
|
||||||
|
A3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFEFCFBFFFBF9F7FFFAF4F2FFF7F0EDFFF3EAE4FF644A36FF00000000C8B2
|
||||||
|
A3FFCAB4A5FFCBB5A6FFCAB4A5FFC9B3A4FFC7B2A3FFC6B0A1FFC3AE9FFFC1AC
|
||||||
|
9DFFBFAA9BFFBDA899FFBBA697FFB9A495FFB8A394FFB7A293FF000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000000000000000000000000000FFFF
|
||||||
|
0000FFFF00000003000000010000000100000001000000010000000100000001
|
||||||
|
0000000100000001000000010000000100000001000000010000FFFF0000}
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShortCut = FormShortCut
|
||||||
|
OnShow = FormShow
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object Splitter1: TSplitter
|
||||||
|
Left = 0
|
||||||
|
Top = 373
|
||||||
|
Width = 583
|
||||||
|
Height = 4
|
||||||
|
Cursor = crVSplit
|
||||||
|
Align = alBottom
|
||||||
|
end
|
||||||
|
object ToolBar: TToolBar
|
||||||
|
Left = 560
|
||||||
|
Top = 0
|
||||||
|
Width = 23
|
||||||
|
Height = 373
|
||||||
|
Align = alRight
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'ToolBar'
|
||||||
|
Images = MainForm.Buttons
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 0
|
||||||
|
object btnNew: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Hint = 'New'
|
||||||
|
Caption = 'btnNew'
|
||||||
|
ImageIndex = 0
|
||||||
|
Wrap = True
|
||||||
|
OnClick = btnNewClick
|
||||||
|
end
|
||||||
|
object btnOpen: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 22
|
||||||
|
Hint = 'Open'
|
||||||
|
Caption = 'btnOpen'
|
||||||
|
ImageIndex = 1
|
||||||
|
Wrap = True
|
||||||
|
OnClick = btnOpenClick
|
||||||
|
end
|
||||||
|
object btnSave: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 44
|
||||||
|
Hint = 'Save'
|
||||||
|
Caption = 'btnSave'
|
||||||
|
ImageIndex = 2
|
||||||
|
Wrap = True
|
||||||
|
OnClick = btnSaveClick
|
||||||
|
end
|
||||||
|
object btnRun: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 66
|
||||||
|
Hint = 'Run'
|
||||||
|
Caption = 'btnRun'
|
||||||
|
ImageIndex = 43
|
||||||
|
Wrap = True
|
||||||
|
OnClick = btnRunClick
|
||||||
|
end
|
||||||
|
object btnStop: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 88
|
||||||
|
Hint = 'Stop'
|
||||||
|
Caption = 'btnStop'
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 36
|
||||||
|
Wrap = True
|
||||||
|
OnClick = btnStopClick
|
||||||
|
end
|
||||||
|
object btnBreak: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 110
|
||||||
|
Hint = 'Break'
|
||||||
|
Enabled = False
|
||||||
|
ImageIndex = 37
|
||||||
|
OnClick = btnBreakClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object StatusBar: TStatusBar
|
||||||
|
Left = 0
|
||||||
|
Top = 466
|
||||||
|
Width = 583
|
||||||
|
Height = 19
|
||||||
|
Anchors = [akLeft, akRight]
|
||||||
|
Panels = <>
|
||||||
|
end
|
||||||
|
object BackPanel: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 560
|
||||||
|
Height = 373
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvLowered
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'BackPanel'
|
||||||
|
TabOrder = 2
|
||||||
|
object Editor: TAdvMemo
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 556
|
||||||
|
Height = 369
|
||||||
|
Cursor = crIBeam
|
||||||
|
PopupMenu = PopupMenu
|
||||||
|
ActiveLineSettings.ShowActiveLine = False
|
||||||
|
ActiveLineSettings.ShowActiveLineIndicator = False
|
||||||
|
Align = alClient
|
||||||
|
AutoCompletion.Font.Charset = DEFAULT_CHARSET
|
||||||
|
AutoCompletion.Font.Color = clWindowText
|
||||||
|
AutoCompletion.Font.Height = -11
|
||||||
|
AutoCompletion.Font.Name = 'MS Sans Serif'
|
||||||
|
AutoCompletion.Font.Style = []
|
||||||
|
AutoCompletion.Height = 120
|
||||||
|
AutoCompletion.StartToken = '(.'
|
||||||
|
AutoCompletion.Width = 400
|
||||||
|
AutoCorrect.Active = True
|
||||||
|
AutoHintParameterPosition = hpBelowCode
|
||||||
|
BlockShow = False
|
||||||
|
BlockColor = clWindow
|
||||||
|
BlockLineColor = clGray
|
||||||
|
BkColor = clWindow
|
||||||
|
BookmarkGlyph.Data = {
|
||||||
|
36050000424D3605000000000000360400002800000010000000100000000100
|
||||||
|
0800000000000001000000000000000000000001000000000000000000000000
|
||||||
|
80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
|
||||||
|
A6000020400000206000002080000020A0000020C0000020E000004000000040
|
||||||
|
20000040400000406000004080000040A0000040C0000040E000006000000060
|
||||||
|
20000060400000606000006080000060A0000060C0000060E000008000000080
|
||||||
|
20000080400000806000008080000080A0000080C0000080E00000A0000000A0
|
||||||
|
200000A0400000A0600000A0800000A0A00000A0C00000A0E00000C0000000C0
|
||||||
|
200000C0400000C0600000C0800000C0A00000C0C00000C0E00000E0000000E0
|
||||||
|
200000E0400000E0600000E0800000E0A00000E0C00000E0E000400000004000
|
||||||
|
20004000400040006000400080004000A0004000C0004000E000402000004020
|
||||||
|
20004020400040206000402080004020A0004020C0004020E000404000004040
|
||||||
|
20004040400040406000404080004040A0004040C0004040E000406000004060
|
||||||
|
20004060400040606000406080004060A0004060C0004060E000408000004080
|
||||||
|
20004080400040806000408080004080A0004080C0004080E00040A0000040A0
|
||||||
|
200040A0400040A0600040A0800040A0A00040A0C00040A0E00040C0000040C0
|
||||||
|
200040C0400040C0600040C0800040C0A00040C0C00040C0E00040E0000040E0
|
||||||
|
200040E0400040E0600040E0800040E0A00040E0C00040E0E000800000008000
|
||||||
|
20008000400080006000800080008000A0008000C0008000E000802000008020
|
||||||
|
20008020400080206000802080008020A0008020C0008020E000804000008040
|
||||||
|
20008040400080406000804080008040A0008040C0008040E000806000008060
|
||||||
|
20008060400080606000806080008060A0008060C0008060E000808000008080
|
||||||
|
20008080400080806000808080008080A0008080C0008080E00080A0000080A0
|
||||||
|
200080A0400080A0600080A0800080A0A00080A0C00080A0E00080C0000080C0
|
||||||
|
200080C0400080C0600080C0800080C0A00080C0C00080C0E00080E0000080E0
|
||||||
|
200080E0400080E0600080E0800080E0A00080E0C00080E0E000C0000000C000
|
||||||
|
2000C0004000C0006000C0008000C000A000C000C000C000E000C0200000C020
|
||||||
|
2000C0204000C0206000C0208000C020A000C020C000C020E000C0400000C040
|
||||||
|
2000C0404000C0406000C0408000C040A000C040C000C040E000C0600000C060
|
||||||
|
2000C0604000C0606000C0608000C060A000C060C000C060E000C0800000C080
|
||||||
|
2000C0804000C0806000C0808000C080A000C080C000C080E000C0A00000C0A0
|
||||||
|
2000C0A04000C0A06000C0A08000C0A0A000C0A0C000C0A0E000C0C00000C0C0
|
||||||
|
2000C0C04000C0C06000C0C08000C0C0A000F0FBFF00A4A0A000808080000000
|
||||||
|
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FDFD25252525
|
||||||
|
2525252525252525FDFDFD2E25FFFFFFFFFFFFFFFFFFFF25FDFDFD2525252525
|
||||||
|
2525252525252525FDFD9A9AB7B7B7B7B7B7B7B7B7B72525FDFDFD25B7B7B7B7
|
||||||
|
B7B7B7B7B7B72525FDFD9A9AB7B7B7B7B7B7B7B7B7B72525FDFDFD25BFB7BFBF
|
||||||
|
B7B7B7B7B7B72525FDFD9A9ABFBFBFB7BFBFB7B7B7B72525FDFDFD25BFBFBFBF
|
||||||
|
BFB7BFBFB7B72525FDFD9A9ABFBFBFB7BFBFBFB7BFB72525FDFDFD25BFBFBFBF
|
||||||
|
BFBFBFBFBFB72525FDFD9A9ABFBFBFBFBFB7BFBFB7B72525FDFDFD25BFBFBFBF
|
||||||
|
BFBFBFBFBFB72525FDFD9A9ABFBFBFBFBFBFBFBFBFB725FDFDFDFD2525252525
|
||||||
|
25252525252525FDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFDFD}
|
||||||
|
BorderStyle = bsNone
|
||||||
|
ClipboardFormats = [cfText]
|
||||||
|
CodeFolding.Enabled = False
|
||||||
|
CodeFolding.LineColor = clGray
|
||||||
|
Ctl3D = False
|
||||||
|
DelErase = True
|
||||||
|
EnhancedHomeKey = False
|
||||||
|
Gutter.DigitCount = 4
|
||||||
|
Gutter.Font.Charset = DEFAULT_CHARSET
|
||||||
|
Gutter.Font.Color = clWindowText
|
||||||
|
Gutter.Font.Height = -13
|
||||||
|
Gutter.Font.Name = 'Courier New'
|
||||||
|
Gutter.Font.Style = []
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlack
|
||||||
|
Font.Height = -13
|
||||||
|
Font.Name = 'COURIER NEW'
|
||||||
|
Font.Style = []
|
||||||
|
HiddenCaret = False
|
||||||
|
Lines.Strings = (
|
||||||
|
'{ Rotate the reference triangle continuously }'
|
||||||
|
'{ Hit any key to stop }'
|
||||||
|
'Flame.SampleDensity := 1;'
|
||||||
|
'while not Stopped do'
|
||||||
|
'begin'
|
||||||
|
' RotateReference(3.6);'
|
||||||
|
' Preview;'
|
||||||
|
'end;')
|
||||||
|
MarkerList.UseDefaultMarkerImageIndex = False
|
||||||
|
MarkerList.DefaultMarkerImageIndex = -1
|
||||||
|
MarkerList.ImageTransparentColor = 33554432
|
||||||
|
PrintOptions.MarginLeft = 0
|
||||||
|
PrintOptions.MarginRight = 0
|
||||||
|
PrintOptions.MarginTop = 0
|
||||||
|
PrintOptions.MarginBottom = 0
|
||||||
|
PrintOptions.PageNr = False
|
||||||
|
PrintOptions.PrintLineNumbers = False
|
||||||
|
RightMarginColor = 14869218
|
||||||
|
ScrollHint = False
|
||||||
|
SelColor = clWhite
|
||||||
|
SelBkColor = clHighlight
|
||||||
|
ShowRightMargin = True
|
||||||
|
SmartTabs = False
|
||||||
|
SyntaxStyles = Styler
|
||||||
|
TabOrder = 0
|
||||||
|
TabSize = 4
|
||||||
|
TabStop = True
|
||||||
|
TrimTrailingSpaces = False
|
||||||
|
UILanguage.ScrollHint = 'Row'
|
||||||
|
UILanguage.Undo = 'Undo'
|
||||||
|
UILanguage.Redo = 'Redo'
|
||||||
|
UILanguage.Copy = 'Copy'
|
||||||
|
UILanguage.Cut = 'Cut'
|
||||||
|
UILanguage.Paste = 'Paste'
|
||||||
|
UILanguage.Delete = 'Delete'
|
||||||
|
UILanguage.SelectAll = 'Select All'
|
||||||
|
UrlAware = False
|
||||||
|
UrlStyle.TextColor = clBlue
|
||||||
|
UrlStyle.BkColor = clWhite
|
||||||
|
UrlStyle.Style = [fsUnderline]
|
||||||
|
UseStyler = True
|
||||||
|
Version = '3.0.0.0'
|
||||||
|
WordWrap = wwNone
|
||||||
|
OnChange = EditorChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Console: TMemo
|
||||||
|
Left = 0
|
||||||
|
Top = 377
|
||||||
|
Width = 583
|
||||||
|
Height = 89
|
||||||
|
Align = alBottom
|
||||||
|
Constraints.MinHeight = 20
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object MainOpenDialog: TOpenDialog
|
||||||
|
DefaultExt = 'asc'
|
||||||
|
Filter = 'Apophysis Script Files (*.asc)|*.asc|Text files (*.txt)|*.txt'
|
||||||
|
Options = [ofHideReadOnly, ofFileMustExist, ofEnableSizing]
|
||||||
|
Left = 472
|
||||||
|
Top = 64
|
||||||
|
end
|
||||||
|
object MainSaveDialog: TSaveDialog
|
||||||
|
DefaultExt = 'asc'
|
||||||
|
Filter = 'Apophysis Script Files (*.asc)|*.asc|Text files (*.txt)|*.txt'
|
||||||
|
Options = [ofOverwritePrompt, ofHideReadOnly, ofEnableSizing]
|
||||||
|
Left = 344
|
||||||
|
Top = 32
|
||||||
|
end
|
||||||
|
object PopupMenu: TPopupMenu
|
||||||
|
Images = MainForm.Buttons
|
||||||
|
Left = 280
|
||||||
|
Top = 112
|
||||||
|
object mnuUndo: TMenuItem
|
||||||
|
Caption = 'Undo'
|
||||||
|
ImageIndex = 4
|
||||||
|
OnClick = mnuUndoClick
|
||||||
|
end
|
||||||
|
object N1: TMenuItem
|
||||||
|
Caption = '-'
|
||||||
|
end
|
||||||
|
object mnuCut: TMenuItem
|
||||||
|
Caption = 'Cut'
|
||||||
|
ImageIndex = 6
|
||||||
|
ShortCut = 16472
|
||||||
|
OnClick = mnuCutClick
|
||||||
|
end
|
||||||
|
object mnuCopy: TMenuItem
|
||||||
|
Caption = 'Copy'
|
||||||
|
ImageIndex = 7
|
||||||
|
OnClick = mnuCopyClick
|
||||||
|
end
|
||||||
|
object mnuPaste: TMenuItem
|
||||||
|
Caption = 'Paste'
|
||||||
|
ImageIndex = 8
|
||||||
|
OnClick = mnuPasteClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Scripter: TatPascalScripter
|
||||||
|
SourceCode.Strings = (
|
||||||
|
'')
|
||||||
|
SaveCompiledCode = False
|
||||||
|
EventSupport = False
|
||||||
|
OnCompileError = ScripterCompileError
|
||||||
|
ShortBooleanEval = False
|
||||||
|
LibOptions.SearchPath.Strings = (
|
||||||
|
'$(CURDIR)'
|
||||||
|
'$(APPDIR)')
|
||||||
|
LibOptions.SourceFileExt = '.psc'
|
||||||
|
LibOptions.CompiledFileExt = '.pcu'
|
||||||
|
LibOptions.UseScriptFiles = False
|
||||||
|
CallExecHookEvent = False
|
||||||
|
Left = 480
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object OpenDialog: TOpenDialog
|
||||||
|
DefaultExt = 'fla'
|
||||||
|
Filter =
|
||||||
|
'Flame files (*.flame)|*.flame|Apophysis 1.0 parameters (*.apo;*.' +
|
||||||
|
'fla)|*.apo;*.fla|All files (*.*)|*.*'
|
||||||
|
Options = [ofHideReadOnly, ofFileMustExist, ofEnableSizing]
|
||||||
|
Left = 416
|
||||||
|
Top = 200
|
||||||
|
end
|
||||||
|
object SaveDialog: TSaveDialog
|
||||||
|
DefaultExt = 'flame'
|
||||||
|
Filter = 'Flame files (*.flame)|*.flame'
|
||||||
|
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofEnableSizing]
|
||||||
|
Left = 440
|
||||||
|
Top = 128
|
||||||
|
end
|
||||||
|
object Styler: TAdvPascalMemoStyler
|
||||||
|
BlockStart = 'begin,try,case,class,record'
|
||||||
|
BlockEnd = 'end'
|
||||||
|
LineComment = '//'
|
||||||
|
MultiCommentLeft = '{'
|
||||||
|
MultiCommentRight = '}'
|
||||||
|
CommentStyle.TextColor = clNavy
|
||||||
|
CommentStyle.BkColor = clWhite
|
||||||
|
CommentStyle.Style = [fsItalic]
|
||||||
|
NumberStyle.TextColor = clFuchsia
|
||||||
|
NumberStyle.BkColor = clWhite
|
||||||
|
NumberStyle.Style = [fsBold]
|
||||||
|
HighlightStyle.TextColor = clWhite
|
||||||
|
HighlightStyle.BkColor = clRed
|
||||||
|
HighlightStyle.Style = [fsBold]
|
||||||
|
AllStyles = <
|
||||||
|
item
|
||||||
|
KeyWords.Strings = (
|
||||||
|
'absolute'
|
||||||
|
'abstract'
|
||||||
|
'and'
|
||||||
|
'array'
|
||||||
|
'as'
|
||||||
|
'asm'
|
||||||
|
'assembler'
|
||||||
|
'automated'
|
||||||
|
'begin'
|
||||||
|
'break'
|
||||||
|
'case'
|
||||||
|
'cdecl'
|
||||||
|
'class'
|
||||||
|
'class'
|
||||||
|
'const'
|
||||||
|
'constructor'
|
||||||
|
'continue'
|
||||||
|
'default'
|
||||||
|
'deprecated'
|
||||||
|
'destructor'
|
||||||
|
'dispid'
|
||||||
|
'dispinterface'
|
||||||
|
'div'
|
||||||
|
'do'
|
||||||
|
'downto'
|
||||||
|
'dynamic'
|
||||||
|
'else'
|
||||||
|
'end'
|
||||||
|
'except'
|
||||||
|
'exports'
|
||||||
|
'external'
|
||||||
|
'far'
|
||||||
|
'file'
|
||||||
|
'finalise'
|
||||||
|
'finally'
|
||||||
|
'for'
|
||||||
|
'forward'
|
||||||
|
'function'
|
||||||
|
'if'
|
||||||
|
'implementation'
|
||||||
|
'in'
|
||||||
|
'inherited'
|
||||||
|
'initialise'
|
||||||
|
'inline'
|
||||||
|
'interface'
|
||||||
|
'is'
|
||||||
|
'label'
|
||||||
|
'library'
|
||||||
|
'message'
|
||||||
|
'mod'
|
||||||
|
'near'
|
||||||
|
'nil'
|
||||||
|
'not'
|
||||||
|
'object'
|
||||||
|
'of'
|
||||||
|
'or'
|
||||||
|
'out'
|
||||||
|
'overload'
|
||||||
|
'override'
|
||||||
|
'packed'
|
||||||
|
'pascal'
|
||||||
|
'platform'
|
||||||
|
'private'
|
||||||
|
'procedure'
|
||||||
|
'program'
|
||||||
|
'program'
|
||||||
|
'property'
|
||||||
|
'protected'
|
||||||
|
'public'
|
||||||
|
'published'
|
||||||
|
'raise'
|
||||||
|
'record'
|
||||||
|
'register'
|
||||||
|
'reintroduce'
|
||||||
|
'repeat'
|
||||||
|
'resourcestring'
|
||||||
|
'safecall'
|
||||||
|
'set'
|
||||||
|
'shl'
|
||||||
|
'shr'
|
||||||
|
'stdcall'
|
||||||
|
'stored'
|
||||||
|
'string'
|
||||||
|
'then'
|
||||||
|
'threadvar'
|
||||||
|
'to'
|
||||||
|
'try'
|
||||||
|
'type'
|
||||||
|
'unit'
|
||||||
|
'until'
|
||||||
|
'uses'
|
||||||
|
'var'
|
||||||
|
'virtual'
|
||||||
|
'while'
|
||||||
|
'with'
|
||||||
|
'xor')
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clGreen
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = [fsBold]
|
||||||
|
BGColor = clWhite
|
||||||
|
StyleType = stKeyword
|
||||||
|
BracketStart = #0
|
||||||
|
BracketEnd = #0
|
||||||
|
Info = 'Pascal Standard Default'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = []
|
||||||
|
BGColor = clWhite
|
||||||
|
StyleType = stBracket
|
||||||
|
BracketStart = #39
|
||||||
|
BracketEnd = #39
|
||||||
|
Info = 'Simple Quote'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clBlue
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = []
|
||||||
|
BGColor = clWhite
|
||||||
|
StyleType = stBracket
|
||||||
|
BracketStart = '"'
|
||||||
|
BracketEnd = '"'
|
||||||
|
Info = 'Double Quote'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clRed
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = []
|
||||||
|
BGColor = clWhite
|
||||||
|
StyleType = stSymbol
|
||||||
|
BracketStart = #0
|
||||||
|
BracketEnd = #0
|
||||||
|
Symbols = ' ,;:.(){}[]=+-*/^%<>#'#13#10
|
||||||
|
Info = 'Symbols Delimiters'
|
||||||
|
end>
|
||||||
|
AutoCompletion.Strings = (
|
||||||
|
'ShowMessage'
|
||||||
|
'MessageDlg')
|
||||||
|
HintParameter.TextColor = clBlack
|
||||||
|
HintParameter.BkColor = clInfoBk
|
||||||
|
HintParameter.HintCharStart = '('
|
||||||
|
HintParameter.HintCharEnd = ')'
|
||||||
|
HintParameter.HintCharDelimiter = ';'
|
||||||
|
HintParameter.HintClassDelimiter = '.'
|
||||||
|
HintParameter.HintCharWriteDelimiter = ','
|
||||||
|
HintParameter.Parameters.Strings = (
|
||||||
|
'ShowMessage(const Msg: string);'
|
||||||
|
|
||||||
|
'MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMs' +
|
||||||
|
'gDlgButtons; HelpCtx: Longint): Integer);')
|
||||||
|
HexIdentifier = '$'
|
||||||
|
Description = 'Pascal'
|
||||||
|
Filter = 'Pascal Files (*.pas,*.dpr,*.dpk,*.inc)|*.pas;*.dpr;*.dpk;*.inc'
|
||||||
|
DefaultExtension = '.pas'
|
||||||
|
StylerName = 'Pascal'
|
||||||
|
Extensions = 'pas;dpr;dpk;inc'
|
||||||
|
RegionDefinitions = <
|
||||||
|
item
|
||||||
|
Identifier = 'procedure'
|
||||||
|
RegionStart = 'begin'
|
||||||
|
RegionEnd = 'end'
|
||||||
|
RegionType = rtClosed
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'constructor'
|
||||||
|
RegionStart = 'begin'
|
||||||
|
RegionEnd = 'end'
|
||||||
|
RegionType = rtClosed
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'destructor'
|
||||||
|
RegionStart = 'begin'
|
||||||
|
RegionEnd = 'end'
|
||||||
|
RegionType = rtClosed
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'interface'
|
||||||
|
RegionStart = 'interface'
|
||||||
|
RegionType = rtOpen
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'unit'
|
||||||
|
RegionStart = 'unit'
|
||||||
|
RegionType = rtFile
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'implementation'
|
||||||
|
RegionStart = 'implementation'
|
||||||
|
RegionType = rtOpen
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'case'
|
||||||
|
RegionStart = 'case'
|
||||||
|
RegionEnd = 'end'
|
||||||
|
RegionType = rtIgnore
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'try'
|
||||||
|
RegionStart = 'try'
|
||||||
|
RegionEnd = 'end'
|
||||||
|
RegionType = rtIgnore
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = 'function'
|
||||||
|
RegionStart = 'begin'
|
||||||
|
RegionEnd = 'end'
|
||||||
|
RegionType = rtClosed
|
||||||
|
ShowComments = False
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Identifier = '{$region'
|
||||||
|
RegionStart = '{$region'
|
||||||
|
RegionEnd = '{$endregion'
|
||||||
|
RegionType = rtClosed
|
||||||
|
ShowComments = False
|
||||||
|
end>
|
||||||
|
Left = 288
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
end
|
4210
Forms/ScriptForm.pas
Normal file
4210
Forms/ScriptForm.pas
Normal file
File diff suppressed because it is too large
Load Diff
40
Forms/ScriptRender.dfm
Normal file
40
Forms/ScriptRender.dfm
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
object ScriptRenderForm: TScriptRenderForm
|
||||||
|
Left = 390
|
||||||
|
Top = 391
|
||||||
|
BorderStyle = bsDialog
|
||||||
|
Caption = 'ScriptRenderForm'
|
||||||
|
ClientHeight = 58
|
||||||
|
ClientWidth = 285
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
DesignSize = (
|
||||||
|
285
|
||||||
|
58)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object btnCancel: TButton
|
||||||
|
Left = 96
|
||||||
|
Top = 28
|
||||||
|
Width = 95
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
Caption = '&Cancel'
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = btnCancelClick
|
||||||
|
end
|
||||||
|
object ProgressBar: TProgressBar
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 271
|
||||||
|
Height = 13
|
||||||
|
Anchors = [akLeft, akTop, akRight]
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
end
|
172
Forms/ScriptRender.pas
Normal file
172
Forms/ScriptRender.pas
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
unit ScriptRender;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
||||||
|
ComCtrls, StdCtrls, RenderThread, cmap, ControlPoint, Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TScriptRenderForm = class(TForm)
|
||||||
|
btnCancel: TButton;
|
||||||
|
ProgressBar: TProgressBar;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure btnCancelClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
// PixelsPerUnit: double;
|
||||||
|
StartTime: TDateTime;
|
||||||
|
Remainder: TDateTime;
|
||||||
|
|
||||||
|
procedure HandleThreadCompletion(var Message: TMessage);
|
||||||
|
message WM_THREAD_COMPLETE;
|
||||||
|
procedure HandleThreadTermination(var Message: TMessage);
|
||||||
|
message WM_THREAD_TERMINATE;
|
||||||
|
public
|
||||||
|
Renderer: TRenderThread;
|
||||||
|
ColorMap: TColorMap;
|
||||||
|
cp: TControlPoint;
|
||||||
|
Filename: string;
|
||||||
|
ImageWidth, ImageHeight, Oversample: Integer;
|
||||||
|
zoom, Sample_Density, Brightness, Gamma, Vibrancy, Filter_Radius: double;
|
||||||
|
center: array[0..1] of double;
|
||||||
|
procedure OnProgress(prog: double);
|
||||||
|
procedure Render;
|
||||||
|
procedure SetRenderBounds;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
ScriptRenderForm: TScriptRenderForm;
|
||||||
|
Cancelled: boolean;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses Global, Math, FormRender, ScriptForm;
|
||||||
|
{$R *.DFM}
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.SetRenderBounds;
|
||||||
|
begin
|
||||||
|
cp.copy(ScriptEditor.cp);
|
||||||
|
//cp.Width := ScriptEditor.Renderer.Width;
|
||||||
|
//cp.Height := ScriptEditor.Renderer.Height;
|
||||||
|
cp.AdjustScale(ScriptEditor.Renderer.Width, ScriptEditor.Renderer.Height);
|
||||||
|
// --?-- cp.CalcBoundBox;
|
||||||
|
cp.center[0] := ScriptEditor.cp.center[0];
|
||||||
|
cp.center[1] := ScriptEditor.cp.center[1];
|
||||||
|
cp.zoom := ScriptEditor.cp.zoom;
|
||||||
|
//PixelsPerUnit := cp.Pixels_per_unit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.Render;
|
||||||
|
begin
|
||||||
|
assert(not Assigned(Renderer));
|
||||||
|
Renderer := TRenderThread.Create;
|
||||||
|
|
||||||
|
Cancelled := False;
|
||||||
|
ScriptEditor.Scripter.Paused := True;
|
||||||
|
StartTime := Now;
|
||||||
|
Remainder := 1;
|
||||||
|
cp.copy(ScriptEditor.cp);
|
||||||
|
Filename := ScriptEditor.Renderer.Filename;
|
||||||
|
//cp.Width := ScriptEditor.Renderer.Width;
|
||||||
|
//cp.Height := ScriptEditor.Renderer.Height;
|
||||||
|
//cp.pixels_per_unit := PixelsPerUnit;
|
||||||
|
cp.AdjustScale(ScriptEditor.Renderer.Width, ScriptEditor.Renderer.Height);
|
||||||
|
cp.Transparency := (PNGTransparency <> 0) and (UpperCase(ExtractFileExt(ScriptEditor.Renderer.FileName)) = '.PNG');
|
||||||
|
|
||||||
|
Renderer.OnProgress := OnProgress;
|
||||||
|
// Renderer.Compatibility := Compatibility;
|
||||||
|
Renderer.SetCP(cp);
|
||||||
|
if (ScriptEditor.Renderer.MaxMemory > 0) then Renderer.MaxMem := ScriptEditor.Renderer.MaxMemory;
|
||||||
|
Renderer.TargetHandle := Handle;
|
||||||
|
renderPath := ExtractFilePath(ScriptEditor.Renderer.Filename);
|
||||||
|
Renderer.Priority := tpLower;
|
||||||
|
Renderer.NrThreads := NrTreads;
|
||||||
|
Renderer.Resume;
|
||||||
|
|
||||||
|
// Renderer.SaveImage(FileName);
|
||||||
|
// ScriptEditor.Scripter.Paused := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.OnProgress(prog: double);
|
||||||
|
var
|
||||||
|
Elapsed: TDateTime;
|
||||||
|
begin
|
||||||
|
prog := (Renderer.Slice + Prog) / Renderer.NrSlices;
|
||||||
|
ProgressBar.Position := round(100 * prog);
|
||||||
|
Elapsed := Now - StartTime;
|
||||||
|
// if prog > 0 then Remainder := Elapsed * (1/prog - 1);
|
||||||
|
//Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
cp.free;
|
||||||
|
assert(not Assigned(Renderer)); //if Assigned(Renderer) then Renderer.free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
//Renderer := TRenderThread.Create;
|
||||||
|
self.Caption := TextByKey('script-rendering');
|
||||||
|
btnCancel.Caption := TextByKey('common-cancel');
|
||||||
|
cp := TControlPoint.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.btnCancelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ScriptEditor.Scripter.Halt;
|
||||||
|
Cancelled := True;
|
||||||
|
// Renderer.Stop;
|
||||||
|
if Assigned(Renderer) then begin
|
||||||
|
Renderer.Terminate;
|
||||||
|
Renderer.WaitFor;
|
||||||
|
Renderer.Free;
|
||||||
|
Renderer := nil;
|
||||||
|
end;
|
||||||
|
LastError := 'Render cancelled';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.HandleThreadCompletion(var Message: TMessage);
|
||||||
|
begin
|
||||||
|
Renderer.SaveImage(FileName);
|
||||||
|
|
||||||
|
Renderer.Free;
|
||||||
|
Renderer := nil;
|
||||||
|
|
||||||
|
ScriptEditor.Scripter.Paused := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TScriptRenderForm.HandleThreadTermination(var Message: TMessage);
|
||||||
|
begin
|
||||||
|
if Assigned(Renderer) then
|
||||||
|
begin
|
||||||
|
Renderer.Free;
|
||||||
|
Renderer := nil;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
11305
Forms/SplashForm.dfm
Normal file
11305
Forms/SplashForm.dfm
Normal file
File diff suppressed because it is too large
Load Diff
39
Forms/SplashForm.pas
Normal file
39
Forms/SplashForm.pas
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
unit SplashForm;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ExtCtrls, Global;
|
||||||
|
|
||||||
|
type
|
||||||
|
TSplashWindow = class(TForm)
|
||||||
|
BackgroundImage: TImage;
|
||||||
|
lblVersion: TLabel;
|
||||||
|
lblInfo: TLabel;
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
procedure SetInfo(info:string);
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
SplashWindow: TSplashWindow;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TSplashWindow.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
lblVersion.Caption := APP_BUILD;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSplashWindow.SetInfo(info:string);
|
||||||
|
begin
|
||||||
|
lblInfo.Caption := info;
|
||||||
|
//Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
117
Forms/Template.dfm
Normal file
117
Forms/Template.dfm
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
object TemplateForm: TTemplateForm
|
||||||
|
Left = 399
|
||||||
|
Top = 213
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
Caption = 'New Flame'
|
||||||
|
ClientHeight = 391
|
||||||
|
ClientWidth = 547
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
FormStyle = fsStayOnTop
|
||||||
|
Icon.Data = {
|
||||||
|
0000010001001010000001001800680300001600000028000000100000002000
|
||||||
|
0000010018000000000000030000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
0000000000000000000000000000000000000000B7A293634935634935634935
|
||||||
|
6349356349356349356349356349356349356349350000000000000000000000
|
||||||
|
00000000B7A293FFFFFFB7A293B7A293B7A293B7A293B7A293B7A293B7A293B7
|
||||||
|
A293634935000000000000000000000000000000B7A293FFFFFFFFFFFFFCFAF9
|
||||||
|
F7F1EEF1E7E1ECDDD5E6D3C9E1CABDB7A2936349350000000000000000000000
|
||||||
|
00000000B7A293FFFFFFFFFFFFF5F5F5F1EEECECE4E0E6DBD4E1D1C9E4CFC4B7
|
||||||
|
A293634935000000000000000000000000000000B7A293FFFFFFC1C1C1ACACAC
|
||||||
|
ABAAA9A7A4A2A39D99A09692B4A69FB7A2936349350000000000000000000000
|
||||||
|
00000000BAA596FFFFFFB6B6B6ECECECFFFFFFFBF8F7EEE7E49C9591E8D8D0B7
|
||||||
|
A293634935000000000000000000000000000000BEA99AFFFFFFB6B6B6ECECEC
|
||||||
|
FFFFFFF8F7F6ACAAA7E7DEDAEEE1DAB7A2936349350000000000000000000000
|
||||||
|
00000000C3AE9EFFFFFFB6B6B6ECECECFCFCFCB9B9B9CCCBCAF7F1EEF1E7E1B7
|
||||||
|
A293634935000000000000000000000000000000C8B2A3FFFFFFB5B5B5EDEDED
|
||||||
|
C1C1C1CBCBCBFEFEFEFAF7F5F5EDE9B7A2936349350000000000000000000000
|
||||||
|
00000000CCB6A7FFFFFFB0B0B0C7C7C7C7C7C7FFFFFFFFFFFFFDFCFBB7A293B7
|
||||||
|
A293644A36000000000000000000000000000000D1BBABFFFFFFB6B6B6C1C1C1
|
||||||
|
FFFFFFFFFFFFFFFFFFB7A293644A36644A36644A360000000000000000000000
|
||||||
|
00000000D5BFAFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB9A495D4C5BA64
|
||||||
|
4A36E1D5CD000000000000000000000000000000D8C2B2FFFFFFFFFFFFFFFFFF
|
||||||
|
FFFFFFFFFFFFFFFFFFC0AB9C644A36E2D6CD0000000000000000000000000000
|
||||||
|
00000000D8C2B2D8C2B2D8C2B2D8C2B2D8C2B2D4BEAECFB9A9C9B3A4E2D6CD00
|
||||||
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
000000000000000000000000000000000000000000000000000000000000FFFF
|
||||||
|
0000C0070000C0070000C0070000C0070000C0070000C0070000C0070000C007
|
||||||
|
0000C0070000C0070000C0070000C0070000C00F0000C01F0000FFFF0000}
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
547
|
||||||
|
391)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object lblFile: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 364
|
||||||
|
Width = 329
|
||||||
|
Height = 13
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
AutoSize = False
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object btnCancel: TButton
|
||||||
|
Left = 454
|
||||||
|
Top = 360
|
||||||
|
Width = 89
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Cancel = True
|
||||||
|
Caption = 'Cancel'
|
||||||
|
TabOrder = 1
|
||||||
|
OnClick = btnCancelClick
|
||||||
|
end
|
||||||
|
object btnOK: TButton
|
||||||
|
Left = 357
|
||||||
|
Top = 359
|
||||||
|
Width = 89
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = 'OK'
|
||||||
|
Default = True
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = btnOKClick
|
||||||
|
end
|
||||||
|
object Files: TListBox
|
||||||
|
Left = 112
|
||||||
|
Top = 8
|
||||||
|
Width = 417
|
||||||
|
Height = 113
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
|
object TemplateList: TListView
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 529
|
||||||
|
Height = 344
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
BevelInner = bvNone
|
||||||
|
BevelOuter = bvNone
|
||||||
|
BevelKind = bkTile
|
||||||
|
BorderStyle = bsNone
|
||||||
|
Color = clBtnFace
|
||||||
|
Columns = <>
|
||||||
|
LargeImages = UsedThumbnails
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = TemplateListChange
|
||||||
|
end
|
||||||
|
object UsedThumbnails: TImageList
|
||||||
|
Height = 128
|
||||||
|
Masked = False
|
||||||
|
Width = 128
|
||||||
|
Left = 8
|
||||||
|
Top = 320
|
||||||
|
end
|
||||||
|
end
|
344
Forms/Template.pas
Normal file
344
Forms/Template.pas
Normal file
@ -0,0 +1,344 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit Template;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Translation,
|
||||||
|
Dialogs, StdCtrls, ComCtrls, ImgList, ControlPoint, cmap, RenderingInterface, Main,
|
||||||
|
Global, Adjust;
|
||||||
|
|
||||||
|
type
|
||||||
|
TTemplateForm = class(TForm)
|
||||||
|
TemplateList: TListView;
|
||||||
|
btnCancel: TButton;
|
||||||
|
btnOK: TButton;
|
||||||
|
UsedThumbnails: TImageList;
|
||||||
|
Files: TListBox;
|
||||||
|
lblFile: TLabel;
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure TemplateListChange(Sender: TObject; Item: TListItem;
|
||||||
|
Change: TItemChange);
|
||||||
|
procedure btnOKClick(Sender: TObject);
|
||||||
|
procedure btnCancelClick(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
TemplateForm: TTemplateForm;
|
||||||
|
const
|
||||||
|
blankFlameXML1 = '<flame name="Blank Flame" version="Apophysis" size="1500 1000" center="0 0" background="0 0 0">';
|
||||||
|
blankFlameXML2 = '<xform weight="0.5" color="0" linear3D="1" coefs="1 0 0 1 0 0" />';
|
||||||
|
blankFlameXML3 = '<palette count="256" format="RGB">';
|
||||||
|
|
||||||
|
procedure ListTemplateByFileName(filename:string);
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
function LoadUserTemplates2(mask:string): integer;
|
||||||
|
var
|
||||||
|
FindResult: integer;
|
||||||
|
SearchRec : TSearchRec;
|
||||||
|
Path : string;
|
||||||
|
begin
|
||||||
|
Path:=AppPath + templatePath + '\';
|
||||||
|
result := 0;
|
||||||
|
|
||||||
|
FindResult := FindFirst(Path + Mask, faAnyFile - faDirectory, SearchRec);
|
||||||
|
while FindResult = 0 do
|
||||||
|
begin
|
||||||
|
ListTemplateByFileName(Path + SearchRec.Name);
|
||||||
|
result := result + 1;
|
||||||
|
|
||||||
|
FindResult := FindNext(SearchRec);
|
||||||
|
end;
|
||||||
|
{ free memory }
|
||||||
|
FindClose(SearchRec);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function LoadUserTemplates:integer;
|
||||||
|
begin
|
||||||
|
LoadUserTemplates2('*.flame');
|
||||||
|
LoadUserTemplates2('*.template');
|
||||||
|
Result := 0; // make RTL happy
|
||||||
|
end;
|
||||||
|
|
||||||
|
function BlankXML:string;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
s:string;
|
||||||
|
const
|
||||||
|
break = ' ';
|
||||||
|
begin
|
||||||
|
s:=blankFlameXML1 + break + blankFlameXML2 + break + blankFlameXML3 + break;
|
||||||
|
for i:=1 to 256 do begin
|
||||||
|
s := s + '000000';
|
||||||
|
if (i mod 32 = 0) then s := s + break;
|
||||||
|
end;
|
||||||
|
s := s + '</palette></flame>';
|
||||||
|
Result := s;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DropBlank();
|
||||||
|
var
|
||||||
|
flameXML: string;
|
||||||
|
cp: TControlPoint;
|
||||||
|
bm: TBitmap;
|
||||||
|
cmap: TColorMap;
|
||||||
|
zoom: double;
|
||||||
|
center: array[0..1] of double;
|
||||||
|
brightness, gamma, vibrancy: double;
|
||||||
|
Render: TRenderer;
|
||||||
|
ListItem: TListItem;
|
||||||
|
index: integer;
|
||||||
|
begin
|
||||||
|
cp := TControlPoint.Create;
|
||||||
|
Render := TRenderer.Create;
|
||||||
|
bm := TBitmap.Create;
|
||||||
|
|
||||||
|
cp.Clear;
|
||||||
|
flameXML := BlankXML;
|
||||||
|
MainForm.ParseXML(cp, PCHAR(flameXML), true);
|
||||||
|
cp.AdjustScale(TemplateForm.UsedThumbnails.Width, TemplateForm.UsedThumbnails.Height);
|
||||||
|
|
||||||
|
//Clipboard.SetTextBuf(PChar(Trim(flameXML)));
|
||||||
|
|
||||||
|
// start preview
|
||||||
|
cp.Width := TemplateForm.UsedThumbnails.Width;
|
||||||
|
cp.Height := TemplateForm.UsedThumbnails.Height;
|
||||||
|
cp.spatial_oversample := 1;
|
||||||
|
cp.spatial_filter_radius := 0.1;
|
||||||
|
cp.sample_density := 3;
|
||||||
|
// Render.Compatibility := compatibility;
|
||||||
|
try
|
||||||
|
Render.SetCP(cp);
|
||||||
|
Render.Render;
|
||||||
|
finally
|
||||||
|
BM.Assign(Render.GetImage);
|
||||||
|
cp.Free;
|
||||||
|
Render.free;
|
||||||
|
end;
|
||||||
|
// Thumbnails
|
||||||
|
TemplateForm.UsedThumbnails.Add(bm, nil);
|
||||||
|
ListItem := TemplateForm.TemplateList.Items.Add;
|
||||||
|
ListItem.Caption := 'Blank Flame';
|
||||||
|
ListItem.ImageIndex := 0;
|
||||||
|
TemplateForm.Files.Items.Add('n/a');
|
||||||
|
//end preview
|
||||||
|
//
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DropListItem(FileName: string; FlameName: string);
|
||||||
|
var
|
||||||
|
flameXML: string;
|
||||||
|
cp: TControlPoint;
|
||||||
|
bm: TBitmap;
|
||||||
|
cmap: TColorMap;
|
||||||
|
zoom: double;
|
||||||
|
center: array[0..1] of double;
|
||||||
|
brightness, gamma, vibrancy: double;
|
||||||
|
Render: TRenderer;
|
||||||
|
ListItem: TListItem;
|
||||||
|
index: integer;
|
||||||
|
begin
|
||||||
|
cp := TControlPoint.Create;
|
||||||
|
Render := TRenderer.Create;
|
||||||
|
bm := TBitmap.Create;
|
||||||
|
|
||||||
|
cp.Clear;
|
||||||
|
flameXML := LoadXMLFlameText(filename, FlameName);
|
||||||
|
MainForm.ParseXML(cp, PCHAR(flameXML), true);
|
||||||
|
cp.AdjustScale(TemplateForm.UsedThumbnails.Width, TemplateForm.UsedThumbnails.Height);
|
||||||
|
|
||||||
|
//Clipboard.SetTextBuf(PChar(Trim(flameXML)));
|
||||||
|
|
||||||
|
// start preview
|
||||||
|
cp.Width := TemplateForm.UsedThumbnails.Width;
|
||||||
|
cp.Height := TemplateForm.UsedThumbnails.Height;
|
||||||
|
cp.spatial_oversample := 1;
|
||||||
|
cp.spatial_filter_radius := 0.1;
|
||||||
|
cp.sample_density := 3;
|
||||||
|
// Render.Compatibility := compatibility;
|
||||||
|
try
|
||||||
|
Render.SetCP(cp);
|
||||||
|
Render.Render;
|
||||||
|
finally
|
||||||
|
BM.Assign(Render.GetImage);
|
||||||
|
cp.Free;
|
||||||
|
Render.free;
|
||||||
|
end;
|
||||||
|
// Thumbnails
|
||||||
|
TemplateForm.UsedThumbnails.Add(bm, nil);
|
||||||
|
ListItem := TemplateForm.TemplateList.Items.Add;
|
||||||
|
ListItem.Caption := FlameName;
|
||||||
|
ListItem.ImageIndex := TemplateForm.TemplateList.Items.Count - 1;
|
||||||
|
TemplateForm.Files.Items.Add(FileName);
|
||||||
|
//end preview
|
||||||
|
//
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ListTemplateByFileName(filename:string);
|
||||||
|
{ List .flame file }
|
||||||
|
var
|
||||||
|
sel:integer;
|
||||||
|
i, p, img: integer;
|
||||||
|
Title: string;
|
||||||
|
ListItem: TListItem;
|
||||||
|
FStrings: TStringList;
|
||||||
|
bm: TBitmap;
|
||||||
|
begin
|
||||||
|
sel := 0;
|
||||||
|
if not FileExists(FileName) then exit;
|
||||||
|
FStrings := TStringList.Create;
|
||||||
|
FStrings.LoadFromFile(FileName);
|
||||||
|
try
|
||||||
|
if (Pos('<flame ', Lowercase(FStrings.Text)) <> 0) then
|
||||||
|
begin
|
||||||
|
for i := 0 to FStrings.Count - 1 do
|
||||||
|
begin
|
||||||
|
p := Pos('<flame ', LowerCase(FStrings[i]));
|
||||||
|
if (p <> 0) then
|
||||||
|
begin
|
||||||
|
MainForm.ListXMLScanner.LoadFromBuffer(PAnsiChar(AnsiString(FSTrings[i])));
|
||||||
|
MainForm.ListXMLScanner.Execute;
|
||||||
|
|
||||||
|
if Length(pname) = 0 then
|
||||||
|
Title := '*untitled ' + ptime
|
||||||
|
else
|
||||||
|
Title := Trim(pname);
|
||||||
|
if Title <> '' then
|
||||||
|
begin { Otherwise bad format }
|
||||||
|
//ListItem := MainForm.ListView.Items.Add;
|
||||||
|
//Listitem.Caption := Title;
|
||||||
|
DropListItem(FileName, Title);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FStrings.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ListTemplate;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
bm:TBitmap;
|
||||||
|
begin
|
||||||
|
TemplateForm.TemplateList.Items.BeginUpdate;
|
||||||
|
TemplateForm.TemplateList.Items.Clear;
|
||||||
|
TemplateForm.UsedThumbnails.Clear;
|
||||||
|
|
||||||
|
// hmmm...
|
||||||
|
(*for i := 0 to TemplateForm.UsedThumbnails.Count - 1 do
|
||||||
|
begin
|
||||||
|
TemplateForm.UsedThumbnails.GetBitmap(i, bm);
|
||||||
|
bm.Free;
|
||||||
|
end; *)
|
||||||
|
|
||||||
|
DropBlank;
|
||||||
|
|
||||||
|
ListTemplateByFileName(AppPath + templateFileName);
|
||||||
|
LoadUserTemplates;
|
||||||
|
|
||||||
|
TemplateForm.TemplateList.Items.EndUpdate;
|
||||||
|
TemplateForm.TemplateList.Selected := TemplateForm.TemplateList.Items[0];
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTemplateForm.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
self.Caption := TextByKey('template-title');
|
||||||
|
btnOK.Caption := TextByKey('common-ok');
|
||||||
|
btnCancel.Caption := TextByKey('common-cancel');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTemplateForm.TemplateListChange(Sender: TObject;
|
||||||
|
Item: TListItem; Change: TItemChange);
|
||||||
|
var
|
||||||
|
fn : string;
|
||||||
|
begin
|
||||||
|
if (TemplateList.Selected = nil) then begin
|
||||||
|
btnOK.Enabled := false;
|
||||||
|
end else begin
|
||||||
|
if (TemplateList.Selected.Index >= 0) then begin
|
||||||
|
btnOK.Enabled := true;
|
||||||
|
if (TemplateList.Selected.Index > 0) then begin
|
||||||
|
fn := ChangeFileExt(ExtractFileName(Files.Items[TemplateList.Selected.Index]), '');
|
||||||
|
if (LowerCase(fn) <> 'default') then lblFile.Caption := 'Template file: ' + fn
|
||||||
|
else lblFile.Caption := '';
|
||||||
|
end else begin
|
||||||
|
lblFile.Caption := '';
|
||||||
|
end;
|
||||||
|
end else begin
|
||||||
|
btnOK.Enabled := false;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTemplateForm.btnOKClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
flameXML:string;
|
||||||
|
fn:string;
|
||||||
|
ci:integer;
|
||||||
|
begin
|
||||||
|
fn:=Files.Items[TemplateList.Selected.Index];
|
||||||
|
if (TemplateList.Selected.Index = 0) then flameXML := BlankXML
|
||||||
|
else flameXML := LoadXMLFlameText(fn, TemplateList.Selected.Caption);
|
||||||
|
MainForm.UpdateUndo;
|
||||||
|
MainForm.StopThread;
|
||||||
|
MainForm.InvokeLoadXML(flameXML);
|
||||||
|
Transforms := MainCp.TrianglesFromCP(MainTriangles);
|
||||||
|
MainForm.Statusbar.Panels[3].Text := MainCp.name;
|
||||||
|
{if ResizeOnLoad then}
|
||||||
|
MainForm.ResizeImage;
|
||||||
|
MainForm.RedrawTimer.Enabled := True;
|
||||||
|
Application.ProcessMessages;
|
||||||
|
MainForm.UpdateWindows;
|
||||||
|
ci := Random(256); //Random(NRCMAPS);
|
||||||
|
GetCMap(ci, 1, MainCp.cmap);
|
||||||
|
MainCp.cmapIndex := ci;
|
||||||
|
AdjustForm.TemplateRandomizeGradient;
|
||||||
|
btnCancelClick(sender);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTemplateForm.btnCancelClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close();
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTemplateForm.FormShow(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ListTemplate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
133
Forms/Tracer.dfm
Normal file
133
Forms/Tracer.dfm
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
object TraceForm: TTraceForm
|
||||||
|
Left = 36
|
||||||
|
Top = 159
|
||||||
|
Width = 411
|
||||||
|
Height = 527
|
||||||
|
Caption = 'Trace'
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'MS Sans Serif'
|
||||||
|
Font.Style = []
|
||||||
|
Icon.Data = {
|
||||||
|
0000010001001010000000000800680500001600000028000000100000002000
|
||||||
|
0000010008000000000000010000000000000000000000010000000100000000
|
||||||
|
0000000080000080000000808000800000008000800080800000C0C0C000C0DC
|
||||||
|
C000F0CAA60004040400080808000C0C0C0011111100161616001C1C1C002222
|
||||||
|
220029292900555555004D4D4D004242420039393900807CFF005050FF009300
|
||||||
|
D600FFECCC00C6D6EF00D6E7E70090A9AD000000330000006600000099000000
|
||||||
|
CC00003300000033330000336600003399000033CC000033FF00006600000066
|
||||||
|
330000666600006699000066CC000066FF000099000000993300009966000099
|
||||||
|
99000099CC000099FF0000CC000000CC330000CC660000CC990000CCCC0000CC
|
||||||
|
FF0000FF660000FF990000FFCC00330000003300330033006600330099003300
|
||||||
|
CC003300FF00333300003333330033336600333399003333CC003333FF003366
|
||||||
|
00003366330033666600336699003366CC003366FF0033990000339933003399
|
||||||
|
6600339999003399CC003399FF0033CC000033CC330033CC660033CC990033CC
|
||||||
|
CC0033CCFF0033FF330033FF660033FF990033FFCC0033FFFF00660000006600
|
||||||
|
330066006600660099006600CC006600FF006633000066333300663366006633
|
||||||
|
99006633CC006633FF00666600006666330066666600666699006666CC006699
|
||||||
|
00006699330066996600669999006699CC006699FF0066CC000066CC330066CC
|
||||||
|
990066CCCC0066CCFF0066FF000066FF330066FF990066FFCC00CC00FF00FF00
|
||||||
|
CC009999000099339900990099009900CC009900000099333300990066009933
|
||||||
|
CC009900FF00996600009966330099336600996699009966CC009933FF009999
|
||||||
|
330099996600999999009999CC009999FF0099CC000099CC330066CC660099CC
|
||||||
|
990099CCCC0099CCFF0099FF000099FF330099CC660099FF990099FFCC0099FF
|
||||||
|
FF00CC00000099003300CC006600CC009900CC00CC0099330000CC333300CC33
|
||||||
|
6600CC339900CC33CC00CC33FF00CC660000CC66330099666600CC669900CC66
|
||||||
|
CC009966FF00CC990000CC993300CC996600CC999900CC99CC00CC99FF00CCCC
|
||||||
|
0000CCCC3300CCCC6600CCCC9900CCCCCC00CCCCFF00CCFF0000CCFF330099FF
|
||||||
|
6600CCFF9900CCFFCC00CCFFFF00CC003300FF006600FF009900CC330000FF33
|
||||||
|
3300FF336600FF339900FF33CC00FF33FF00FF660000FF663300CC666600FF66
|
||||||
|
9900FF66CC00CC66FF00FF990000FF993300FF996600FF999900FF99CC00FF99
|
||||||
|
FF00FFCC0000FFCC3300FFCC6600FFCC9900FFCCCC00FFCCFF00FFFF3300CCFF
|
||||||
|
6600FFFF9900FFFFCC006666FF0066FF660066FFFF00FF666600FF66FF00FFFF
|
||||||
|
66002100A5005F5F5F00777777008686860096969600CBCBCB00B2B2B200D7D7
|
||||||
|
D700DDDDDD00E3E3E300EAEAEA00F1F1F100F8F8F800F0FBFF00A4A0A0008080
|
||||||
|
80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
|
||||||
|
000000000000000000000000000000000000000000000000000000000000AC12
|
||||||
|
1212121212121212121212F70000AC000000000000000000000000120000AC00
|
||||||
|
0000000000000000000000120000AC00FA00FAFA00FA0000000000120000AC00
|
||||||
|
0000000000000000000000120000AC00FAFA00FAFAFA00FA000000120000AC00
|
||||||
|
0000000000000000000000120000AC00FA00FAFA00FAFA00000000120000AC00
|
||||||
|
0000000000000000000000120000AC000000000000000000000000120000ACAC
|
||||||
|
ACACACACACACACACACACACAC0000ACFF090909090909090909FFADFF0000ACAC
|
||||||
|
ACACACACACACACACACACACACAC0000000000000000000000000000000000FFFF
|
||||||
|
0000000100000001000000010000000100000001000000010000000100000001
|
||||||
|
0000000100000001000000010000000100000001000000010000FFFF0000}
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
DesignSize = (
|
||||||
|
403
|
||||||
|
500)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object PageControl1: TPageControl
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 403
|
||||||
|
Height = 500
|
||||||
|
ActivePage = TabMain
|
||||||
|
Align = alClient
|
||||||
|
Images = MainForm.Buttons
|
||||||
|
TabOrder = 0
|
||||||
|
object TabMain: TTabSheet
|
||||||
|
Caption = 'Main'
|
||||||
|
ImageIndex = 47
|
||||||
|
object MainTrace: TMemo
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 395
|
||||||
|
Height = 471
|
||||||
|
Align = alClient
|
||||||
|
Color = clBlack
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clLime
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object TabFullscreen: TTabSheet
|
||||||
|
Caption = 'Fullscreen'
|
||||||
|
ImageIndex = 52
|
||||||
|
object FullscreenTrace: TMemo
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 395
|
||||||
|
Height = 471
|
||||||
|
Align = alClient
|
||||||
|
Color = clBlack
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clLime
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Courier New'
|
||||||
|
Font.Style = []
|
||||||
|
ParentFont = False
|
||||||
|
ReadOnly = True
|
||||||
|
ScrollBars = ssVertical
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cbTraceLevel: TComboBox
|
||||||
|
Left = 280
|
||||||
|
Top = 0
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Style = csDropDownList
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
ItemHeight = 13
|
||||||
|
TabOrder = 1
|
||||||
|
OnSelect = cbTraceLevelSelect
|
||||||
|
Items.Strings = (
|
||||||
|
'No trace'
|
||||||
|
'Minimal trace'
|
||||||
|
'Full trace')
|
||||||
|
end
|
||||||
|
end
|
149
Forms/Tracer.pas
Normal file
149
Forms/Tracer.pas
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit Tracer;
|
||||||
|
|
||||||
|
{$define TRACEFORM_HIDDEN}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, StdCtrls, ComCtrls;
|
||||||
|
|
||||||
|
type
|
||||||
|
TTraceForm = class(TForm)
|
||||||
|
PageControl1: TPageControl;
|
||||||
|
TabMain: TTabSheet;
|
||||||
|
TabFullscreen: TTabSheet;
|
||||||
|
FullscreenTrace: TMemo;
|
||||||
|
cbTraceLevel: TComboBox;
|
||||||
|
MainTrace: TMemo;
|
||||||
|
procedure cbTraceLevelSelect(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
TraceForm: TTraceForm;
|
||||||
|
|
||||||
|
var
|
||||||
|
TraceLevel: integer;
|
||||||
|
|
||||||
|
const
|
||||||
|
MsgComplete = '< Received WM_THREAD_COMPLETE from RenderThread #';
|
||||||
|
MsgTerminated = '< Received WM_THREAD_TERMINATE from RenderThread #';
|
||||||
|
MsgNotAssigned = 'Ignoring message: RenderThread does not exist';
|
||||||
|
MsgAnotherRunning = 'Ignoring message: another RenderThread is running';
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Registry,
|
||||||
|
Global, Main;
|
||||||
|
|
||||||
|
procedure TTraceForm.cbTraceLevelSelect(Sender: TObject);
|
||||||
|
begin
|
||||||
|
TraceLevel := cbTraceLevel.ItemIndex;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTraceForm.FormCreate(Sender: TObject);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Read position from registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\Trace', False) then
|
||||||
|
begin
|
||||||
|
if Registry.ValueExists('Top') then
|
||||||
|
self.Top := Registry.ReadInteger('Top');
|
||||||
|
if Registry.ValueExists('Left') then
|
||||||
|
self.Left := Registry.ReadInteger('Left');
|
||||||
|
if Registry.ValueExists('Width') then
|
||||||
|
self.Width := Registry.ReadInteger('Width');
|
||||||
|
if Registry.ValueExists('Height') then
|
||||||
|
self.Height := Registry.ReadInteger('Height');
|
||||||
|
|
||||||
|
{$ifndef TRACEFORM_HIDDEN}
|
||||||
|
|
||||||
|
if Registry.ValueExists('TraceLevel') then
|
||||||
|
TraceLevel := Registry.ReadInteger('TraceLevel')
|
||||||
|
else
|
||||||
|
TraceLevel := 0;
|
||||||
|
MainForm.tbShowTrace.Visible := true;
|
||||||
|
MainForm.tbShowTrace.Enabled := true;
|
||||||
|
MainForm.tbTraceSeparator.Visible := true;
|
||||||
|
MainForm.tbTraceSeparator.Enabled := true;
|
||||||
|
|
||||||
|
{$else} // Tracer disabled in release version
|
||||||
|
|
||||||
|
TraceLevel := 0;
|
||||||
|
//MainForm.tbShowTrace.Visible := false;
|
||||||
|
//MainForm.tbShowTrace.Enabled := false;
|
||||||
|
//MainForm.tbTraceSeparator.Visible := false;
|
||||||
|
//MainForm.tbTraceSeparator.Enabled := false;
|
||||||
|
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
end;
|
||||||
|
Registry.CloseKey;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
cbTraceLevel.ItemIndex := TraceLevel;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TTraceForm.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Write position to registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\Trace', True) then
|
||||||
|
begin
|
||||||
|
if self.WindowState <> wsMaximized then begin
|
||||||
|
Registry.WriteInteger('Top', self.Top);
|
||||||
|
Registry.WriteInteger('Left', self.Left);
|
||||||
|
Registry.WriteInteger('Width', self.Width);
|
||||||
|
Registry.WriteInteger('Height', self.Height);
|
||||||
|
|
||||||
|
Registry.WriteInteger('TraceLevel', TraceLevel);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
251
Forms/formPostProcess.dfm
Normal file
251
Forms/formPostProcess.dfm
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
object frmPostProcess: TfrmPostProcess
|
||||||
|
Left = 421
|
||||||
|
Top = 359
|
||||||
|
Width = 709
|
||||||
|
Height = 575
|
||||||
|
Caption = 'Post Render'
|
||||||
|
Color = clBtnFace
|
||||||
|
Constraints.MinHeight = 200
|
||||||
|
Constraints.MinWidth = 700
|
||||||
|
Font.Charset = DEFAULT_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -11
|
||||||
|
Font.Name = 'Tahoma'
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnCreate = FormCreate
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
OnShow = FormShow
|
||||||
|
DesignSize = (
|
||||||
|
701
|
||||||
|
548)
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 13
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 701
|
||||||
|
Height = 81
|
||||||
|
Align = alTop
|
||||||
|
BevelOuter = bvNone
|
||||||
|
TabOrder = 0
|
||||||
|
DesignSize = (
|
||||||
|
701
|
||||||
|
81)
|
||||||
|
object pnlFilter: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 32
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Filter Radius'
|
||||||
|
TabOrder = 11
|
||||||
|
OnDblClick = DragPanelDblClick
|
||||||
|
OnMouseDown = DragPanelMouseDown
|
||||||
|
OnMouseMove = DragPanelMouseMove
|
||||||
|
OnMouseUp = DragPanelMouseUp
|
||||||
|
end
|
||||||
|
object pnlVibrancy: TPanel
|
||||||
|
Left = 360
|
||||||
|
Top = 32
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Vibrancy'
|
||||||
|
TabOrder = 10
|
||||||
|
OnDblClick = DragPanelDblClick
|
||||||
|
OnMouseDown = DragPanelMouseDown
|
||||||
|
OnMouseMove = DragPanelMouseMove
|
||||||
|
OnMouseUp = DragPanelMouseUp
|
||||||
|
end
|
||||||
|
object pnlBrightness: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 32
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Brightness'
|
||||||
|
TabOrder = 8
|
||||||
|
OnDblClick = DragPanelDblClick
|
||||||
|
OnMouseDown = DragPanelMouseDown
|
||||||
|
OnMouseMove = DragPanelMouseMove
|
||||||
|
OnMouseUp = DragPanelMouseUp
|
||||||
|
end
|
||||||
|
object pnlContrast: TPanel
|
||||||
|
Left = 360
|
||||||
|
Top = 8
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Contrast'
|
||||||
|
TabOrder = 9
|
||||||
|
OnDblClick = DragPanelDblClick
|
||||||
|
OnMouseDown = DragPanelMouseDown
|
||||||
|
OnMouseMove = DragPanelMouseMove
|
||||||
|
OnMouseUp = DragPanelMouseUp
|
||||||
|
end
|
||||||
|
object pnlGamma: TPanel
|
||||||
|
Left = 192
|
||||||
|
Top = 8
|
||||||
|
Width = 105
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Gamma'
|
||||||
|
TabOrder = 7
|
||||||
|
OnDblClick = DragPanelDblClick
|
||||||
|
OnMouseDown = DragPanelMouseDown
|
||||||
|
OnMouseMove = DragPanelMouseMove
|
||||||
|
OnMouseUp = DragPanelMouseUp
|
||||||
|
end
|
||||||
|
object ProgressBar1: TProgressBar
|
||||||
|
Left = 8
|
||||||
|
Top = 61
|
||||||
|
Width = 690
|
||||||
|
Height = 20
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object txtFilterRadius: TEdit
|
||||||
|
Left = 128
|
||||||
|
Top = 32
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object txtGamma: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 8
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object txtVibrancy: TEdit
|
||||||
|
Left = 464
|
||||||
|
Top = 32
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object txtContrast: TEdit
|
||||||
|
Left = 464
|
||||||
|
Top = 8
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
|
object txtBrightness: TEdit
|
||||||
|
Left = 296
|
||||||
|
Top = 32
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object pnlBackground: TPanel
|
||||||
|
Left = 8
|
||||||
|
Top = 8
|
||||||
|
Width = 121
|
||||||
|
Height = 21
|
||||||
|
Cursor = crArrow
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Caption = 'Background'
|
||||||
|
TabOrder = 12
|
||||||
|
OnDblClick = DragPanelDblClick
|
||||||
|
OnMouseDown = DragPanelMouseDown
|
||||||
|
OnMouseMove = DragPanelMouseMove
|
||||||
|
OnMouseUp = DragPanelMouseUp
|
||||||
|
end
|
||||||
|
object pnlBackColor: TPanel
|
||||||
|
Left = 128
|
||||||
|
Top = 8
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
Cursor = crHandPoint
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
BorderStyle = bsSingle
|
||||||
|
TabOrder = 0
|
||||||
|
OnClick = pnlBackColorClick
|
||||||
|
object shBack: TShape
|
||||||
|
Left = 2
|
||||||
|
Top = 2
|
||||||
|
Width = 49
|
||||||
|
Height = 13
|
||||||
|
Align = alClient
|
||||||
|
Brush.Color = clBlack
|
||||||
|
Pen.Color = clWindow
|
||||||
|
Pen.Style = psClear
|
||||||
|
Pen.Width = 0
|
||||||
|
OnMouseUp = shBackMouseUp
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object btnApply: TButton
|
||||||
|
Left = 597
|
||||||
|
Top = 16
|
||||||
|
Width = 97
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = '&Apply'
|
||||||
|
Default = True
|
||||||
|
TabOrder = 13
|
||||||
|
OnClick = btnApplyClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScrollBox1: TScrollBox
|
||||||
|
Left = 8
|
||||||
|
Top = 88
|
||||||
|
Width = 689
|
||||||
|
Height = 417
|
||||||
|
Align = alCustom
|
||||||
|
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||||
|
BevelInner = bvNone
|
||||||
|
BevelKind = bkSoft
|
||||||
|
BorderStyle = bsNone
|
||||||
|
Color = clAppWorkSpace
|
||||||
|
ParentColor = False
|
||||||
|
TabOrder = 1
|
||||||
|
object Image: TImage
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 687
|
||||||
|
Height = 415
|
||||||
|
Align = alClient
|
||||||
|
AutoSize = True
|
||||||
|
Center = True
|
||||||
|
Proportional = True
|
||||||
|
Stretch = True
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object btnSave: TButton
|
||||||
|
Left = 599
|
||||||
|
Top = 516
|
||||||
|
Width = 97
|
||||||
|
Height = 25
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
Caption = '&Save'
|
||||||
|
TabOrder = 2
|
||||||
|
OnClick = btnSaveClick
|
||||||
|
end
|
||||||
|
object chkFitToWindow: TCheckBox
|
||||||
|
Left = 8
|
||||||
|
Top = 520
|
||||||
|
Width = 490
|
||||||
|
Height = 17
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
Caption = 'Fit to window'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
|
OnClick = chkFitToWindowClick
|
||||||
|
end
|
||||||
|
object ColorDialog: TColorDialog
|
||||||
|
Left = 612
|
||||||
|
Top = 76
|
||||||
|
end
|
||||||
|
end
|
523
Forms/formPostProcess.pas
Normal file
523
Forms/formPostProcess.pas
Normal file
@ -0,0 +1,523 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit formPostProcess;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||||
|
Dialogs, ExtCtrls, RenderingInterface, controlpoint, StdCtrls, ComCtrls,
|
||||||
|
Translation;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmPostProcess = class(TForm)
|
||||||
|
Panel1: TPanel;
|
||||||
|
ScrollBox1: TScrollBox;
|
||||||
|
Image: TImage;
|
||||||
|
pnlBackColor: TPanel;
|
||||||
|
ColorDialog: TColorDialog;
|
||||||
|
ProgressBar1: TProgressBar;
|
||||||
|
txtFilterRadius: TEdit;
|
||||||
|
txtGamma: TEdit;
|
||||||
|
txtVibrancy: TEdit;
|
||||||
|
txtContrast: TEdit;
|
||||||
|
txtBrightness: TEdit;
|
||||||
|
pnlGamma: TPanel;
|
||||||
|
pnlBrightness: TPanel;
|
||||||
|
pnlContrast: TPanel;
|
||||||
|
pnlVibrancy: TPanel;
|
||||||
|
pnlFilter: TPanel;
|
||||||
|
shBack: TShape;
|
||||||
|
pnlBackground: TPanel;
|
||||||
|
btnSave: TButton;
|
||||||
|
chkFitToWindow: TCheckBox;
|
||||||
|
btnApply: TButton;
|
||||||
|
procedure chkFitToWindowClick(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure btnSaveClick(Sender: TObject);
|
||||||
|
procedure btnApplyClick(Sender: TObject);
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure pnlBackColorClick(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
|
||||||
|
procedure DragPanelMouseDown(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure DragPanelMouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||||
|
Y: Integer);
|
||||||
|
procedure DragPanelMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
procedure DragPanelDblClick(Sender: TObject);
|
||||||
|
procedure shBackMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
FRenderer: TBaseRenderer;
|
||||||
|
FCP: TControlPoint;
|
||||||
|
FImagename: string;
|
||||||
|
|
||||||
|
pnlDragMode, pnlDragged, pnlMM: boolean;
|
||||||
|
pnlDragPos, pnlDragOld: integer;
|
||||||
|
pnlDragValue: double;
|
||||||
|
mousepos: TPoint;
|
||||||
|
|
||||||
|
BkgColor: TColor;
|
||||||
|
Filter,
|
||||||
|
Gamma, Brightness,
|
||||||
|
Contrast, Vibrancy: double;
|
||||||
|
|
||||||
|
procedure UpdateFlame;
|
||||||
|
procedure SetDefaultValues;
|
||||||
|
|
||||||
|
procedure OnProgress(prog: double);
|
||||||
|
|
||||||
|
public
|
||||||
|
cp : TControlPoint;
|
||||||
|
|
||||||
|
procedure SetRenderer(Renderer: TBaseRenderer);
|
||||||
|
procedure SetControlPoint(CP: TControlPoint);
|
||||||
|
procedure SetImageName(imagename: string);
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmPostProcess: TfrmPostProcess;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
Registry, Global, Main;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
{ TfrmPostProcess }
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.SetRenderer(Renderer: TBaseRenderer);
|
||||||
|
begin
|
||||||
|
if assigned(FRenderer) then
|
||||||
|
FRenderer.Free;
|
||||||
|
|
||||||
|
FRenderer := Renderer;
|
||||||
|
Frenderer.OnProgress := OnProgress;
|
||||||
|
Image.Picture.Graphic := FRenderer.GetImage;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.FormShow(Sender: TObject);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Read posution from registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('Software\' + APP_NAME + '\Forms\PostProcess', False) then begin
|
||||||
|
if Registry.ValueExists('Left') then
|
||||||
|
Left := Registry.ReadInteger('Left');
|
||||||
|
if Registry.ValueExists('Top') then
|
||||||
|
Top := Registry.ReadInteger('Top');
|
||||||
|
//if Registry.ValueExists('Width') then
|
||||||
|
//Width := Registry.ReadInteger('Width');
|
||||||
|
//if Registry.ValueExists('Height') then
|
||||||
|
// Height := Registry.ReadInteger('Height');
|
||||||
|
end;
|
||||||
|
Registry.CloseKey;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
var
|
||||||
|
Registry: TRegistry;
|
||||||
|
begin
|
||||||
|
{ Write position to registry }
|
||||||
|
Registry := TRegistry.Create;
|
||||||
|
try
|
||||||
|
Registry.RootKey := HKEY_CURRENT_USER;
|
||||||
|
if Registry.OpenKey('\Software\' + APP_NAME + '\Forms\PostProcess', True) then
|
||||||
|
begin
|
||||||
|
Registry.WriteInteger('Top', Top);
|
||||||
|
Registry.WriteInteger('Left', Left);
|
||||||
|
// Registry.WriteInteger('Width', Width);
|
||||||
|
// Registry.WriteInteger('Height', Height);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
Registry.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
FRenderer.Free; // weirdness!!! :-/
|
||||||
|
FRenderer := nil;
|
||||||
|
Image.Picture.Graphic := nil;
|
||||||
|
FCP.Free;
|
||||||
|
FCP := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.SetDefaultValues;
|
||||||
|
begin
|
||||||
|
BkgColor := RGB(Fcp.background[0], Fcp.background[1], Fcp.background[2]);
|
||||||
|
pnlBackColor.Color := BkgColor;
|
||||||
|
shBack.Brush.Color := BkgColor;
|
||||||
|
Filter := FCP.spatial_filter_radius;
|
||||||
|
txtFilterRadius.Text := FloatTostr(Filter);
|
||||||
|
Gamma := FCP.gamma;
|
||||||
|
txtGamma.Text := FloatTostr(Gamma);
|
||||||
|
Vibrancy := FCP.vibrancy;
|
||||||
|
txtVibrancy.Text := FloatTostr(Vibrancy);
|
||||||
|
Contrast := FCP.contrast;
|
||||||
|
txtContrast.Text := FloatTostr(Contrast);
|
||||||
|
Brightness := FCP.brightness;
|
||||||
|
txtBrightness.Text := FloatTostr(brightness);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.SetControlPoint(CP: TControlPoint);
|
||||||
|
begin
|
||||||
|
if assigned(FCP) then
|
||||||
|
FCP.Free;
|
||||||
|
|
||||||
|
FCP := cp.Clone;
|
||||||
|
SetDefaultValues;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.pnlBackColorClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
col: Longint;
|
||||||
|
begin
|
||||||
|
ColorDialog.Color := shBack.Brush.Color;
|
||||||
|
if ColorDialog.Execute then begin
|
||||||
|
pnlBackColor.Color := ColorDialog.Color;
|
||||||
|
shBack.Brush.Color := ColorDialog.Color;
|
||||||
|
col := ColorToRGB(ColorDialog.Color);
|
||||||
|
Fcp.background[0] := col and 255;
|
||||||
|
Fcp.background[1] := (col shr 8) and 255;
|
||||||
|
Fcp.background[2] := (col shr 16) and 255;
|
||||||
|
UpdateFlame;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.UpdateFlame;
|
||||||
|
begin
|
||||||
|
Screen.Cursor := crHourGlass;
|
||||||
|
FRenderer.UpdateImage(FCP);
|
||||||
|
Image.Picture.Graphic := FRenderer.GetImage;
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if assigned(FRenderer) then
|
||||||
|
FRenderer.Free;
|
||||||
|
|
||||||
|
if assigned(FCP) then
|
||||||
|
FCP.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.OnProgress(prog: double);
|
||||||
|
begin
|
||||||
|
ProgressBar1.Position := round(100 * prog);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.btnApplyClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
temp: double;
|
||||||
|
begin
|
||||||
|
TryStrToFloat(txtFilterRadius.Text, FCP.spatial_filter_radius);
|
||||||
|
if FCP.spatial_filter_radius > 2 then begin
|
||||||
|
FCP.spatial_filter_radius := 2;
|
||||||
|
txtFilterRadius.Text := '2';
|
||||||
|
end else if FCP.spatial_filter_radius < 0 then begin
|
||||||
|
FCP.spatial_filter_radius := 0.01;
|
||||||
|
txtFilterRadius.Text := FloatTostr(0.01);
|
||||||
|
end;
|
||||||
|
|
||||||
|
TryStrToFloat(txtGamma.Text, FCP.gamma);
|
||||||
|
if FCP.gamma > 10 then begin
|
||||||
|
FCP.gamma := 10;
|
||||||
|
txtGamma.Text := '10';
|
||||||
|
end else if FCP.gamma < 0.01 then begin
|
||||||
|
FCP.gamma := 0.01;
|
||||||
|
txtGamma.Text := FloatTostr(0.01);
|
||||||
|
end;
|
||||||
|
|
||||||
|
TryStrToFloat(txtVibrancy.Text, FCP.vibrancy);
|
||||||
|
if FCP.vibrancy > 10 then begin
|
||||||
|
FCP.vibrancy := 10;
|
||||||
|
txtVibrancy.Text := '10';
|
||||||
|
end else if FCP.vibrancy < 0.01 then begin
|
||||||
|
FCP.vibrancy := 0.01;
|
||||||
|
txtVibrancy.Text := FloatTostr(0.01);
|
||||||
|
end;
|
||||||
|
|
||||||
|
TryStrToFloat(txtContrast.Text, FCP.contrast);
|
||||||
|
if FCP.contrast > 10 then begin
|
||||||
|
FCP.contrast := 10;
|
||||||
|
txtContrast.Text := '10';
|
||||||
|
end else if FCP.contrast < 0.01 then begin
|
||||||
|
FCP.contrast := 0.01;
|
||||||
|
txtContrast.Text := FloatTostr(0.01);
|
||||||
|
end;
|
||||||
|
|
||||||
|
if TryStrToFloat(txtBrightness.Text, temp) then FCP.brightness := temp;
|
||||||
|
//TryStrToFloat(txtBrightness.Text, FCP.brightness);
|
||||||
|
if FCP.brightness > 100 then begin
|
||||||
|
FCP.brightness := 100;
|
||||||
|
txtBrightness.Text := '100';
|
||||||
|
end else if FCP.brightness < 0.01 then begin
|
||||||
|
FCP.brightness := 0.01;
|
||||||
|
txtBrightness.Text := FloatTostr(0.01);
|
||||||
|
end;
|
||||||
|
|
||||||
|
UpdateFlame;
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.btnSaveClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FRenderer.SaveImage(FImagename);
|
||||||
|
end;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
procedure TfrmPostProcess.SetImageName(imagename: string);
|
||||||
|
begin
|
||||||
|
FImagename := imagename;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
procedure TfrmPostProcess.DragPanelMouseDown(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
if Button <> mbLeft then exit;
|
||||||
|
|
||||||
|
if (Sender = pnlFilter) then
|
||||||
|
pnlDragValue := fcp.spatial_filter_radius * 10
|
||||||
|
else if (Sender = pnlGamma) then
|
||||||
|
pnlDragValue := fcp.gamma
|
||||||
|
else if (Sender = pnlBrightness) then
|
||||||
|
pnlDragValue := fcp.brightness
|
||||||
|
else if (Sender = pnlContrast) then
|
||||||
|
pnlDragValue := fcp.contrast
|
||||||
|
else if (Sender = pnlVibrancy) then
|
||||||
|
pnlDragValue := fcp.vibrancy
|
||||||
|
else exit;//assert(false);
|
||||||
|
|
||||||
|
pnlDragMode := true;
|
||||||
|
pnlDragPos := 0;
|
||||||
|
pnlDragOld := x;
|
||||||
|
pnlMM := false;
|
||||||
|
SetCaptureControl(TControl(Sender));
|
||||||
|
Screen.Cursor := crHSplit;
|
||||||
|
GetCursorPos(mousepos); // hmmm
|
||||||
|
pnlDragged := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPostProcess.DragPanelMouseMove(Sender: TObject; Shift: TShiftState;
|
||||||
|
X, Y: Integer);
|
||||||
|
var
|
||||||
|
v: double;
|
||||||
|
pEdit: ^TEdit;
|
||||||
|
enableDrag : boolean;
|
||||||
|
begin
|
||||||
|
if pnlMM then // hack: to skip MouseMove event
|
||||||
|
begin
|
||||||
|
pnlMM:=false;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if pnlDragMode and (x <> pnlDragOld) then
|
||||||
|
begin
|
||||||
|
Inc(pnlDragPos, x - pnlDragOld);
|
||||||
|
|
||||||
|
if GetKeyState(VK_MENU) < 0 then v := 100000
|
||||||
|
else if GetKeyState(VK_CONTROL) < 0 then v := 10000
|
||||||
|
else if GetKeyState(VK_SHIFT) < 0 then v := 100
|
||||||
|
else v := 1000;
|
||||||
|
|
||||||
|
v := Round6(pnlDragValue + pnlDragPos / v);
|
||||||
|
|
||||||
|
SetCursorPos(MousePos.x, MousePos.y); // hmmm
|
||||||
|
pnlMM:=true;
|
||||||
|
|
||||||
|
enableDrag := true;
|
||||||
|
if (Sender = pnlFilter) then
|
||||||
|
begin
|
||||||
|
v := v / 10;
|
||||||
|
if v > 2 then v := 2
|
||||||
|
else if v < 0.01 then v := 0.01;
|
||||||
|
fcp.spatial_filter_radius := v;
|
||||||
|
pEdit := @txtFilterRadius;
|
||||||
|
end
|
||||||
|
else if (Sender = pnlGamma) then
|
||||||
|
begin
|
||||||
|
if v > 10 then v := 10
|
||||||
|
else if v < 0.01 then v := 0.01;
|
||||||
|
fcp.gamma := v;
|
||||||
|
pEdit := @txtGamma;
|
||||||
|
end
|
||||||
|
else if (Sender = pnlBrightness) then
|
||||||
|
begin
|
||||||
|
if v > 100 then v := 100
|
||||||
|
else if v < 0.01 then v := 0.01;
|
||||||
|
fcp.brightness := v;
|
||||||
|
pEdit := @txtBrightness;
|
||||||
|
end
|
||||||
|
else if (Sender = pnlContrast) then
|
||||||
|
begin
|
||||||
|
if v > 10 then v := 10
|
||||||
|
else if v < 0.01 then v := 0.01;
|
||||||
|
fcp.contrast := v;
|
||||||
|
pEdit := @txtContrast;
|
||||||
|
end
|
||||||
|
else if (Sender = pnlVibrancy) then
|
||||||
|
begin
|
||||||
|
if v > 10 then v := 10
|
||||||
|
else if v < 0.01 then v := 0.01;
|
||||||
|
fcp.vibrancy := v;
|
||||||
|
pEdit := @txtVibrancy;
|
||||||
|
end else exit;
|
||||||
|
|
||||||
|
if enableDrag then begin
|
||||||
|
pEdit^.Text := FloatToStr(v);
|
||||||
|
//pEdit.Refresh;
|
||||||
|
pnlDragged := True;
|
||||||
|
// TODO: image preview (?)
|
||||||
|
//DrawPreview;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPostProcess.DragPanelMouseUp(Sender: TObject; Button: TMouseButton;
|
||||||
|
Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
if Button <> mbLeft then exit;
|
||||||
|
|
||||||
|
if pnlDragMode then
|
||||||
|
begin
|
||||||
|
SetCaptureControl(nil);
|
||||||
|
pnlDragMode := false;
|
||||||
|
Screen.Cursor := crDefault;
|
||||||
|
|
||||||
|
if pnlDragged then
|
||||||
|
begin
|
||||||
|
//UpdateFlame;
|
||||||
|
pnlDragged := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPostProcess.DragPanelDblClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
pValue: ^double;
|
||||||
|
pDefaultValue: ^double;
|
||||||
|
pEdit: ^TEdit;
|
||||||
|
begin
|
||||||
|
if (Sender = pnlFilter) then
|
||||||
|
begin
|
||||||
|
pValue := @fcp.spatial_filter_radius;
|
||||||
|
pDefaultValue := @Filter;
|
||||||
|
pEdit := @txtFilterRadius;
|
||||||
|
end
|
||||||
|
else if (Sender = pnlGamma) then
|
||||||
|
begin
|
||||||
|
pValue := @fcp.gamma;
|
||||||
|
pDefaultValue := @Gamma;
|
||||||
|
pEdit := @txtGamma;
|
||||||
|
end
|
||||||
|
else if (Sender = pnlBrightness) then
|
||||||
|
begin
|
||||||
|
{
|
||||||
|
pValue := @fcp.brightness;
|
||||||
|
pDefaultValue := @Brightness;
|
||||||
|
pEdit := @txtBrightness;
|
||||||
|
}
|
||||||
|
if fcp.brightness = Brightness then exit;
|
||||||
|
fcp.brightness := Brightness;
|
||||||
|
txtBrightness.Text := FloatToStr(fcp.brightness);
|
||||||
|
exit;
|
||||||
|
end
|
||||||
|
else if (Sender = pnlContrast) then
|
||||||
|
begin
|
||||||
|
pValue := @fcp.contrast;
|
||||||
|
pDefaultValue := @Contrast;
|
||||||
|
pEdit := @txtContrast
|
||||||
|
end
|
||||||
|
else if (Sender = pnlVibrancy) then
|
||||||
|
begin
|
||||||
|
pValue := @fcp.vibrancy;
|
||||||
|
pDefaultValue := @Vibrancy;
|
||||||
|
pEdit := @txtVibrancy;
|
||||||
|
end
|
||||||
|
else exit; //assert(false);
|
||||||
|
|
||||||
|
if pValue^ = pDefaultValue^ then exit;
|
||||||
|
pValue^ := pDefaultValue^;
|
||||||
|
pEdit^.Text := FloatToStr(pValue^);
|
||||||
|
//UpdateFlame;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPostProcess.shBackMouseUp(Sender: TObject;
|
||||||
|
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||||
|
begin
|
||||||
|
pnlBackColorClick(sender);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPostProcess.FormCreate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
btnApply.Caption := TextByKey('common-apply');
|
||||||
|
pnlFilter.Caption := TextByKey('common-filterradius');
|
||||||
|
pnlGamma.Caption := TextByKey('common-gamma');
|
||||||
|
pnlBrightness.Caption := TextByKey('common-brightness');
|
||||||
|
pnlContrast.Caption := TextByKey('common-contrast');
|
||||||
|
pnlVibrancy.Caption := TextByKey('common-vibrancy');
|
||||||
|
pnlBackground.Caption := TextByKey('common-background');
|
||||||
|
pnlFilter.Hint := TextByKey('common-dragpanelhint');
|
||||||
|
pnlGamma.Hint := TextByKey('common-dragpanelhint');
|
||||||
|
pnlBrightness.Hint := TextByKey('common-dragpanelhint');
|
||||||
|
pnlVibrancy.Hint := TextByKey('common-dragpanelhint');
|
||||||
|
pnlContrast.Hint := TextByKey('common-dragpanelhint');
|
||||||
|
self.Caption := TextByKey('postprocess-title');
|
||||||
|
btnSave.Caption := TextByKey('postprocess-save');
|
||||||
|
chkFitToWindow.Caption := TextByKey('postprocess-fittowindow');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmPostProcess.chkFitToWindowClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
{if (chkFitToWindow.Checked) then begin
|
||||||
|
Image.Stretch := true;
|
||||||
|
Image.Align := alClient;
|
||||||
|
end else begin
|
||||||
|
Image.Stretch := false;
|
||||||
|
Image.Align := alNone;
|
||||||
|
end; }
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
267
IO/Base64.pas
Normal file
267
IO/Base64.pas
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
{
|
||||||
|
Apophysis Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
|
||||||
|
Apophysis Copyright (C) 2007-2008 Piotr Borys, Peter Sdobnov
|
||||||
|
|
||||||
|
Apophysis "3D hack" Copyright (C) 2007-2008 Peter Sdobnov
|
||||||
|
Apophysis "7X" Copyright (C) 2009-2010 Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
}
|
||||||
|
|
||||||
|
unit Base64;
|
||||||
|
|
||||||
|
interface
|
||||||
|
uses
|
||||||
|
Windows, Sysutils;
|
||||||
|
|
||||||
|
type TBinArray = Array of Byte;
|
||||||
|
|
||||||
|
{ Base64 encode and decode a string }
|
||||||
|
function B64Encode(const data: TBinArray; size : integer): string;
|
||||||
|
procedure B64Decode(S: string; var data : TBinArray; var size : integer);
|
||||||
|
|
||||||
|
{******************************************************************************}
|
||||||
|
{******************************************************************************}
|
||||||
|
implementation
|
||||||
|
|
||||||
|
const
|
||||||
|
B64Table= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||||
|
|
||||||
|
procedure StringToBinArray(const s: String; var bin: TBinArray);
|
||||||
|
var
|
||||||
|
l: Integer;
|
||||||
|
begin
|
||||||
|
l := Length(s);
|
||||||
|
SetLength(bin, l);
|
||||||
|
CopyMemory(@bin[0], @s[1], l);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure BinArrayToString(const bin: TBinArray; var s: string);
|
||||||
|
var
|
||||||
|
l: Integer;
|
||||||
|
begin
|
||||||
|
l := Length(bin);
|
||||||
|
SetLength(s, l);
|
||||||
|
CopyMemory(@s[1], @bin[0], l);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function B64Encode(const data: TBinArray; size : integer) : string;
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
S: string;
|
||||||
|
InBuf: array[0..2] of byte;
|
||||||
|
OutBuf: array[0..3] of char;
|
||||||
|
begin
|
||||||
|
BinArrayToString(data, s);
|
||||||
|
SetLength(Result,((size+2) div 3)*4);
|
||||||
|
for i:= 1 to ((size+2) div 3) do
|
||||||
|
begin
|
||||||
|
if size< (i*3) then
|
||||||
|
Move(S[(i-1)*3+1],InBuf,size-(i-1)*3)
|
||||||
|
else
|
||||||
|
Move(S[(i-1)*3+1],InBuf,3);
|
||||||
|
OutBuf[0]:= B64Table[((InBuf[0] and $FC) shr 2) + 1];
|
||||||
|
OutBuf[1]:= B64Table[(((InBuf[0] and $03) shl 4) or ((InBuf[1] and $F0) shr 4)) + 1];
|
||||||
|
OutBuf[2]:= B64Table[(((InBuf[1] and $0F) shl 2) or ((InBuf[2] and $C0) shr 6)) + 1];
|
||||||
|
OutBuf[3]:= B64Table[(InBuf[2] and $3F) + 1];
|
||||||
|
Move(OutBuf,Result[(i-1)*4+1],4);
|
||||||
|
end;
|
||||||
|
if (size mod 3)= 1 then
|
||||||
|
begin
|
||||||
|
Result[Length(Result)-1]:= '=';
|
||||||
|
Result[Length(Result)]:= '=';
|
||||||
|
end
|
||||||
|
else if (Length(S) mod 3)= 2 then
|
||||||
|
Result[Length(Result)]:= '=';
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure B64Decode(S: string; var data : TBinArray; var size : integer);
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
InBuf: array[0..3] of byte;
|
||||||
|
OutBuf: array[0..2] of byte;
|
||||||
|
Result2: string;
|
||||||
|
begin
|
||||||
|
if (Length(S) mod 4)<> 0 then
|
||||||
|
raise Exception.Create('Base64: Incorrect string format');
|
||||||
|
SetLength(Result2,((Length(S) div 4)-1)*3);
|
||||||
|
for i:= 1 to ((Length(S) div 4)-1) do
|
||||||
|
begin
|
||||||
|
Move(S[(i-1)*4+1],InBuf,4);
|
||||||
|
if (InBuf[0]> 64) and (InBuf[0]< 91) then
|
||||||
|
Dec(InBuf[0],65)
|
||||||
|
else if (InBuf[0]> 96) and (InBuf[0]< 123) then
|
||||||
|
Dec(InBuf[0],71)
|
||||||
|
else if (InBuf[0]> 47) and (InBuf[0]< 58) then
|
||||||
|
Inc(InBuf[0],4)
|
||||||
|
else if InBuf[0]= 43 then
|
||||||
|
InBuf[0]:= 62
|
||||||
|
else
|
||||||
|
InBuf[0]:= 63;
|
||||||
|
if (InBuf[1]> 64) and (InBuf[1]< 91) then
|
||||||
|
Dec(InBuf[1],65)
|
||||||
|
else if (InBuf[1]> 96) and (InBuf[1]< 123) then
|
||||||
|
Dec(InBuf[1],71)
|
||||||
|
else if (InBuf[1]> 47) and (InBuf[1]< 58) then
|
||||||
|
Inc(InBuf[1],4)
|
||||||
|
else if InBuf[1]= 43 then
|
||||||
|
InBuf[1]:= 62
|
||||||
|
else
|
||||||
|
InBuf[1]:= 63;
|
||||||
|
if (InBuf[2]> 64) and (InBuf[2]< 91) then
|
||||||
|
Dec(InBuf[2],65)
|
||||||
|
else if (InBuf[2]> 96) and (InBuf[2]< 123) then
|
||||||
|
Dec(InBuf[2],71)
|
||||||
|
else if (InBuf[2]> 47) and (InBuf[2]< 58) then
|
||||||
|
Inc(InBuf[2],4)
|
||||||
|
else if InBuf[2]= 43 then
|
||||||
|
InBuf[2]:= 62
|
||||||
|
else
|
||||||
|
InBuf[2]:= 63;
|
||||||
|
if (InBuf[3]> 64) and (InBuf[3]< 91) then
|
||||||
|
Dec(InBuf[3],65)
|
||||||
|
else if (InBuf[3]> 96) and (InBuf[3]< 123) then
|
||||||
|
Dec(InBuf[3],71)
|
||||||
|
else if (InBuf[3]> 47) and (InBuf[3]< 58) then
|
||||||
|
Inc(InBuf[3],4)
|
||||||
|
else if InBuf[3]= 43 then
|
||||||
|
InBuf[3]:= 62
|
||||||
|
else
|
||||||
|
InBuf[3]:= 63;
|
||||||
|
OutBuf[0]:= (InBuf[0] shl 2) or ((InBuf[1] shr 4) and $03);
|
||||||
|
OutBuf[1]:= (InBuf[1] shl 4) or ((InBuf[2] shr 2) and $0F);
|
||||||
|
OutBuf[2]:= (InBuf[2] shl 6) or (InBuf[3] and $3F);
|
||||||
|
Move(OutBuf,Result2[(i-1)*3+1],3);
|
||||||
|
end;
|
||||||
|
if Length(S)<> 0 then
|
||||||
|
begin
|
||||||
|
Move(S[Length(S)-3],InBuf,4);
|
||||||
|
if InBuf[2]= 61 then
|
||||||
|
begin
|
||||||
|
if (InBuf[0]> 64) and (InBuf[0]< 91) then
|
||||||
|
Dec(InBuf[0],65)
|
||||||
|
else if (InBuf[0]> 96) and (InBuf[0]< 123) then
|
||||||
|
Dec(InBuf[0],71)
|
||||||
|
else if (InBuf[0]> 47) and (InBuf[0]< 58) then
|
||||||
|
Inc(InBuf[0],4)
|
||||||
|
else if InBuf[0]= 43 then
|
||||||
|
InBuf[0]:= 62
|
||||||
|
else
|
||||||
|
InBuf[0]:= 63;
|
||||||
|
if (InBuf[1]> 64) and (InBuf[1]< 91) then
|
||||||
|
Dec(InBuf[1],65)
|
||||||
|
else if (InBuf[1]> 96) and (InBuf[1]< 123) then
|
||||||
|
Dec(InBuf[1],71)
|
||||||
|
else if (InBuf[1]> 47) and (InBuf[1]< 58) then
|
||||||
|
Inc(InBuf[1],4)
|
||||||
|
else if InBuf[1]= 43 then
|
||||||
|
InBuf[1]:= 62
|
||||||
|
else
|
||||||
|
InBuf[1]:= 63;
|
||||||
|
OutBuf[0]:= (InBuf[0] shl 2) or ((InBuf[1] shr 4) and $03);
|
||||||
|
Result2:= Result2 + char(OutBuf[0]);
|
||||||
|
end
|
||||||
|
else if InBuf[3]= 61 then
|
||||||
|
begin
|
||||||
|
if (InBuf[0]> 64) and (InBuf[0]< 91) then
|
||||||
|
Dec(InBuf[0],65)
|
||||||
|
else if (InBuf[0]> 96) and (InBuf[0]< 123) then
|
||||||
|
Dec(InBuf[0],71)
|
||||||
|
else if (InBuf[0]> 47) and (InBuf[0]< 58) then
|
||||||
|
Inc(InBuf[0],4)
|
||||||
|
else if InBuf[0]= 43 then
|
||||||
|
InBuf[0]:= 62
|
||||||
|
else
|
||||||
|
InBuf[0]:= 63;
|
||||||
|
if (InBuf[1]> 64) and (InBuf[1]< 91) then
|
||||||
|
Dec(InBuf[1],65)
|
||||||
|
else if (InBuf[1]> 96) and (InBuf[1]< 123) then
|
||||||
|
Dec(InBuf[1],71)
|
||||||
|
else if (InBuf[1]> 47) and (InBuf[1]< 58) then
|
||||||
|
Inc(InBuf[1],4)
|
||||||
|
else if InBuf[1]= 43 then
|
||||||
|
InBuf[1]:= 62
|
||||||
|
else
|
||||||
|
InBuf[1]:= 63;
|
||||||
|
if (InBuf[2]> 64) and (InBuf[2]< 91) then
|
||||||
|
Dec(InBuf[2],65)
|
||||||
|
else if (InBuf[2]> 96) and (InBuf[2]< 123) then
|
||||||
|
Dec(InBuf[2],71)
|
||||||
|
else if (InBuf[2]> 47) and (InBuf[2]< 58) then
|
||||||
|
Inc(InBuf[2],4)
|
||||||
|
else if InBuf[2]= 43 then
|
||||||
|
InBuf[2]:= 62
|
||||||
|
else
|
||||||
|
InBuf[2]:= 63;
|
||||||
|
OutBuf[0]:= (InBuf[0] shl 2) or ((InBuf[1] shr 4) and $03);
|
||||||
|
OutBuf[1]:= (InBuf[1] shl 4) or ((InBuf[2] shr 2) and $0F);
|
||||||
|
Result2:= Result2 + char(OutBuf[0]) + char(OutBuf[1]);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if (InBuf[0]> 64) and (InBuf[0]< 91) then
|
||||||
|
Dec(InBuf[0],65)
|
||||||
|
else if (InBuf[0]> 96) and (InBuf[0]< 123) then
|
||||||
|
Dec(InBuf[0],71)
|
||||||
|
else if (InBuf[0]> 47) and (InBuf[0]< 58) then
|
||||||
|
Inc(InBuf[0],4)
|
||||||
|
else if InBuf[0]= 43 then
|
||||||
|
InBuf[0]:= 62
|
||||||
|
else
|
||||||
|
InBuf[0]:= 63;
|
||||||
|
if (InBuf[1]> 64) and (InBuf[1]< 91) then
|
||||||
|
Dec(InBuf[1],65)
|
||||||
|
else if (InBuf[1]> 96) and (InBuf[1]< 123) then
|
||||||
|
Dec(InBuf[1],71)
|
||||||
|
else if (InBuf[1]> 47) and (InBuf[1]< 58) then
|
||||||
|
Inc(InBuf[1],4)
|
||||||
|
else if InBuf[1]= 43 then
|
||||||
|
InBuf[1]:= 62
|
||||||
|
else
|
||||||
|
InBuf[1]:= 63;
|
||||||
|
if (InBuf[2]> 64) and (InBuf[2]< 91) then
|
||||||
|
Dec(InBuf[2],65)
|
||||||
|
else if (InBuf[2]> 96) and (InBuf[2]< 123) then
|
||||||
|
Dec(InBuf[2],71)
|
||||||
|
else if (InBuf[2]> 47) and (InBuf[2]< 58) then
|
||||||
|
Inc(InBuf[2],4)
|
||||||
|
else if InBuf[2]= 43 then
|
||||||
|
InBuf[2]:= 62
|
||||||
|
else
|
||||||
|
InBuf[2]:= 63;
|
||||||
|
if (InBuf[3]> 64) and (InBuf[3]< 91) then
|
||||||
|
Dec(InBuf[3],65)
|
||||||
|
else if (InBuf[3]> 96) and (InBuf[3]< 123) then
|
||||||
|
Dec(InBuf[3],71)
|
||||||
|
else if (InBuf[3]> 47) and (InBuf[3]< 58) then
|
||||||
|
Inc(InBuf[3],4)
|
||||||
|
else if InBuf[3]= 43 then
|
||||||
|
InBuf[3]:= 62
|
||||||
|
else
|
||||||
|
InBuf[3]:= 63;
|
||||||
|
OutBuf[0]:= (InBuf[0] shl 2) or ((InBuf[1] shr 4) and $03);
|
||||||
|
OutBuf[1]:= (InBuf[1] shl 4) or ((InBuf[2] shr 2) and $0F);
|
||||||
|
OutBuf[2]:= (InBuf[2] shl 6) or (InBuf[3] and $3F);
|
||||||
|
Result2:= Result2 + Char(OutBuf[0]) + Char(OutBuf[1]) + Char(OutBuf[2]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
StringToBinArray(Result2, data);
|
||||||
|
size := Length(result2);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
177
IO/Binary.pas
Normal file
177
IO/Binary.pas
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
unit Binary;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
const
|
||||||
|
|
||||||
|
HIB_BLOCKSIZE = $10; // 16 bytes
|
||||||
|
HIB_MAXOFFSET = $0F; // HIB_BLOCKSIZE - 1
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
// low-level binary types
|
||||||
|
TBlock = array[0..HIB_MAXOFFSET] of byte;
|
||||||
|
TWord = array[0..1] of byte;
|
||||||
|
TDWord = array[0..3] of byte;
|
||||||
|
TQWord = array[0..7] of byte;
|
||||||
|
THibRawString = array of byte;
|
||||||
|
|
||||||
|
// procedures to write blocks at low level
|
||||||
|
procedure WriteData2(var target: TBlock; data: TWord; pos: integer);
|
||||||
|
procedure WriteData4(var target: TBlock; data: TDWord; pos: integer);
|
||||||
|
procedure WriteData8(var target: TBlock; data: TQWord; pos: integer);
|
||||||
|
|
||||||
|
// procedures to read blocks at low level
|
||||||
|
procedure ReadData2(source: TBlock; var data: TWord; pos: integer);
|
||||||
|
procedure ReadData4(source: TBlock; var data: TDWord; pos: integer);
|
||||||
|
procedure ReadData8(source: TBlock; var data: TQWord; pos: integer);
|
||||||
|
|
||||||
|
// procedures to write typed data to blocks
|
||||||
|
procedure Int16ToBlock(var target: TBlock; pos: integer; data: SmallInt);
|
||||||
|
procedure Int32ToBlock(var target: TBlock; pos: integer; data: Integer);
|
||||||
|
procedure LongWordToBlock(var target: TBlock; pos: integer; data: LongWord);
|
||||||
|
procedure Int64ToBlock(var target: TBlock; pos: integer; data: Int64);
|
||||||
|
procedure SingleToBlock(var target: TBlock; pos: integer; data: Single);
|
||||||
|
procedure DoubleToBlock(var target: TBlock; pos: integer; data: Double);
|
||||||
|
|
||||||
|
// procedures to read typed data from blocks
|
||||||
|
function BlockToInt16(source: TBlock; pos: integer): SmallInt;
|
||||||
|
function BlockToInt32(source: TBlock; pos: integer): Integer;
|
||||||
|
function BlockToLongWord(source: TBlock; pos: integer): LongWord;
|
||||||
|
function BlockToInt64(source: TBlock; pos: integer): Int64;
|
||||||
|
function BlockToSingle(source: TBlock; pos: integer): Single;
|
||||||
|
function BlockToDouble(source: TBlock; pos: integer): Double;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure ReadData2(source: TBlock; var data: TWord; pos: integer);
|
||||||
|
const size = 2;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to size - 1 do
|
||||||
|
if i + pos < HIB_BLOCKSIZE then
|
||||||
|
data[i] := source[i + pos];
|
||||||
|
end;
|
||||||
|
procedure ReadData4(source: TBlock; var data: TDWord; pos: integer);
|
||||||
|
const size = 4;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to size - 1 do
|
||||||
|
if i + pos < HIB_BLOCKSIZE then
|
||||||
|
data[i] := source[i + pos];
|
||||||
|
end;
|
||||||
|
procedure ReadData8(source: TBlock; var data: TQWord; pos: integer);
|
||||||
|
const size = 8;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to size - 1 do
|
||||||
|
if i + pos < HIB_BLOCKSIZE then
|
||||||
|
data[i] := source[i + pos];
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure WriteData2(var target: TBlock; data: TWord; pos: integer);
|
||||||
|
const size = 2;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to size - 1 do
|
||||||
|
if i + pos < HIB_BLOCKSIZE then
|
||||||
|
target[i + pos] := data[i];
|
||||||
|
end;
|
||||||
|
procedure WriteData4(var target: TBlock; data: TDWord; pos: integer);
|
||||||
|
const size = 4;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to size - 1 do
|
||||||
|
if i + pos < HIB_BLOCKSIZE then
|
||||||
|
target[i + pos] := data[i];
|
||||||
|
end;
|
||||||
|
procedure WriteData8(var target: TBlock; data: TQWord; pos: integer);
|
||||||
|
const size = 8;
|
||||||
|
var i: integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to size - 1 do
|
||||||
|
if i + pos < HIB_BLOCKSIZE then
|
||||||
|
target[i + pos] := data[i];
|
||||||
|
end;
|
||||||
|
|
||||||
|
function BlockToInt16(source: TBlock; pos: integer): SmallInt;
|
||||||
|
var temp: TWord; data: SmallInt;
|
||||||
|
begin
|
||||||
|
ReadData2(source, temp, pos);
|
||||||
|
Move(temp, data, SizeOf(TWord));
|
||||||
|
Result := data;
|
||||||
|
end;
|
||||||
|
function BlockToInt32(source: TBlock; pos: integer): Integer;
|
||||||
|
var temp: TDWord; data: Integer;
|
||||||
|
begin
|
||||||
|
ReadData4(source, temp, pos);
|
||||||
|
Move(temp, data, SizeOf(TDWord));
|
||||||
|
Result := data;
|
||||||
|
end;
|
||||||
|
function BlockToLongWord(source: TBlock; pos: integer): LongWord;
|
||||||
|
var temp: TDWord; data: LongWord;
|
||||||
|
begin
|
||||||
|
ReadData4(source, temp, pos);
|
||||||
|
Move(temp, data, SizeOf(TDWord));
|
||||||
|
Result := data;
|
||||||
|
end;
|
||||||
|
function BlockToInt64(source: TBlock; pos: integer): Int64;
|
||||||
|
var temp: TQWord; data: Int64;
|
||||||
|
begin
|
||||||
|
ReadData8(source, temp, pos);
|
||||||
|
Move(temp, data, SizeOf(TQWord));
|
||||||
|
Result := data;
|
||||||
|
end;
|
||||||
|
function BlockToSingle(source: TBlock; pos: integer): Single;
|
||||||
|
var temp: TDWord; data: Single;
|
||||||
|
begin
|
||||||
|
ReadData4(source, temp, pos);
|
||||||
|
Move(temp, data, SizeOf(TDWord));
|
||||||
|
Result := data;
|
||||||
|
end;
|
||||||
|
function BlockToDouble(source: TBlock; pos: integer): Double;
|
||||||
|
var temp: TQWord; data: Double;
|
||||||
|
begin
|
||||||
|
ReadData8(source, temp, pos);
|
||||||
|
Move(temp, data, SizeOf(TQWord));
|
||||||
|
Result := data;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Int16ToBlock(var target: TBlock; pos: integer; data: SmallInt);
|
||||||
|
var temp: TWord;
|
||||||
|
begin
|
||||||
|
Move(data, temp, SizeOf(TWord));
|
||||||
|
WriteData2(target, temp, pos);
|
||||||
|
end;
|
||||||
|
procedure Int32ToBlock(var target: TBlock; pos: integer; data: Integer);
|
||||||
|
var temp: TDWord;
|
||||||
|
begin
|
||||||
|
Move(data, temp, SizeOf(TDWord));
|
||||||
|
WriteData4(target, temp, pos);
|
||||||
|
end;
|
||||||
|
procedure LongWordToBlock(var target: TBlock; pos: integer; data: LongWord);
|
||||||
|
var temp: TDWord;
|
||||||
|
begin
|
||||||
|
Move(data, temp, SizeOf(TDWord));
|
||||||
|
WriteData4(target, temp, pos);
|
||||||
|
end;
|
||||||
|
procedure Int64ToBlock(var target: TBlock; pos: integer; data: Int64);
|
||||||
|
var temp: TQWord;
|
||||||
|
begin
|
||||||
|
Move(data, temp, SizeOf(TQWord));
|
||||||
|
WriteData8(target, temp, pos);
|
||||||
|
end;
|
||||||
|
procedure SingleToBlock(var target: TBlock; pos: integer; data: single);
|
||||||
|
var temp: TDWord;
|
||||||
|
begin
|
||||||
|
Move(data, temp, SizeOf(TDWord));
|
||||||
|
WriteData4(target, temp, pos);
|
||||||
|
end;
|
||||||
|
procedure DoubleToBlock(var target: TBlock; pos: integer; data: double);
|
||||||
|
var temp: TQWord;
|
||||||
|
begin
|
||||||
|
Move(data, temp, SizeOf(TQWord));
|
||||||
|
WriteData8(target, temp, pos);
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
48
IO/CommandLine.pas
Normal file
48
IO/CommandLine.pas
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
unit CommandLine;
|
||||||
|
|
||||||
|
interface
|
||||||
|
uses Dialogs, RegularExpressionsCore;
|
||||||
|
|
||||||
|
type TCommandLine = class
|
||||||
|
public
|
||||||
|
CreateFromTemplate : boolean;
|
||||||
|
TemplateFile : string;
|
||||||
|
TemplateName : string;
|
||||||
|
Lite: boolean;
|
||||||
|
|
||||||
|
procedure Load;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure TCommandLine.Load;
|
||||||
|
var
|
||||||
|
Regex: TPerlRegEx;
|
||||||
|
begin
|
||||||
|
Regex := TPerlRegEx.Create;
|
||||||
|
Regex.RegEx := '-template\s+"(.+)"\s+"(.+)"';
|
||||||
|
Regex.Options := [preSingleLine, preCaseless];
|
||||||
|
Regex.Subject := Utf8String(CmdLine);
|
||||||
|
CreateFromTemplate := false;
|
||||||
|
if Regex.Match then begin
|
||||||
|
if Regex.GroupCount = 2 then begin
|
||||||
|
CreateFromTemplate := true;
|
||||||
|
TemplateFile := String(Regex.Groups[1]);
|
||||||
|
TemplateName := String(Regex.Groups[2]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Regex.Destroy;
|
||||||
|
|
||||||
|
Regex := TPerlRegEx.Create;
|
||||||
|
Regex.RegEx := '-lite';
|
||||||
|
Regex.Options := [preSingleLine, preCaseless];
|
||||||
|
Regex.Subject := Utf8String(CmdLine);
|
||||||
|
CreateFromTemplate := false;
|
||||||
|
if Regex.Match then begin
|
||||||
|
Lite := true;
|
||||||
|
end;
|
||||||
|
Regex.Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
397
IO/Hibernation.pas
Normal file
397
IO/Hibernation.pas
Normal file
@ -0,0 +1,397 @@
|
|||||||
|
unit Hibernation;
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses RenderingCommon, RenderingInterface, SysUtils, Windows, Forms, Classes, Binary, ControlPoint;
|
||||||
|
|
||||||
|
const
|
||||||
|
HIB_VERSION_MAJOR = 2; // Apophysis7X.15
|
||||||
|
HIB_VERSION_MINOR = 10;
|
||||||
|
HIB_VERSION_REVISION = 1500;
|
||||||
|
|
||||||
|
HIB_ADDR_HEADER = $30; // 48 bytes
|
||||||
|
HIB_SIZE_HEADER = $30; // 48 bytes
|
||||||
|
HIB_ADDR_LOCATOR = $60; // HIB_SIZE_HEADER + HIB_ADDR_HEADER
|
||||||
|
HIB_SIZE_LOCATOR = $20; // 32 bytes
|
||||||
|
|
||||||
|
HIB_COOKIE_INTRO_HIGH = $AB; // A B0F
|
||||||
|
HIB_COOKIE_INTRO_LOW = $0F;
|
||||||
|
HIB_COOKIE_OUTRO_HIGH = $AE; // A E0F
|
||||||
|
HIB_COOKIE_OUTRO_LOW = $0F;
|
||||||
|
|
||||||
|
type
|
||||||
|
EHibBitsPerPixel = (
|
||||||
|
EBP_32 = 32,
|
||||||
|
EBP_64 = 64 // 64 bit renderer; probably used later
|
||||||
|
);
|
||||||
|
EHibPixelLayout = (
|
||||||
|
EPL_XYZW = 0123,
|
||||||
|
EPL_YXZW = 1023, // indicates different subpixel orders;
|
||||||
|
EPL_YZXW = 1203, // for example, metaphysis uses WXYZ (3012)
|
||||||
|
EPL_YZWX = 1230,
|
||||||
|
EPL_XZYW = 0213,
|
||||||
|
EPL_XZWY = 0231,
|
||||||
|
EPL_XYWZ = 0132,
|
||||||
|
EPL_ZXYW = 2013,
|
||||||
|
EPL_WXYZ = 3012,
|
||||||
|
EPL_XWYZ = 0312
|
||||||
|
);
|
||||||
|
EHibFileFlags = (
|
||||||
|
EFF_NONE = 0, // no flags (default)
|
||||||
|
EFF_FLOATBUFFER = 1, // using a float buffer (32/64bit)
|
||||||
|
EFF_SEPARATEFLAME = 2, // flame stored in separate file (unused yet)
|
||||||
|
EFF_BINARYFLAME = 4, // flame stored in binary format (unused yet)
|
||||||
|
EFF_COMPRESSED = 8 // data is GZIP-compressed (unused yet)
|
||||||
|
);
|
||||||
|
|
||||||
|
// some types for the header (some unused)
|
||||||
|
THibInt2_32 = record X, Y : integer; end;
|
||||||
|
THibInt2_64 = record X, Y : int64; end;
|
||||||
|
THibFloat2 = record X, Y : double; end;
|
||||||
|
THibFloat4 = record X, Y, Z, W : double; end;
|
||||||
|
THibBoolean = (HB_YES = -1, HB_NO = 0);
|
||||||
|
|
||||||
|
// the actual header
|
||||||
|
THibHeader = record
|
||||||
|
ActualDensity : double;
|
||||||
|
Size2D : THibInt2_64;
|
||||||
|
Size : int64;
|
||||||
|
RenderTime : TDateTime;
|
||||||
|
PauseTime : TDateTime;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// file allocation and release procedures
|
||||||
|
procedure HibAllocate(var handle: File; path: string);
|
||||||
|
procedure HibOpen(var handle: File; path: string);
|
||||||
|
procedure HibFree(const handle: File);
|
||||||
|
|
||||||
|
// high-level write procedures
|
||||||
|
procedure HibWriteIntro(const handle: File);
|
||||||
|
procedure HibWriteOutro(const handle: File);
|
||||||
|
procedure HibWriteGlobals(const handle: File; flags: EHibFileFlags;
|
||||||
|
layout: EHibPixelLayout; bpp: EHibBitsPerPixel);
|
||||||
|
procedure HibWriteHeader(const handle: File; header: THibHeader);
|
||||||
|
procedure HibWriteData(const handle: File; header: THibHeader;
|
||||||
|
flame: TControlPoint; buckets: TBucket32Array;
|
||||||
|
colormap: TColorMapArray; callback: TOnProgress);
|
||||||
|
|
||||||
|
// high-level read procedures
|
||||||
|
procedure HibReadIntro(const handle: File; var cookieValid: boolean);
|
||||||
|
procedure HibReadOutro(const handle: File; var cookieValid: boolean);
|
||||||
|
procedure HibReadGlobals(const handle: File; var versionRel: smallint;
|
||||||
|
var flags: EHibFileFlags; var layout: EHibPixelLayout; var bpp: EHibBitsPerPixel);
|
||||||
|
procedure HibReadHeader(const handle: File; var header: THibHeader);
|
||||||
|
procedure HibReadData(const handle: File; header: THibHeader; var flame: TStringList;
|
||||||
|
var buckets: TBucket32Array; var colormap: TColorMapArray; callback: TOnProgress);
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
procedure HibAllocate(var handle: File; path: string);
|
||||||
|
begin
|
||||||
|
AssignFile(handle, path);
|
||||||
|
ReWrite(handle, HIB_BLOCKSIZE);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HibOpen(var handle: File; path: string);
|
||||||
|
begin
|
||||||
|
AssignFile(handle, path);
|
||||||
|
FileMode := fmOpenRead;
|
||||||
|
Reset(handle, HIB_BLOCKSIZE);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HibFree(const handle: File);
|
||||||
|
begin
|
||||||
|
CloseFile(handle);
|
||||||
|
end;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
procedure HibWriteIntro(const handle: File);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
chunk: string;
|
||||||
|
begin
|
||||||
|
block[0] := HIB_COOKIE_INTRO_HIGH;
|
||||||
|
block[1] := HIB_COOKIE_INTRO_LOW;
|
||||||
|
chunk := 'Apophysis7X Hi';
|
||||||
|
CopyMemory(@block[2], @chunk[1], Length(chunk));
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
chunk := 'bernation File';
|
||||||
|
block[14] := $0; block[15] := $0;
|
||||||
|
CopyMemory(@block[0], @chunk[1], Length(chunk));
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HibWriteOutro(const handle: File);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
begin
|
||||||
|
block[0] := $0; block[1] := $0; block[2] := $0; block[3] := $0;
|
||||||
|
block[4] := $0; block[5] := $0; block[6] := $0; block[7] := $0;
|
||||||
|
block[8] := $0; block[9] := $0; block[10] := $0; block[11] := $0;
|
||||||
|
block[12] := $0; block[13] := $0;
|
||||||
|
block[14] := HIB_COOKIE_OUTRO_HIGH;
|
||||||
|
block[15] := HIB_COOKIE_OUTRO_LOW;
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HibWriteGlobals(const handle: File; flags: EHibFileFlags;
|
||||||
|
layout: EHibPixelLayout; bpp: EHibBitsPerPixel);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
begin
|
||||||
|
Int16ToBlock(block, 0, HIB_VERSION_MAJOR);
|
||||||
|
Int16ToBlock(block, 2, HIB_VERSION_MINOR);
|
||||||
|
Int32ToBlock(block, 4, HIB_VERSION_REVISION);
|
||||||
|
Int16ToBlock(block, 8, SmallInt(flags));
|
||||||
|
Int16ToBlock(block, 10, HIB_SIZE_HEADER);
|
||||||
|
Int16ToBlock(block, 12, SmallInt(layout));
|
||||||
|
Int16ToBlock(block, 14, SmallInt(bpp));
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HibWriteHeader(const handle: File; header: THibHeader);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
begin
|
||||||
|
DoubleToBlock(block, 0, header.ActualDensity);
|
||||||
|
Int64ToBlock(block, 8, header.Size);
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
|
||||||
|
Int64ToBlock(block, 0, header.Size2D.X);
|
||||||
|
Int64ToBlock(block, 8, header.Size2D.Y);
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
|
||||||
|
Int64ToBlock(block, 0,
|
||||||
|
Int64(((Trunc(header.RenderTime) - 25569) * 86400) +
|
||||||
|
Trunc(86400 * (header.RenderTime -
|
||||||
|
Trunc(header.RenderTime))) - 7200));
|
||||||
|
Int64ToBlock(block, 8,
|
||||||
|
Int64(((Trunc(header.PauseTime) - 25569) * 86400) +
|
||||||
|
Trunc(86400 * (header.PauseTime -
|
||||||
|
Trunc(header.PauseTime))) - 7200));
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure HibWriteData(const handle: File; header: THibHeader; flame: TControlPoint;
|
||||||
|
buckets: TBucket32Array; colormap: TColorMapArray; callback: TOnProgress);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
flametext: string;
|
||||||
|
rawflame: THibRawString;
|
||||||
|
rawflamesize: integer;
|
||||||
|
rawflamechunks: integer;
|
||||||
|
i, j, c: integer;
|
||||||
|
p, step: double;
|
||||||
|
begin
|
||||||
|
rawflamesize := CalcBinaryFlameSize(flame);
|
||||||
|
|
||||||
|
Int64ToBlock(block, 0, HIB_ADDR_LOCATOR + HIB_SIZE_LOCATOR);
|
||||||
|
Int64ToBlock(block, 8, Int64(rawflamesize) );
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
|
||||||
|
Int64ToBlock(block, 0, HIB_ADDR_LOCATOR + HIB_SIZE_LOCATOR + rawflamesize);
|
||||||
|
Int64ToBlock(block, 8, 16 * header.Size2D.X * header.Size2D.Y);
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
|
||||||
|
flame.SaveToBinary(handle);
|
||||||
|
|
||||||
|
callback(0);
|
||||||
|
c := 0; p := 0;
|
||||||
|
step := 1.0 / (header.Size2D.X * header.Size2D.Y);
|
||||||
|
for j := 0 to header.Size2D.Y - 1 do
|
||||||
|
for i := 0 to header.Size2D.X - 1 do
|
||||||
|
with buckets[j][i] do begin
|
||||||
|
Int32ToBlock(block, 0, Red);
|
||||||
|
Int32ToBlock(block, 4, Green);
|
||||||
|
Int32ToBlock(block, 8, Blue);
|
||||||
|
Int32ToBlock(block, 12, Count);
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
p := p + step;
|
||||||
|
c := (c + 1) mod 64;
|
||||||
|
if (c = 0) then begin
|
||||||
|
callback(p*0.99);
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
callback(0.99);
|
||||||
|
|
||||||
|
i := 0;
|
||||||
|
while i < 256 do begin
|
||||||
|
Int32ToBlock(block, 0,
|
||||||
|
(colormap[i+0].Red) or
|
||||||
|
(((colormap[i+0].Green) and $ff) shl 8) or
|
||||||
|
(((colormap[i+0].Blue) and $ff) shl 16));
|
||||||
|
Int32ToBlock(block, 4,
|
||||||
|
(colormap[i+1].Red) or
|
||||||
|
(((colormap[i+1].Green) and $ff) shl 8) or
|
||||||
|
(((colormap[i+1].Blue) and $ff) shl 16));
|
||||||
|
Int32ToBlock(block, 8,
|
||||||
|
(colormap[i+2].Red) or
|
||||||
|
(((colormap[i+2].Green) and $ff) shl 8) or
|
||||||
|
(((colormap[i+2].Blue) and $ff) shl 16));
|
||||||
|
Int32ToBlock(block, 12,
|
||||||
|
(colormap[i+3].Red) or
|
||||||
|
(((colormap[i+3].Green) and $ff) shl 8) or
|
||||||
|
(((colormap[i+3].Blue) and $ff) shl 16));
|
||||||
|
BlockWrite(handle, block, 1);
|
||||||
|
i := i + 4;
|
||||||
|
end;
|
||||||
|
callback(1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
procedure HibReadIntro(const handle: File; var cookieValid: boolean);
|
||||||
|
var
|
||||||
|
block1, block2: TBlock;
|
||||||
|
begin
|
||||||
|
BlockRead(handle, block1, 1);
|
||||||
|
BlockRead(handle, block2, 1);
|
||||||
|
cookieValid :=
|
||||||
|
(block1[0] = HIB_COOKIE_INTRO_HIGH) and
|
||||||
|
(block1[1] = HIB_COOKIE_INTRO_LOW);
|
||||||
|
end;
|
||||||
|
procedure HibReadOutro(const handle: File; var cookieValid: boolean);
|
||||||
|
var
|
||||||
|
block1, block2: TBlock;
|
||||||
|
begin
|
||||||
|
BlockRead(handle, block1, 1);
|
||||||
|
BlockRead(handle, block2, 1);
|
||||||
|
cookieValid :=
|
||||||
|
(block2[14] = HIB_COOKIE_OUTRO_HIGH) and
|
||||||
|
(block2[15] = HIB_COOKIE_OUTRO_LOW);
|
||||||
|
end;
|
||||||
|
procedure HibReadGlobals(const handle: File; var versionRel: SmallInt;
|
||||||
|
var flags: EHibFileFlags; var layout: EHibPixelLayout; var bpp: EHibBitsPerPixel);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
major, minor, rev: Integer;
|
||||||
|
begin
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
major := BlockToInt16(block, 0);
|
||||||
|
minor := BlockToInt16(block, 2);
|
||||||
|
rev := BlockToInt32(block, 4);
|
||||||
|
flags := EHibFileFlags(BlockToInt16(block, 8));
|
||||||
|
assert(BlockToInt16(block, 10) <> HIB_SIZE_HEADER, 'Invalid header size');
|
||||||
|
layout := EHibPixelLayout(BlockToInt16(block, 12));
|
||||||
|
bpp := EHibBitsPerPixel(BlockToInt16(block, 14));
|
||||||
|
|
||||||
|
if major < HIB_VERSION_MAJOR then versionRel := -1
|
||||||
|
else if major > HIB_VERSION_MAJOR then versionRel := 1
|
||||||
|
else begin
|
||||||
|
if minor < HIB_VERSION_MINOR then versionRel := -1
|
||||||
|
else if minor > HIB_VERSION_MINOR then versionRel := 1
|
||||||
|
else begin
|
||||||
|
if rev < HIB_VERSION_REVISION then versionRel := -1
|
||||||
|
else if rev > HIB_VERSION_REVISION then versionRel := 1
|
||||||
|
else versionRel := 0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure HibReadHeader(const handle: File; var header: THibHeader);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
begin
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
header.ActualDensity := BlockToDouble(block, 0);
|
||||||
|
header.Size := BlockToInt64(block, 8);
|
||||||
|
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
header.Size2D.X := BlockToInt64(block, 0);
|
||||||
|
header.Size2D.Y := BlockToInt64(block, 8);
|
||||||
|
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
header.RenderTime := ((BlockToInt64(block, 0) + 7200) / 86500) + 25569;
|
||||||
|
header.PauseTime := ((BlockToInt64(block, 8) + 7200) / 86500) + 25569;
|
||||||
|
end;
|
||||||
|
procedure HibReadData(const handle: File; header: THibHeader; var flame: TStringList;
|
||||||
|
var buckets: TBucket32Array; var colormap: TColorMapArray; callback: TOnProgress);
|
||||||
|
var
|
||||||
|
block: TBlock;
|
||||||
|
pos, offsf, sizef, offsd, sized : Int64;
|
||||||
|
fbytes: THibRawString;
|
||||||
|
i, c, bx, by: Integer;
|
||||||
|
p, step: Double;
|
||||||
|
begin
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
offsf := BlockToInt64(block, 0);
|
||||||
|
sizef := BlockToInt64(block, 8);
|
||||||
|
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
offsd := BlockToInt64(block, 0);
|
||||||
|
sized := BlockToInt64(block, 8);
|
||||||
|
|
||||||
|
pos := 0;
|
||||||
|
Seek(handle, offsf);
|
||||||
|
SetLength(fbytes, sizef);
|
||||||
|
|
||||||
|
while pos < sizef do begin
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
CopyMemory(@fbytes[pos], @block[0], HIB_BLOCKSIZE);
|
||||||
|
pos := pos + HIB_BLOCKSIZE;
|
||||||
|
end;
|
||||||
|
flame := TStringList.Create;
|
||||||
|
flame.Text := PChar(fbytes);
|
||||||
|
|
||||||
|
pos := 0;
|
||||||
|
bx := 0; by := 0;
|
||||||
|
Seek(handle, offsd);
|
||||||
|
SetLength(buckets, header.Size2D.Y, header.Size2D.X);
|
||||||
|
|
||||||
|
callback(0);
|
||||||
|
c := 0; p := 0;
|
||||||
|
step := 1.0 / sized;
|
||||||
|
while pos < sized do begin
|
||||||
|
with buckets[by][bx] do begin
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
Red := BlockToInt32(block, 0);
|
||||||
|
Green := BlockToInt32(block, 4);
|
||||||
|
Blue := BlockToInt32(block, 8);
|
||||||
|
Count := BlockToInt32(block, 12);
|
||||||
|
end;
|
||||||
|
Inc(bx);
|
||||||
|
pos := pos + HIB_BLOCKSIZE;
|
||||||
|
if bx >= header.Size2D.X then begin
|
||||||
|
Inc(by); bx := 0;
|
||||||
|
end;
|
||||||
|
p := p + step;
|
||||||
|
c := (c + 1) mod 64;
|
||||||
|
if (c = 0) then begin
|
||||||
|
callback(p*0.99);
|
||||||
|
Application.ProcessMessages;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
callback(0.99);
|
||||||
|
|
||||||
|
i := 0;
|
||||||
|
while i < 256 do begin
|
||||||
|
BlockRead(handle, block, 1);
|
||||||
|
|
||||||
|
c := BlockToInt32(block, 0);
|
||||||
|
colormap[i+0].Red := c and $ff;
|
||||||
|
colormap[i+0].Green := (c and $ff00) shr 8;
|
||||||
|
colormap[i+0].Blue := (c and $ff0000) shr 16;
|
||||||
|
|
||||||
|
c := BlockToInt32(block, 4);
|
||||||
|
colormap[i+1].Red := c and $ff;
|
||||||
|
colormap[i+1].Green := (c and $ff00) shr 8;
|
||||||
|
colormap[i+1].Blue := (c and $ff0000) shr 16;
|
||||||
|
|
||||||
|
c := BlockToInt32(block, 8);
|
||||||
|
colormap[i+2].Red := c and $ff;
|
||||||
|
colormap[i+2].Green := (c and $ff00) shr 8;
|
||||||
|
colormap[i+2].Blue := (c and $ff0000) shr 16;
|
||||||
|
|
||||||
|
c := BlockToInt32(block, 12);
|
||||||
|
colormap[i+3].Red := c and $ff;
|
||||||
|
colormap[i+3].Green := (c and $ff00) shr 8;
|
||||||
|
colormap[i+3].Blue := (c and $ff0000) shr 16;
|
||||||
|
|
||||||
|
i := i + 4;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
76
IO/MissingPlugin.pas
Normal file
76
IO/MissingPlugin.pas
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
unit MissingPlugin;
|
||||||
|
|
||||||
|
interface
|
||||||
|
uses Windows, Global, Classes, LoadTracker, ComCtrls, SysUtils,
|
||||||
|
ControlPoint, Translation;
|
||||||
|
const RegisteredAttributes : array[0..13] of string = (
|
||||||
|
'weight', 'color', 'symmetry', 'color_speed', 'coefs', 'chaos',
|
||||||
|
'plotmode', 'opacity', 'post', 'var', 'var1', 'var_color',
|
||||||
|
'name', 'linear3D'
|
||||||
|
);
|
||||||
|
var MissingPluginList : TStringList;
|
||||||
|
Parsing : boolean;
|
||||||
|
ErrorMessageString : string;
|
||||||
|
|
||||||
|
procedure BeginParsing;
|
||||||
|
procedure CheckAttribute(attr:string);
|
||||||
|
function EndParsing(cp : TControlPoint; var statusPanelText : string): boolean;
|
||||||
|
procedure AnnoyUser;
|
||||||
|
implementation
|
||||||
|
|
||||||
|
procedure BeginParsing;
|
||||||
|
begin
|
||||||
|
MissingPluginList := TStringList.Create;
|
||||||
|
if (AutoOpenLog = true) then
|
||||||
|
if (LoadForm.Showing = false) then
|
||||||
|
LoadForm.Show;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure CheckAttribute(attr:string);
|
||||||
|
var i : integer;
|
||||||
|
begin
|
||||||
|
for i := 0 to Length(RegisteredAttributes)-1 do
|
||||||
|
if attr=RegisteredAttributes[i] then exit;
|
||||||
|
|
||||||
|
if MissingPluginList.IndexOf(attr) < 0 then
|
||||||
|
MissingPluginList.Add(attr);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function EndParsing(cp : TControlPoint; var statusPanelText : string): boolean;
|
||||||
|
var str, str2 : string; i : integer; newl : TStringList;
|
||||||
|
begin
|
||||||
|
str2 := TextByKey('main-status-variationsorvariables');
|
||||||
|
if (cp.used_plugins.Count > 0) then begin
|
||||||
|
newl := TStringList.Create;
|
||||||
|
for i := 0 to MissingPluginList.Count - 1 do begin
|
||||||
|
if cp.used_plugins.IndexOf(MissingPluginList[i]) >= 0 then
|
||||||
|
newl.Add(MissingPluginList[i]);
|
||||||
|
end;
|
||||||
|
str2 := TextByKey('main-status-plugins');
|
||||||
|
MissingPluginList.Free;
|
||||||
|
MissingPluginList := newl;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if MissingPluginList.Count > 0 then begin
|
||||||
|
statusPanelText := Format(TextByKey('main-status-loadingerrorcount'), [MissingPluginList.Count]);
|
||||||
|
|
||||||
|
for i := 0 to MissingPluginList.Count - 1 do
|
||||||
|
str := str + #13#10 + ' - ' + MissingPluginList[i];
|
||||||
|
ErrorMessageString := Format(TextByKey('main-status-morepluginsneeded'), [cp.name, str2]) + str;
|
||||||
|
LoadForm.Output.Text := LoadForm.Output.Text +
|
||||||
|
ErrorMessageString + #13#10#13#10;
|
||||||
|
Result := false;
|
||||||
|
end else begin
|
||||||
|
statusPanelText := TextByKey('main-status-noloadingerrors');
|
||||||
|
ErrorMessageString := '';
|
||||||
|
Result := true;
|
||||||
|
end;
|
||||||
|
MissingPluginList.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure AnnoyUser;
|
||||||
|
begin
|
||||||
|
if (ErrorMessageString = '') or (not WarnOnMissingPlugin) then exit;
|
||||||
|
MessageBox($00000000, PChar(ErrorMessageString), PChar('Apophysis'), MB_ICONHAND or MB_OK);
|
||||||
|
end;
|
||||||
|
end.
|
603
IO/ParameterIO.pas
Normal file
603
IO/ParameterIO.pas
Normal file
@ -0,0 +1,603 @@
|
|||||||
|
unit ParameterIO;
|
||||||
|
|
||||||
|
interface
|
||||||
|
uses Global, SysUtils, StrUtils, ControlPoint, XForm, cmap,
|
||||||
|
XFormMan, RegularExpressionsCore, RegexHelper, Classes;
|
||||||
|
|
||||||
|
function IsRegisteredVariation(name: string): boolean;
|
||||||
|
function IsRegisteredVariable(name: string): boolean;
|
||||||
|
|
||||||
|
procedure EnumParameters(xml: string; var list: TStringList);
|
||||||
|
function NameOf(xml: string): string;
|
||||||
|
function FindFlameInBatch(xml, name: string): string;
|
||||||
|
|
||||||
|
procedure LoadPaletteFromXmlCompatible(xml: Utf8String; var cp: TControlPoint);
|
||||||
|
procedure LoadXFormFromXmlCompatible(xml: Utf8String; isFinalXForm: boolean; var xf: TXForm; var enabled: boolean);
|
||||||
|
function LoadCpFromXmlCompatible(xml: string; var cp: TControlPoint; var statusOutput: string): boolean;
|
||||||
|
function SaveCpToXmlCompatible(var xml: string; const cp1: TControlPoint): boolean;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
(* *************************** Validation functions ***************************** *)
|
||||||
|
function IsRegisteredVariation(name: string): boolean;
|
||||||
|
var i, count: integer; vname: string; xf: txform;
|
||||||
|
begin
|
||||||
|
xf := txform.Create;
|
||||||
|
xf.Destroy;
|
||||||
|
count:=NrVar;
|
||||||
|
for i:=0 to count - 1 do
|
||||||
|
begin
|
||||||
|
vname := VarNames(i);
|
||||||
|
if (lowercase(vname) = lowercase(name)) then
|
||||||
|
begin
|
||||||
|
Result := true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result := false;
|
||||||
|
end;
|
||||||
|
function IsRegisteredVariable(name: string): boolean;
|
||||||
|
var i, count: integer;
|
||||||
|
begin
|
||||||
|
count:=GetNrVariableNames;
|
||||||
|
for i:=0 to count - 1 do
|
||||||
|
begin
|
||||||
|
if (LowerCase(GetVariableNameAt(i)) = LowerCase(name)) then
|
||||||
|
begin
|
||||||
|
Result := true;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
Result := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
(* ***************************** Loading functions ******************************* *)
|
||||||
|
function NameOf(xml: string): string;
|
||||||
|
var
|
||||||
|
Regex: TPerlRegEx;
|
||||||
|
begin
|
||||||
|
Regex := TPerlRegEx.Create;
|
||||||
|
Regex.RegEx := '<flame.*?name="(.*?)".*?>.*?</flame>';
|
||||||
|
Regex.Options := [preSingleLine, preCaseless];
|
||||||
|
Regex.Subject := Utf8String(xml);
|
||||||
|
if Regex.Match then begin
|
||||||
|
Result := String(Regex.Groups[1]);
|
||||||
|
end else Result := '';
|
||||||
|
Regex.Free;
|
||||||
|
end;
|
||||||
|
procedure EnumParameters(xml: string; var list: TStringList);
|
||||||
|
var
|
||||||
|
Regex: TPerlRegEx;
|
||||||
|
begin
|
||||||
|
Regex := TPerlRegEx.Create;
|
||||||
|
Regex.RegEx := '<flame.*?>.*?</flame>';
|
||||||
|
Regex.Options := [preSingleLine, preCaseless];
|
||||||
|
Regex.Subject := Utf8String(xml);
|
||||||
|
if Regex.Match then begin
|
||||||
|
repeat
|
||||||
|
list.Add(String(Regex.MatchedText));
|
||||||
|
until not Regex.MatchAgain;
|
||||||
|
end;
|
||||||
|
Regex.Free;
|
||||||
|
end;
|
||||||
|
function FindFlameInBatch(xml, name: string): string;
|
||||||
|
var
|
||||||
|
Regex: TPerlRegEx;
|
||||||
|
begin
|
||||||
|
Regex := TPerlRegEx.Create;
|
||||||
|
Regex.RegEx := '<flame.*?name="(.*?)".*?>.*?</flame>';
|
||||||
|
Regex.Options := [preSingleLine, preCaseless];
|
||||||
|
Regex.Subject := Utf8String(xml);
|
||||||
|
if Regex.Match then begin
|
||||||
|
repeat
|
||||||
|
if (Utf8String(name) = Regex.Groups[1]) then begin
|
||||||
|
Result := String(Regex.MatchedText);
|
||||||
|
Regex.Free;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
until not Regex.MatchAgain;
|
||||||
|
end;
|
||||||
|
Result := '';
|
||||||
|
Regex.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function LoadCpFromXmlCompatible(xml: string; var cp: TControlPoint; var statusOutput: string): boolean;
|
||||||
|
const
|
||||||
|
re_flame : string = '<flame(.*?)>(.*?)</flame>';
|
||||||
|
re_xform : string = '<((?:final)?xform)(.*?)/>';
|
||||||
|
re_palette : string = '<palette(.*?)>([a-f0-9\s]+)</palette>';
|
||||||
|
re_attrib : string = '([0-9a-z_]+)="(.*?)"';
|
||||||
|
re_strtoken : string = '([a-z0-9_]+)';
|
||||||
|
var
|
||||||
|
flame_attribs : Utf8String;
|
||||||
|
flame_content : Utf8String;
|
||||||
|
xform_type : Utf8String;
|
||||||
|
xform_attribs : Utf8String;
|
||||||
|
palette_attribs : Utf8String;
|
||||||
|
palette_content : Utf8String;
|
||||||
|
|
||||||
|
find_attribs : TPerlRegEx;
|
||||||
|
found_attrib : boolean;
|
||||||
|
attrib_name : Utf8String;
|
||||||
|
attrib_match : Utf8String;
|
||||||
|
|
||||||
|
find_xforms : TPerlRegEx;
|
||||||
|
found_xform : boolean;
|
||||||
|
xform_index : integer;
|
||||||
|
|
||||||
|
find_strtokens : TPerlRegEx;
|
||||||
|
found_strtoken : boolean;
|
||||||
|
strtoken_index : integer;
|
||||||
|
strtoken_value : Utf8String;
|
||||||
|
|
||||||
|
find_palette : TPerlRegEx;
|
||||||
|
|
||||||
|
temp2i : T2Int;
|
||||||
|
temp2f : T2Float;
|
||||||
|
temprgb : TRGB;
|
||||||
|
|
||||||
|
dummy: boolean;
|
||||||
|
attrib_success: boolean;
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
find_strtokens := TPerlRegEx.Create;
|
||||||
|
find_attribs := TPerlRegEx.Create;
|
||||||
|
find_xforms := TPerlRegEx.Create;
|
||||||
|
find_palette := TPerlRegEx.Create;
|
||||||
|
|
||||||
|
find_attribs.RegEx := Utf8String(re_attrib);
|
||||||
|
find_strtokens.RegEx := Utf8String(re_strtoken);
|
||||||
|
find_xforms.RegEx := Utf8String(re_xform);
|
||||||
|
find_palette.RegEx := Utf8String(re_palette);
|
||||||
|
|
||||||
|
find_attribs.Options := [preSingleLine, preCaseless];
|
||||||
|
find_strtokens.Options := [preSingleLine, preCaseless];
|
||||||
|
find_xforms.Options := [preSingleLine, preCaseless];
|
||||||
|
find_palette.Options := [preSingleLine, preCaseless];
|
||||||
|
|
||||||
|
flame_attribs := Utf8String(GetStringPart(xml, re_flame, 1, ''));
|
||||||
|
flame_content := Utf8String(GetStringPart(xml, re_flame, 2, ''));
|
||||||
|
|
||||||
|
find_attribs.Subject := Utf8String(flame_attribs);
|
||||||
|
found_attrib := find_attribs.Match;
|
||||||
|
|
||||||
|
Result := true;
|
||||||
|
|
||||||
|
while found_attrib do begin
|
||||||
|
attrib_match := find_attribs.MatchedText;
|
||||||
|
attrib_name := Utf8String(Lowercase(String(find_attribs.Groups[1])));
|
||||||
|
attrib_success := true;
|
||||||
|
|
||||||
|
if attrib_name = 'name' then
|
||||||
|
cp.name := GetStringPart(String(attrib_match), re_attrib, 2, '')
|
||||||
|
else if attrib_name = 'vibrancy' then
|
||||||
|
cp.vibrancy := GetFloatPart(String(attrib_match), re_attrib, 2, defVibrancy)
|
||||||
|
else if attrib_name = 'brightness' then
|
||||||
|
cp.brightness := GetFloatPart(String(attrib_match), re_attrib, 2, defBrightness)
|
||||||
|
else if attrib_name = 'gamma' then
|
||||||
|
cp.gamma := GetFloatPart(String(attrib_match), re_attrib, 2, defGamma)
|
||||||
|
else if attrib_name = 'gamma_threshold' then
|
||||||
|
cp.gamma_threshold := GetFloatPart(String(attrib_match), re_attrib, 2, defGammaThreshold)
|
||||||
|
else if attrib_name = 'oversample' then
|
||||||
|
cp.spatial_oversample := GetIntPart(String(attrib_match), re_attrib, 2, defOversample)
|
||||||
|
else if attrib_name = 'filter' then
|
||||||
|
cp.spatial_filter_radius := GetFloatPart(String(attrib_match), re_attrib, 2, defFilterRadius)
|
||||||
|
else if attrib_name = 'zoom' then
|
||||||
|
cp.zoom := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'scale' then
|
||||||
|
cp.pixels_per_unit := GetFloatPart(String(attrib_match), re_attrib, 2, 25)
|
||||||
|
else if attrib_name = 'quality' then
|
||||||
|
cp.sample_density := GetFloatPart(String(attrib_match), re_attrib, 2, 5)
|
||||||
|
else if attrib_name = 'angle' then
|
||||||
|
cp.fangle := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'rotate' then // angle = -pi*x/180
|
||||||
|
cp.vibrancy := -PI * GetFloatPart(String(attrib_match), re_attrib, 2, 0) / 180
|
||||||
|
else if attrib_name = 'cam_pitch' then
|
||||||
|
cp.cameraPitch := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'cam_yaw' then
|
||||||
|
cp.cameraYaw := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'cam_perspective' then
|
||||||
|
cp.cameraPersp := GetFloatPart(String(attrib_match), re_attrib, 2, 1)
|
||||||
|
else if attrib_name = 'cam_dist' then // perspective = 1/x
|
||||||
|
begin
|
||||||
|
cp.cameraPersp := GetFloatPart(String(attrib_match), re_attrib, 2, 1);
|
||||||
|
if cp.cameraPersp = 0 then
|
||||||
|
cp.cameraPersp := EPS;
|
||||||
|
cp.cameraPersp := 1 / cp.cameraPersp;
|
||||||
|
end
|
||||||
|
else if attrib_name = 'cam_zpos' then
|
||||||
|
cp.cameraZpos := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'cam_dof' then
|
||||||
|
cp.cameraDOF := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
|
||||||
|
else if attrib_name = 'estimator_radius' then
|
||||||
|
cp.estimator := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'estimator_minimum' then
|
||||||
|
cp.estimator_min := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'estimator_curve' then
|
||||||
|
cp.estimator_curve := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if attrib_name = 'enable_de' then
|
||||||
|
cp.enable_de := GetBoolPart(String(attrib_match), re_attrib, 2, false)
|
||||||
|
|
||||||
|
else if attrib_name = 'center' then
|
||||||
|
begin
|
||||||
|
temp2f := Get2FloatPart(String(attrib_match), re_attrib, 2, 0);
|
||||||
|
cp.center[0] := temp2f.f1; cp.center[1] := temp2f.f2;
|
||||||
|
end
|
||||||
|
else if attrib_name = 'size' then
|
||||||
|
begin
|
||||||
|
temp2i := Get2IntPart(String(attrib_match), re_attrib, 2, 0);
|
||||||
|
cp.Width := temp2i.i1; cp.Height := temp2i.i2;
|
||||||
|
end
|
||||||
|
else if attrib_name = 'background' then
|
||||||
|
begin
|
||||||
|
temprgb := GetRGBPart(String(attrib_match), re_attrib, 2, 0);
|
||||||
|
cp.background[0] := temprgb.r;
|
||||||
|
cp.background[1] := temprgb.g;
|
||||||
|
cp.background[2] := temprgb.b;
|
||||||
|
end
|
||||||
|
|
||||||
|
else if attrib_name = 'soloxform' then
|
||||||
|
cp.soloXform := GetIntPart(String(attrib_match), re_attrib, 2, 0);
|
||||||
|
|
||||||
|
found_attrib := find_attribs.MatchAgain;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if LimitVibrancy and (cp.vibrancy > 1) then
|
||||||
|
cp.vibrancy := 1;
|
||||||
|
cp.cmapindex := -1;
|
||||||
|
|
||||||
|
find_xforms.Subject := flame_content;
|
||||||
|
found_xform := find_xforms.Match;
|
||||||
|
xform_index := 0;
|
||||||
|
cp.finalXformEnabled := false;
|
||||||
|
|
||||||
|
for i := 0 TO NXFORMS - 1 do
|
||||||
|
cp.xform[i].density := 0;
|
||||||
|
|
||||||
|
while found_xform do begin
|
||||||
|
xform_type := find_xforms.Groups[1];
|
||||||
|
xform_attribs := find_xforms.Groups[2];
|
||||||
|
if (LowerCase(String(xform_type)) = 'xform') then begin
|
||||||
|
LoadXFormFromXmlCompatible(find_xforms.MatchedText,
|
||||||
|
false, cp.xform[xform_index], cp.finalXformEnabled);
|
||||||
|
xform_index := xform_index + 1;
|
||||||
|
end else begin
|
||||||
|
cp.finalXform := Txform.Create;
|
||||||
|
LoadXFormFromXmlCompatible(find_xforms.MatchedText,
|
||||||
|
true, cp.finalXform, dummy);
|
||||||
|
cp.finalXformEnabled := true;
|
||||||
|
cp.useFinalXform := true;
|
||||||
|
xform_index := xform_index + 1;
|
||||||
|
cp.xform[cp.NumXForms] := cp.finalXform;
|
||||||
|
end;
|
||||||
|
found_xform := find_xforms.MatchAgain;
|
||||||
|
end;
|
||||||
|
|
||||||
|
find_palette.Subject := Utf8String(xml);
|
||||||
|
if (find_palette.Match) then
|
||||||
|
LoadPaletteFromXmlCompatible(find_palette.MatchedText, cp);
|
||||||
|
|
||||||
|
find_strtokens.Free;
|
||||||
|
find_attribs.Free;
|
||||||
|
find_xforms.Free;
|
||||||
|
find_palette.Free;
|
||||||
|
end;
|
||||||
|
procedure LoadPaletteFromXmlCompatible(xml: Utf8String; var cp: TControlPoint);
|
||||||
|
const
|
||||||
|
re_palette: string = '<palette(.*?)>([a-f0-9\s]+)</palette>';
|
||||||
|
re_attrib : string = '([0-9a-z_]+)="(.*?)"';
|
||||||
|
var
|
||||||
|
i, pos, len, count: integer; c: char;
|
||||||
|
data, attr, hexdata, format: string;
|
||||||
|
alpha: boolean;
|
||||||
|
|
||||||
|
find_attribs : TPerlRegEx;
|
||||||
|
found_attrib : boolean;
|
||||||
|
attrib_name : Utf8String;
|
||||||
|
attrib_match : Utf8String;
|
||||||
|
attrib_success : Boolean;
|
||||||
|
function HexChar(c: Char): Byte;
|
||||||
|
begin
|
||||||
|
case c of
|
||||||
|
'0'..'9': Result := (Byte(c) - Byte('0'));
|
||||||
|
'a'..'f': Result := (Byte(c) - Byte('a')) + 10;
|
||||||
|
'A'..'F': Result := (Byte(c) - Byte('A')) + 10;
|
||||||
|
else
|
||||||
|
Result := 0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
begin
|
||||||
|
hexdata := GetStringPart(String(xml), re_palette, 2, '');
|
||||||
|
attr := GetStringPart(String(xml), re_palette, 1, '');
|
||||||
|
|
||||||
|
find_attribs := TPerlRegEx.Create;
|
||||||
|
find_attribs.RegEx := Utf8String(re_attrib);
|
||||||
|
find_attribs.Options := [preSingleLine, preCaseless];
|
||||||
|
find_attribs.Subject := Utf8String(attr);
|
||||||
|
found_attrib := find_attribs.Match;
|
||||||
|
|
||||||
|
count := 0;
|
||||||
|
|
||||||
|
while found_attrib do begin
|
||||||
|
attrib_match := find_attribs.MatchedText;
|
||||||
|
attrib_name := Utf8String(Lowercase(String(find_attribs.Groups[1])));
|
||||||
|
attrib_success := true;
|
||||||
|
|
||||||
|
if (attrib_name = 'count') then
|
||||||
|
count := GetIntPart(String(attrib_match), re_attrib, 2, 256)
|
||||||
|
else if (attrib_name = 'format') then
|
||||||
|
format := GetStringPart(String(attrib_match), re_attrib, 2, 'RGB');
|
||||||
|
|
||||||
|
found_attrib := find_attribs.MatchAgain;
|
||||||
|
end;
|
||||||
|
|
||||||
|
find_attribs.Free;
|
||||||
|
|
||||||
|
alpha := (lowercase(format) = 'rgba');
|
||||||
|
data := '';
|
||||||
|
|
||||||
|
for i := 1 to Length(hexdata) do
|
||||||
|
begin
|
||||||
|
c := hexdata[i];
|
||||||
|
if CharInSet(c, ['0'..'9']+['A'..'F']+['a'..'f']) then data := data + c;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if alpha then len := count * 8
|
||||||
|
else len := count * 6;
|
||||||
|
|
||||||
|
for i := 0 to Count-1 do begin
|
||||||
|
if alpha then pos := i * 8 + 2
|
||||||
|
else pos := i * 6;
|
||||||
|
cp.cmap[i][0] := 16 * HexChar(Data[pos + 1]) + HexChar(Data[pos + 2]);
|
||||||
|
cp.cmap[i][1] := 16 * HexChar(Data[pos + 3]) + HexChar(Data[pos + 4]);
|
||||||
|
cp.cmap[i][2] := 16 * HexChar(Data[pos + 5]) + HexChar(Data[pos + 6]);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
procedure LoadXFormFromXmlCompatible(xml: Utf8String; isFinalXForm: boolean; var xf: TXForm; var enabled: boolean);
|
||||||
|
const
|
||||||
|
re_attrib : string = '([0-9a-z_]+)="(.*?)"';
|
||||||
|
re_xform : string = '<((?:final)?xform)(.*?)/>';
|
||||||
|
re_coefs : string = '([\d.eE+-]+)\s+([\d.eE+-]+)\s+([\d.eE+-]+)\s+([\d.eE+-]+)\s+([\d.eE+-]+)\s+([\d.eE+-]+)';
|
||||||
|
var
|
||||||
|
xform_attribs: string;
|
||||||
|
find_attribs : TPerlRegEx;
|
||||||
|
found_attrib : boolean;
|
||||||
|
attrib_name : Utf8String;
|
||||||
|
attrib_match : Utf8String;
|
||||||
|
token_part : string;
|
||||||
|
i, j : integer;
|
||||||
|
d : double;
|
||||||
|
t : TStringList;
|
||||||
|
v_set : Boolean;
|
||||||
|
attrib_success: Boolean;
|
||||||
|
begin
|
||||||
|
enabled := true;
|
||||||
|
xform_attribs := GetStringPart(String(xml), re_xform, 2, '');
|
||||||
|
|
||||||
|
find_attribs := TPerlRegEx.Create;
|
||||||
|
find_attribs.RegEx := Utf8String(re_attrib);
|
||||||
|
find_attribs.Options := [preSingleLine, preCaseless];
|
||||||
|
find_attribs.Subject := Utf8String(xform_attribs);
|
||||||
|
found_attrib := find_attribs.Match;
|
||||||
|
|
||||||
|
for i := 0 to NRVAR-1 do
|
||||||
|
xf.SetVariation(i, 0);
|
||||||
|
|
||||||
|
while found_attrib do begin
|
||||||
|
attrib_match := find_attribs.MatchedText;
|
||||||
|
attrib_name := (find_attribs.Groups[1]);
|
||||||
|
attrib_success := true;
|
||||||
|
|
||||||
|
if (attrib_name = 'enabled') and isFinalXform then
|
||||||
|
enabled := GetBoolPart(String(attrib_match), re_attrib, 2, true)
|
||||||
|
else if (attrib_name = 'weight') and (not isFinalXform) then
|
||||||
|
xf.density := GetFloatPart(String(attrib_match), re_attrib, 2, 0.5)
|
||||||
|
else if (attrib_name = 'symmetry') and (not isFinalXform) then
|
||||||
|
xf.symmetry := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if (attrib_name = 'color_speed') and (not isFinalXform) then
|
||||||
|
xf.symmetry := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if (attrib_name = 'chaos') and (not isFinalXform) then
|
||||||
|
begin
|
||||||
|
token_part := GetStringPart(String(attrib_match), re_attrib, 2, '');
|
||||||
|
if token_part <> '' then
|
||||||
|
begin
|
||||||
|
t := TStringList.Create;
|
||||||
|
GetTokens(token_part, t);
|
||||||
|
for i := 0 to t.Count-1 do
|
||||||
|
xf.modWeights[i] := Abs(StrToFloat(t[i]));
|
||||||
|
t.Destroy;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else if (attrib_name = 'opacity') and (not isFinalXform) then
|
||||||
|
xf.transOpacity := GetFloatPart(String(attrib_match), re_attrib, 2, 1)
|
||||||
|
else if (attrib_name = 'name') and (not isFinalXform) then
|
||||||
|
xf.TransformName := GetStringPart(String(attrib_match), re_attrib, 2, '')
|
||||||
|
else if (attrib_name = 'plotmode') and (not isFinalXform) then
|
||||||
|
xf.transOpacity := StrToFloat(IfThen(LowerCase(GetStringPart(String(attrib_match), re_attrib, 2, '')) = 'off', '0', '1'))
|
||||||
|
else if (attrib_name = 'coefs') then
|
||||||
|
begin
|
||||||
|
token_part := GetStringPart(String(attrib_match), re_attrib, 2, '1 0 0 1 0 0');
|
||||||
|
xf.c[0][0] := GetFloatPart(token_part, re_coefs, 1, 1);
|
||||||
|
xf.c[0][1] := GetFloatPart(token_part, re_coefs, 2, 0);
|
||||||
|
xf.c[1][0] := GetFloatPart(token_part, re_coefs, 3, 0);
|
||||||
|
xf.c[1][1] := GetFloatPart(token_part, re_coefs, 4, 1);
|
||||||
|
xf.c[2][0] := GetFloatPart(token_part, re_coefs, 5, 0);
|
||||||
|
xf.c[2][1] := GetFloatPart(token_part, re_coefs, 6, 0);
|
||||||
|
end
|
||||||
|
else if (attrib_name = 'post') then
|
||||||
|
begin
|
||||||
|
token_part := GetStringPart(String(attrib_match), re_attrib, 2, '1 0 0 1 0 0');
|
||||||
|
xf.p[0][0] := GetFloatPart(token_part, re_coefs, 1, 1);
|
||||||
|
xf.p[0][1] := GetFloatPart(token_part, re_coefs, 2, 0);
|
||||||
|
xf.p[1][0] := GetFloatPart(token_part, re_coefs, 3, 0);
|
||||||
|
xf.p[1][1] := GetFloatPart(token_part, re_coefs, 4, 1);
|
||||||
|
xf.p[2][0] := GetFloatPart(token_part, re_coefs, 5, 0);
|
||||||
|
xf.p[2][1] := GetFloatPart(token_part, re_coefs, 6, 0);
|
||||||
|
end
|
||||||
|
else if (attrib_name = 'color') then
|
||||||
|
xf.color := GetFloatPart(String(attrib_match), re_attrib, 2, 0)
|
||||||
|
else if (attrib_name = 'var_color') then
|
||||||
|
xf.vc := GetFloatPart(String(attrib_match), re_attrib, 2, 1)
|
||||||
|
else if ((String(attrib_name) = 'symmetry') or (String(attrib_name) = 'weight') or
|
||||||
|
(String(attrib_name) = 'color_speed') or (String(attrib_name) = 'chaos') or
|
||||||
|
(String(attrib_name) = 'opacity') or (String(attrib_name) = 'name') or
|
||||||
|
(String(attrib_name) = 'plotmode')) and (isFinalXForm) then
|
||||||
|
begin
|
||||||
|
//EmitWarning('Malformed attribute "xform.' + attrib_name + '" - ignoring');
|
||||||
|
//LogWrite('WARNING|' +'Malformed attribute "xform.' + attrib_name + '" - ignoring', 'parser.log');
|
||||||
|
attrib_success := false;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
if (String(attrib_name) = 'linear3D') then begin
|
||||||
|
xf.SetVariation(0, GetFloatPart(String(attrib_match), re_attrib, 2, 0));
|
||||||
|
end else if (IsRegisteredVariation(String(attrib_name))) then begin
|
||||||
|
for i := 0 to NRVAR - 1 do begin
|
||||||
|
if lowercase(varnames(i)) = lowercase(String(attrib_name)) then begin
|
||||||
|
xf.SetVariation(i, GetFloatPart(String(attrib_match), re_attrib, 2, 0));
|
||||||
|
v_set := true;
|
||||||
|
break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if (IsRegisteredVariable(String(attrib_name))) then begin
|
||||||
|
d := GetFloatPart(String(attrib_match), re_attrib, 2, 0);
|
||||||
|
xf.SetVariable(String(attrib_name), d);
|
||||||
|
end;
|
||||||
|
end else if (IsRegisteredVariable(String(attrib_name))) then begin
|
||||||
|
d := GetFloatPart(String(attrib_match), re_attrib, 2, 0);
|
||||||
|
xf.SetVariable(String(attrib_name), d);
|
||||||
|
end;
|
||||||
|
attrib_success := false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
found_attrib := find_attribs.MatchAgain;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if (isFinalXform) then begin
|
||||||
|
xf.symmetry := 1;
|
||||||
|
xf.color := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
find_attribs.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// Replace...
|
||||||
|
function SaveCpToXmlCompatible(var xml: string; const cp1: TControlPoint): boolean;
|
||||||
|
function ColorToXmlCompact(cp1: TControlPoint): string;
|
||||||
|
var
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
Result := ' <palette count="256" format="RGB">';
|
||||||
|
for i := 0 to 255 do begin
|
||||||
|
if ((i and 7) = 0) then Result := Result + #13#10 + ' ';
|
||||||
|
Result := Result + IntToHex(cp1.cmap[i, 0],2)
|
||||||
|
+ IntToHex(cp1.cmap[i, 1],2)
|
||||||
|
+ IntToHex(cp1.cmap[i, 2],2);
|
||||||
|
end;
|
||||||
|
Result := Result + #13#10 + ' </palette>';
|
||||||
|
end;
|
||||||
|
var
|
||||||
|
t, i{, j}: integer;
|
||||||
|
FileList: TStringList;
|
||||||
|
x, y: double;
|
||||||
|
parameters: string;
|
||||||
|
str: string;
|
||||||
|
begin
|
||||||
|
FileList := TStringList.create;
|
||||||
|
x := cp1.center[0];
|
||||||
|
y := cp1.center[1];
|
||||||
|
|
||||||
|
// if cp1.cmapindex >= 0 then pal := pal + 'gradient="' + IntToStr(cp1.cmapindex) + '" ';
|
||||||
|
|
||||||
|
try
|
||||||
|
parameters := 'version="Apophysis 7X" ';
|
||||||
|
if cp1.time <> 0 then
|
||||||
|
parameters := parameters + format('time="%g" ', [cp1.time]);
|
||||||
|
|
||||||
|
parameters := parameters +
|
||||||
|
'size="' + IntToStr(cp1.width) + ' ' + IntToStr(cp1.height) +
|
||||||
|
format('" center="%g %g" ', [x, y]) +
|
||||||
|
format('scale="%g" ', [cp1.pixels_per_unit]);
|
||||||
|
|
||||||
|
if cp1.FAngle <> 0 then
|
||||||
|
parameters := parameters + format('angle="%g" ', [cp1.FAngle]) +
|
||||||
|
format('rotate="%g" ', [-180 * cp1.FAngle/Pi]);
|
||||||
|
if cp1.zoom <> 0 then
|
||||||
|
parameters := parameters + format('zoom="%g" ', [cp1.zoom]);
|
||||||
|
|
||||||
|
// 3d
|
||||||
|
if cp1.cameraPitch <> 0 then
|
||||||
|
parameters := parameters + format('cam_pitch="%g" ', [cp1.cameraPitch]);
|
||||||
|
if cp1.cameraYaw <> 0 then
|
||||||
|
parameters := parameters + format('cam_yaw="%g" ', [cp1.cameraYaw]);
|
||||||
|
if cp1.cameraPersp <> 0 then
|
||||||
|
parameters := parameters + format('cam_perspective="%g" ', [cp1.cameraPersp]);
|
||||||
|
if cp1.cameraZpos <> 0 then
|
||||||
|
parameters := parameters + format('cam_zpos="%g" ', [cp1.cameraZpos]);
|
||||||
|
if cp1.cameraDOF <> 0 then
|
||||||
|
parameters := parameters + format('cam_dof="%g" ', [cp1.cameraDOF]);
|
||||||
|
//
|
||||||
|
parameters := parameters + format(
|
||||||
|
'oversample="%d" filter="%g" quality="%g" ',
|
||||||
|
[cp1.spatial_oversample,
|
||||||
|
cp1.spatial_filter_radius,
|
||||||
|
cp1.sample_density]
|
||||||
|
);
|
||||||
|
if cp1.nbatches <> 1 then parameters := parameters + 'batches="' + IntToStr(cp1.nbatches) + '" ';
|
||||||
|
|
||||||
|
parameters := parameters +
|
||||||
|
format('background="%g %g %g" ', [cp1.background[0] / 255, cp1.background[1] / 255, cp1.background[2] / 255]) +
|
||||||
|
format('brightness="%g" ', [cp1.brightness]) +
|
||||||
|
format('gamma="%g" ', [cp1.gamma]);
|
||||||
|
|
||||||
|
if cp1.vibrancy <> 1 then
|
||||||
|
parameters := parameters + format('vibrancy="%g" ', [cp1.vibrancy]);
|
||||||
|
|
||||||
|
if cp1.gamma_threshold <> 0 then
|
||||||
|
parameters := parameters + format('gamma_threshold="%g" ', [cp1.gamma_threshold]);
|
||||||
|
|
||||||
|
if cp1.soloXform >= 0 then
|
||||||
|
parameters := parameters + format('soloxform="%d" ', [cp1.soloXform]);
|
||||||
|
|
||||||
|
parameters := parameters +
|
||||||
|
format('estimator_radius="%g" ', [cp1.estimator]) +
|
||||||
|
format('estimator_minimum="%g" ', [cp1.estimator_min]) +
|
||||||
|
format('estimator_curve="%g" ', [cp1.estimator_curve]);
|
||||||
|
if (cp1.enable_de) then
|
||||||
|
parameters := parameters + ('enable_de="1" ')
|
||||||
|
else parameters := parameters + ('enable_de="0" ');
|
||||||
|
|
||||||
|
str := '';
|
||||||
|
for i := 0 to cp1.used_plugins.Count-1 do begin
|
||||||
|
str := str + cp1.used_plugins[i];
|
||||||
|
if (i = cp1.used_plugins.Count-1) then break;
|
||||||
|
str := str + ' ';
|
||||||
|
end;
|
||||||
|
parameters := parameters + format('plugins="%s" ', [str]);
|
||||||
|
|
||||||
|
FileList.Add('<flame name="' + cp1.name + '" ' + parameters + '>');
|
||||||
|
{ Write transform parameters }
|
||||||
|
t := cp1.NumXForms;
|
||||||
|
for i := 0 to t - 1 do
|
||||||
|
FileList.Add(cp1.xform[i].ToXMLString);
|
||||||
|
if cp1.HasFinalXForm then
|
||||||
|
begin
|
||||||
|
// 'enabled' flag disabled in this release
|
||||||
|
FileList.Add(cp1.xform[t].FinalToXMLString(cp1.finalXformEnabled));
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ Write palette data }
|
||||||
|
//if exporting or OldPaletteFormat then
|
||||||
|
// FileList.Add(ColorToXml(cp1))
|
||||||
|
//else
|
||||||
|
FileList.Add(ColorToXmlCompact(cp1));
|
||||||
|
|
||||||
|
FileList.Add('</flame>');
|
||||||
|
xml := FileList.text;
|
||||||
|
result := true;
|
||||||
|
finally
|
||||||
|
FileList.free
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
1545
IO/Settings.pas
Normal file
1545
IO/Settings.pas
Normal file
File diff suppressed because it is too large
Load Diff
89
Plugin/barycentroid.c
Normal file
89
Plugin/barycentroid.c
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double barycentroid_a, barycentroid_b, barycentroid_c, barycentroid_d;
|
||||||
|
double a, b, c, d;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("barycentroid");
|
||||||
|
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(barycentroid_a, 1.0),
|
||||||
|
VAR_REAL(barycentroid_b, 0.0),
|
||||||
|
VAR_REAL(barycentroid_c, 0.0),
|
||||||
|
VAR_REAL(barycentroid_d, 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
// alias
|
||||||
|
VAR(a) = VAR(barycentroid_a);
|
||||||
|
VAR(b) = VAR(barycentroid_b);
|
||||||
|
VAR(c) = VAR(barycentroid_c);
|
||||||
|
VAR(d) = VAR(barycentroid_d);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline double sgn(double v) { return v < 0 ? -1 : v > 0 ? 1 : 0; }
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
// helpers
|
||||||
|
|
||||||
|
/* The code is supposed to be fast and you all can read it so I dont
|
||||||
|
create those aliases for readability in actual code:
|
||||||
|
|
||||||
|
v0x = VAR(a)
|
||||||
|
v0y = VAR(b)
|
||||||
|
v1x = VAR(c)
|
||||||
|
v1y = VAR(d)
|
||||||
|
v2x = FTx
|
||||||
|
v2y = FTy
|
||||||
|
*/
|
||||||
|
|
||||||
|
// compute dot products
|
||||||
|
double dot00 = VAR(a) * VAR(a) + VAR(b) * VAR(b); // v0 * v0
|
||||||
|
double dot01 = VAR(a) * VAR(c) + VAR(b) * VAR(d); // v0 * v1
|
||||||
|
double dot02 = VAR(a) * FTx + VAR(b) * FTy; // v0 * v2
|
||||||
|
double dot11 = VAR(c) * VAR(c) + VAR(d) * VAR(d); // v1 * v1
|
||||||
|
double dot12 = VAR(c) * FTx + VAR(d) * FTy; // v1 * v2
|
||||||
|
|
||||||
|
// compute inverse denomiator
|
||||||
|
double invDenom = 1 / (dot00 * dot11 - dot01 * dot01);
|
||||||
|
|
||||||
|
/* now we can pull [u,v] as the barycentric coordinates of the point
|
||||||
|
P in the triangle [A, B, C]
|
||||||
|
*/
|
||||||
|
double u = (dot11 * dot02 - dot01 * dot12) * invDenom;
|
||||||
|
double v = (dot00 * dot12 - dot01 * dot02) * invDenom;
|
||||||
|
|
||||||
|
// now combine with input
|
||||||
|
double um = sqrt(sqr(u) + sqr(FTx)) * sgn(u);
|
||||||
|
double vm = sqrt(sqr(v) + sqr(FTy)) * sgn(v);
|
||||||
|
|
||||||
|
FPx += VVAR * um;
|
||||||
|
FPy += VVAR * vm;
|
||||||
|
FPz += VVAR * FTz; // just pass
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
65
Plugin/bcircle.c
Normal file
65
Plugin/bcircle.c
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double bcbw;
|
||||||
|
double bcircle_scale;
|
||||||
|
double bcircle_borderwidth;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("bcircle");
|
||||||
|
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(bcircle_scale, 1.0),
|
||||||
|
VAR_REAL(bcircle_borderwidth, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(bcbw) = fabs(VAR(bcircle_borderwidth));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
if ((FTx == 0) && (FTy == 0)) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
double x = FTx * VAR(bcircle_scale);
|
||||||
|
double y = FTy * VAR(bcircle_scale);
|
||||||
|
double r = sqrt(x * x + y * y);
|
||||||
|
|
||||||
|
if (r <= 1) {
|
||||||
|
FPx += VVAR * x;
|
||||||
|
FPy += VVAR * y;
|
||||||
|
} else {
|
||||||
|
if (VAR(bcbw) != 0) {
|
||||||
|
double ang = atan2(y, x);
|
||||||
|
double omega = (0.2 * VAR(bcbw) * random01()) + 1;
|
||||||
|
double px = omega * cos(ang);
|
||||||
|
double py = omega * sin(ang);
|
||||||
|
FPx += VVAR * px;
|
||||||
|
FPy += VVAR * py;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
67
Plugin/bent2.c
Normal file
67
Plugin/bent2.c
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2008-2009 Michael Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double bent2_x;
|
||||||
|
double bent2_y;
|
||||||
|
|
||||||
|
|
||||||
|
double vvarx;
|
||||||
|
double vvary;
|
||||||
|
//double bipilar_vvar;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("bent2");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(bent2_x, 1.0),
|
||||||
|
VAR_REAL(bent2_y, 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(vvarx) = VVAR * VAR(bent2_x);
|
||||||
|
VAR(vvary) = VVAR * VAR(bent2_y);
|
||||||
|
//VAR(bipolar_vvar) = 1
|
||||||
|
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
if(FTx >= 0.0)
|
||||||
|
FPx += VVAR * FTx;
|
||||||
|
else
|
||||||
|
FPx += VAR(vvarx) * FTx;
|
||||||
|
if(FTy >= 0.0)
|
||||||
|
FPy += VVAR * FTy;
|
||||||
|
else
|
||||||
|
FPy += VAR(vvary) * FTy;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
58
Plugin/blur_linear.c
Normal file
58
Plugin/blur_linear.c
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2009 Joel Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double blur_linear_length;
|
||||||
|
double blur_linear_angle;
|
||||||
|
|
||||||
|
double s;
|
||||||
|
double c;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("blur_linear");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(blur_linear_length, 0.0),
|
||||||
|
VAR_REAL_CYCLE(blur_linear_angle, 0.0, M_2PI, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
fsincos(VAR(blur_linear_angle), &VAR(s), &VAR(c));
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double r = VAR(blur_linear_length) * random01();
|
||||||
|
|
||||||
|
FPx += VVAR * (FTx + r * VAR(c));
|
||||||
|
FPy += VVAR * (FTy + r * VAR(s));
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
53
Plugin/blur_square.c
Normal file
53
Plugin/blur_square.c
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2009 Joel Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double v;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#define APO_NOVARIABLES
|
||||||
|
#define APO_VIRTUALVAR
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("blur_square");
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(v) = VVAR * 2.0;
|
||||||
|
|
||||||
|
// Always return TRUE.
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
|
||||||
|
FPx += VAR(v) * (random01() - 0.5);
|
||||||
|
FPy += VAR(v) * (random01() - 0.5);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
}
|
104
Plugin/boarders2.c
Normal file
104
Plugin/boarders2.c
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2007-2009 Joel Faber
|
||||||
|
Copyright (C) 2007-2009 Michael Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double boarders2_c;
|
||||||
|
double boarders2_left;
|
||||||
|
double boarders2_right;
|
||||||
|
double c, cl, cr;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("boarders2");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(boarders2_c, 0.5),
|
||||||
|
VAR_REAL(boarders2_left, 0.5),
|
||||||
|
VAR_REAL(boarders2_right, 0.5),
|
||||||
|
);
|
||||||
|
|
||||||
|
inline double rint(double x)
|
||||||
|
{
|
||||||
|
int temp; temp = (x >= 0. ? (int)(x + 0.5) : (int)(x - 0.5));
|
||||||
|
return (double)temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
double c = fabs(VAR(boarders2_c)),
|
||||||
|
cl = fabs(VAR(boarders2_left)),
|
||||||
|
cr = fabs(VAR(boarders2_right));
|
||||||
|
c = c==0?EPS:c; cl = cl==0?EPS:cl; cr = cr==0?EPS:cr;
|
||||||
|
VAR(c) = c; VAR(cl) = c*cl; VAR(cr) = c+(c*cr);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
const double c = vp->var.c;
|
||||||
|
const double cl = vp->var.cl;
|
||||||
|
const double cr = vp->var.cr;
|
||||||
|
|
||||||
|
double roundX, roundY, offsetX, offsetY;
|
||||||
|
|
||||||
|
roundX = rint(FTx);
|
||||||
|
roundY = rint(FTy);
|
||||||
|
offsetX = FTx - roundX;
|
||||||
|
offsetY = FTy - roundY;
|
||||||
|
|
||||||
|
if(random01() >= cr)
|
||||||
|
{
|
||||||
|
FPx += VVAR*(offsetX*c + roundX);
|
||||||
|
FPy += VVAR*(offsetY*c + roundY);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(fabs(offsetX) >= fabs(offsetY))
|
||||||
|
{
|
||||||
|
if(offsetX >= 0.0)
|
||||||
|
{
|
||||||
|
FPx += VVAR*(offsetX*c + roundX + cl);
|
||||||
|
FPy += VVAR*(offsetY*c + roundY + cl * offsetY / offsetX);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPx += VVAR*(offsetX*c + roundX - cl);
|
||||||
|
FPy += VVAR*(offsetY*c + roundY - cl * offsetY / offsetX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(offsetY >= 0.0)
|
||||||
|
{
|
||||||
|
FPy += VVAR*(offsetY*c + roundY + cl);
|
||||||
|
FPx += VVAR*(offsetX*c + roundX + offsetX/offsetY*cl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPy += VVAR*(offsetY*c + roundY - cl);
|
||||||
|
FPx += VVAR*(offsetX*c + roundX - offsetX/offsetY*cl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
54
Plugin/butterfly.c
Normal file
54
Plugin/butterfly.c
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2007-2009 Joel Faber
|
||||||
|
Copyright (C) 2007-2009 Michael Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double v;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#define APO_NOVARIABLES
|
||||||
|
#define APO_VIRTUALVAR
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("butterfly");
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(v) = VVAR * 4.0 / sqrt(3.0 * M_PI);
|
||||||
|
// Always return TRUE.
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double y2 = FTy * 2.0;
|
||||||
|
double r = VAR(v) * sqrt(fabs(FTy * FTx)/(EPS + sqr(FTx) + sqr(y2)));
|
||||||
|
|
||||||
|
FPx += r * FTx;
|
||||||
|
FPy += r * y2;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
52
Plugin/cardiod.c
Normal file
52
Plugin/cardiod.c
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double cardioid_a;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("cardioid");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(cardioid_a, 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double a = atan2(FTy, FTx);
|
||||||
|
double r = VVAR * sqrt(sqr(FTx) + sqr(FTy) + sin( a * VAR(cardioid_a)) + 1.0 );
|
||||||
|
double s, c;
|
||||||
|
fsincos( a, &s, &c);
|
||||||
|
|
||||||
|
FPx += r * c;
|
||||||
|
FPy += r * s;
|
||||||
|
return TRUE;
|
||||||
|
}
|
92
Plugin/cell.c
Normal file
92
Plugin/cell.c
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (c) 2008 Joel Faber. All rights reserverd.
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double cell_size;
|
||||||
|
|
||||||
|
double inv_cell_size;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("cell");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(cell_size, 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
if (VAR(cell_size) == 0) VAR(cell_size) = 1e-6;
|
||||||
|
VAR(inv_cell_size) = 1.0 / VAR(cell_size);
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
// calculate input cell
|
||||||
|
int x = floor(FTx*VAR(inv_cell_size));
|
||||||
|
int y = floor(FTy*VAR(inv_cell_size));
|
||||||
|
|
||||||
|
// Offset from cell origin
|
||||||
|
double dx = FTx - x*VAR(cell_size);
|
||||||
|
double dy = FTy - y*VAR(cell_size);
|
||||||
|
|
||||||
|
// interleave cells
|
||||||
|
if (y >= 0)
|
||||||
|
{
|
||||||
|
if (x >= 0)
|
||||||
|
{
|
||||||
|
y *= 2;
|
||||||
|
x *= 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
y *= 2;
|
||||||
|
x = -(2*x+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x >= 0)
|
||||||
|
{
|
||||||
|
y = -(2*y+1);
|
||||||
|
x *= 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
y = -(2*y+1);
|
||||||
|
x = -(2*x+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// calculate output point from interleaved cell
|
||||||
|
FPx += VVAR * (dx + x*VAR(cell_size));
|
||||||
|
FPy -= VVAR * (dy + y*VAR(cell_size));
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
101
Plugin/checks.c
Normal file
101
Plugin/checks.c
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double checks_x;
|
||||||
|
double checks_y;
|
||||||
|
double checks_size;
|
||||||
|
double checks_rnd;
|
||||||
|
|
||||||
|
double cs, cx, cy, ncx, ncy;
|
||||||
|
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("checks");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(checks_x, 0.5),
|
||||||
|
VAR_REAL(checks_y, 0.5),
|
||||||
|
VAR_REAL(checks_size, 0.5),
|
||||||
|
VAR_REAL(checks_rnd, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
inline double lrint(double x)
|
||||||
|
{
|
||||||
|
long int temp; temp = (x >= 0. ? (long int)(x + 0.5) : (long int)(x - 0.5));
|
||||||
|
return (double)temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
// Multiplication is faster than division, so divide in precalc, multiply in calc.
|
||||||
|
VAR(cs) = 1.0 / (VAR(checks_size) + EPS);
|
||||||
|
|
||||||
|
// -X- Copied the variables as we only need them for reading
|
||||||
|
// This is just for safety :-)
|
||||||
|
VAR(cx) = VAR(checks_x); VAR(cy) = VAR(checks_y);
|
||||||
|
// -X- Then precalculate -checkx_x, -checks_y
|
||||||
|
VAR(ncx) = VAR(checks_x) * -1.0; VAR(ncy) = VAR(checks_y) * -1.0;
|
||||||
|
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double dx, dy;
|
||||||
|
double x = FTx * VAR(cs);
|
||||||
|
double y = FTy * VAR(cs);
|
||||||
|
|
||||||
|
int isXY = lrint(FTx * VAR(cs)) +
|
||||||
|
lrint(FTy * VAR(cs));
|
||||||
|
|
||||||
|
// -X- This is just for code readability,
|
||||||
|
// if there is any impact on performance, its minimal :-)
|
||||||
|
double rnx = VAR(checks_rnd) * random01();
|
||||||
|
double rny = VAR(checks_rnd) * random01();
|
||||||
|
|
||||||
|
if (isXY % 2)
|
||||||
|
{
|
||||||
|
// -X- The -VAR(checks_#) stuff caused the error!
|
||||||
|
dx = VAR(ncx) + rnx;
|
||||||
|
dy = VAR(ncy);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dx = VAR(cx);
|
||||||
|
dy = VAR(cy) + rny;
|
||||||
|
}
|
||||||
|
|
||||||
|
FPx += VVAR * (FTx + dx);
|
||||||
|
FPy += VVAR * (FTy + dy);
|
||||||
|
|
||||||
|
// -X- and as a little goodie, I pass through FTz so that
|
||||||
|
// neat lil variation does not kill 3Dness in hack & 7X
|
||||||
|
FPz += VVAR * (FTz);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
93
Plugin/circlize.c
Normal file
93
Plugin/circlize.c
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2007-2009 Joel Faber
|
||||||
|
Copyright (C) 2007-2009 Michael Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double circlize_hole;
|
||||||
|
double VVAR4_PI;
|
||||||
|
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("circlize");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(circlize_hole, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(VVAR4_PI) = VVAR / M_PI_4;
|
||||||
|
// Always return TRUE.
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double absx = fabs(FTx);
|
||||||
|
double absy = fabs(FTy);
|
||||||
|
double side;
|
||||||
|
double perimeter;
|
||||||
|
double r, sina, cosa;
|
||||||
|
|
||||||
|
if (absx >= absy)
|
||||||
|
{
|
||||||
|
if (FTx >= absy)
|
||||||
|
{
|
||||||
|
perimeter = absx + FTy;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
perimeter = 5.0 * absx - FTy;
|
||||||
|
}
|
||||||
|
|
||||||
|
side = absx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (FTy >= absx)
|
||||||
|
{
|
||||||
|
perimeter = 3.0 * absy - FTx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
perimeter = 7.0 * absy + FTx;
|
||||||
|
}
|
||||||
|
|
||||||
|
side = absy;
|
||||||
|
}
|
||||||
|
|
||||||
|
// tsk tsk... hole is not scaled by vvar.
|
||||||
|
r = VAR(VVAR4_PI) * side + VAR(circlize_hole);
|
||||||
|
fsincos(M_PI_4 * perimeter / side - M_PI_4, &sina, &cosa);
|
||||||
|
|
||||||
|
FPx += r * cosa;
|
||||||
|
FPy += r * sina;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
75
Plugin/coswrap.c
Normal file
75
Plugin/coswrap.c
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
"Cosine Wrap" plugin for Apophysis 2.x
|
||||||
|
Copyright (C) 2010 Georg Kiehne
|
||||||
|
|
||||||
|
Apophysis Fractal Flame Renderer
|
||||||
|
Copyright (C) 2001-2004 Mark Townsend
|
||||||
|
Copyright (C) 2005-2008 Peter Sdobnov, Piotr Borys, Ronald Hordijk
|
||||||
|
|
||||||
|
flame - cosmic recursive fractal flames
|
||||||
|
Copyright (C) 1992-2007 Scott Draves
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int coswrap_repeat;
|
||||||
|
double coswrap_amount_x, coswrap_amount_y;
|
||||||
|
double coswrap_phase_x, coswrap_phase_y;
|
||||||
|
double ax, ay, px, py, axn, ayn, fr, vv2;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("coswrap");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_INTEGER_NONZERO(coswrap_repeat, 1.0),
|
||||||
|
VAR_REAL(coswrap_amount_x, 0.0),
|
||||||
|
VAR_REAL(coswrap_amount_y, 0.0),
|
||||||
|
VAR_REAL_CYCLE(coswrap_phase_x, -1.0, 1.0, 0.0),
|
||||||
|
VAR_REAL_CYCLE(coswrap_phase_y, -1.0, 1.0, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// why isn't this in apoplugin.h??
|
||||||
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(ax) = M_2PI * fabs(VAR(coswrap_amount_x));
|
||||||
|
VAR(ay) = M_2PI * fabs(VAR(coswrap_amount_y));
|
||||||
|
VAR(px) = M_PI * VAR(coswrap_phase_x);
|
||||||
|
VAR(py) = M_PI * VAR(coswrap_phase_y);
|
||||||
|
VAR(fr) = fabs((double)VAR(coswrap_repeat));
|
||||||
|
VAR(vv2)= 2.0 * VVAR;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline double flerp(double a, double b, double p) { return (a+(b-a)*p); }
|
||||||
|
inline double fabsmod(double fintp) { double dummy; return modf(fintp, &dummy); }
|
||||||
|
inline double fosc(double p, double amp, double ph) { return 0.5-cos(p*amp+ph)*0.5; }
|
||||||
|
inline double foscn(double p, double ph) { return 0.5-cos(p+ph)*0.5; }
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double x = 0.5 * FTx + 0.5, y = 0.5 * FTy + 0.5;
|
||||||
|
double bx = fabsmod(VAR(fr) * x), by = fabsmod(VAR(fr) * y);
|
||||||
|
double oscnapx = foscn(VAR(coswrap_amount_x), VAR(px)),
|
||||||
|
oscnapy = foscn(VAR(coswrap_amount_y), VAR(py));
|
||||||
|
FPx = -1.0 + VAR(vv2) * flerp(flerp(x, fosc(x, 4.0, VAR(px)), oscnapx), fosc(bx, 4.0, VAR(px)), oscnapx);
|
||||||
|
FPy = -1.0 + VAR(vv2) * flerp(flerp(y, fosc(y, 4.0, VAR(py)), oscnapy), fosc(by, 4.0, VAR(py)), oscnapy);
|
||||||
|
return TRUE;
|
||||||
|
}
|
79
Plugin/cpow.c
Normal file
79
Plugin/cpow.c
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2007-2009 Joel Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double cpow_r;
|
||||||
|
double cpow_i;
|
||||||
|
int cpow_power;
|
||||||
|
|
||||||
|
double c;
|
||||||
|
double d;
|
||||||
|
double ang;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("cpow");
|
||||||
|
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(cpow_r, 1.0),
|
||||||
|
VAR_REAL(cpow_i, 0.0),
|
||||||
|
VAR_INTEGER_NONZERO(cpow_power, 1)
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(ang) = 2.0 * M_PI / ((double) VAR(cpow_power));
|
||||||
|
VAR(c) = VAR(cpow_r) / ((double) VAR(cpow_power));
|
||||||
|
VAR(d) = VAR(cpow_i) / ((double) VAR(cpow_power));
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
z' = z^(cpow_r + i * cpow_i)
|
||||||
|
|
||||||
|
Simplified using formula:
|
||||||
|
(a + i*b)^(c + i*d) = rho^c * e^(-d * theta) * [cos(c * theta + d * ln(rho) + i * sin(c * theta + d * ln(rho)],
|
||||||
|
where (rho, theta) is the polar coordinate equivalent of z=(x, y).
|
||||||
|
*/
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double sn, cs;
|
||||||
|
double a = atan2(FTy, FTx); // Angular polar dimension
|
||||||
|
double lnr = 0.5 * log(FTx*FTx + FTy*FTy); // Natural logarithm of the radial polar dimension.
|
||||||
|
|
||||||
|
double m = VVAR * exp(VAR(c) * lnr - VAR(d) * a);
|
||||||
|
|
||||||
|
fsincos(VAR(c) * a + VAR(d) * lnr + VAR(ang) * (rand() % VAR(cpow_power)), &sn, &cs);
|
||||||
|
|
||||||
|
FPx += m * cs;
|
||||||
|
FPy += m * sn;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
84
Plugin/cpow2.c
Normal file
84
Plugin/cpow2.c
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double cpow2_r, cpow2_a;
|
||||||
|
int cpow2_divisor;
|
||||||
|
int cpow2_spread;
|
||||||
|
|
||||||
|
double c, half_c;
|
||||||
|
double d, half_d;
|
||||||
|
double ang;
|
||||||
|
double inv_spread, full_spread;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("cpow2");
|
||||||
|
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(cpow2_r, 1.0),
|
||||||
|
VAR_REAL(cpow2_a, 0.0),
|
||||||
|
VAR_INTEGER_NONZERO(cpow2_divisor, 1),
|
||||||
|
VAR_INTEGER_RANGE(cpow2_spread, 1, 0x7fffffff, 1),
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(ang) = 2*M_PI / ((double) VAR(cpow2_divisor));
|
||||||
|
VAR(c) = VAR(cpow2_r) * cos(M_PI/2*VAR(cpow2_a)) / ((double) VAR(cpow2_divisor));
|
||||||
|
VAR(d) = VAR(cpow2_r) * sin(M_PI/2*VAR(cpow2_a)) / ((double) VAR(cpow2_divisor));
|
||||||
|
VAR(half_c) = VAR(c) / 2;
|
||||||
|
VAR(half_d) = VAR(d) / 2;
|
||||||
|
VAR(inv_spread) = 0.5 / VAR(cpow2_spread);
|
||||||
|
VAR(full_spread) = 2*M_PI*VAR(cpow2_spread);
|
||||||
|
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double sn, cs;
|
||||||
|
double a = atan2(FTy, FTx);
|
||||||
|
|
||||||
|
int n = rand() % VAR(cpow2_spread);
|
||||||
|
if (a < 0) n++;
|
||||||
|
a += 2*M_PI*n;
|
||||||
|
if (cos(a*VAR(inv_spread)) < rand()*2.0/RAND_MAX - 1.0)
|
||||||
|
a -= VAR(full_spread);
|
||||||
|
|
||||||
|
double lnr2 = log(FTx*FTx + FTy*FTy); // logarithm * 2
|
||||||
|
|
||||||
|
double r = VVAR * exp(VAR(half_c) * lnr2 - VAR(d) * a);
|
||||||
|
|
||||||
|
fsincos(VAR(c) * a + VAR(half_d) * lnr2 + VAR(ang) * rand(),
|
||||||
|
&sn, &cs);
|
||||||
|
|
||||||
|
FPx += r * cs;
|
||||||
|
FPy += r * sn;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
762
Plugin/crackle.c
Normal file
762
Plugin/crackle.c
Normal file
@ -0,0 +1,762 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// "Crackle" variation is a type of blur - it is not affected by incoming data, simply
|
||||||
|
// generates a texture.
|
||||||
|
|
||||||
|
// These set cache size for cell centres, they take a lot of processing, so it's handy to
|
||||||
|
// keep values between calls
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#define CACHE_NUM 10
|
||||||
|
#define CACHE_WIDTH 21
|
||||||
|
#define VORONOI_MAXPOINTS 25
|
||||||
|
|
||||||
|
// voronoi and noiseb are additional, not required in all Apophysis plugins
|
||||||
|
#define _x_ 0
|
||||||
|
#define _y_ 1
|
||||||
|
#define _z_ 2
|
||||||
|
|
||||||
|
double vratio( double P[2], double Q[2], double U[2] );
|
||||||
|
int closest( double P[VORONOI_MAXPOINTS][2], int n, double U[2] );
|
||||||
|
double voronoi( double P[VORONOI_MAXPOINTS][2], int n, int q, double U[2] );
|
||||||
|
double simplexNoise3D( double V[3] );
|
||||||
|
double perlinNoise3D( double V[3], double aScale, double fScale, int octaves );
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double crackle_cellsize;
|
||||||
|
double crackle_power;
|
||||||
|
double crackle_distort;
|
||||||
|
double crackle_scale;
|
||||||
|
double crackle_z;
|
||||||
|
// P is a working list of points
|
||||||
|
double P[VORONOI_MAXPOINTS][2];
|
||||||
|
// C is a cache of pre-calculated centres
|
||||||
|
double C[CACHE_WIDTH][CACHE_WIDTH][2];
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
static int p[2050] = {
|
||||||
|
127, 71, 882, 898, 798, 463, 517, 451, 454, 634, 578, 695, 728, 742, 325, 350, 684, 153, 340,
|
||||||
|
311, 992, 706, 218, 285, 96, 486, 160, 98, 686, 288, 193, 119, 410, 246, 536, 415, 953, 417,
|
||||||
|
784, 573, 734, 1, 136, 381, 177, 678, 773, 22, 301, 51, 874, 844, 775, 744, 633, 468, 1019,
|
||||||
|
287, 475, 78, 294, 724, 519, 17, 323, 191, 187, 446, 262, 212, 170, 33, 7, 227, 566, 526, 264,
|
||||||
|
556, 717, 477, 815, 671, 225, 207, 692, 663, 969, 393, 658, 877, 353, 788, 128, 303, 614, 501,
|
||||||
|
490, 387, 53, 941, 951, 736, 539, 102, 163, 175, 584, 988, 35, 347, 442, 649, 642, 198, 727,
|
||||||
|
939, 913, 811, 894, 858, 181, 412, 307, 830, 154, 479, 704, 326, 681, 619, 698, 621, 552, 598,
|
||||||
|
74, 890, 299, 922, 701, 481, 867, 214, 817, 731, 768, 673, 315, 338, 576, 222, 484, 305, 623,
|
||||||
|
239, 269, 46, 748, 608, 546, 537, 125, 667, 998, 714, 529, 823, 247, 289, 771, 808, 973, 735,
|
||||||
|
516, 974, 702, 636, 357, 455, 600, 80, 336, 696, 963, 297, 92, 980, 670, 958, 625, 712, 406,
|
||||||
|
173, 19, 763, 470, 793, 283, 655, 59, 421, 1016, 219, 13, 105, 840, 111, 38, 408, 945, 242,
|
||||||
|
559, 206, 443, 331, 737, 580, 767, 1020, 220, 31, 968, 15, 527, 833, 139, 129, 859, 739, 418,
|
||||||
|
783, 933, 49, 789, 178, 124, 772, 627, 0, 23, 388, 950, 976, 940, 485, 685, 21, 523, 723, 244,
|
||||||
|
637, 488, 835, 379, 342, 452, 862, 295, 765, 897, 507, 370, 567, 416, 100, 914, 300, 120, 392,
|
||||||
|
694, 94, 265, 791, 171, 200, 787, 441, 868, 672, 769, 983, 911, 427, 82, 69, 224, 176, 920,
|
||||||
|
500, 462, 263, 513, 797, 293, 322, 645, 469, 635, 40, 215, 687, 960, 818, 826, 34, 603, 316,
|
||||||
|
994, 611, 511, 93, 899, 114, 73, 241, 585, 327, 674, 280, 957, 471, 24, 502, 355, 159, 1017,
|
||||||
|
855, 270, 538, 521, 162, 880, 334, 986, 740, 719, 266, 820, 97, 41, 52, 750, 893, 838, 616, 83,
|
||||||
|
896, 777, 464, 562, 183, 362, 411, 478, 398, 384, 912, 599, 587, 609, 822, 243, 504, 753, 857,
|
||||||
|
157, 964, 65, 261, 81, 371, 435, 924, 885, 884, 863, 613, 721, 669, 121, 639, 989, 487, 238,
|
||||||
|
448, 216, 852, 643, 713, 676, 277, 879, 133, 123, 304, 547, 396, 70, 141, 909, 848, 900, 318,
|
||||||
|
146, 356, 802, 4, 807, 558, 764, 545, 588, 872, 554, 467, 544, 505, 149, 62, 901, 64, 45, 813,
|
||||||
|
27, 109, 718, 803, 853, 996, 1014, 476, 575, 28, 199, 688, 6, 482, 703, 560, 395, 66, 341, 794,
|
||||||
|
422, 376, 601, 76, 14, 569, 480, 39, 1011, 1001, 854, 55, 89, 335, 761, 363, 419, 252, 799,
|
||||||
|
358, 324, 1012, 152, 312, 496, 235, 916, 582, 615, 979, 1005, 891, 1013, 641, 18, 148, 185,
|
||||||
|
512, 378, 58, 211, 495, 594, 87, 762, 366, 660, 449, 520, 424, 886, 819, 281, 147, 290, 390,
|
||||||
|
32, 572, 993, 720, 683, 309, 254, 607, 568, 256, 533, 394, 620, 429, 67, 831, 103, 423, 668,
|
||||||
|
693, 518, 551, 697, 253, 949, 54, 875, 116, 434, 743, 644, 590, 279, 843, 589, 11, 647, 586,
|
||||||
|
806, 549, 375, 226, 851, 499, 450, 978, 29, 982, 189, 107, 508, 373, 796, 20, 700, 110, 26,
|
||||||
|
461, 782, 591, 828, 57, 904, 847, 328, 122, 630, 711, 44, 397, 404, 209, 365, 84, 194, 1021,
|
||||||
|
675, 135, 965, 329, 557, 691, 79, 352, 498, 629, 869, 90, 921, 233, 622, 871, 755, 439, 955,
|
||||||
|
228, 63, 825, 43, 943, 438, 144, 961, 359, 330, 682, 626, 425, 259, 249, 801, 754, 1003, 230,
|
||||||
|
377, 217, 878, 1007, 313, 2, 915, 550, 271, 437, 846, 548, 145, 715, 346, 251, 372, 99, 543,
|
||||||
|
16, 47, 195, 679, 174, 905, 188, 804, 169, 785, 231, 726, 814, 339, 531, 420, 258, 1009, 134,
|
||||||
|
972, 458, 234, 690, 260, 666, 646, 142, 184, 91, 628, 987, 10, 210, 926, 348, 386, 161, 60,
|
||||||
|
409, 680, 204, 164, 444, 708, 276, 68, 383, 491, 382, 42, 816, 483, 699, 150, 9, 565, 555, 433,
|
||||||
|
593, 86, 952, 839, 618, 751, 889, 108, 361, 595, 677, 407, 856, 255, 604, 85, 648, 928, 824,
|
||||||
|
213, 192, 267, 902, 792, 656, 631, 403, 389, 493, 333, 756, 602, 925, 113, 632, 354, 37, 873,
|
||||||
|
577, 56, 278, 930, 367, 428, 332, 317, 530, 364, 800, 774, 497, 1023, 12, 137, 845, 653, 101,
|
||||||
|
888, 542, 167, 48, 158, 1002, 745, 292, 944, 456, 990, 574, 25, 1018, 937, 298, 966, 430, 400,
|
||||||
|
349, 860, 689, 320, 117, 778, 104, 314, 786, 205, 606, 440, 936, 457, 932, 934, 948, 168, 445,
|
||||||
|
931, 757, 291, 571, 919, 360, 284, 509, 296, 245, 836, 166, 3, 257, 50, 282, 151, 810, 344,
|
||||||
|
947, 236, 946, 865, 752, 77, 610, 967, 795, 131, 302, 760, 781, 190, 938, 61, 1022, 652, 138,
|
||||||
|
984, 832, 202, 140, 985, 5, 657, 997, 401, 319, 431, 662, 405, 275, 650, 651, 887, 310, 1004,
|
||||||
|
368, 208, 596, 248, 758, 8, 126, 730, 489, 343, 337, 506, 515, 432, 232, 250, 532, 954, 524,
|
||||||
|
115, 229, 522, 908, 729, 186, 561, 995, 156, 196, 118, 805, 399, 918, 991, 849, 273, 747, 640,
|
||||||
|
143, 321, 624, 268, 306, 30, 722, 540, 534, 710, 130, 155, 883, 716, 525, 426, 812, 345, 929,
|
||||||
|
975, 472, 837, 605, 664, 391, 581, 272, 746, 112, 659, 665, 780, 240, 841, 474, 563, 36, 579,
|
||||||
|
286, 436, 907, 369, 201, 402, 962, 106, 749, 172, 494, 88, 466, 473, 414, 597, 374, 942, 308,
|
||||||
|
766, 459, 821, 592, 881, 380, 759, 866, 779, 809, 876, 541, 829, 528, 999, 221, 661, 927, 413,
|
||||||
|
977, 182, 583, 733, 892, 741, 570, 351, 617, 956, 72, 709, 850, 732, 770, 870, 95, 935, 223,
|
||||||
|
179, 861, 917, 447, 385, 132, 827, 923, 75, 465, 612, 460, 725, 492, 553, 1008, 910, 981, 503,
|
||||||
|
165, 895, 834, 1000, 180, 638, 906, 510, 274, 776, 971, 564, 738, 903, 654, 864, 959, 1015,
|
||||||
|
453, 535, 237, 197, 1006, 790, 514, 842, 970, 705, 707, 1010, 203,
|
||||||
|
|
||||||
|
// 1k Block repeats here
|
||||||
|
|
||||||
|
127, 71, 882, 898, 798, 463, 517, 451, 454, 634, 578, 695, 728, 742, 325, 350, 684, 153, 340,
|
||||||
|
311, 992, 706, 218, 285, 96, 486, 160, 98, 686, 288, 193, 119, 410, 246, 536, 415, 953, 417,
|
||||||
|
784, 573, 734, 1, 136, 381, 177, 678, 773, 22, 301, 51, 874, 844, 775, 744, 633, 468, 1019,
|
||||||
|
287, 475, 78, 294, 724, 519, 17, 323, 191, 187, 446, 262, 212, 170, 33, 7, 227, 566, 526, 264,
|
||||||
|
556, 717, 477, 815, 671, 225, 207, 692, 663, 969, 393, 658, 877, 353, 788, 128, 303, 614, 501,
|
||||||
|
490, 387, 53, 941, 951, 736, 539, 102, 163, 175, 584, 988, 35, 347, 442, 649, 642, 198, 727,
|
||||||
|
939, 913, 811, 894, 858, 181, 412, 307, 830, 154, 479, 704, 326, 681, 619, 698, 621, 552, 598,
|
||||||
|
74, 890, 299, 922, 701, 481, 867, 214, 817, 731, 768, 673, 315, 338, 576, 222, 484, 305, 623,
|
||||||
|
239, 269, 46, 748, 608, 546, 537, 125, 667, 998, 714, 529, 823, 247, 289, 771, 808, 973, 735,
|
||||||
|
516, 974, 702, 636, 357, 455, 600, 80, 336, 696, 963, 297, 92, 980, 670, 958, 625, 712, 406,
|
||||||
|
173, 19, 763, 470, 793, 283, 655, 59, 421, 1016, 219, 13, 105, 840, 111, 38, 408, 945, 242,
|
||||||
|
559, 206, 443, 331, 737, 580, 767, 1020, 220, 31, 968, 15, 527, 833, 139, 129, 859, 739, 418,
|
||||||
|
783, 933, 49, 789, 178, 124, 772, 627, 0, 23, 388, 950, 976, 940, 485, 685, 21, 523, 723, 244,
|
||||||
|
637, 488, 835, 379, 342, 452, 862, 295, 765, 897, 507, 370, 567, 416, 100, 914, 300, 120, 392,
|
||||||
|
694, 94, 265, 791, 171, 200, 787, 441, 868, 672, 769, 983, 911, 427, 82, 69, 224, 176, 920,
|
||||||
|
500, 462, 263, 513, 797, 293, 322, 645, 469, 635, 40, 215, 687, 960, 818, 826, 34, 603, 316,
|
||||||
|
994, 611, 511, 93, 899, 114, 73, 241, 585, 327, 674, 280, 957, 471, 24, 502, 355, 159, 1017,
|
||||||
|
855, 270, 538, 521, 162, 880, 334, 986, 740, 719, 266, 820, 97, 41, 52, 750, 893, 838, 616, 83,
|
||||||
|
896, 777, 464, 562, 183, 362, 411, 478, 398, 384, 912, 599, 587, 609, 822, 243, 504, 753, 857,
|
||||||
|
157, 964, 65, 261, 81, 371, 435, 924, 885, 884, 863, 613, 721, 669, 121, 639, 989, 487, 238,
|
||||||
|
448, 216, 852, 643, 713, 676, 277, 879, 133, 123, 304, 547, 396, 70, 141, 909, 848, 900, 318,
|
||||||
|
146, 356, 802, 4, 807, 558, 764, 545, 588, 872, 554, 467, 544, 505, 149, 62, 901, 64, 45, 813,
|
||||||
|
27, 109, 718, 803, 853, 996, 1014, 476, 575, 28, 199, 688, 6, 482, 703, 560, 395, 66, 341, 794,
|
||||||
|
422, 376, 601, 76, 14, 569, 480, 39, 1011, 1001, 854, 55, 89, 335, 761, 363, 419, 252, 799,
|
||||||
|
358, 324, 1012, 152, 312, 496, 235, 916, 582, 615, 979, 1005, 891, 1013, 641, 18, 148, 185,
|
||||||
|
512, 378, 58, 211, 495, 594, 87, 762, 366, 660, 449, 520, 424, 886, 819, 281, 147, 290, 390,
|
||||||
|
32, 572, 993, 720, 683, 309, 254, 607, 568, 256, 533, 394, 620, 429, 67, 831, 103, 423, 668,
|
||||||
|
693, 518, 551, 697, 253, 949, 54, 875, 116, 434, 743, 644, 590, 279, 843, 589, 11, 647, 586,
|
||||||
|
806, 549, 375, 226, 851, 499, 450, 978, 29, 982, 189, 107, 508, 373, 796, 20, 700, 110, 26,
|
||||||
|
461, 782, 591, 828, 57, 904, 847, 328, 122, 630, 711, 44, 397, 404, 209, 365, 84, 194, 1021,
|
||||||
|
675, 135, 965, 329, 557, 691, 79, 352, 498, 629, 869, 90, 921, 233, 622, 871, 755, 439, 955,
|
||||||
|
228, 63, 825, 43, 943, 438, 144, 961, 359, 330, 682, 626, 425, 259, 249, 801, 754, 1003, 230,
|
||||||
|
377, 217, 878, 1007, 313, 2, 915, 550, 271, 437, 846, 548, 145, 715, 346, 251, 372, 99, 543,
|
||||||
|
16, 47, 195, 679, 174, 905, 188, 804, 169, 785, 231, 726, 814, 339, 531, 420, 258, 1009, 134,
|
||||||
|
972, 458, 234, 690, 260, 666, 646, 142, 184, 91, 628, 987, 10, 210, 926, 348, 386, 161, 60,
|
||||||
|
409, 680, 204, 164, 444, 708, 276, 68, 383, 491, 382, 42, 816, 483, 699, 150, 9, 565, 555, 433,
|
||||||
|
593, 86, 952, 839, 618, 751, 889, 108, 361, 595, 677, 407, 856, 255, 604, 85, 648, 928, 824,
|
||||||
|
213, 192, 267, 902, 792, 656, 631, 403, 389, 493, 333, 756, 602, 925, 113, 632, 354, 37, 873,
|
||||||
|
577, 56, 278, 930, 367, 428, 332, 317, 530, 364, 800, 774, 497, 1023, 12, 137, 845, 653, 101,
|
||||||
|
888, 542, 167, 48, 158, 1002, 745, 292, 944, 456, 990, 574, 25, 1018, 937, 298, 966, 430, 400,
|
||||||
|
349, 860, 689, 320, 117, 778, 104, 314, 786, 205, 606, 440, 936, 457, 932, 934, 948, 168, 445,
|
||||||
|
931, 757, 291, 571, 919, 360, 284, 509, 296, 245, 836, 166, 3, 257, 50, 282, 151, 810, 344,
|
||||||
|
947, 236, 946, 865, 752, 77, 610, 967, 795, 131, 302, 760, 781, 190, 938, 61, 1022, 652, 138,
|
||||||
|
984, 832, 202, 140, 985, 5, 657, 997, 401, 319, 431, 662, 405, 275, 650, 651, 887, 310, 1004,
|
||||||
|
368, 208, 596, 248, 758, 8, 126, 730, 489, 343, 337, 506, 515, 432, 232, 250, 532, 954, 524,
|
||||||
|
115, 229, 522, 908, 729, 186, 561, 995, 156, 196, 118, 805, 399, 918, 991, 849, 273, 747, 640,
|
||||||
|
143, 321, 624, 268, 306, 30, 722, 540, 534, 710, 130, 155, 883, 716, 525, 426, 812, 345, 929,
|
||||||
|
975, 472, 837, 605, 664, 391, 581, 272, 746, 112, 659, 665, 780, 240, 841, 474, 563, 36, 579,
|
||||||
|
286, 436, 907, 369, 201, 402, 962, 106, 749, 172, 494, 88, 466, 473, 414, 597, 374, 942, 308,
|
||||||
|
766, 459, 821, 592, 881, 380, 759, 866, 779, 809, 876, 541, 829, 528, 999, 221, 661, 927, 413,
|
||||||
|
977, 182, 583, 733, 892, 741, 570, 351, 617, 956, 72, 709, 850, 732, 770, 870, 95, 935, 223,
|
||||||
|
179, 861, 917, 447, 385, 132, 827, 923, 75, 465, 612, 460, 725, 492, 553, 1008, 910, 981, 503,
|
||||||
|
165, 895, 834, 1000, 180, 638, 906, 510, 274, 776, 971, 564, 738, 903, 654, 864, 959, 1015,
|
||||||
|
453, 535, 237, 197, 1006, 790, 514, 842, 970, 705, 707, 1010, 203,
|
||||||
|
|
||||||
|
// 2k block overlaps by two items here . . . (to allow for over-runs caused by taking
|
||||||
|
// "next item in sequence")
|
||||||
|
|
||||||
|
127, 71
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// grad[][] contains gradient values that will be associated with grid points for
|
||||||
|
// the simplex code to interpolate. They are chosen using the hash codes
|
||||||
|
// from p[], above
|
||||||
|
|
||||||
|
static double grad3[1024][3] = {
|
||||||
|
{0.79148875, 0.11986299, -0.59931496}, {0.51387411, -0.61170974, 0.60145208}, {-0.95395128, -0.21599571, 0.20814132}, {0.59830026, 0.67281067, 0.43515813},
|
||||||
|
{-0.93971346, 0.16019818, -0.30211777}, {-0.74549699, -0.35758846, 0.56246309}, {-0.78850321, -0.29060783, 0.54204223}, {0.61332339, 0.38915256, 0.68730976},
|
||||||
|
{-0.64370632, -0.40843865, 0.64716307}, {-0.23922684, 0.70399949, -0.66869667}, {-0.82882802, -0.00130741, 0.55950192}, {0.07987672, 0.62439350, -0.77701510},
|
||||||
|
{-0.46863456, -0.57517073, 0.67049257}, {0.30792870, 0.42464616, -0.85138449}, {-0.06972001, 0.30439513, 0.94999091}, {0.58798450, -0.00151777, 0.80887077},
|
||||||
|
{-0.32757867, 0.51578941, 0.79161449}, {-0.44745031, 0.86883688, 0.21192142}, {-0.38042636, 0.71222019, 0.58993066}, {-0.32616370, 0.61421101, -0.71858339},
|
||||||
|
{0.45483340, 0.19928843, -0.86799234}, {-0.81020233, -0.05930352, 0.58314259}, {0.81994145, 0.39825895, 0.41120046}, {0.49257662, 0.74240487, 0.45409612},
|
||||||
|
{0.95124863, -0.26667257, -0.15495734}, {-0.95745656, 0.09203090, -0.27350914}, {0.20842499, -0.82482150, -0.52557446}, {0.46829293, -0.47740985, -0.74349282},
|
||||||
|
{-0.65000311, -0.74754355, 0.13665502}, {0.83566743, 0.53294928, -0.13275921}, {0.90454761, -0.35449497, -0.23691126}, {-0.64270969, 0.21532175, 0.73522839},
|
||||||
|
{-0.39693478, -0.17553935, -0.90090439}, {0.45073049, 0.65155528, 0.61017845}, {0.69618384, -0.07989842, 0.71340333}, {0.09059934, 0.85274641, -0.51440773},
|
||||||
|
{-0.00560267, 0.69197466, 0.72190005}, {0.23586856, -0.95830502, 0.16129945}, {0.20354340, -0.96925430, -0.13826128}, {-0.45516395, 0.63885905, 0.62022970},
|
||||||
|
{0.80792021, 0.47917579, 0.34300946}, {0.40886670, -0.32579857, -0.85245722}, {-0.83819701, -0.30910810, 0.44930831}, {-0.57602641, -0.75801200, 0.30595978},
|
||||||
|
{-0.16591524, -0.96579983, -0.19925569}, {0.27174061, 0.93638167, -0.22214053}, {-0.45758922, 0.73185326, -0.50497812}, {-0.18029934, -0.78067110, -0.59836843},
|
||||||
|
{0.14087163, -0.39189764, -0.90915974}, {-0.03534787, -0.02750024, 0.99899663}, {0.91016878, 0.06772570, 0.40866370}, {0.70142578, 0.70903193, 0.07263332},
|
||||||
|
{-0.49486157, -0.54111502, -0.67993129}, {-0.26972486, -0.84418773, -0.46324462}, {0.91931005, 0.03121901, 0.39229378}, {-0.15332070, -0.87495538, 0.45928842},
|
||||||
|
{-0.59010107, -0.66883868, 0.45214549}, {0.51964273, -0.78565398, -0.33573688}, {-0.25845001, 0.87348329, -0.41259003}, {-0.64741807, -0.59846669, 0.47189773},
|
||||||
|
{-0.79348688, -0.32782128, -0.51274923}, {-0.86280237, -0.14342378, -0.48476972}, {0.19469709, -0.76349966, 0.61576076}, {0.39371236, -0.70742193, -0.58697938},
|
||||||
|
{0.62103834, -0.50000004, -0.60358209}, {-0.19652824, -0.51508695, 0.83430335}, {-0.96016549, -0.26826630, -0.07820118}, {0.52655683, 0.84118729, 0.12305219},
|
||||||
|
{0.56222101, 0.70557745, -0.43135599}, {0.06395307, 0.99025162, -0.12374061}, {-0.65379289, 0.52521996, 0.54470070}, {0.81206590, -0.38643765, 0.43728128},
|
||||||
|
{-0.69449067, -0.71926243, -0.01855435}, {0.33968533, 0.75504287, 0.56082452}, {-0.52402654, -0.70537870, -0.47732282}, {-0.65379327, -0.46369816, 0.59794512},
|
||||||
|
{-0.08582021, -0.01217948, 0.99623619}, {-0.66287577, 0.49604924, 0.56083051}, {0.70911302, 0.68748287, -0.15660789}, {-0.58662137, -0.46475685, 0.66323181},
|
||||||
|
{-0.76681755, 0.63310950, -0.10565607}, {0.68601816, -0.59353001, 0.42083395}, {0.64792478, -0.72668696, 0.22829704}, {0.68756542, -0.69062543, 0.22425499},
|
||||||
|
{-0.46901797, -0.72307343, -0.50713604}, {-0.71418521, -0.11738817, 0.69004312}, {0.50880449, -0.80611081, 0.30216445}, {0.27793962, -0.58372922, -0.76289565},
|
||||||
|
{-0.39417207, 0.91575060, -0.07764800}, {-0.84724113, -0.47860304, 0.23048124}, {0.67628991, 0.54362408, -0.49709638}, {0.65073821, -0.09420630, 0.75343544},
|
||||||
|
{0.66910202, 0.73566783, -0.10533437}, {0.72191995, -0.00305613, 0.69196983}, {-0.00313125, 0.06634333, 0.99779194}, {-0.06908811, 0.28990653, -0.95455803},
|
||||||
|
{0.17507626, 0.73870621, 0.65089280}, {-0.57470594, 0.75735703, 0.31003777}, {-0.91870733, 0.08883536, 0.38481830}, {-0.27399536, 0.39846316, 0.87530203},
|
||||||
|
{0.99772699, -0.05473919, 0.03929993}, {0.22663907, 0.97393801, -0.00891541}, {0.62338001, 0.59656797, -0.50547405}, {0.59177247, 0.49473684, -0.63642816},
|
||||||
|
{-0.24457664, -0.31345545, 0.91756632}, {-0.44691491, -0.89198404, -0.06805539}, {-0.83115967, -0.44685014, 0.33090566}, {-0.39940345, 0.67719937, -0.61796270},
|
||||||
|
{0.55460272, -0.63265953, -0.54051619}, {0.82284412, 0.14794174, -0.54867185}, {-0.39887172, -0.82890906, -0.39218761}, {0.28591109, 0.71270085, 0.64055628},
|
||||||
|
{-0.15438831, 0.66966606, 0.72643762}, {-0.75134796, 0.54289699, 0.37515211}, {0.32016243, 0.77691605, -0.54212311}, {0.50884942, 0.15171482, -0.84738119},
|
||||||
|
{0.08945627, 0.73684807, 0.67011379}, {-0.68792851, -0.71885270, -0.10002580}, {0.02292266, -0.07249674, 0.99710520}, {0.94083723, -0.10191422, 0.32316993},
|
||||||
|
{-0.81053204, 0.43703808, 0.38991733}, {-0.19558496, -0.07485841, 0.97782552}, {0.68911052, -0.49915226, -0.52533200}, {0.19796974, 0.93342057, 0.29922235},
|
||||||
|
{-0.79540501, -0.26473293, 0.54520395}, {-0.27945416, -0.91288360, 0.29757168}, {0.82074194, 0.43648314, 0.36859889}, {-0.20594999, -0.70696486, -0.67659832},
|
||||||
|
{-0.05687654, -0.70968577, 0.70221874}, {-0.26280466, 0.69993747, -0.66409430}, {-0.54551347, -0.78469719, 0.29438983}, {0.90609571, 0.39319111, 0.15617717},
|
||||||
|
{0.69129692, 0.67317351, 0.26257571}, {0.98391565, -0.05206160, 0.17087883}, {0.63806303, 0.67740288, -0.36606134}, {-0.50096077, 0.83542684, -0.22605378},
|
||||||
|
{0.65237128, 0.35509583, 0.66956603}, {-0.85711882, -0.19885856, 0.47518691}, {0.79383271, -0.12451513, 0.59525256}, {-0.63301076, 0.07907192, 0.77009416},
|
||||||
|
{0.57925311, -0.49077742, 0.65084818}, {0.14070842, 0.97298117, 0.18305403}, {-0.59601232, 0.69646383, -0.39963413}, {-0.68205637, -0.47455943, 0.55641033},
|
||||||
|
{0.47997775, -0.84805982, -0.22453484}, {0.83562547, -0.48273957, 0.26209270}, {0.59180830, 0.36411758, 0.71915320}, {0.66057023, -0.66033264, 0.35722231},
|
||||||
|
{0.53319130, 0.75511965, 0.38144639}, {-0.21631797, -0.12712992, 0.96801060}, {-0.23971441, 0.89928294, -0.36582400}, {-0.72825564, 0.27377922, -0.62824252},
|
||||||
|
{0.02135570, 0.73882696, 0.67355672}, {0.48112026, 0.78759215, 0.38499597}, {-0.58250985, -0.09956878, 0.80670213}, {0.21323385, 0.36856735, 0.90481459},
|
||||||
|
{-0.36459960, -0.93062781, -0.03160697}, {-0.68684541, 0.17314748, -0.70587771}, {0.68032531, -0.07909205, -0.72863017}, {0.25007484, -0.61882132, 0.74466284},
|
||||||
|
{0.77055613, 0.59380162, 0.23160935}, {0.67996118, -0.03835970, 0.73224403}, {0.43079959, 0.38901749, -0.81429547}, {0.76815116, -0.63831184, 0.05001794},
|
||||||
|
{-0.13601015, 0.75596033, -0.64033211}, {0.36884321, -0.45188838, -0.81225093}, {0.79562623, -0.43647179, 0.42008485}, {-0.65875496, 0.39126701, -0.64261344},
|
||||||
|
{-0.68899899, 0.44217527, 0.57424858}, {0.25292617, 0.96620732, -0.04971687}, {-0.68558843, -0.70460233, 0.18304118}, {0.86382379, 0.29507865, 0.40833448},
|
||||||
|
{0.13627838, 0.31500179, 0.93925613}, {0.67187940, 0.64336667, 0.36695693}, {0.37977583, 0.31123423, 0.87115072}, {-0.03326050, -0.99451574, -0.09915731},
|
||||||
|
{-0.66427749, -0.01424397, -0.74735033}, {0.68859558, 0.44744486, -0.57063931}, {-0.56738045, 0.30154774, -0.76625608}, {-0.58488004, 0.63357146, 0.50646080},
|
||||||
|
{0.38842469, 0.92016339, 0.04925032}, {0.15316057, -0.97495961, -0.16123153}, {0.57623375, 0.51659393, 0.63331301}, {0.32392581, -0.79816566, -0.50794059},
|
||||||
|
{0.73136440, -0.54179646, 0.41420129}, {-0.58929886, -0.58690534, -0.55521975}, {0.64030162, 0.32487137, -0.69604054}, {0.80502987, -0.00635101, 0.59320028},
|
||||||
|
{0.46595373, 0.62005710, -0.63120227}, {0.83612498, 0.53677947, 0.11297261}, {-0.60753284, -0.29028728, -0.73934913}, {-0.45583848, 0.84488003, 0.27998037},
|
||||||
|
{-0.27320563, -0.39709327, 0.87617100}, {0.84893256, -0.09000823, 0.52078021}, {-0.35708766, -0.73203774, 0.58018027}, {0.10507148, -0.71032871, 0.69598355},
|
||||||
|
{0.68468508, 0.26788814, -0.67782172}, {-0.94602428, -0.13594737, -0.29420466}, {0.27104088, 0.95431757, 0.12575696}, {-0.55840113, 0.14909310, 0.81606337},
|
||||||
|
{0.47553129, 0.80729730, 0.34948685}, {-0.01891509, -0.97526220, 0.22024047}, {-0.65760518, -0.45924250, -0.59720327}, {-0.70549425, 0.70862555, 0.01129989},
|
||||||
|
{-0.88864223, 0.43707946, -0.13883994}, {0.49252849, -0.43814774, 0.75195894}, {-0.01398277, 0.69598571, 0.71791947}, {-0.67265622, 0.27228276, -0.68803758},
|
||||||
|
{-0.91724038, -0.01083918, -0.39818663}, {-0.24468025, 0.75690032, 0.60599792}, {-0.49070434, -0.48530058, 0.72366608}, {0.67110346, -0.55453760, -0.49204492},
|
||||||
|
{-0.95532877, -0.26328211, -0.13427388}, {-0.66012945, 0.41730904, 0.62456567}, {0.96822786, -0.03273592, 0.24791766}, {0.91952853, 0.23575545, -0.31446248},
|
||||||
|
{0.63712542, 0.06762652, 0.76778763}, {-0.21680947, 0.65843559, 0.72073312}, {0.06143588, 0.47272235, -0.87906724}, {0.70541616, -0.21884659, 0.67416186},
|
||||||
|
{-0.04396589, -0.67487644, -0.73661984}, {-0.65032618, 0.75012744, 0.11993615}, {-0.78840054, 0.58187068, -0.19962741}, {0.99318416, 0.11467779, 0.02083796},
|
||||||
|
{0.76775820, 0.46845611, -0.43714554}, {-0.70891635, -0.54302381, -0.45006972}, {0.55548849, -0.71825576, -0.41897638}, {-0.62167600, 0.77500231, 0.11353575},
|
||||||
|
{0.38413022, -0.79687865, 0.46629218}, {-0.56271512, 0.54186596, -0.62428597}, {0.62019121, -0.70563211, -0.34270424}, {0.85913131, 0.50529005, 0.08108862},
|
||||||
|
{0.54973106, -0.66129569, -0.51037612}, {-0.74254469, -0.49670185, -0.44934914}, {-0.75780366, 0.59195518, -0.27444976}, {-0.40050287, 0.04302113, -0.91528500},
|
||||||
|
{-0.60859484, 0.35063171, 0.71180736}, {-0.57297537, 0.81938865, -0.01736289}, {0.98721933, 0.09373543, -0.12888621}, {0.30397213, 0.87942861, 0.36634172},
|
||||||
|
{0.32615126, -0.64515144, -0.69094498}, {0.83015604, 0.30783918, 0.46483974}, {0.42822875, -0.04288671, -0.90265213}, {0.16585965, 0.53714643, 0.82702133},
|
||||||
|
{-0.37193298, 0.88497229, 0.28016051}, {0.73544877, 0.67744273, 0.01365471}, {-0.66150496, 0.09327263, -0.74411787}, {0.41664753, -0.23786298, -0.87739731},
|
||||||
|
{-0.78513086, -0.42653313, 0.44904233}, {0.08029855, 0.84803303, 0.52382451}, {-0.09507221, 0.50524394, -0.85772364}, {0.66939507, -0.17805679, 0.72125309},
|
||||||
|
{-0.76923153, 0.41652205, -0.48455364}, {0.51989556, 0.79632686, 0.30914743}, {0.85617969, -0.51024476, 0.08128121}, {0.71830013, 0.03208003, 0.69499337},
|
||||||
|
{-0.96000528, -0.11640072, -0.25463844}, {0.66084196, -0.19355993, 0.72513617}, {-0.57661819, -0.54757438, 0.60636109}, {0.65123443, -0.64818909, -0.39464494},
|
||||||
|
{0.36952748, -0.22540306, -0.90146708}, {0.34048182, -0.33515083, 0.87849078}, {0.11132435, -0.75280467, 0.64876191}, {0.67563520, 0.64934616, -0.34909404},
|
||||||
|
{0.23316576, 0.69276343, -0.68243135}, {0.30368064, -0.87532007, 0.37628825}, {-0.27080673, -0.74246398, 0.61270789}, {-0.21655683, -0.49565083, -0.84109060},
|
||||||
|
{-0.98776592, -0.14473189, 0.05806181}, {0.64562720, 0.38598860, 0.65892209}, {-0.63746045, -0.57205546, 0.51613635}, {0.06117405, -0.78423981, -0.61743474},
|
||||||
|
{0.74829362, 0.59119862, 0.30090006}, {-0.42571462, 0.51302568, -0.74536683}, {-0.56331794, 0.48608227, -0.66812943}, {-0.75919788, -0.64885422, 0.05105673},
|
||||||
|
{0.14385006, -0.53933953, 0.82971081}, {-0.77031548, -0.28344830, 0.57120148}, {-0.98358057, 0.17900745, 0.02292584}, {-0.25051205, 0.10358351, 0.96255606},
|
||||||
|
{-0.32867861, -0.83176115, -0.44737430}, {-0.36281449, -0.92995082, -0.05964161}, {-0.53796595, -0.03614791, 0.84219117}, {0.92960703, 0.10461247, 0.35339354},
|
||||||
|
{0.64021850, 0.61360003, 0.46218532}, {0.22343529, 0.69409296, 0.68433299}, {0.01781074, 0.89088149, 0.45388648}, {-0.63004672, -0.26934609, 0.72835007},
|
||||||
|
{0.48560056, -0.35192051, -0.80021500}, {0.62050161, 0.57366872, 0.53467931}, {0.00265452, 0.71539198, -0.69871830}, {0.64229521, 0.41380752, 0.64515130},
|
||||||
|
{0.23080049, -0.43573115, 0.86998247}, {0.14620517, 0.61171896, -0.77744708}, {-0.27436021, -0.61900378, 0.73590814}, {0.69959023, 0.71050058, 0.07591065},
|
||||||
|
{0.70362024, 0.62044755, -0.34635731}, {-0.29622242, -0.71700405, -0.63099721}, {0.31094340, -0.84299864, -0.43893905}, {0.07704196, -0.46344069, -0.88277248},
|
||||||
|
{-0.94533514, -0.04418570, 0.32309301}, {0.65845027, -0.36172634, -0.65999795}, {0.76069300, -0.18013255, 0.62361721}, {0.18607691, -0.45751624, -0.86951382},
|
||||||
|
{-0.67626808, -0.39178398, -0.62383235}, {-0.58782719, 0.55645189, -0.58721418}, {0.37531624, 0.80640206, 0.45700485}, {0.32610790, -0.50457786, 0.79940905},
|
||||||
|
{0.62915643, 0.76094546, -0.15850616}, {0.62803678, -0.75273385, -0.19738681}, {0.42539119, -0.89094420, 0.15893638}, {0.17668676, -0.40626331, 0.89651096},
|
||||||
|
{0.02778178, -0.78957083, -0.61303024}, {-0.25950053, -0.16244258, 0.95198313}, {-0.44117714, 0.73727502, -0.51165249}, {-0.30827444, 0.94136275, 0.13712420},
|
||||||
|
{0.97572111, -0.04258044, -0.21483768}, {0.55607688, 0.60474525, -0.57014181}, {-0.67430479, 0.12532345, 0.72774109}, {-0.31325824, -0.81393777, -0.48925921},
|
||||||
|
{-0.34811982, -0.70956566, 0.61264114}, {0.22583632, 0.72502572, -0.65064250}, {0.76936493, 0.63742123, -0.04209247}, {-0.55303394, -0.38417341, -0.73929984},
|
||||||
|
{-0.20953448, -0.92686077, -0.31148742}, {-0.18786352, 0.39920999, 0.89740664}, {0.46307517, -0.88470611, 0.05344618}, {-0.70328479, 0.30353783, 0.64284935},
|
||||||
|
{0.85916171, 0.15710234, 0.48699077}, {-0.26398391, 0.42122173, 0.86768932}, {0.82468427, 0.55134621, 0.12614757}, {0.05993298, 0.63414584, 0.77088721},
|
||||||
|
{-0.57291678, 0.81909656, -0.02910645}, {0.64075141, 0.74416542, -0.18882655}, {0.67112660, -0.55747979, -0.48867716}, {0.89932863, 0.23426637, -0.36922525},
|
||||||
|
{0.59146340, -0.44386974, 0.67316469}, {0.46684506, 0.19781570, -0.86193076}, {0.18536399, 0.76259887, 0.61974443}, {0.84144446, -0.53500771, -0.07574940},
|
||||||
|
{0.31212800, 0.82898453, -0.46406977}, {-0.88440729, -0.27020677, -0.38054178}, {0.20051055, 0.77523319, 0.59900670}, {0.48749115, 0.44082691, -0.75367368},
|
||||||
|
{0.24971103, -0.88242146, 0.39871892}, {-0.29777449, -0.95158243, -0.07629705}, {-0.37776905, -0.58777023, 0.71541366}, {0.22179317, 0.14730715, -0.96390269},
|
||||||
|
{0.58348153, 0.68630504, 0.43420582}, {-0.96759942, 0.14572096, 0.20619593}, {-0.15181654, 0.47495708, 0.86681458}, {0.26580537, 0.74350537, -0.61363447},
|
||||||
|
{-0.39189499, 0.72950601, 0.56057051}, {-0.01888074, 0.73557245, -0.67718290}, {0.73486517, 0.20569655, -0.64626783}, {-0.26354754, -0.23595215, -0.93534447},
|
||||||
|
{-0.62584298, -0.65116585, 0.42930594}, {-0.66666701, 0.61406968, 0.42246127}, {0.71799877, 0.67101619, 0.18497305}, {0.80098282, -0.45681211, -0.38697444},
|
||||||
|
{0.13205975, 0.91574792, -0.37942847}, {0.68891728, 0.72389791, -0.03694308}, {0.50346408, 0.46323331, -0.72934136}, {0.84557323, 0.53378861, -0.00869685},
|
||||||
|
{0.08666773, -0.81879883, 0.56750082}, {-0.50044423, 0.65858460, -0.56198033}, {0.35669785, 0.32248792, -0.87679427}, {-0.97346629, -0.22237373, -0.05397509},
|
||||||
|
{-0.53358835, -0.29312069, -0.79332448}, {0.12615748, 0.47083230, 0.87315591}, {-0.97022570, 0.19065350, 0.14937651}, {-0.57777643, 0.36008023, 0.73247295},
|
||||||
|
{0.60132454, 0.72398065, 0.33802488}, {0.19047827, -0.94729649, -0.25757988}, {-0.45904437, 0.69100108, 0.55838676}, {0.39148612, -0.51878308, 0.76000180},
|
||||||
|
{0.04137949, -0.75662546, -0.65253786}, {0.20020542, -0.76439245, -0.61288006}, {0.07933739, -0.21074410, 0.97431643}, {-0.40807425, 0.80614533, 0.42849166},
|
||||||
|
{-0.95397962, -0.09342040, -0.28494828}, {-0.31365384, 0.14377778, -0.93858895}, {0.84618575, -0.39191761, 0.36106822}, {-0.90177404, 0.07825801, -0.42506385},
|
||||||
|
{-0.19689944, -0.97296956, 0.12066831}, {0.61145370, 0.51715369, -0.59889601}, {-0.57329050, -0.80450317, -0.15528251}, {-0.27749150, -0.76245284, 0.58452044},
|
||||||
|
{-0.74877628, 0.66124357, 0.04572758}, {0.60284514, 0.58208119, 0.54567318}, {0.17695878, -0.67360184, 0.71759748}, {-0.83953853, 0.41240184, 0.35369447},
|
||||||
|
{0.37802442, -0.60322405, 0.70229501}, {0.51050450, -0.42970396, 0.74480847}, {-0.48366785, -0.20902730, -0.84992529}, {-0.87971286, -0.14820690, -0.45181855},
|
||||||
|
{-0.11520437, -0.59044778, -0.79881123}, {0.38877393, 0.92116844, -0.01742240}, {0.94330646, -0.27385756, -0.18754989}, {-0.66585548, 0.46928680, -0.58000550},
|
||||||
|
{0.20659390, -0.97226278, -0.10965425}, {0.70114934, 0.70875543, -0.07781609}, {0.50683262, 0.81003447, 0.29489803}, {-0.75501572, 0.56485827, -0.33299610},
|
||||||
|
{-0.43930454, -0.48824131, 0.75407688}, {-0.43442626, 0.51174617, 0.74120826}, {-0.97139119, -0.22722375, 0.06905442}, {-0.27189670, 0.51890879, -0.81043559},
|
||||||
|
{0.34109465, 0.91412005, -0.21917797}, {0.23216825, -0.66497033, 0.70986785}, {0.87281521, 0.48669099, 0.03640737}, {-0.60266004, -0.34235001, -0.72083101},
|
||||||
|
{-0.01994494, -0.52747354, 0.84933731}, {-0.27000504, -0.77679344, -0.56893693}, {-0.12330809, 0.85744248, -0.49958734}, {-0.69270982, 0.61145042, -0.38246763},
|
||||||
|
{-0.60277814, 0.55015465, 0.57791727}, {0.64946165, -0.22132925, -0.72747023}, {0.24257305, 0.26557728, 0.93307397}, {-0.66814908, 0.64881591, -0.36416303},
|
||||||
|
{-0.74538727, -0.44634982, -0.49514609}, {0.25115903, 0.38535072, -0.88793241}, {-0.61584597, -0.69782826, -0.36574509}, {0.13745929, 0.92666227, 0.34985995},
|
||||||
|
{-0.50342245, -0.82980249, -0.24081874}, {0.11249648, 0.99333196, -0.02522230}, {0.83241096, 0.21922825, -0.50895085}, {0.50175590, 0.86108612, 0.08229039},
|
||||||
|
{-0.35527286, -0.56925625, -0.74143679}, {0.31441654, -0.91653449, 0.24719782}, {0.62936968, 0.70222610, 0.33282475}, {0.77755375, -0.56236234, -0.28135169},
|
||||||
|
{-0.80098254, -0.37712493, 0.46497715}, {0.59310190, -0.68181911, -0.42819720}, {0.15392285, -0.98282954, 0.10175390}, {-0.96618662, 0.25781497, 0.00385483},
|
||||||
|
{0.33750940, -0.86020836, 0.38226820}, {-0.09597976, -0.40348179, -0.90993974}, {-0.70910783, 0.60681107, -0.35909108}, {0.41726791, -0.90380775, 0.09496860},
|
||||||
|
{-0.03646000, 0.99581799, -0.08376873}, {0.35348135, -0.70899268, 0.61022972}, {0.66002017, 0.74115740, -0.12271547}, {0.18515044, 0.96534454, -0.18392727},
|
||||||
|
{-0.29364182, -0.88826809, -0.35320572}, {0.99692330, 0.02436644, -0.07449968}, {-0.13529570, 0.35908874, 0.92344483}, {-0.76888326, -0.29702475, 0.56621095},
|
||||||
|
{-0.31931644, 0.72859881, 0.60595444}, {0.52827199, -0.82385659, 0.20539968}, {-0.83281688, -0.27413556, 0.48090097}, {-0.76899198, 0.23377782, 0.59497837},
|
||||||
|
{-0.60599231, 0.54438401, -0.58001670}, {-0.59616975, -0.18605791, 0.78100198}, {-0.83753036, 0.32458912, -0.43952794}, {0.62016934, 0.71285793, 0.32745011},
|
||||||
|
{-0.62489231, 0.01790151, 0.78050570}, {-0.44050813, -0.31396367, 0.84105850}, {0.82831903, 0.51349534, 0.22407615}, {-0.54638365, -0.42878084, -0.71945250},
|
||||||
|
{-0.30690837, -0.54588407, -0.77962673}, {-0.51419246, 0.49668914, 0.69921814}, {0.12759508, 0.79794754, 0.58906640}, {0.59812622, 0.53597438, 0.59579904},
|
||||||
|
{0.75450428, 0.31026344, 0.57832507}, {-0.34806954, -0.09710281, 0.93242621}, {-0.40140375, -0.85287390, 0.33388792}, {0.57290191, 0.32347021, -0.75309390},
|
||||||
|
{-0.53362688, -0.81285892, 0.23345818}, {-0.74679447, 0.64927639, 0.14400758}, {-0.80251380, -0.59638095, 0.01736004}, {-0.56868668, 0.61763086, -0.54325646},
|
||||||
|
{-0.72976559, 0.04179896, -0.68241852}, {0.57244144, -0.09255805, -0.81470474}, {0.97741613, 0.07186077, -0.19873032}, {0.72298477, 0.06613486, 0.68769121},
|
||||||
|
{-0.42596585, -0.65375247, -0.62542850}, {0.64840687, 0.16136696, -0.74399545}, {0.34352050, -0.92950264, 0.13423304}, {0.74687236, 0.45351768, -0.48631613},
|
||||||
|
{-0.51873425, -0.73762481, -0.43223191}, {0.29790392, 0.44209023, 0.84605525}, {-0.67740274, 0.46717430, -0.56821977}, {-0.36224935, -0.42773177, 0.82814307},
|
||||||
|
{-0.44192484, 0.73919980, 0.50821855}, {-0.92680658, -0.18163204, -0.32869343}, {-0.71384582, -0.70014113, 0.01505111}, {0.70600729, -0.70152253, 0.09705589},
|
||||||
|
{0.90031692, -0.36943663, 0.23010002}, {0.25264659, -0.65121757, -0.71560141}, {0.96727807, 0.19056552, 0.16750499}, {-0.65770755, -0.65887301, 0.36511251},
|
||||||
|
{0.05208955, -0.10417910, 0.99319353}, {-0.65282932, -0.40832320, 0.63803294}, {-0.00628739, -0.99502463, -0.09943061}, {-0.51900794, -0.62993523, 0.57776497},
|
||||||
|
{0.83046729, -0.16527060, 0.53198657}, {0.66869945, -0.56606479, -0.48209097}, {-0.54299772, -0.48639669, -0.68452300}, {0.52407156, -0.42268239, 0.73938393},
|
||||||
|
{0.71446999, -0.30844019, -0.62801057}, {-0.67320882, 0.39978543, 0.62206228}, {-0.53289859, -0.05079670, -0.84465306}, {0.67708925, -0.71979254, 0.15313018},
|
||||||
|
{-0.61369683, 0.65230332, 0.44483321}, {-0.26453665, -0.69129417, -0.67240816}, {0.85045794, 0.03075140, 0.52514345}, {-0.76757885, -0.10940324, 0.63154861},
|
||||||
|
{0.72754104, -0.17450402, -0.66350011}, {-0.34075755, -0.67303082, 0.65644026}, {0.70044829, 0.13095479, -0.70158609}, {0.43950040, -0.88211196, 0.16946353},
|
||||||
|
{-0.35706397, 0.48041126, 0.80106825}, {-0.77687193, 0.33320308, -0.53427120}, {0.51274543, 0.77662232, 0.36599165}, {0.33380578, 0.79591657, 0.50506486},
|
||||||
|
{-0.76587225, -0.03670574, 0.64194422}, {-0.23491078, 0.43695339, -0.86826762}, {0.25698923, -0.62346599, 0.73840822}, {0.13009757, -0.93331414, -0.33466303},
|
||||||
|
{-0.54841950, 0.64297666, -0.53461861}, {0.69823865, 0.51710521, -0.49504039}, {-0.64058874, -0.76638614, -0.04794108}, {-0.99383538, 0.10829476, 0.02373760},
|
||||||
|
{0.53702674, -0.26620457, -0.80046075}, {0.95618706, 0.14762618, 0.25280983}, {0.46882627, -0.32353926, -0.82190284}, {0.37771393, -0.17580406, -0.90907927},
|
||||||
|
{-0.38046162, 0.14393199, -0.91352752}, {0.99319923, -0.09757638, -0.06351493}, {0.50851715, 0.83898531, 0.19368521}, {0.32506349, -0.66811447, 0.66929574},
|
||||||
|
{-0.48035988, -0.63636898, -0.60356351}, {-0.06435942, 0.26733173, 0.96145286}, {0.60598929, -0.04278909, 0.79432114}, {-0.24869997, 0.88809619, -0.38656626},
|
||||||
|
{0.37370464, 0.04464997, -0.92647246}, {-0.48971589, -0.59472073, 0.63756224}, {0.69752714, 0.12358938, 0.70581978}, {0.52787180, 0.64468756, -0.55292794},
|
||||||
|
{-0.10489693, 0.16880171, -0.98005235}, {-0.63336451, -0.45121552, -0.62869226}, {0.54866356, 0.65678858, 0.51729785}, {-0.85968969, 0.49557488, -0.12385145},
|
||||||
|
{-0.47320716, -0.15150042, 0.86782637}, {0.19900943, -0.10259966, 0.97461200}, {-0.52893938, 0.84740153, 0.04619294}, {0.65121421, -0.49243156, -0.57743503},
|
||||||
|
{0.45693424, 0.73751862, 0.49726994}, {-0.47661222, -0.77374319, -0.41732752}, {-0.04808540, 0.90050093, 0.43218730}, {0.91129978, -0.31013948, 0.27082507},
|
||||||
|
{0.58778939, -0.42668247, -0.68734686}, {0.82297839, -0.34772114, -0.44921773}, {0.29494223, -0.86544442, -0.40498769}, {-0.39161493, 0.79055212, 0.47081322},
|
||||||
|
{0.79434783, -0.59398096, -0.12727195}, {0.77174313, 0.29796481, 0.56180915}, {0.78482345, -0.44974833, 0.42635500}, {-0.58988658, -0.54565594, 0.59522551},
|
||||||
|
{-0.97115669, 0.13450224, 0.19688532}, {0.42988246, 0.15513097, -0.88945796}, {-0.30013401, -0.45617888, 0.83774722}, {0.50990724, -0.38026491, -0.77161727},
|
||||||
|
{-0.68923129, 0.29274099, -0.66276914}, {-0.81531731, -0.42344291, -0.39490984}, {0.26048163, -0.96468719, -0.03908901}, {0.32147033, 0.32614689, -0.88897977},
|
||||||
|
{0.70055924, -0.70700997, 0.09671429}, {-0.58890140, -0.17999683, 0.78790626}, {0.70222863, 0.69308083, -0.16283095}, {-0.75366081, -0.65098223, -0.09065052},
|
||||||
|
{-0.19053922, -0.78772343, -0.58582130}, {-0.58846812, 0.34955220, 0.72905317}, {-0.60563594, -0.40529546, -0.68479244}, {-0.71315551, 0.69904447, 0.05240265},
|
||||||
|
{-0.45479055, 0.81186703, -0.36611129}, {-0.29059626, 0.05377439, 0.95533352}, {0.56290473, 0.78501299, 0.25863657}, {-0.43010366, -0.47609705, 0.76703484},
|
||||||
|
{0.63372606, -0.06214270, -0.77105744}, {0.28788198, -0.78226752, -0.55243234}, {-0.55506056, 0.67832002, -0.48144545}, {-0.47229498, 0.84794057, -0.24069533},
|
||||||
|
{-0.27628326, 0.87423025, -0.39923556}, {0.97754921, -0.01429369, -0.21022189}, {-0.78483628, 0.30941478, -0.53693064}, {-0.35769150, -0.53057471, 0.76847073},
|
||||||
|
{0.56804560, 0.59946775, -0.56388173}, {0.80328735, -0.57298006, -0.16255243}, {-0.34327107, -0.35133498, -0.87105034}, {0.80357102, -0.01979284, -0.59487970},
|
||||||
|
{-0.87804782, 0.46346126, 0.11931336}, {-0.11872912, -0.93845057, 0.32436695}, {0.68065237, 0.69467363, 0.23268195}, {-0.71974506, -0.36713686, 0.58921776},
|
||||||
|
{0.52822234, 0.82314813, -0.20834663}, {-0.67654042, -0.73158271, 0.08414148}, {-0.39062516, 0.89358947, -0.22115571}, {-0.62142505, 0.43386674, -0.65237302},
|
||||||
|
{-0.48099381, -0.18611372, -0.85674188}, {0.05036514, -0.74987003, 0.65966528}, {-0.49984895, -0.80920390, -0.30877188}, {0.50496868, 0.85618105, 0.10936472},
|
||||||
|
{-0.54084761, 0.24485715, 0.80469176}, {-0.81973873, -0.50777759, 0.26493457}, {0.72082268, -0.43713926, -0.53788839}, {0.91725234, -0.15187152, 0.36821621},
|
||||||
|
{-0.17151325, 0.57985483, 0.79646192}, {-0.74076471, 0.06061813, -0.66902398}, {0.32541463, -0.08200506, 0.94200875}, {-0.10818362, 0.99402161, -0.01474260},
|
||||||
|
{-0.61710380, -0.78296663, 0.07839742}, {-0.38878719, -0.57916742, 0.71652608}, {0.37911419, 0.92170992, 0.08199541}, {-0.60810067, -0.43108035, 0.66662082},
|
||||||
|
{-0.11745691, 0.38395577, 0.91585034}, {0.47694470, -0.81050760, 0.34000174}, {0.40287244, 0.88894800, 0.21786522}, {0.46780815, -0.54966937, 0.69211207},
|
||||||
|
{0.07109649, 0.79259959, -0.60558333}, {-0.52073054, -0.06778631, 0.85102569}, {-0.36866700, 0.77676019, -0.51061556}, {-0.71702100, -0.35727116, 0.59853004},
|
||||||
|
{-0.59010862, -0.73536014, -0.33319257}, {-0.66875911, 0.58597660, 0.45759445}, {-0.59798034, -0.69169805, 0.40493619}, {-0.20490060, 0.79048994, 0.57718402},
|
||||||
|
{0.48765302, 0.85851673, 0.15856717}, {0.88918101, 0.10371433, 0.44564612}, {0.48664272, 0.83596000, 0.25367252}, {-0.24554119, 0.50230038, -0.82909822},
|
||||||
|
{0.03554055, -0.41884154, -0.90736356}, {-0.03701100, -0.61772404, 0.78552352}, {0.42824046, 0.20582938, -0.87991158}, {-0.06839464, -0.43555129, -0.89756183},
|
||||||
|
{-0.40866952, -0.70331213, -0.58167111}, {-0.74822692, 0.38256599, 0.54203297}, {0.71541445, 0.51615594, 0.47091953}, {0.60759905, -0.70288934, -0.36982423},
|
||||||
|
{-0.01648745, -0.13394229, -0.99085197}, {-0.64568452, -0.13342451, 0.75185730}, {-0.42008783, 0.33302268, 0.84416948}, {-0.63557180, -0.46817632, 0.61388877},
|
||||||
|
{-0.82478405, -0.45636029, 0.33386606}, {-0.66628051, 0.24058840, 0.70582399}, {-0.60499178, -0.78374178, -0.14047697}, {0.63041860, -0.60894989, -0.48140672},
|
||||||
|
{-0.07945150, -0.91288865, -0.40040202}, {-0.66942344, 0.18523930, 0.71941550}, {-0.00849762, -0.47038898, 0.88241827}, {0.66223413, -0.33585751, 0.66981019},
|
||||||
|
{0.82512667, -0.23099667, -0.51556427}, {-0.75186864, 0.65450118, -0.07950940}, {0.87383910, 0.08193441, 0.47926192}, {-0.26554211, 0.78650504, 0.55758158},
|
||||||
|
{-0.49574252, 0.70523568, 0.50683527}, {-0.49212635, -0.64694353, 0.58247381}, {0.32264136, 0.78159510, -0.53386482}, {0.71510371, -0.22498049, 0.66182359},
|
||||||
|
{0.61434883, -0.51790453, 0.59527340}, {-0.82551670, -0.14228251, -0.54614821}, {-0.46251954, 0.64306734, -0.61036060}, {-0.52117891, -0.69061769, 0.50141773},
|
||||||
|
{0.27468699, -0.88951139, -0.36512537}, {0.65713642, -0.75365863, -0.01305358}, {0.94136220, -0.21960140, -0.25614924}, {-0.85554460, 0.30842011, -0.41583708},
|
||||||
|
{-0.35233681, -0.15379949, 0.92314922}, {-0.74432132, 0.44164975, -0.50093040}, {0.53994954, -0.79953954, -0.26304184}, {0.42964607, 0.11880600, 0.89514769},
|
||||||
|
{-0.87921789, 0.18018271, 0.44103298}, {-0.80353079, 0.36514238, 0.47011628}, {0.50404538, 0.65465655, -0.56334986}, {-0.92083981, -0.30381360, -0.24444087},
|
||||||
|
{0.13956423, -0.96009192, -0.24237437}, {-0.71698508, 0.68682212, 0.11919639}, {-0.76698836, 0.61675487, -0.17703754}, {-0.21874818, -0.57847904, -0.78581883},
|
||||||
|
{0.55494484, -0.79971185, 0.22912262}, {0.79660662, -0.41090893, 0.44336412}, {0.66489466, 0.00947646, -0.74687703}, {-0.59920476, 0.36935905, 0.71030103},
|
||||||
|
{-0.57524868, -0.51402380, -0.63629277}, {0.20536135, -0.69296940, 0.69110066}, {-0.05544564, -0.99802158, 0.02964287}, {0.13201661, 0.16519726, -0.97738502},
|
||||||
|
{0.46510187, 0.64584669, -0.60544390}, {-0.80108393, -0.59762086, 0.03337417}, {-0.39806873, -0.44410006, -0.80269323}, {0.95136791, -0.21916666, -0.21648342},
|
||||||
|
{-0.82086395, 0.17982074, 0.54207645}, {0.79513089, 0.37056075, 0.48005374}, {0.77112323, 0.56616567, 0.29124800}, {0.81176337, -0.24837815, 0.52853432},
|
||||||
|
{-0.81842091, 0.50060656, 0.28209979}, {-0.38248924, -0.72602893, 0.57147525}, {0.46198573, 0.37950267, 0.80159024}, {-0.59524911, 0.04222053, 0.80243126},
|
||||||
|
{-0.52273882, 0.79497643, -0.30782561}, {-0.79922245, 0.45390541, 0.39397125}, {0.38051244, -0.76512679, 0.51941436}, {0.83818590, 0.22605420, 0.49633043},
|
||||||
|
{0.63218067, 0.48127057, 0.60722832}, {0.59242495, 0.18424992, -0.78427333}, {0.85249021, -0.48552132, 0.19372531}, {-0.43548364, -0.58439144, 0.68471939},
|
||||||
|
{0.73179011, 0.29594379, -0.61392223}, {-0.45280534, -0.80755156, 0.37792566}, {0.55557939, 0.30092870, -0.77509578}, {0.42575514, 0.70893498, 0.56226662},
|
||||||
|
{0.60528173, -0.51550786, 0.60653580}, {-0.51076670, 0.84729685, -0.14562083}, {-0.33474095, 0.69713420, -0.63399716}, {-0.48650711, 0.74561924, 0.45537104},
|
||||||
|
{-0.41670009, -0.87381546, -0.25061440}, {0.92586094, -0.34254116, -0.15952140}, {-0.10682502, 0.59910669, 0.79351092}, {-0.44718479, -0.59299328, 0.66961536},
|
||||||
|
{0.69862855, -0.48858264, 0.52269031}, {-0.74718902, 0.51933770, -0.41472512}, {-0.56931667, 0.42835158, 0.70170753}, {0.05154068, 0.16647211, 0.98469823},
|
||||||
|
{0.74568360, -0.66371406, 0.05864824}, {0.64686641, 0.41668704, 0.63869849}, {0.27796256, -0.73021674, 0.62411563}, {0.77079499, -0.62615383, 0.11750087},
|
||||||
|
{-0.06833979, 0.90160690, 0.42712371}, {-0.98003087, -0.09480635, 0.17478914}, {-0.85191651, 0.47279136, 0.22518122}, {0.52473004, -0.19693989, -0.82817454},
|
||||||
|
{0.16081399, 0.75081437, -0.64063768}, {0.71441816, 0.52488995, -0.46270642}, {-0.23333515, -0.88652173, 0.39954216}, {0.54760612, -0.74897952, -0.37303782},
|
||||||
|
{0.48186221, -0.57810371, 0.65848683}, {-0.21255857, -0.53489421, -0.81774509}, {0.77930308, 0.57549405, -0.24797842}, {0.60279872, -0.76604104, -0.22319235},
|
||||||
|
{0.37230136, -0.52720909, 0.76383393}, {-0.13321231, -0.92277683, 0.36157627}, {-0.47833070, -0.49076061, -0.72825392}, {0.28828612, -0.93601402, 0.20191301},
|
||||||
|
{-0.66460360, -0.65589055, 0.35792406}, {0.90686144, 0.30403802, 0.29182738}, {-0.00682204, 0.42199214, 0.90657382}, {-0.33221520, 0.26584830, -0.90496284},
|
||||||
|
{-0.59515132, 0.55081686, 0.58514588}, {0.77123373, 0.59869357, -0.21625109}, {-0.69765329, -0.61042387, 0.37505011}, {0.02426772, -0.55656860, -0.83044715},
|
||||||
|
{0.65180023, 0.75814507, 0.01930051}, {-0.01531784, -0.78276243, 0.62213209}, {0.63847163, 0.03936370, 0.76863807}, {0.40703600, -0.09783879, -0.90815707},
|
||||||
|
{-0.46223121, -0.64783550, -0.60551753}, {0.82788442, -0.46539053, 0.31307993}, {-0.75467147, 0.24001984, 0.61062382}, {-0.70062375, -0.69087941, 0.17835919},
|
||||||
|
{0.35457466, 0.88605939, -0.29862279}, {0.20159504, -0.88658663, -0.41632150}, {-0.32096612, 0.72494426, -0.60945597}, {0.14147986, 0.53949815, -0.83001518},
|
||||||
|
{0.28297638, 0.93772862, 0.20146813}, {0.67192636, 0.43759891, -0.59751332}, {0.98497844, 0.01967209, 0.17155312}, {0.60388215, -0.68969665, 0.39955586},
|
||||||
|
{0.41200242, 0.85002960, 0.32818240}, {-0.83375884, 0.39266173, -0.38815328}, {-0.70938505, -0.58502714, -0.39308535}, {-0.63048972, 0.77513872, 0.04053013},
|
||||||
|
{0.10261233, -0.69355480, -0.71305852}, {0.65702752, -0.38976767, -0.64528753}, {-0.41388260, 0.33890875, 0.84489174}, {0.03028400, -0.46424256, -0.88519022},
|
||||||
|
{0.45068344, -0.52775066, -0.71997478}, {0.48930093, 0.41323002, -0.76800101}, {0.28350070, 0.66390322, 0.69199701}, {0.42450922, -0.60916900, 0.66985450},
|
||||||
|
{0.67306932, 0.51724488, -0.52861652}, {0.31095891, 0.94487804, -0.10251852}, {-0.25569777, 0.90632689, -0.33643754}, {-0.21431592, 0.07778980, -0.97366187},
|
||||||
|
{0.27676605, -0.87464593, 0.39798876}, {0.00288072, -0.88726140, -0.46125796}, {0.51138622, 0.12353356, 0.85042554}, {0.59734197, 0.76052363, 0.25453168},
|
||||||
|
{-0.43336730, -0.76588813, 0.47498227}, {0.34180565, -0.68750195, -0.64071052}, {-0.65078280, 0.51803512, 0.55508681}, {-0.89824124, 0.40466264, -0.17149586},
|
||||||
|
{0.54253116, 0.81082175, -0.21960883}, {-0.53994336, 0.54836630, 0.63855741}, {0.68778819, 0.33483595, -0.64407475}, {-0.63530446, -0.39864092, 0.66141792},
|
||||||
|
{0.80728009, -0.58358794, -0.08788616}, {0.94835277, 0.26419320, 0.17558181}, {-0.15823843, -0.51165316, 0.84449490}, {0.17510951, -0.22389002, 0.95875436},
|
||||||
|
{0.13697442, -0.88598087, 0.44303037}, {-0.73457485, -0.23332652, -0.63714874}, {0.95521505, -0.11801760, 0.27135964}, {-0.40184319, -0.90170455, -0.15953355},
|
||||||
|
{0.16857866, -0.70975159, -0.68398386}, {-0.55230772, 0.37144476, 0.74631426}, {0.29875717, -0.61848962, -0.72678383}, {0.62465217, -0.76131685, 0.17379963},
|
||||||
|
{0.75759704, 0.19352541, 0.62337360}, {-0.10375594, 0.61563856, 0.78116827}, {0.52725731, 0.25296549, 0.81117704}, {-0.71292545, -0.53989924, -0.44748867},
|
||||||
|
{0.78246146, 0.54867457, 0.29446609}, {0.31458005, 0.63401883, -0.70644145}, {-0.09360697, -0.99481997, -0.03963538}, {-0.59000956, 0.10880136, -0.80003186},
|
||||||
|
{0.49713243, 0.77379744, -0.39255173}, {-0.92985377, 0.17383167, 0.32427537}, {0.73574353, -0.63730495, -0.22918086}, {-0.04383386, -0.80273910, -0.59471719},
|
||||||
|
{0.68411849, 0.52929683, -0.50182344}, {-0.19561815, -0.57428906, -0.79493749}, {0.90257811, -0.06366895, -0.42579222}, {0.62294256, 0.39027502, -0.67795868},
|
||||||
|
{-0.39046281, -0.70398950, 0.59324327}, {0.70990020, 0.62433400, -0.32595821}, {-0.99157404, 0.01300690, 0.12888658}, {-0.55765988, -0.46179257, 0.68975581},
|
||||||
|
{-0.53736280, -0.34635255, -0.76894807}, {0.25083685, 0.44726649, -0.85850659}, {0.45758528, 0.86982087, -0.18446507}, {-0.18615519, 0.23441065, -0.95414773},
|
||||||
|
{0.56359579, -0.41325118, -0.71525048}, {-0.48542469, 0.59678985, -0.63890903}, {-0.72243931, -0.40815930, 0.55811059}, {-0.23748605, 0.68466361, -0.68908354},
|
||||||
|
{-0.69257361, 0.27959985, -0.66495543}, {-0.10352601, -0.17369566, -0.97934273}, {0.00192480, -0.09194122, 0.99576258}, {0.36297645, 0.86362173, 0.34986513},
|
||||||
|
{-0.71118388, -0.10242990, 0.69550385}, {0.45146824, 0.43080300, 0.78139952}, {-0.13265094, -0.68773403, -0.71374059}, {0.56016516, -0.56270148, -0.60793259},
|
||||||
|
{-0.95871022, -0.27465634, -0.07374694}, {-0.84169709, 0.06533746, -0.53598230}, {0.69711911, -0.61618111, -0.36653212}, {-0.01620384, 0.59778204, -0.80149490},
|
||||||
|
{-0.34911215, 0.65899531, -0.66621760}, {-0.19279427, -0.50540811, -0.84106659}, {-0.60506152, 0.72292944, 0.33357695}, {0.79789244, -0.59553505, 0.09330415},
|
||||||
|
{-0.48173680, -0.74189415, 0.46639331}, {0.84140763, 0.31839867, 0.43664115}, {0.79614481, 0.60391839, -0.03789486}, {0.19384456, 0.57096572, 0.79776089},
|
||||||
|
{0.83441754, -0.25078854, -0.49076723}, {-0.62605441, 0.72550166, 0.28583776}, {0.55337866, -0.75558589, 0.35051679}, {0.80543476, -0.01571309, 0.59247611},
|
||||||
|
{-0.00851542, 0.98991715, 0.14139139}, {-0.94076275, -0.29730096, -0.16302633}, {-0.75465549, -0.41353736, -0.50939371}, {0.37739255, -0.63080384, 0.67798332},
|
||||||
|
{0.47325376, -0.73145333, -0.49092453}, {0.12930721, -0.49066326, -0.86170135}, {0.71173142, -0.11663112, 0.69270165}, {0.41952295, -0.63051086, -0.65303641},
|
||||||
|
{0.85916103, 0.42641569, 0.28286390}, {0.54792224, -0.66418740, 0.50856299}, {0.28479416, 0.43856869, 0.85237890}, {-0.59050384, -0.68486024, -0.42693285},
|
||||||
|
{0.54884141, 0.60847988, 0.57317130}, {0.87567478, 0.25649070, -0.40915304}, {0.02961573, 0.33496172, 0.94176619}, {0.67428181, 0.70665199, 0.21444580},
|
||||||
|
{0.23609059, -0.51982231, 0.82100305}, {0.93726653, 0.00671493, 0.34854893}, {-0.39891590, -0.91536143, -0.05458531}, {0.93359117, -0.35793085, 0.01711843},
|
||||||
|
{0.53572079, -0.56879583, 0.62407896}, {-0.61516933, -0.36856434, -0.69694119}, {0.74630703, -0.65946218, -0.09019675}, {0.50607373, -0.59204544, -0.62719342},
|
||||||
|
{-0.89793356, 0.43675114, 0.05444050}, {-0.91682171, 0.07126199, 0.39288634}, {-0.61178292, -0.15203616, -0.77627744}, {-0.14028895, 0.63023583, 0.76362413},
|
||||||
|
{0.71475895, -0.54060748, 0.44369268}, {-0.31764961, 0.92630790, -0.20261391}, {0.59833443, -0.58864018, -0.54359788}, {-0.81450219, 0.22699691, -0.53390879},
|
||||||
|
{0.00452737, -0.06652318, 0.99777461}, {0.59311614, 0.19797584, -0.78039657}, {-0.71375488, -0.02586188, 0.69991795}, {-0.75600145, -0.26384588, -0.59903853},
|
||||||
|
{0.25716644, 0.77480857, -0.57752671}, {0.71712423, 0.61984999, -0.31862018}, {-0.28194922, -0.55108799, 0.78537040}, {0.57068285, -0.67066160, 0.47385030},
|
||||||
|
{0.48969101, -0.22604767, -0.84208382}, {-0.93763991, -0.34062289, 0.06933579}, {-0.67376035, 0.15110895, -0.72333469}, {-0.72414406, -0.65877431, -0.20403872},
|
||||||
|
{-0.71204285, 0.41163046, -0.56881926}, {0.23641604, -0.86280490, 0.44685026}, {0.84208951, 0.19949878, -0.50108432}, {-0.67481860, 0.67904385, -0.28899707},
|
||||||
|
{0.52167146, 0.66360202, 0.53618211}, {-0.49330390, -0.48590434, 0.72149029}, {-0.18240720, 0.04137646, -0.98235208}, {0.30714395, 0.55170433, 0.77542564},
|
||||||
|
{-0.14577549, 0.95376355, -0.26283949}, {-0.54373260, -0.69781662, -0.46626905}, {0.01799205, -0.81833182, 0.57446437}, {0.51019037, -0.56615200, -0.64743934},
|
||||||
|
{0.48463473, 0.59436639, 0.64176146}, {0.09115853, -0.52830175, -0.84414891}, {-0.62962436, -0.38408030, -0.67531880}, {0.50864721, -0.48401592, -0.71204396},
|
||||||
|
{-0.69669235, -0.63427804, -0.33512853}, {0.60735178, -0.18339351, 0.77297518}, {0.74102699, 0.67064566, 0.03336744}, {-0.47352242, -0.76145583, -0.44267543},
|
||||||
|
{0.47751531, -0.79737827, -0.36900816}, {0.74175025, -0.64892413, 0.16942269}, {0.65484829, -0.70924167, -0.26105549}, {0.60455058, -0.64392987, -0.46890608},
|
||||||
|
{-0.61878613, -0.77223405, 0.14407742}, {-0.72376655, -0.65562529, 0.21521492}, {0.24420910, -0.52118606, -0.81775731}, {0.61291622, 0.39870471, -0.68217906},
|
||||||
|
{0.67751893, 0.65970488, 0.32520389}, {-0.04366879, -0.96113671, 0.27259726}, {0.36541094, 0.62808212, 0.68701361}, {-0.92572867, 0.10611717, -0.36299528},
|
||||||
|
{0.80766374, -0.02031352, -0.58929335}, {-0.82117076, 0.53034081, 0.21075390}, {-0.62778197, -0.51872129, 0.58036025}, {0.37696186, 0.57743439, -0.72420251},
|
||||||
|
{-0.56818895, -0.47089866, -0.67484500}, {-0.61126182, -0.69853192, 0.37203783}, {0.57901952, 0.81284241, -0.06343191}, {-0.53287943, 0.70445351, 0.46881208},
|
||||||
|
{0.22300157, -0.93258969, 0.28380764}, {-0.63832115, -0.40157013, -0.65672486}, {-0.22074780, 0.50999380, 0.83137040}, {-0.59081050, -0.13684815, -0.79511982},
|
||||||
|
{-0.79824305, 0.52060475, -0.30295004}, {-0.56871170, 0.76435226, 0.30386284}, {0.12786983, -0.64236825, -0.75565358}, {-0.17631562, -0.76167939, -0.62350405},
|
||||||
|
{0.34713709, 0.61125835, -0.71123770}, {-0.39238887, -0.52886732, 0.75254922}, {0.38116332, 0.71358998, -0.58779577}, {-0.72949527, -0.67040404, 0.13562844},
|
||||||
|
{-0.62057913, 0.45165344, -0.64100757}, {-0.10668918, -0.98309252, -0.14881706}, {0.59490400, -0.46196716, -0.65778079}, {0.22433782, 0.49054463, 0.84204424},
|
||||||
|
{0.77498791, -0.57220981, 0.26827165}, {0.26474565, 0.93986866, -0.21576987}, {-0.01328623, 0.99975439, 0.01773780}, {0.53097408, 0.47771884, 0.69989373},
|
||||||
|
{0.24635212, -0.37499947, -0.89369236}, {0.31300988, -0.54171955, 0.78010560}, {0.77494650, -0.52634980, 0.34987684}, {0.65518408, 0.51410661, -0.55355958},
|
||||||
|
{0.78000762, -0.61855443, -0.09475515}, {0.58176976, 0.62638121, 0.51883574}, {-0.62371886, -0.59433046, 0.50768699}, {0.85206333, 0.17478222, -0.49339564},
|
||||||
|
{0.69974170, -0.42963013, 0.57077098}, {-0.44953934, 0.62956163, -0.63369277}, {0.63562255, 0.51965998, -0.57090935}, {-0.02766532, -0.52812789, -0.84871406},
|
||||||
|
{0.78698609, 0.04742916, -0.61514500}, {0.37827449, 0.78614098, 0.48876454}, {0.90534508, -0.25600916, -0.33883565}, {-0.37701605, 0.47347359, -0.79604124},
|
||||||
|
{-0.43802429, 0.40756165, -0.80126664}, {-0.87945568, -0.47372426, -0.04629300}, {-0.22787901, -0.82242670, 0.52123457}, {0.48721529, 0.74652617, -0.45312243},
|
||||||
|
{-0.68473990, -0.68222429, 0.25632263}, {-0.33289944, 0.62102263, -0.70958358}, {-0.07838790, -0.85438083, -0.51370101}, {0.18575601, 0.96209034, 0.19969195},
|
||||||
|
{0.09048656, -0.68256793, -0.72519874}, {0.29506068, -0.68306389, -0.66810397}, {-0.94937153, -0.17748927, 0.25921277}, {-0.38725072, 0.16372291, 0.90732116},
|
||||||
|
{-0.02691563, 0.81898594, 0.57318198}, {-0.65244629, -0.52276924, -0.54865851}, {0.15270967, -0.00097578, 0.98827061}, {0.39108739, 0.55471383, -0.73439990},
|
||||||
|
{0.85379797, -0.05140234, 0.51806064}, {0.31443713, 0.14998906, -0.93735403}, {-0.44277186, -0.56474741, -0.69642907}, {-0.31521736, 0.37268196, 0.87278071},
|
||||||
|
{0.97997903, -0.16829529, 0.10638514}, {-0.25174419, -0.84939324, 0.46384910}, {0.03867740, -0.72044135, 0.69243651}, {-0.80207202, 0.48047131, 0.35472214},
|
||||||
|
{0.48200634, -0.48413492, 0.73026246}, {-0.41800015, 0.44068588, -0.79440029}, {0.58661859, -0.43233611, 0.68480955}, {0.40830998, -0.53710845, 0.73810397},
|
||||||
|
{0.61242611, -0.72220206, -0.32149407}, {-0.34159283, -0.62199145, -0.70458567}, {-0.29885191, 0.58492128, -0.75402562}, {-0.62924060, 0.77130626, -0.09561862},
|
||||||
|
{0.91118189, 0.27762192, 0.30442344}, {0.08064464, -0.99213777, -0.09570315}, {0.93083382, -0.34928416, -0.10746612}, {0.66101659, -0.67569323, 0.32633681},
|
||||||
|
{0.07148482, -0.97619739, -0.20476469}, {0.30440743, -0.78193565, -0.54397863}, {-0.35656518, -0.19962907, 0.91269355}, {0.82151650, -0.31061678, 0.47815045},
|
||||||
|
{-0.69709423, -0.71173375, -0.08657198}, {-0.46044170, -0.78565215, -0.41321197}, {-0.70275364, -0.21121895, 0.67935548}, {0.38087769, 0.63933041, 0.66797366} };
|
||||||
|
|
||||||
|
// Simplex noise is evaluated on a tetrahedral grid, as opposed to a regular
|
||||||
|
// cube-based one. The two "skew factors" are used to convert between views
|
||||||
|
// of the grid so that calculations of which gridpoints to use are simpler.
|
||||||
|
// These numbers are straightforward for 3D, but the geometry is not so kind in
|
||||||
|
// 2D or 4D
|
||||||
|
|
||||||
|
static const double skewF3 = 1.0/3.0;
|
||||||
|
static const double skewG3 = 1.0/6.0;
|
||||||
|
|
||||||
|
|
||||||
|
// simplexNoise3D - given a vector in (x,y,z) returns the noise value for the
|
||||||
|
// location
|
||||||
|
double simplexNoise3D( double V[3] ) {
|
||||||
|
double C[4][3]; // Co-ordinates of four simplex shape corners in (x,y,z)
|
||||||
|
double n = 0.0; // Noise total value
|
||||||
|
int gi[4]; // Hashed grid index for each corner, used to determine gradient
|
||||||
|
double* U; // Pointer to current gradient vector . . .
|
||||||
|
int corner; // Iterator for which corner is being processed
|
||||||
|
double t; // Temp double
|
||||||
|
|
||||||
|
// Convert input co-ordinates ( x, y, z ) to
|
||||||
|
// integer-based simplex grid ( i, j, k )
|
||||||
|
double skewIn = ( V[_x_] + V[_y_] + V[_z_] ) * skewF3;
|
||||||
|
int i = floor( V[_x_] + skewIn );
|
||||||
|
int j = floor( V[_y_] + skewIn );
|
||||||
|
int k = floor( V[_z_] + skewIn );
|
||||||
|
t = (i + j + k) * skewG3;
|
||||||
|
|
||||||
|
// Cell origin co-ordinates in input space (x,y,z)
|
||||||
|
double X0 = i - t;
|
||||||
|
double Y0 = j - t;
|
||||||
|
double Z0 = k - t;
|
||||||
|
// This value of t finished with, not used later . . .
|
||||||
|
|
||||||
|
// Point offset within cell, in input space (x,y,z)
|
||||||
|
C[0][_x_] = V[_x_] - X0;
|
||||||
|
C[0][_y_] = V[_y_] - Y0;
|
||||||
|
C[0][_z_] = V[_z_] - Z0;
|
||||||
|
|
||||||
|
// For the 3D case, the simplex shape is a slightly irregular tetrahedron.
|
||||||
|
// The nested logic determines which simplex we are in, and therefore in which
|
||||||
|
// order to get gradients for the four corners
|
||||||
|
|
||||||
|
int i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords
|
||||||
|
int i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords
|
||||||
|
|
||||||
|
// The fourth corner is always i3 = 1, j3 = 1, k3 = 1, so no need to
|
||||||
|
// calculate values
|
||||||
|
if ( C[0][_x_] >= C[0][_y_] ) {
|
||||||
|
if ( C[0][_y_] >= C[0][_z_] ) {
|
||||||
|
i1=1; j1=0; k1=0; i2=1; j2=1; k2=0;
|
||||||
|
} else { // y0<z0
|
||||||
|
if( C[0][_x_] >= C[0][_z_] ) {
|
||||||
|
i1=1; j1=0; k1=0; i2=1; j2=0; k2=1;
|
||||||
|
} else {
|
||||||
|
i1=0; j1=0; k1=1; i2=1; j2=0; k2=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else { // x0<y0
|
||||||
|
if( C[0][_y_] < C[0][_z_] ) {
|
||||||
|
i1=0; j1=0; k1=1; i2=0; j2=1; k2=1;
|
||||||
|
} else {
|
||||||
|
if( C[0][_x_] < C[0][_z_] ) {
|
||||||
|
i1=0; j1=1; k1=0; i2=0; j2=1; k2=1;
|
||||||
|
} else {
|
||||||
|
i1=0; j1=1; k1=0; i2=1; j2=1; k2=0;
|
||||||
|
} // Y X Z order
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// A step of 1i in (i,j,k) is a step of (1-skewG3, -skewG3, -skewG3) in (x,y,z),
|
||||||
|
// and this is similar for j and k . . .
|
||||||
|
|
||||||
|
// Offsets for second corner in (x,y,z) coords
|
||||||
|
C[1][_x_] = C[0][_x_] - i1 + skewG3;
|
||||||
|
C[1][_y_] = C[0][_y_] - j1 + skewG3;
|
||||||
|
C[1][_z_] = C[0][_z_] - k1 + skewG3;
|
||||||
|
|
||||||
|
// Offsets for third corner in (x,y,z) coords
|
||||||
|
C[2][_x_] = C[0][_x_] - i2 + 2.0 * skewG3;
|
||||||
|
C[2][_y_] = C[0][_y_] - j2 + 2.0 * skewG3;
|
||||||
|
C[2][_z_] = C[0][_z_] - k2 + 2.0 * skewG3;
|
||||||
|
|
||||||
|
// Offsets for last corner in (x,y,z) coords
|
||||||
|
C[3][_x_] = C[0][_x_] - 1.0 + 3.0 * skewG3;
|
||||||
|
C[3][_y_] = C[0][_y_] - 1.0 + 3.0 * skewG3;
|
||||||
|
C[3][_z_] = C[0][_z_] - 1.0 + 3.0 * skewG3;
|
||||||
|
|
||||||
|
// Work out the hashed gradient indices of the four simplex corners
|
||||||
|
int ii = i & 0x3ff;
|
||||||
|
int jj = j & 0x3ff;
|
||||||
|
int kk = k & 0x3ff;
|
||||||
|
|
||||||
|
gi[0] = p[ii + p[jj + p[kk]]];
|
||||||
|
gi[1] = p[ii + i1 + p[jj + j1 + p[kk + k1]]];
|
||||||
|
gi[2] = p[ii + i2 +p[jj + j2 + p[kk + k2]]];
|
||||||
|
gi[3] = p[ii + 1 + p[jj + 1 + p[kk + 1]]];
|
||||||
|
|
||||||
|
// Calculate the contribution from the four corners, and add to total
|
||||||
|
for( corner = 0; corner < 4; corner++ ) {
|
||||||
|
t = 0.6 - C[corner][_x_] * C[corner][_x_] - C[corner][_y_] * C[corner][_y_] - C[corner][_z_] * C[corner][_z_] ;
|
||||||
|
if(t > 0.0) {
|
||||||
|
U = grad3[ gi[corner] ];
|
||||||
|
t *= t;
|
||||||
|
n += t * t * ( U[_x_] * C[corner][_x_] + U[_y_] * C[corner][_y_] + U[_z_] * C[corner][_z_] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The result is scaled be fit -1.0 to 1.0
|
||||||
|
return 32.0 * n;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The Perlin noise function is based on summing coherent noise in "octaves"
|
||||||
|
double perlinNoise3D(double V[3], double aScale, double fScale, int octaves) {
|
||||||
|
int i; // Iterator
|
||||||
|
double n = 0.0; // Sum of noise values
|
||||||
|
double U[3];
|
||||||
|
double a = 1.0;
|
||||||
|
|
||||||
|
U[_x_] = V[_x_];
|
||||||
|
U[_y_] = V[_y_];
|
||||||
|
U[_z_] = V[_z_];
|
||||||
|
|
||||||
|
for (i=0; i < octaves; i++) {
|
||||||
|
n += simplexNoise3D(U) / a;
|
||||||
|
// None of the below required for last octave . . .
|
||||||
|
a *= aScale;
|
||||||
|
U[_x_] *= fScale;
|
||||||
|
U[_y_] *= fScale;
|
||||||
|
U[_z_] *= fScale;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
double vratio( double P[2], double Q[2], double U[2] ) {
|
||||||
|
double PmQx, PmQy;
|
||||||
|
|
||||||
|
PmQx = P[_x_] - Q[_x_];
|
||||||
|
PmQy = P[_y_] - Q[_y_];
|
||||||
|
|
||||||
|
if ( 0.0 == PmQx && 0.0 == PmQy ) {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 2.0 * ( ( U[_x_] - Q[_x_] ) * PmQx + ( U[_y_] - Q[_y_] ) * PmQy ) / ( PmQx * PmQx + PmQy * PmQy );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Closest point to U from array P.
|
||||||
|
// P is an array of points
|
||||||
|
// n is number of points to check
|
||||||
|
// U is location to find closest
|
||||||
|
int closest( double P[VORONOI_MAXPOINTS][2], int n, double U[2] ) {
|
||||||
|
double d2;
|
||||||
|
double d2min = 1.0e100;
|
||||||
|
int i, j;
|
||||||
|
|
||||||
|
for( i = 0; i < n; i++ ) {
|
||||||
|
d2 = (P[i][_x_] - U[_x_]) * (P[i][_x_] - U[_x_]) + (P[i][_y_] - U[_y_]) * (P[i][_y_] - U[_y_]);
|
||||||
|
if ( d2 < d2min ) {
|
||||||
|
d2min = d2;
|
||||||
|
j = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Voronoi "value" is 0.0 (centre) to 1.0 (edge) if inside cell . . . higher values
|
||||||
|
// mean that point is not in the cell defined by chosen centre.
|
||||||
|
// P is an array of points defining cell centres
|
||||||
|
// n is number of points in array
|
||||||
|
// q is chosen centre to measure distance from
|
||||||
|
// U is point to test
|
||||||
|
double voronoi( double P[VORONOI_MAXPOINTS][2], int n, int q, double U[2] ) {
|
||||||
|
double ratio;
|
||||||
|
double ratiomax = -1.0e100;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for( i = 0; i < n; i++ ) {
|
||||||
|
if ( i != q ) {
|
||||||
|
ratio = vratio( P[i], P[q], U );
|
||||||
|
if ( ratio > ratiomax ) {
|
||||||
|
ratiomax = ratio;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ratiomax;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Waffle's cells are based on a simple square grid which is distorted using a noise function
|
||||||
|
|
||||||
|
// position() calculates cell centre for cell (x, y), given plane slice z, scale factor s, distortion d
|
||||||
|
// and stores in supplied array
|
||||||
|
void position( int x, int y, double z, double s, double d, double V[2] ) {
|
||||||
|
double E[3], F[3];
|
||||||
|
|
||||||
|
// Values here are arbitrary, chosen simply to be far enough apart so they do not correlate
|
||||||
|
E[_x_] = x * 2.5;
|
||||||
|
E[_y_] = y * 2.5;
|
||||||
|
E[_z_] = z * 2.5;
|
||||||
|
// Cross-over between x and y is intentional
|
||||||
|
F[_x_] = y * 2.5 + 30.2;
|
||||||
|
F[_y_] = x * 2.5 - 12.1;
|
||||||
|
F[_z_] = z * 2.5 + 19.8;
|
||||||
|
|
||||||
|
V[_x_] = ( x + d * simplexNoise3D( E ) ) * s;
|
||||||
|
V[_y_] = ( y + d * simplexNoise3D( F ) ) * s;
|
||||||
|
}
|
||||||
|
|
||||||
|
// cached_position gives centre co-ordinates either from cache, or calculated from scratch if needed
|
||||||
|
void cached_position( double Cache[CACHE_WIDTH][CACHE_WIDTH][2], int x, int y, double z, double s, double d, double V[2] ) {
|
||||||
|
if ( abs(x) <= CACHE_NUM && abs(y) <= CACHE_NUM ) {
|
||||||
|
V[_x_] = Cache[x+CACHE_NUM][y+CACHE_NUM][_x_];
|
||||||
|
V[_y_] = Cache[x+CACHE_NUM][y+CACHE_NUM][_y_];
|
||||||
|
} else {
|
||||||
|
position( x,y,z,s,d,V );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("crackle");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(crackle_cellsize, 1.0),
|
||||||
|
VAR_REAL(crackle_power, 0.2),
|
||||||
|
VAR_REAL(crackle_distort, 0.0),
|
||||||
|
VAR_REAL(crackle_scale, 1.0),
|
||||||
|
VAR_REAL(crackle_z, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
// Pre-calculate cache of grid centres, to save time later . . .
|
||||||
|
int x,y;
|
||||||
|
for ( x= -CACHE_NUM; x <= CACHE_NUM; x++ ) { for ( y= -CACHE_NUM; y <= CACHE_NUM; y++ ) {
|
||||||
|
position( x, y, VAR(crackle_z), VAR(crackle_cellsize) / 2.0, VAR(crackle_distort), VAR(C)[x+CACHE_NUM][y+CACHE_NUM] );
|
||||||
|
} }
|
||||||
|
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double XCo, YCo, DXo, DYo, L, R, s, trgL;
|
||||||
|
double U[2];
|
||||||
|
int XCv, YCv;
|
||||||
|
|
||||||
|
// An infinite number of invisible cells? No thanks!
|
||||||
|
if ( 0.0 == VAR(crackle_cellsize) ) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scaling factor
|
||||||
|
s = VAR(crackle_cellsize) / 2.0;
|
||||||
|
|
||||||
|
// For a blur effect, base everything starting on a circle radius 1.0
|
||||||
|
// (as opposed to reading the values from FTx and FTy)
|
||||||
|
double blurr = (random01() + random01()) / 2.0 + ( random01() - 0.5 ) / 4.0;
|
||||||
|
|
||||||
|
double theta = 2 * M_PI * random01();
|
||||||
|
U[_x_] = blurr * sin(theta);
|
||||||
|
U[_y_] = blurr * cos(theta);
|
||||||
|
|
||||||
|
// Use integer values as Voronoi grid co-ordinates
|
||||||
|
XCv = (int) floor( U[_x_] / s );
|
||||||
|
YCv = (int) floor( U[_y_] / s );
|
||||||
|
|
||||||
|
// Get a set of 9 square centre points, based around the one above
|
||||||
|
int di, dj;
|
||||||
|
int i = 0;
|
||||||
|
for (di = -1; di < 2; di++) { for (dj = -1; dj < 2; dj++) {
|
||||||
|
cached_position( VAR(C), XCv+di, YCv+dj, VAR(crackle_z), s, VAR(crackle_distort), VAR(P)[i] );
|
||||||
|
i++;
|
||||||
|
} }
|
||||||
|
|
||||||
|
int q = closest( VAR(P), 9, U );
|
||||||
|
|
||||||
|
int offset[9][2] = { { -1, -1}, { -1, 0}, { -1, 1},
|
||||||
|
{ 0, -1}, { 0, 0}, { 0, 1},
|
||||||
|
{ 1, -1}, { 1, 0}, { 1, 1} };
|
||||||
|
|
||||||
|
// Remake list starting from chosen square, ensure it is completely surrounded (total 9 points)
|
||||||
|
|
||||||
|
// First adjust centres according to which one was found to be closest
|
||||||
|
XCv += offset[q][_x_];
|
||||||
|
YCv += offset[q][_y_];
|
||||||
|
|
||||||
|
// Get a new set of 9 square centre points, based around the definite closest point
|
||||||
|
i=0;
|
||||||
|
for (di = -1; di < 2; di++) { for (dj = -1; dj < 2; dj++) {
|
||||||
|
cached_position( VAR(C), XCv+di, YCv+dj, VAR(crackle_z), s, VAR(crackle_distort), VAR(P)[i] );
|
||||||
|
i++;
|
||||||
|
} }
|
||||||
|
|
||||||
|
L = voronoi( VAR(P), 9, 4, U ); // index 4 is centre cell
|
||||||
|
|
||||||
|
// Delta vector from centre
|
||||||
|
DXo = U[_x_] - VAR(P)[4][_x_];
|
||||||
|
DYo = U[_y_] - VAR(P)[4][_y_];
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
// Apply "interesting bit" to cell's DXo and DYo co-ordinates
|
||||||
|
|
||||||
|
// trgL is the new value of L
|
||||||
|
trgL = pow(L + 1e-100, VAR(crackle_power)) * VAR(crackle_scale); // ( 0.9 )
|
||||||
|
|
||||||
|
R = trgL / ( L + 1e-100 );
|
||||||
|
|
||||||
|
DXo *= R;
|
||||||
|
DYo *= R;
|
||||||
|
|
||||||
|
// Add cell centre co-ordinates back in
|
||||||
|
DXo += VAR(P)[4][_x_];
|
||||||
|
DYo += VAR(P)[4][_y_];
|
||||||
|
|
||||||
|
// Finally add values in
|
||||||
|
FPx += VVAR * DXo;
|
||||||
|
FPy += VVAR * DYo;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
73
Plugin/curve.c
Normal file
73
Plugin/curve.c
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2007-2009 Joel Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double curve_xamp;
|
||||||
|
double curve_xlength;
|
||||||
|
double curve_yamp;
|
||||||
|
double curve_ylength;
|
||||||
|
|
||||||
|
// precalc values:
|
||||||
|
double pc_xamp;
|
||||||
|
double pc_yamp;
|
||||||
|
double pc_xlen;
|
||||||
|
double pc_ylen;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("curve");
|
||||||
|
|
||||||
|
// Define the Variables
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(curve_xamp, 0.0),
|
||||||
|
VAR_REAL(curve_yamp, 0.0),
|
||||||
|
VAR_REAL(curve_xlength, 1.0),
|
||||||
|
VAR_REAL(curve_ylength, 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
inline double fmax(double a, double b) {
|
||||||
|
return a > b ? a : b;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(pc_xamp) = VVAR * VAR(curve_xamp);
|
||||||
|
VAR(pc_yamp) = VVAR * VAR(curve_yamp);
|
||||||
|
VAR(pc_xlen) = 1.0 / fmax(VAR(curve_xlength) * VAR(curve_xlength), 1E-20);
|
||||||
|
VAR(pc_ylen) = 1.0 / fmax(VAR(curve_ylength) * VAR(curve_ylength), 1E-20);
|
||||||
|
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
FPx += VVAR * FTx + VAR(pc_xamp) * exp(-FTy * FTy * VAR(pc_xlen));
|
||||||
|
FPy += VVAR * FTy + VAR(pc_yamp) * exp(-FTx * FTx * VAR(pc_ylen));
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
85
Plugin/dc_boarders.c
Normal file
85
Plugin/dc_boarders.c
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define APO_NOVARIABLES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("dc_boarders");
|
||||||
|
|
||||||
|
inline double rint(double x)
|
||||||
|
{
|
||||||
|
int temp; temp = (x >= 0. ? (int)(x + 0.5) : (int)(x - 0.5));
|
||||||
|
return (double)temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
// Always return TRUE.
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double roundX, roundY, offsetX, offsetY;
|
||||||
|
|
||||||
|
roundX = rint(FTx);
|
||||||
|
roundY = rint(FTy);
|
||||||
|
offsetX = FTx - roundX;
|
||||||
|
offsetY = FTy - roundY;
|
||||||
|
|
||||||
|
if(random01() >= 0.75)
|
||||||
|
{
|
||||||
|
FPx += VVAR*(offsetX*0.5 + roundX);
|
||||||
|
FPy += VVAR*(offsetY*0.5 + roundY);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(fabs(offsetX) >= fabs(offsetY))
|
||||||
|
{
|
||||||
|
if(offsetX >= 0.0)
|
||||||
|
{
|
||||||
|
FPx += VVAR*(offsetX*0.5 + roundX + 0.25);
|
||||||
|
FPy += VVAR*(offsetY*0.5 + roundY + 0.25 * offsetY / offsetX);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPx += VVAR*(offsetX*0.5 + roundX - 0.25);
|
||||||
|
FPy += VVAR*(offsetY*0.5 + roundY - 0.25 * offsetY / offsetX);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(offsetY >= 0.0)
|
||||||
|
{
|
||||||
|
FPy += VVAR*(offsetY*0.5 + roundY + 0.25);
|
||||||
|
FPx += VVAR*(offsetX*0.5 + roundX + offsetX/offsetY*0.25);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPy += VVAR*(offsetY*0.5 + roundY - 0.25);
|
||||||
|
FPx += VVAR*(offsetX*0.5 + roundX - offsetX/offsetY*0.25);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
55
Plugin/dc_bubble.c
Normal file
55
Plugin/dc_bubble.c
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double dc_bubble_centerx;
|
||||||
|
double dc_bubble_centery;
|
||||||
|
double dc_bubble_scale;
|
||||||
|
|
||||||
|
double bdcs;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("dc_bubble");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(dc_bubble_centerx, 0.0),
|
||||||
|
VAR_REAL(dc_bubble_centery, 0.0),
|
||||||
|
VAR_REAL(dc_bubble_scale, 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(bdcs) = 1.0 / (VAR(dc_bubble_scale) == 0.0 ? 10E-6 : VAR(dc_bubble_scale));
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double r = (sqr(FTx) + sqr(FTy));
|
||||||
|
double r4_1 = r / 4.0 + 1.0;
|
||||||
|
r4_1 = VVAR / r4_1;
|
||||||
|
FPx += FPx + r4_1 * FTx;
|
||||||
|
FPy += FPy + r4_1 * FTy;
|
||||||
|
FPz += FPz + VVAR * (2.0 / r4_1 - 1.0);
|
||||||
|
|
||||||
|
TC = fmod(fabs(VAR(bdcs) * (sqr(FPx + VAR(dc_bubble_centerx)) + sqr(FPy + VAR(dc_bubble_centery)))), 1.0);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
63
Plugin/dc_cube.c
Normal file
63
Plugin/dc_cube.c
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double dc_cube_c1, dc_cube_c2, dc_cube_c3,
|
||||||
|
dc_cube_c4, dc_cube_c5, dc_cube_c6;
|
||||||
|
double dc_cube_x, dc_cube_y, dc_cube_z;
|
||||||
|
double c1, c2, c3, c4, c5, c6;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("dc_cube");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(dc_cube_c1, 0.0), VAR_REAL(dc_cube_c2, 0.0),
|
||||||
|
VAR_REAL(dc_cube_c3, 0.0), VAR_REAL(dc_cube_c4, 0.0),
|
||||||
|
VAR_REAL(dc_cube_c5, 0.0), VAR_REAL(dc_cube_c6, 0.0),
|
||||||
|
VAR_REAL(dc_cube_x, 1.0), VAR_REAL(dc_cube_y, 1.0),
|
||||||
|
VAR_REAL(dc_cube_z, 1.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(c1) = VAR(dc_cube_c1)<0?0:VAR(dc_cube_c1)>1?1:VAR(dc_cube_c1);
|
||||||
|
VAR(c2) = VAR(dc_cube_c2)<0?0:VAR(dc_cube_c2)>1?1:VAR(dc_cube_c2);
|
||||||
|
VAR(c3) = VAR(dc_cube_c3)<0?0:VAR(dc_cube_c3)>1?1:VAR(dc_cube_c3);
|
||||||
|
VAR(c4) = VAR(dc_cube_c4)<0?0:VAR(dc_cube_c4)>1?1:VAR(dc_cube_c4);
|
||||||
|
VAR(c5) = VAR(dc_cube_c5)<0?0:VAR(dc_cube_c5)>1?1:VAR(dc_cube_c5);
|
||||||
|
VAR(c6) = VAR(dc_cube_c6)<0?0:VAR(dc_cube_c6)>1?1:VAR(dc_cube_c6);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double x, y, z;
|
||||||
|
double p = 2*random01()-1, q = 2*random01()-1;
|
||||||
|
int i = rand() % 3, j = rand() & 1; switch (i) {
|
||||||
|
case 0: x = VVAR * (j?-1:1); y = VVAR * p; z = VVAR * q;
|
||||||
|
if(j) TC=VAR(c1); else TC=VAR(c2); break;
|
||||||
|
case 1: x = VVAR * p; y = VVAR * (j?-1:1); z = VVAR * q;
|
||||||
|
if(j) TC=VAR(c3); else TC=VAR(c4); break;
|
||||||
|
case 2: x = VVAR * p; y = VVAR * q; z = VVAR * (j?-1:1);
|
||||||
|
if(j) TC=VAR(c5); else TC=VAR(c6); break;
|
||||||
|
}
|
||||||
|
FPx += x * VAR(dc_cube_x); FPy += y * VAR(dc_cube_y); FPz += z * VAR(dc_cube_z);
|
||||||
|
return TRUE;
|
||||||
|
}
|
117
Plugin/dc_gridout.c
Normal file
117
Plugin/dc_gridout.c
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2007-2008 Michael Faber
|
||||||
|
Copyright (C) 2007-2008 Joel Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define APO_NOVARIABLES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("dc_gridout");
|
||||||
|
|
||||||
|
inline double rint(double x)
|
||||||
|
{
|
||||||
|
int temp; temp = (x >= 0. ? (int)(x + 0.5) : (int)(x - 0.5));
|
||||||
|
return (double)temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double x = rint(FTx);
|
||||||
|
double y = rint(FTy);
|
||||||
|
double c = TC;
|
||||||
|
|
||||||
|
if (y <= 0.0)
|
||||||
|
{
|
||||||
|
if (x > 0.0)
|
||||||
|
{
|
||||||
|
if (-y >= x)
|
||||||
|
{
|
||||||
|
FPx += VVAR * (FTx + 1.0);
|
||||||
|
FPy += VVAR * FTy;
|
||||||
|
c += 0.25;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPx += VVAR * FTx;
|
||||||
|
FPy += VVAR * (FTy + 1.0);
|
||||||
|
c += 0.75;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (y <= x)
|
||||||
|
{
|
||||||
|
FPx += VVAR * (FTx + 1.0);
|
||||||
|
FPy += VVAR * FTy;
|
||||||
|
c += 0.25;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPx += VVAR * FTx;
|
||||||
|
FPy += VVAR * (FTy - 1.0);
|
||||||
|
c += 0.75;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x > 0.0)
|
||||||
|
{
|
||||||
|
if (y >= x)
|
||||||
|
{
|
||||||
|
FPx += VVAR * (FTx - 1.0);
|
||||||
|
FPy += VVAR * FTy;
|
||||||
|
c += 0.25;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPx += VVAR * FTx;
|
||||||
|
FPy += VVAR * (FTy + 1.0);
|
||||||
|
c += 0.75;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (y > -x)
|
||||||
|
{
|
||||||
|
FPx += VVAR * (FTx - 1.0);
|
||||||
|
FPy += VVAR * FTy;
|
||||||
|
c += 0.25;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FPx += VVAR * FTx;
|
||||||
|
FPy += VVAR * (FTy - 1.0);
|
||||||
|
c += 0.75;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TC = fmod(c, 1.0);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
52
Plugin/dc_linear.c
Normal file
52
Plugin/dc_linear.c
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double dc_linear_offset, dc_linear_angle, dc_linear_scale;
|
||||||
|
double ldcs, ldca;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("dc_linear");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(dc_linear_offset, 0.0),
|
||||||
|
VAR_REAL(dc_linear_angle, 0.0),
|
||||||
|
VAR_REAL(dc_linear_scale, 1.0),
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(ldcs) = 1.0 / (VAR(dc_linear_scale) == 0.0 ? 10E-6 : VAR(dc_linear_scale));
|
||||||
|
VAR(ldca) = VAR(dc_linear_offset) * M_PI;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
FPx += VVAR * FTx;
|
||||||
|
FPy += VVAR * FTy;
|
||||||
|
FPz += VVAR * FTz;
|
||||||
|
|
||||||
|
double c, s; fsincos(VAR(dc_linear_angle), &s, &c);
|
||||||
|
TC = fmod( fabs( 0.5 * (VAR(ldcs) * ((c * FPx + s * FPy + VAR(dc_linear_offset))) + 1.0) ), 1.0 );
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
301
Plugin/dc_mandelbrot.c
Normal file
301
Plugin/dc_mandelbrot.c
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Mandelbrot Set Plugin v2 - Copyright 2008,2009 Jed Kelsey
|
||||||
|
Changed to work with Apophysis 7X / DC in 2010 by Georg Kiehne
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
int dcm_iter;
|
||||||
|
int dcm_miniter;
|
||||||
|
int dcm_smooth_iter;
|
||||||
|
int dcm_retries;
|
||||||
|
int dcm_mode;
|
||||||
|
int dcm_pow;
|
||||||
|
int dcm_color_method;
|
||||||
|
double dcm_invert;
|
||||||
|
double dcm_xmin;
|
||||||
|
double dcm_xmax;
|
||||||
|
double dcm_ymin;
|
||||||
|
double dcm_ymax;
|
||||||
|
double dcm_scatter;
|
||||||
|
double dcm_sx;
|
||||||
|
double dcm_sy;
|
||||||
|
double dcm_zscale;
|
||||||
|
|
||||||
|
double x0, y0;
|
||||||
|
double zs, sc;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("dc_mandelbrot");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_INTEGER_RANGE(dcm_iter, 5, INT_MAX, 25),
|
||||||
|
VAR_INTEGER_RANGE(dcm_miniter, 0, INT_MAX, 1),
|
||||||
|
VAR_INTEGER_RANGE(dcm_smooth_iter, 0, INT_MAX, 0),
|
||||||
|
VAR_INTEGER_RANGE(dcm_retries, 0, INT_MAX, 50),
|
||||||
|
VAR_INTEGER_RANGE(dcm_mode, 0, 5, 0),
|
||||||
|
VAR_INTEGER_RANGE(dcm_pow, -6, 6, 2), // TODO: negative powers
|
||||||
|
VAR_INTEGER_RANGE(dcm_color_method, 0, 7, 0),
|
||||||
|
VAR_REAL_RANGE(dcm_invert, 0.0, 1.0, 0.0),
|
||||||
|
VAR_REAL(dcm_xmin, -2.0),
|
||||||
|
VAR_REAL(dcm_xmax, 2.0),
|
||||||
|
VAR_REAL(dcm_ymin, -1.5),
|
||||||
|
VAR_REAL(dcm_ymax, 1.5),
|
||||||
|
VAR_REAL_RANGE(dcm_scatter, -1000.0, 1000.0, 0.0),
|
||||||
|
|
||||||
|
// Following parameters don't affect iterations, just the output point positions.
|
||||||
|
VAR_REAL(dcm_sx, 0.0),
|
||||||
|
VAR_REAL(dcm_sy, 0.0),
|
||||||
|
VAR_REAL(dcm_zscale, 0.0)
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(zs) = VVAR * VAR(dcm_zscale) / VAR(dcm_iter);
|
||||||
|
VAR(sc) = VAR(dcm_scatter) / 10.0;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline double fmod2(double h, double q) { return fmod(fabs(h),q); }
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double x=0.0, y=0.0, x1=0.0, y1=0.0, x2, y2, xtemp=0.0;
|
||||||
|
double cx=0.0, cy=0.0;
|
||||||
|
|
||||||
|
int maxiter = VAR(dcm_iter);
|
||||||
|
int miniter = VAR(dcm_miniter); // = 0.1*(maxiter*(1-scatter));
|
||||||
|
|
||||||
|
double xmax = VAR(dcm_xmax);
|
||||||
|
double xmin = VAR(dcm_xmin);
|
||||||
|
double ymax = VAR(dcm_ymax);
|
||||||
|
double ymin = VAR(dcm_ymin);
|
||||||
|
|
||||||
|
int maxRetries = VAR(dcm_retries);
|
||||||
|
int mode = VAR(dcm_mode); /* 0=Mandelbrot, 1=Julia, 3=Tricorn(Mandelbar) */
|
||||||
|
|
||||||
|
int color_method = VAR(dcm_color_method);
|
||||||
|
double xp = 0.0, yp = 0.0;
|
||||||
|
|
||||||
|
int smooth_iter=0, max_smooth_iter=VAR(dcm_smooth_iter);
|
||||||
|
int inverted, iter=0, retries=0;
|
||||||
|
int isblur = (VAR(sc)>=0);
|
||||||
|
|
||||||
|
double smoothed_iter = 0.0, inv_iter = 1.0;
|
||||||
|
double mag2 = 0.0;
|
||||||
|
|
||||||
|
int m_power = VAR(dcm_pow);
|
||||||
|
int m_power_abs = ((m_power<0) ? -m_power : m_power);
|
||||||
|
|
||||||
|
inverted = random01() < VAR(dcm_invert);
|
||||||
|
|
||||||
|
if (!isblur) {
|
||||||
|
VAR(x0) = FTx;
|
||||||
|
VAR(y0) = FTy;
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (VAR(sc)==0) {
|
||||||
|
// Force selection of point at random
|
||||||
|
VAR(x0) = VAR(y0) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (VAR(x0)==0 && VAR(y0)==0) {
|
||||||
|
// Choose a point at random
|
||||||
|
VAR(x0) = (xmax-xmin)*random01() + xmin;
|
||||||
|
VAR(y0) = (ymax-ymin)*random01() + ymin;
|
||||||
|
} else {
|
||||||
|
// Choose a point close to previous point
|
||||||
|
VAR(x0) += VAR(sc)*(random01()-0.5);
|
||||||
|
VAR(y0) += VAR(sc)*(random01()-0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
// default to Mandelbrot Set
|
||||||
|
cx = x1 = x = xp = VAR(x0);
|
||||||
|
cy = y1 = y = yp = VAR(y0);
|
||||||
|
|
||||||
|
switch(mode) {
|
||||||
|
case 1: // Julia Set
|
||||||
|
cx = TM(e);
|
||||||
|
cy = TM(f);
|
||||||
|
break;
|
||||||
|
case 2: // tricorn (Mandelbar)
|
||||||
|
// leave as-is, handled below
|
||||||
|
break;
|
||||||
|
default: // Regular Mandelbrot set
|
||||||
|
// Leave as-is
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
iter = smooth_iter = 0;
|
||||||
|
|
||||||
|
while ( (((x2=x*x) + (y2=y*y) < 4) && (iter < maxiter)) || (smooth_iter++<max_smooth_iter) ) {
|
||||||
|
if (smooth_iter==0)
|
||||||
|
xp=x; yp=y;
|
||||||
|
|
||||||
|
if (mode==2) y=-y;
|
||||||
|
|
||||||
|
switch(m_power_abs) {
|
||||||
|
case 3:
|
||||||
|
xtemp = x*(x2 - 3*y2) + cx;
|
||||||
|
y = y*(3*x2 - y2) + cy;
|
||||||
|
x = xtemp;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
xtemp = (x2-y2)*(x2-y2)-4*x2*y2 + cx;
|
||||||
|
y = 4*x*y*(x2 - y2) + cy;
|
||||||
|
x = xtemp;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
xtemp = x2*x2*x - 10*x2*x*y2 + 5*x*y2*y2 + cx;
|
||||||
|
y = 5*x2*x2*y - 10*x2*y2*y + y2*y2*y + cy;
|
||||||
|
x = xtemp;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
xtemp = x2*x2*x2 - 15*x2*x2*y2 + 15*x2*y2*y2 - y2*y2*y2 + cx;
|
||||||
|
y = 6*x2*x2*x*y - 20*x2*x*y2*y + 6*x*y2*y2*y + cy;
|
||||||
|
x = xtemp;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if ((m_power>0) && (iter<maxiter)) // (more iterations not helpful)
|
||||||
|
iter = maxiter-1;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
default:
|
||||||
|
xtemp = x2 - y2 + cx;
|
||||||
|
y = 2*x*y + cy;
|
||||||
|
x = xtemp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((m_power<0) && (xtemp=x2+y2)>0) {
|
||||||
|
x = x/xtemp;
|
||||||
|
y = -y/xtemp;
|
||||||
|
}
|
||||||
|
|
||||||
|
iter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
iter -= (smooth_iter-1);
|
||||||
|
|
||||||
|
// could probably bypass check and always select next point at random
|
||||||
|
if ( (miniter==0) || (!inverted && (iter>=maxiter)) /*|| (iter < miniter)*/ ) {
|
||||||
|
VAR(x0) = VAR(y0) = 0; // Random point next time
|
||||||
|
} else if ( (iter < miniter) || (inverted && (iter<maxiter/2)) ) {
|
||||||
|
//if (retries>maxRetries-5) {
|
||||||
|
// VAR(x0) /= 100;
|
||||||
|
// VAR(y0) /= 100;
|
||||||
|
//} else
|
||||||
|
VAR(x0) = VAR(y0) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (++retries > maxRetries)
|
||||||
|
break;
|
||||||
|
|
||||||
|
} while ((inverted && (iter < maxiter)) || (!inverted && ((iter >= maxiter) || ((miniter>0) && (iter < miniter)))));
|
||||||
|
|
||||||
|
smoothed_iter = iter;
|
||||||
|
if (max_smooth_iter>0) {
|
||||||
|
// use Normalized Iteration Count Algorithm for smoothing
|
||||||
|
mag2 = x2 + y2;
|
||||||
|
if (mag2 > 1.1) //FIXME: change this back to if(mag2>4) ?
|
||||||
|
smoothed_iter += 1 - log(log(mag2)/2)/M_LN2;
|
||||||
|
}
|
||||||
|
if (smoothed_iter>0)
|
||||||
|
inv_iter = 1/smoothed_iter;
|
||||||
|
else
|
||||||
|
inv_iter = 1;
|
||||||
|
|
||||||
|
// Adjust location of point according to sx,sy and final iterated point (x,y)
|
||||||
|
// (use of inv_iter reduces effect of factor near regions of high gradient
|
||||||
|
FPx += VVAR*(x1 + VAR(dcm_sx)*x*inv_iter);
|
||||||
|
FPy += VVAR*(y1 + VAR(dcm_sy)*y*inv_iter);
|
||||||
|
//FPx += VVAR*(x1 + VAR(dcm_sx)*x);
|
||||||
|
//FPy += VVAR*(y1 + VAR(dcm_sy)*y);
|
||||||
|
|
||||||
|
// TODO: add check to see whether this Apo supports 3D?
|
||||||
|
if (VAR(dcm_zscale)) {
|
||||||
|
FPz += smoothed_iter * VAR(zs);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allow plugin to influence coloring (-X- changed for Apo7X/DC)
|
||||||
|
|
||||||
|
if (smoothed_iter<0) smoothed_iter=0;
|
||||||
|
if (smoothed_iter>maxiter) smoothed_iter=maxiter;
|
||||||
|
|
||||||
|
switch (color_method) {
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
// scale colormap indexing extent by the final angle of the iterated point
|
||||||
|
// after the extra "smoothing" iterations complete
|
||||||
|
xtemp = 0.0;
|
||||||
|
if (y != 0.0) xtemp = atan2(x,y) * M_1_2PI;
|
||||||
|
TC = fmod2(xtemp, 1);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
// scale colormap indexing extent by the angle of the iterated point at time of escape
|
||||||
|
xtemp = 0.0;
|
||||||
|
if (yp != 0.0) xtemp = atan2(xp,yp) * M_1_2PI;
|
||||||
|
TC = fmod2(xtemp, 1);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
// combination of mode 4 and 2
|
||||||
|
xtemp = 0.0;
|
||||||
|
if (y-yp != 0.0) xtemp = atan2(x-xp,y-yp) * M_1_2PI;
|
||||||
|
TC = fmod2((smoothed_iter/maxiter * xtemp), 1);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// scale colormap indexing extent by the product of the scaled iteration count and
|
||||||
|
// the angle of the iterated point at time of escape
|
||||||
|
xtemp = 0.0;
|
||||||
|
if (yp != 0.0) xtemp = atan2(xp,yp) * M_1_2PI;
|
||||||
|
TC = fmod2((smoothed_iter/maxiter * xtemp), 1);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
// scale colormap indexing extent by a combination of scaled iteration count,
|
||||||
|
// the squared magnitude and adjusted angle of the iterated point at time of escape
|
||||||
|
xtemp = 0.0;
|
||||||
|
if (yp != 0.0) xtemp = (0.5 + atan2(xp,yp) * M_1_2PI) * (xp*xp+yp*yp);
|
||||||
|
TC = fmod2((smoothed_iter/maxiter * xtemp), 1);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
// scale colormap indexing extent by a combination of scaled iteration count and
|
||||||
|
// the squared magnitude of the iterated point at time of escape
|
||||||
|
xtemp = xp*xp+yp*yp;
|
||||||
|
TC = fmod2((smoothed_iter/maxiter * xtemp), 1);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
// scale colormap indexing extent by a combination of scaled iteration count and
|
||||||
|
// the squared magnitude of the iterated point at time of escape
|
||||||
|
// (slightly more relaxed color rolloff than case 6)
|
||||||
|
xtemp = sqrt(xp*xp+yp*yp);
|
||||||
|
TC = fmod2((smoothed_iter/maxiter * xtemp), 1);
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
// default coloring method: scale colormap indexing extent by the scaled "escape time"
|
||||||
|
// (iteration count)
|
||||||
|
default:
|
||||||
|
TC = fmod2(smoothed_iter/maxiter, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
102
Plugin/dc_triangle.c
Normal file
102
Plugin/dc_triangle.c
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double dc_triangle_scatter_area, A;
|
||||||
|
int dc_triangle_zero_edges;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("dc_triangle");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL(dc_triangle_scatter_area, 0.0),
|
||||||
|
VAR_INTEGER_RANGE(dc_triangle_zero_edges, 0, 1, 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(A) = VAR(dc_triangle_scatter_area) < -1 ? -1 :
|
||||||
|
VAR(dc_triangle_scatter_area) > 1 ? 1 :
|
||||||
|
VAR(dc_triangle_scatter_area);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This function is called during calculation.
|
||||||
|
You must call the argument "vp"
|
||||||
|
*/
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
// set up triangle
|
||||||
|
const double
|
||||||
|
xx = TM(a), xy = TM(b), // X
|
||||||
|
yx = TM(c) * -1, yy = TM(d) * -1, // Y
|
||||||
|
ox = TM(e), oy = TM(f), // O
|
||||||
|
px = FTx - ox, py = FTy - oy; // P
|
||||||
|
|
||||||
|
// calculate dot products
|
||||||
|
const double dot00 = xx * xx + xy * xy; // X * X
|
||||||
|
const double dot01 = xx * yx + xy * yy; // X * Y
|
||||||
|
const double dot02 = xx * px + xy * py; // X * P
|
||||||
|
const double dot11 = yx * yx + yy * yy; // Y * Y
|
||||||
|
const double dot12 = yx * px + yy * py; // Y * P
|
||||||
|
|
||||||
|
// calculate barycentric coordinates
|
||||||
|
const double denom = (dot00 * dot11 - dot01 * dot01);
|
||||||
|
const double num_u = (dot11 * dot02 - dot01 * dot12);
|
||||||
|
const double num_v = (dot00 * dot12 - dot01 * dot02);
|
||||||
|
|
||||||
|
// u, v must not be constant
|
||||||
|
double u = num_u / denom;
|
||||||
|
double v = num_v / denom;
|
||||||
|
int inside = 0, f = 1;
|
||||||
|
|
||||||
|
// case A - point escapes edge XY
|
||||||
|
if (u + v > 1) { f = -1;
|
||||||
|
if (u > v) { u = u>1?1:u; v = 1-u; }
|
||||||
|
else { v = v>1?1:v; u = 1-v; } }
|
||||||
|
|
||||||
|
// case B - point escapes either edge OX or OY
|
||||||
|
else if ((u < 0) || (v < 0)) {
|
||||||
|
u = u<0?0:u>1?1:u; v = v<0?0:v>1?1:v; }
|
||||||
|
|
||||||
|
// case C - point is in triangle
|
||||||
|
else inside = 1;
|
||||||
|
|
||||||
|
// handle outside points
|
||||||
|
if (VAR(dc_triangle_zero_edges) && !inside) u = v = 0;
|
||||||
|
else if (!inside) {
|
||||||
|
u = (u + random01() * VAR(A) * f);
|
||||||
|
v = (v + random01() * VAR(A) * f);
|
||||||
|
u = u<-1?-1:u>1?1:u; v = v<-1?-1:v>1?1:v;
|
||||||
|
|
||||||
|
if ((u + v > 1) && (VAR(A) > 0))
|
||||||
|
if (u > v) { u = u>1?1:u; v = 1-u; }
|
||||||
|
else { v = v>1?1:v; u = 1-v; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// set output
|
||||||
|
FPx += VVAR * (ox + u * xx + v * yx);
|
||||||
|
FPy += VVAR * (oy + u * xy + v * yy);
|
||||||
|
FPz += VVAR * FTz;
|
||||||
|
TC = fmod(fabs(u+v),1.0);
|
||||||
|
|
||||||
|
// done
|
||||||
|
return TRUE;
|
||||||
|
}
|
69
Plugin/dc_ztransl.c
Normal file
69
Plugin/dc_ztransl.c
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Written by Georg Kiehne
|
||||||
|
--> http://xyrus-worx.net, http://xyrus02.deviantart.com
|
||||||
|
|
||||||
|
If you find any bugs / nags - keep them :)
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
double dc_ztransl_x0;
|
||||||
|
double dc_ztransl_x1;
|
||||||
|
double dc_ztransl_factor;
|
||||||
|
double x0_, x1_, x1_m_x0;
|
||||||
|
int dc_ztransl_overwrite;
|
||||||
|
int dc_ztransl_clamp;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
APO_PLUGIN("dc_ztransl");
|
||||||
|
APO_VARIABLES(
|
||||||
|
VAR_REAL_RANGE(dc_ztransl_x0, 0.0, 1.0, 0.0),
|
||||||
|
VAR_REAL_RANGE(dc_ztransl_x1, 0.0, 1.0, 1.0),
|
||||||
|
VAR_REAL(dc_ztransl_factor, 1.0),
|
||||||
|
VAR_INTEGER_RANGE(dc_ztransl_overwrite, 0, 1, 1),
|
||||||
|
VAR_INTEGER_RANGE(dc_ztransl_clamp, 0, 1, 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
vp->var.x0_ = vp->var.dc_ztransl_x0 < vp->var.dc_ztransl_x1 ? vp->var.dc_ztransl_x0 : vp->var.dc_ztransl_x1;
|
||||||
|
vp->var.x1_ = vp->var.dc_ztransl_x0 > vp->var.dc_ztransl_x1 ? vp->var.dc_ztransl_x0 : vp->var.dc_ztransl_x1;
|
||||||
|
vp->var.x1_m_x0 = vp->var.x1_ - vp->var.x0_ == 0 ? EPS : vp->var.x1_ - vp->var.x0_;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline double flip(double a, double b, double c){return (c*(b-a)+a);}
|
||||||
|
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double zf = vp->var.dc_ztransl_factor * (*(vp->pColor) - vp->var.x0_) / vp->var.x1_m_x0;
|
||||||
|
if (vp->var.dc_ztransl_clamp != 0)
|
||||||
|
zf = zf < 0 ? 0 : zf > 1 ? 1 : zf;
|
||||||
|
|
||||||
|
*(vp->pFPx) += vp->vvar*(*(vp->pFTx));
|
||||||
|
*(vp->pFPy) += vp->vvar*(*(vp->pFTy));
|
||||||
|
|
||||||
|
if (vp->var.dc_ztransl_overwrite == 0)
|
||||||
|
*(vp->pFPz) += vp->vvar*(*(vp->pFTz))*zf;
|
||||||
|
else *(vp->pFPz) += vp->vvar*zf;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
57
Plugin/deltaA.c
Normal file
57
Plugin/deltaA.c
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double v;
|
||||||
|
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#define APO_NOVARIABLES
|
||||||
|
#define APO_VIRTUALVAR
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("deltaA");
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(v) = 0.5 * VVAR / M_PI;
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double avgr, avga;
|
||||||
|
double s, c;
|
||||||
|
|
||||||
|
avgr = VVAR * (sqrt(sqr(FTy) + sqr(FTx + 1.0)) / sqrt(sqr(FTy) + sqr(FTx - 1.0)));
|
||||||
|
avga = (atan2( FTy, FTx - 1.0) - atan2(FTy, FTx + 1.0) )/ 2.0;
|
||||||
|
fsincos( avga, &s, &c);
|
||||||
|
|
||||||
|
FPx += avgr * c;
|
||||||
|
FPy += avgr * s;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
64
Plugin/edisc.c
Normal file
64
Plugin/edisc.c
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
Copyright (C) 2007-2009 Joel Faber
|
||||||
|
Copyright (C) 2007-2009 Michael Faber
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Must define this structure before we include apoplugin.h
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
double edisc_vvar;
|
||||||
|
} Variables;
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#define APO_NOVARIABLES
|
||||||
|
#define APO_VIRTUALVAR
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
// Set the name of this plugin
|
||||||
|
APO_PLUGIN("edisc");
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
VAR(edisc_vvar) = VVAR / 11.57034632;
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
// You must call the argument "vp".
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double tmp = FTy * FTy + FTx * FTx + 1.0;
|
||||||
|
double tmp2 = 2.0 * FTx;
|
||||||
|
double r1 = sqrt(tmp + tmp2);
|
||||||
|
double r2 = sqrt(tmp - tmp2);
|
||||||
|
double xmax = (r1 + r2) * 0.5;
|
||||||
|
double snv, csv, snhu, cshu;
|
||||||
|
double expu, expuinv;
|
||||||
|
|
||||||
|
fsincos(log(xmax + sqrt(xmax - 1.0)), &snv, &csv);
|
||||||
|
sinhcosh(-acos(FTx / xmax), &snhu, &cshu);
|
||||||
|
|
||||||
|
if (FTy > 0.0)
|
||||||
|
snv = -snv;
|
||||||
|
|
||||||
|
FPx += VAR(edisc_vvar) * cshu * csv;
|
||||||
|
FPy += VAR(edisc_vvar) * snhu * snv;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
53
Plugin/ex.c
Normal file
53
Plugin/ex.c
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
Apophysis Plugin
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#define APO_NOVARIABLES
|
||||||
|
#include "apoplugin.h"
|
||||||
|
|
||||||
|
/* SET PLUGIN NAME HERE:
|
||||||
|
e.g. name-me
|
||||||
|
*/
|
||||||
|
APO_PLUGIN("ex");
|
||||||
|
|
||||||
|
/* DO PREPARE STUFF HERE:
|
||||||
|
You must call the argument "vp"
|
||||||
|
*/
|
||||||
|
int PluginVarPrepare(Variation* vp)
|
||||||
|
{
|
||||||
|
return TRUE; // Always return TRUE.
|
||||||
|
}
|
||||||
|
|
||||||
|
/* DO CALC STUFF HERE:
|
||||||
|
You must call the argument "vp"
|
||||||
|
*/
|
||||||
|
int PluginVarCalc(Variation* vp)
|
||||||
|
{
|
||||||
|
double FAngle = atan2(FTy, FTx);
|
||||||
|
double r = sqrt(FTx*FTx+FTy*FTy);
|
||||||
|
double n0 = sin(FAngle + r);
|
||||||
|
double n1 = cos(FAngle - r);
|
||||||
|
double m0 = sqr(n0) * n0;
|
||||||
|
double m1 = sqr(n1) * n1;
|
||||||
|
|
||||||
|
r = r * VVAR;
|
||||||
|
FPx = FPx + r * (m0 + m1);
|
||||||
|
FPy = FPy + r * (m0 - m1);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user