From 47de63b4097d4dde4e867feb16acae7fbe6a268b Mon Sep 17 00:00:00 2001 From: dkolmck Date: Thu, 6 Aug 2009 14:34:03 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/kolmck/code@10 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07 --- Addons/CplxMath.pas | 278 +++++++++++++++++++++++++++++++++++++ Addons/addons.dpk | 94 +++++++++++++ Addons/addons.res | Bin 0 -> 1536 bytes Addons/addons2006.bdsproj | 173 +++++++++++++++++++++++ Addons/addons2006.dpk | 96 +++++++++++++ Addons/addons2006.res | Bin 0 -> 5056 bytes Addons/addons_whatsnew.txt | 21 +++ 7 files changed, 662 insertions(+) create mode 100644 Addons/CplxMath.pas create mode 100644 Addons/addons.dpk create mode 100644 Addons/addons.res create mode 100644 Addons/addons2006.bdsproj create mode 100644 Addons/addons2006.dpk create mode 100644 Addons/addons2006.res create mode 100644 Addons/addons_whatsnew.txt diff --git a/Addons/CplxMath.pas b/Addons/CplxMath.pas new file mode 100644 index 0000000..7cd180a --- /dev/null +++ b/Addons/CplxMath.pas @@ -0,0 +1,278 @@ +unit CplxMath; +{* This unit contains functins for working with complex numbers. To use with + KOL library and its kolmath.pas unit instead of standard math.pas, define + synmbol KOL in project options, or uncomment its definition below. } + +interface + +//{$DEFINE KOL} + +{$IFNDEF KOL} + {$IFDEF KOL_MCK} + {$DEFINE KOL} + {$ENDIF} +{$ENDIF} + +uses {$IFDEF KOL} kolmath, kol {$ELSE} math, sysutils {$ENDIF}; + +type + {$IFDEF CPLX_EXTENDED} + Double = Extended; + {$ENDIF} + + Complex = record Re, Im: double end; + {* } + + function CfromReIm( Re, Im: Double ): Complex; + {* Re + i * Im } + + function Cadd( const X, Y: Complex ): Complex; + {* X + Y } + + function Cneg( const X: Complex ): Complex; + {* -X } + + function Csub( const X, Y: Complex ): Complex; + {* X - Y } + + function Cmul( const X, Y: Complex ): Complex; + {* X * Y } + + function CmulD( const X: Complex; D: Double ): Complex; + {* X * D } + + function CmulI( const X: Complex ): Complex; + {* i * X } + + function Cdiv( const X, Y: Complex ): Complex; + {* X / Y } + + function Cmod( const X: Complex ): Double; + {* Q( X.Re^2 + X.Im^2 ) } + + function Carg( const X: Complex ): Double; + {* arctg( X.Im / X.Re ) } + + function CfromModArg( R, Arg: Double ): Complex; + {* R * ( cos Arg + i * sin Arg ) } + + function Cpow( const X: Complex; Pow: Double ): Complex; + {* X ^ Pow } + + function Cpower( const X, Pow: Complex ): Complex; + {* X ^ Pow } + + function CIntPower( const X: Complex; Pow: Integer ): Complex; + {* X ^ Pow} + + function Csqrt( const X: Complex ): Complex; + {* Q( X ) } + + function Cexp( const X: Complex ): Complex; + {* exp( X ) } + + function Cln( const X: Complex ): Complex; + {* ln( X ) } + + function Ccos( const X: Complex ): Complex; + {* cos( X ) } + + function Csin( const X: Complex ): Complex; + {* sin( X ) } + + function C2Str( const X: Complex ): String; + {* } + + function C2StrEx( const X: Complex ): String; + {* experimental } + +implementation + + function CfromReIm( Re, Im: Double ): Complex; + begin + Result.Re := Re; + Result.Im := Im; + end; + + function Cadd( const X, Y: Complex ): Complex; + begin + Result.Re := X.Re + Y.Re; + Result.Im := X.Im + Y.Im; + end; + + function Cneg( const X: Complex ): Complex; + begin + Result.Re := -X.Re; + Result.Im := -X.Im; + end; + + function Csub( const X, Y: Complex ): Complex; + begin + Result := Cadd( X, Cneg( Y ) ); + end; + + function Cmul( const X, Y: Complex ): Complex; + begin + Result.Re := X.Re * Y.Re - X.Im * Y.Im; + Result.Im := X.Re * Y.Im + X.Im * Y.Re; + end; + + function CmulD( const X: Complex; D: Double ): Complex; + begin + Result.Re := X.Re * D; + Result.Im := X.Im * D; + end; + + function CmulI( const X: Complex ): Complex; + begin + Result.Re := -X.Im; + Result.Im := X.Re; + end; + + function Cdiv( const X, Y: Complex ): Complex; + var Z: Double; + begin + Z := 1.0 / ( Y.Re * Y.Re + Y.Im * Y.Im ); + Result.Re := (X.Re * Y.Re + X.Im * Y.Im ) * Z; + Result.Im := (X.Im * Y.Re - X.Re * Y.Im ) * Z; + end; + + function Cmod( const X: Complex ): Double; + begin + Result := sqrt( X.Re * X.Re + X.Im * X.Im ); + end; + + function Carg( const X: Complex ): Double; + begin + Result := ArcTan2( X.Im, X.Re ); + end; + + function CfromModArg( R, Arg: Double ): Complex; + begin + Result.Re := R * cos( Arg ); + Result.Im := R * sin( Arg ); + end; + + function Cpow( const X: Complex; Pow: Double ): Complex; + var R, A: Double; + begin + R := power( Cmod( X ), Pow ); + A := Pow * Carg( X ); + Result := CfromModArg( R, A ); + end; + + function Cpower( const X, Pow: Complex ): Complex; + begin + Result := Cexp( Cmul( X, Cln( Pow ) ) ); + end; + + function CIntPower( const X: Complex; Pow: Integer ): Complex; + begin + if (Pow < 0) or (Pow > 100) then Result := Cpow( X, Pow ) + else if Pow = 0 then + begin + Result.Re := 1; + Result.Im := 0; + end + else + begin + Result := X; + while Pow > 1 do + begin + Result := Cmul( Result, X ); + dec( Pow ); + end; + end; + end; + + function Csqrt( const X: Complex ): Complex; + begin + Result := Cpow( X, 0.5 ); + end; + + function Cexp( const X: Complex ): Complex; + var Z: Double; + begin + Z := exp( X.Re ); + Result.Re := Z * cos( X.Im ); + Result.Im := Z * sin( X.Im ); + end; + + function Cln( const X: Complex ): Complex; + begin + Result := CfromModArg( ln( Cmod( X ) ), Carg( X ) ); + end; + + function Ccos( const X: Complex ): Complex; + begin + Result := CmulI( X ); + Result := CmulD( Cadd( Cexp( Result ), Cexp( Cneg( Result ) ) ), + 0.5 ); + end; + + function Csin( const X: Complex ): Complex; + begin + Result := CmulI( X ); + Result := CmulD( Csub( Cexp(Result), Cexp( Cneg(Result) ) ), + 0.5 ); + end; + + {$IFDEF KOL} + function Abs( X: Double ): Double; + begin + Result := EAbs( X ); + end; + {$ENDIF} + + {$IFNDEF KOL} + function Double2Str( D: Double ): String; + begin + Result := DoubleToStr( D ); + end; + {$ENDIF} + + function C2Str( const X: Complex ): String; + begin + if Abs( X.Im ) < 1e-307 then + begin + Result := Double2Str( X.Re ); + end + else + begin + Result := ''; + if Abs( X.Re ) > 1e-307 then + begin + Result := Double2Str( X.Re ); + if X.Im > 0.0 then + Result := Result + ' + '; + end; + if X.Im < 0.0 then + Result := Result + '- i * ' + Double2Str( -X.Im ) + else + Result := Result + 'i * ' + Double2Str( X.Im ); + end; + end; + + function C2StrEx( const X: Complex ): String; + begin + if Abs( X.Im ) < 1e-307 then + begin + Result := Double2StrEx( X.Re ); + end + else + begin + Result := ''; + if Abs( X.Re ) > 1e-307 then + begin + Result := Double2StrEx( X.Re ); + if X.Im > 0.0 then + Result := Result + ' + '; + end; + if X.Im < 0.0 then + Result := Result + '- i * ' + Double2StrEx( -X.Im ) + else + Result := Result + 'i * ' + Double2StrEx( X.Im ); + end; + end; + +end. diff --git a/Addons/addons.dpk b/Addons/addons.dpk new file mode 100644 index 0000000..83448ff --- /dev/null +++ b/Addons/addons.dpk @@ -0,0 +1,94 @@ +package ADDONS; + +{$R *.res} +{$R 'mckCCtrls.dcr'} +{$R 'mckHTTPDownload.dcr'} +{$R 'mckQProgBar.dcr'} +{$ALIGN 1} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'KOLADDONS7'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + rtl, + vcl, + vclactnband, + vclx, + MirrorKOLPackageD7; + +contains + KOLCCtrls in 'KOLCCtrls.pas', + mckCCtrls in 'mckCCtrls.pas', + KOLHashs in 'KOLHashs.PAS', + mckHashs in 'mckHashs.pas', + KOLFontEditor in 'KOLFontEditor.pas', + KOLmhxp in 'KOLmhxp.pas', + MCKMHXP in 'MCKMHXP.pas', + mckTCPSocket in 'mckTCPSocket.pas', + mckSocket in 'mckSocket.pas', + mckListEdit in 'mckListEdit.pas', + KOLSocket in 'KOLSocket.pas', + Objects in 'Objects.pas', + kolTCPSocket in 'kolTCPSocket.pas', + mckCProgBar in 'mckCProgBar.pas', + mckRarInfoBar in 'mckRarInfoBar.pas', + mckRarProgBar in 'mckRarProgBar.pas', + mckHTTP in 'mckHTTP.pas', + mckRAS in 'mckRAS.pas', + KOLRas in 'KOLRas.pas', + RAS in 'RAS.pas', + UStr in 'UStr.pas', + UWrd in 'UWrd.pas', + KOLHTTP in 'KOLHTTP.pas', + mckEcmListEdit in 'mckEcmListEdit.pas', + KOLEcmListEdit in 'KOLEcmListEdit.pas', + mckBlockCipher in 'mckBlockCipher.pas', + KOLBlockCipher in 'KOLBlockCipher.pas', + KOLQProgBar in 'KOLQProgBar.pas', + mckQProgBar in 'mckQProgBar.pas', + MCKPrintDialogs in 'MCKPrintDialogs.pas', + MCKPageSetup in 'MCKPageSetup.pas', + KOLReport in 'KOLReport.pas', + MCKReport in 'MCKReport.pas', + KOLHTTPDownload in 'KOLHTTPDownload.pas', + mckHTTPDownload in 'mckHTTPDownload.pas', + KOLPageSetupDialog in 'KOLPageSetupDialog.pas', + KOLPrintCommon in 'KOLPrintCommon.pas', + KOLPrintDialogs in 'KOLPrintDialogs.pas', + KOLPrinters in 'KOLPrinters.pas', + mckXPMenus in 'mckXPMenus.pas', + XPMenus in 'XPMenus.pas', + MCKGRushSplitterEditor in 'MCKGRushSplitterEditor.pas', + MCKGRushButtonEditor in 'MCKGRushButtonEditor.pas', + MCKGRushCheckBoxEditor in 'MCKGRushCheckBoxEditor.pas', + MCKGRushControls in 'MCKGRushControls.pas', + MCKGRushImageCollectionEditor in 'MCKGRushImageCollectionEditor.pas', + MCKGRushPanelEditor in 'MCKGRushPanelEditor.pas', + MCKGRushProgressBarEditor in 'MCKGRushProgressBarEditor.pas', + MCKGRushRadioBoxEditor in 'MCKGRushRadioBoxEditor.pas', + tinyPNG in 'tinyPNG.pas', + tinyJPGGIFBMP in 'tinyJPGGIFBMP.pas', + MZLib in 'MZLib.pas', + KOLGRushControls in 'KOLGRushControls.pas'; + +end. diff --git a/Addons/addons.res b/Addons/addons.res new file mode 100644 index 0000000000000000000000000000000000000000..fa40de9fb4ba0eefff15b6fa3c4dddb6423f7988 GIT binary patch literal 1536 zcmZuw&ubGw6#mjIBoL`Nc&V2L5fKlP(n9OSR*aQ`TCvh=DYn@b+cb3JZls_o1v9XR z{wGq%A;KWUlXw3Dp%-uFX2Ih4y_wyl4SnR>nK$oyKPLkKCBhg7ZZFBNvDBU=Cu42J z;)Iuy?s8Ki7KjXzWBObzEr36?T5jQ&TcU+tuSbIvA&YSfzpgHWLNF~-q}576N0gwP z>UkAM(@`|gK_mI88Bj`T-5Kgan2q37D#=-_I~{n7VVE4mx*OoB?^nYG%TRGQ$W_D8 z_cyFwpgq@Y(%wk)P7t-*pQ?VlOn$2cN7pp_-Xil}OsePb_jt?f7Qz}$`!p}3o zv1)HsBj+!=I#XfQ<%c8)8St;m4+%KCrJ}vAt%ohg(QK$xL)YCwKJJ!tQG`N5pdMID zN?<_h(Sc3~O3OeCS|^+ZUPq+65d&!Y>kg++N73m}kGa=cxyV|7 ziFqHC*k;oD#HqX^DX3t-vPu?a-iM6&`S3bTIU-9O5AeK zw%3Fo4Nj5+E~#;jsAHY{_w0I|+U6j^J?zXx zQfI?*Ys|efQo$XY{~7JRwMw;h)+yck*rKNsSLcxTnv8X9&~KOPKHjpDR2+9Xi6K*y zylLH{4JY7c^pe~?MtjHJ8zU8h^OU|Xb4I%#?fs_h%gtW0$qdp8E4I*8TX$O3@HT + + + + + + + + + + + addons2006.dpk + + + 7.0 + + + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 1 + 1 + True + True + WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + + False + + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + True + False + False + False + True + True + True + True + True + True + + + + 0 + 0 + False + 1 + False + False + False + 16384 + 1048576 + 4194304 + KOLAddons2006 + + + + D2006 + + + + + + + False + + + + + + False + + + True + False + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + Borland User Components + Borland Sample Components + + + diff --git a/Addons/addons2006.dpk b/Addons/addons2006.dpk new file mode 100644 index 0000000..fcb8f42 --- /dev/null +++ b/Addons/addons2006.dpk @@ -0,0 +1,96 @@ +package addons2006; + +{$R *.res} +{$R 'mckCCtrls.dcr'} +{$R 'mckHTTPDownload.dcr'} +{$R 'mckQProgBar.dcr'} +{$ALIGN 1} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'KOLAddons2006'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + rtl, + vcl, + vclactnband, + vclx, + KOLMCK10, + xmlrtl, + designide; + +contains + KOLCCtrls in 'KOLCCtrls.pas', + mckCCtrls in 'mckCCtrls.pas', + KOLHashs in 'KOLHashs.PAS', + mckHashs in 'mckHashs.pas', + KOLFontEditor in 'KOLFontEditor.pas', + KOLmhxp in 'KOLmhxp.pas', + MCKMHXP in 'MCKMHXP.pas', + mckTCPSocket in 'mckTCPSocket.pas', + mckSocket in 'mckSocket.pas', + mckListEdit in 'mckListEdit.pas', + KOLSocket in 'KOLSocket.pas', + Objects in 'Objects.pas', + kolTCPSocket in 'kolTCPSocket.pas', + mckCProgBar in 'mckCProgBar.pas', + mckRarInfoBar in 'mckRarInfoBar.pas', + mckRarProgBar in 'mckRarProgBar.pas', + mckHTTP in 'mckHTTP.pas', + mckRAS in 'mckRAS.pas', + KOLRas in 'KOLRas.pas', + RAS in 'RAS.pas', + UStr in 'UStr.pas', + UWrd in 'UWrd.pas', + KOLHTTP in 'KOLHTTP.pas', + mckEcmListEdit in 'mckEcmListEdit.pas', + KOLEcmListEdit in 'KOLEcmListEdit.pas', + mckBlockCipher in 'mckBlockCipher.pas', + KOLBlockCipher in 'KOLBlockCipher.pas', + KOLQProgBar in 'KOLQProgBar.pas', + mckQProgBar in 'mckQProgBar.pas', + MCKPrintDialogs in 'MCKPrintDialogs.pas', + MCKPageSetup in 'MCKPageSetup.pas', + KOLReport in 'KOLReport.pas', + MCKReport in 'MCKReport.pas', + KOLHTTPDownload in 'KOLHTTPDownload.pas', + mckHTTPDownload in 'mckHTTPDownload.pas', + KOLPageSetupDialog in 'KOLPageSetupDialog.pas', + KOLPrintCommon in 'KOLPrintCommon.pas', + KOLPrintDialogs in 'KOLPrintDialogs.pas', + KOLPrinters in 'KOLPrinters.pas', + mckXPMenus in 'mckXPMenus.pas', + XPMenus in 'XPMenus.pas', + MCKGRushSplitterEditor in 'MCKGRushSplitterEditor.pas', + MCKGRushButtonEditor in 'MCKGRushButtonEditor.pas', + MCKGRushCheckBoxEditor in 'MCKGRushCheckBoxEditor.pas', + MCKGRushControls in 'MCKGRushControls.pas', + MCKGRushImageCollectionEditor in 'MCKGRushImageCollectionEditor.pas', + MCKGRushPanelEditor in 'MCKGRushPanelEditor.pas', + MCKGRushProgressBarEditor in 'MCKGRushProgressBarEditor.pas', + MCKGRushRadioBoxEditor in 'MCKGRushRadioBoxEditor.pas', + tinyPNG in 'tinyPNG.pas', + tinyJPGGIFBMP in 'tinyJPGGIFBMP.pas', + MZLib in 'MZLib.pas', + KOLGRushControls in 'KOLGRushControls.pas'; + +end. diff --git a/Addons/addons2006.res b/Addons/addons2006.res new file mode 100644 index 0000000000000000000000000000000000000000..653aa546422c586630869ea8ec6504db38b24c40 GIT binary patch literal 5056 zcmbW5Pm3H?6vgjk26Uyfa1%E@h=|NW63oU`DaJrRjTk%IB4~`kWD?@I$g1X>bQU5~ z3%`NXtYub`r7!_MfLXc_%k#VU-Ky$NPn@yf_I-cuyXTzyUcGMG%xp*2_hD)-JwI*d z{H9_yd~SRD{8k3Nt;UY*ec6V$)Xgz z{OJFS4;YD^p0VW7E?S@O#j9=R){4W_oKN?}=EN;jOxj%^eZ`*iB*whtB~Nl`>&9X{ zY5^~>slyTnjX6HpO>1^6?BnF1wsNj}z`@$ZSZlAXa2OA~;LvyIZydW<{8W2e?|N)# zeVIdA$Cw9Uci4zCbh|AQRYp2>P9^EatYxGCnz+)eSL)6vh8Zc$W zho;~#Z^}MPtK+4o{<7MbH!|TK{(k83=x>|W`_$VS?E^72*vSE3 zaF?*ffxhMvAFbrZJCCktC#S~db?Ek(F2>+MpZ$02g|KJvl&|GytPB0tOtphAW3FM( zBhRy6e+&*?aPW7wQ68Dq;OmSX^#dk-xH|qqF~rvLRT%Yg{mSQh7jRI!6E>#xS^NH2 z`_(%wIw&dTL`Ui9Z4`94u+#e#z_-+S@n z&h__HxQv5M4sWl)XT8_E5CfV%%q>WymP!pnu~KUFYMIM*^m9vTJU9HrZG>O_iw58Wgp_)aeu)va*+@H zzW-{Y*XvX(zv7tpoLyk~yw>L3$Xvb;w7uV~$B#3O?y`5}m;S`}+yy_dW4>+5`BmPi zzqn~EvGDvxz^9ROwFbTii*moAq2NdT)z{vd@s4I~;$0i|2X2+(wAS}W-p^xQ-br!D z?{?O#;(K3roqu;E#%#R*{QRj;O)&Uze~}AaXm@VXP7PCQ-V5;?YOKRre4T~3*U&FL z!XbZXjPrv&egpBI`?&htQ^VO5FJi#w4&=LvT**g8^fqhPad=KY=kr+mRlWyk=UwAx zLLB|v3pdX$SbpCW+&qI|^CXvb_>6HDz24PW@2vZhuh1RZ^WEh=1AE}mM4MVnALeFFmUt)nPk+n#{+Al8fgXki4xBO0+G$L&j;S-r?*|Mn z{(IPc)P&rpd6L76&ck!O;5+a*D(@s5&W4@*k^|ngouUpN*OgjGH+z$LGVfV^uE$f4 z7jii|@_FKN-C6NYiqCwf^(W<79q$j#dJX<9`%Csr_EdIQ>_8qn>vN#L9k4^QP3)=J zOUnJKFlNH4gxU9poBeBMc0tznuh=K{fnBvvWgpr#`Fy7TYw&M|{?FLi@qab=7i7cs z&zb+j(f8ZRv*F98Yxd7w(%22VZnZu?vd`7J>Ik*tT~V9om#shlAzv6Hk*lJqXG<0% z-t~{)eBiq6+e5o!dv@Ed$ltYF%DiV^+kHj->@gSYl3ld-r1p|HysPmylx;&=@7q0l zU^f;2NUCqDcWVIH^_a|gSu@|+myY#7n0K^xZ-~8MFDp7@Zz%SmqQ{tv_Kwig5+9!X z9=j*(yDJRda{P}qf7@qa`#?NVd)vOz%6Nk3825!DZrWE`cTfJIeJdvUMC`SagQ|g> zyy=YQ}YD?z*D(pizTlc-e{GaNfyk+)cAL{Un6K QJ*~Q{$mw33-}+