Skip to content

Commit 929dd72

Browse files
Version 2.9
Refactoring container to fix #2 Renamed SVGPreviewForm.* to PreviewForm.* Renamed SVGSettings.* to Settings.* Update Image32 library to new version Fixed #14 closing all pages Added storing settings for export dialog (into Editor) to fix #13
1 parent 0662260 commit 929dd72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+5065
-6582
lines changed

Debug/Preview Handlers/PreviewHandler Host/PreviewHost.dproj

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<ProjectGuid>{4BBCE26D-2844-4147-BD21-3D736FC10602}</ProjectGuid>
4-
<ProjectVersion>19.3</ProjectVersion>
4+
<ProjectVersion>19.5</ProjectVersion>
55
<FrameworkType>VCL</FrameworkType>
66
<MainSource>PreviewHost.dpr</MainSource>
77
<Base>True</Base>
@@ -45,6 +45,12 @@
4545
<CfgParent>Base</CfgParent>
4646
<Base>true</Base>
4747
</PropertyGroup>
48+
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
49+
<Cfg_2_Win32>true</Cfg_2_Win32>
50+
<CfgParent>Cfg_2</CfgParent>
51+
<Cfg_2>true</Cfg_2>
52+
<Base>true</Base>
53+
</PropertyGroup>
4854
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
4955
<Cfg_2_Win64>true</Cfg_2_Win64>
5056
<CfgParent>Cfg_2</CfgParent>
@@ -56,20 +62,20 @@
5662
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
5763
<DCC_UsePackage>fmx;IndySystem;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DataSnapServer;DataSnapProviderClient;DbxCommonDriver;dbxcds;DBXOracleDriver;CustomIPTransport;dsnap;fmxase;IndyCore;CloudService;inetdbxpress;IPIndyImpl;bindcompfmx;rtl;dbrtl;DbxClientDriver;bindcomp;inetdb;xmlrtl;ibxpress;IndyProtocols;DBXMySQLDriver;bindengine;soaprtl;DBXInformixDriver;DBXFirebirdDriver;inet;fmxobj;DBXSybaseASADriver;fmxdae;dbexpress;DataSnapIndy10ServerTransport;$(DCC_UsePackage)</DCC_UsePackage>
5864
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
59-
<DCC_ExeOutput>.\Bin</DCC_ExeOutput>
6065
<SanitizedProjectName>PreviewHost</SanitizedProjectName>
6166
<VerInfo_Locale>1040</VerInfo_Locale>
6267
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
68+
<DCC_UnitSearchPath>D:\ETHEA\ShellControls\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
6369
</PropertyGroup>
6470
<PropertyGroup Condition="'$(Base_Win32)'!=''">
6571
<DCC_UsePackage>JvGlobus;JvMM;JvManagedThreads;JvDlgs;JvCrypt;vclib;inetdbbde;acntDelphiXE2_R;JvNet;JvDotNetCtrls;DBXSybaseASEDriver;vclimg;fmi;vclshlctrls;JvXPCtrls;vcldb;sample;vcldsnap;DBXDb2Driver;JvCore;vclribbon;vcl;DBXMSSQLDriver;JvAppFrm;JvDB;JvRuntimeDesign;webdsnap;JclDeveloperTools;JvDocking;adortl;JvWizards;mbColorLibDXE2;JvHMI;JvBands;vcldbx;JvPluginSystem;JclContainers;DBXOdbcDriver;JvCmp;JvSystem;svnui;SynEdit_RXE2;JvControls;JvTimeFramework;vclactnband;JvJans;JvPrintPreview;JvPageComps;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;vcltouch;websnap;VclSmp;DataSnapConnectors;dsnapcon;JclVcl;JvPascalInterpreter;vclx;svn;bdertl;EurekaLogCore;JvBDE;$(DCC_UsePackage)</DCC_UsePackage>
6672
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
6773
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
6874
<VerInfo_Locale>1033</VerInfo_Locale>
6975
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
70-
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
7176
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
7277
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
78+
<DCC_ExeOutput>.\Bin</DCC_ExeOutput>
7379
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
7480
</PropertyGroup>
7581
<PropertyGroup Condition="'$(Base_Win64)'!=''">
@@ -83,37 +89,43 @@
8389
<VerInfo_Locale>1033</VerInfo_Locale>
8490
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
8591
<Debugger_RunParams>D:\ETHEA\SVGIconImageList\Demo\NewSydneyVectors</Debugger_RunParams>
92+
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
93+
<DCC_ExeOutput>.\Bin64</DCC_ExeOutput>
8694
</PropertyGroup>
8795
<PropertyGroup Condition="'$(Cfg_1)'!=''">
8896
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
8997
<DCC_Optimize>false</DCC_Optimize>
9098
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
9199
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
92100
<DCC_RemoteDebug>true</DCC_RemoteDebug>
93-
<VerInfo_Locale>1040</VerInfo_Locale>
94-
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
95101
</PropertyGroup>
96102
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
97103
<DCC_RemoteDebug>false</DCC_RemoteDebug>
98104
<BT_BuildType>Debug</BT_BuildType>
99105
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
100106
<VerInfo_Locale>1033</VerInfo_Locale>
101-
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
102-
<DCC_UnitSearchPath>D:\ETHEA\ShellControls\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
103107
</PropertyGroup>
104108
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
105-
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
106109
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
110+
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
111+
<VerInfo_Locale>1033</VerInfo_Locale>
112+
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
107113
</PropertyGroup>
108114
<PropertyGroup Condition="'$(Cfg_2)'!=''">
109115
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
110116
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
111117
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
112118
<DCC_DebugInformation>0</DCC_DebugInformation>
113119
</PropertyGroup>
120+
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
121+
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
122+
<VerInfo_Locale>1033</VerInfo_Locale>
123+
</PropertyGroup>
114124
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
115-
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
116125
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
126+
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
127+
<VerInfo_Locale>1033</VerInfo_Locale>
128+
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
117129
</PropertyGroup>
118130
<ItemGroup>
119131
<DelphiCompile Include="$(MainSource)">
@@ -168,15 +180,12 @@
168180
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
169181
<VersionInfoKeys Name="Comments"/>
170182
</VersionInfoKeys>
171-
<Excluded_Packages>
172-
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
173-
<Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
174-
</Excluded_Packages>
183+
<Excluded_Packages/>
175184
<Source>
176185
<Source Name="MainSource">PreviewHost.dpr</Source>
177186
</Source>
178187
</Delphi.Personality>
179-
<Deployment Version="3"/>
188+
<Deployment Version="4"/>
180189
<Platforms>
181190
<Platform value="Win32">True</Platform>
182191
<Platform value="Win64">True</Platform>

Ext/SVGIconImageList/Image32/source/Img32.CQ.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
(*******************************************************************************
44
* Author : Angus Johnson *
5-
* Version : 4.0 *
6-
* Date : 22 December 2021 *
5+
* Version : 4.2 *
6+
* Date : 30 May 2022 *
77
* Website : http://www.angusj.com *
88
* Copyright : Angus Johnson 2019-2021 *
99
* Purpose : Color reduction for TImage32 *

Ext/SVGIconImageList/Image32/source/Img32.Clipper.pas renamed to Ext/SVGIconImageList/Image32/source/Img32.Clipper2.pas

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
unit Img32.Clipper;
1+
unit Img32.Clipper2;
22

33
(*******************************************************************************
44
* Author : Angus Johnson *
5-
* Version : 2.24 *
6-
* Date : 26 June 2021 *
5+
* Version : 4.2 *
6+
* Date : 30 May 2022 *
77
* Website : http://www.angusj.com *
8-
* Copyright : Angus Johnson 2019-2021 *
8+
* Copyright : Angus Johnson 2019-2022 *
99
* Purpose : Wrapper module for the Clipper library *
1010
* License : http://www.boost.org/LICENSE_1_0.txt *
1111
*******************************************************************************)
1212

1313
interface
1414

1515
uses
16-
Clipper, Clipper.Core, Clipper.Engine, Clipper.Offset,
1716
Img32, Img32.Draw, Img32.Vector;
1817

1918
//nb: InflatePath assumes that there's consistent winding where
@@ -48,14 +47,16 @@ function DifferencePolygons(const polygons1, polygons2: TPathsD;
4847

4948
implementation
5049

50+
uses Clipper, Clipper.Core, Clipper.Engine, Clipper.Offset;
51+
5152
//------------------------------------------------------------------------------
5253
//------------------------------------------------------------------------------
5354

54-
function InflatePath(const path: TPathD;
55+
function InflatePath(const path: Img32.TPathD;
5556
delta: Double; joinStyle: TJoinStyle; endStyle: TEndStyle;
56-
miterLimit: double; arcTolerance: double; minEdgeLength: double): TPathsD;
57+
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
5758
var
58-
paths: TPathsD;
59+
paths: Img32.TPathsD;
5960
begin
6061
setLength(paths, 1);
6162
paths[0] := path;
@@ -64,9 +65,9 @@ function InflatePath(const path: TPathD;
6465
end;
6566
//------------------------------------------------------------------------------
6667

67-
function InflatePaths(const paths: TPathsD;
68+
function InflatePaths(const paths: Img32.TPathsD;
6869
delta: Double; joinStyle: TJoinStyle; endStyle: TEndStyle;
69-
miterLimit: double; arcTolerance: double; minEdgeLength: double): TPathsD;
70+
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
7071
var
7172
jt: Clipper.Offset.TJoinType;
7273
et: TEndType;
@@ -89,7 +90,8 @@ function InflatePaths(const paths: TPathsD;
8990
end;
9091
//------------------------------------------------------------------------------
9192

92-
function UnionPolygon(const polygon: TPathD; fillRule: TFillRule): TPathsD;
93+
function UnionPolygon(const polygon: Img32.TPathD;
94+
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
9395
begin
9496
with TClipperD.Create do
9597
try
@@ -102,8 +104,8 @@ function UnionPolygon(const polygon: TPathD; fillRule: TFillRule): TPathsD;
102104
end;
103105
//------------------------------------------------------------------------------
104106

105-
function UnionPolygons(const polygons: TPathsD;
106-
fillRule: TFillRule): TPathsD;
107+
function UnionPolygons(const polygons: Img32.TPathsD;
108+
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
107109
begin
108110
with TClipperD.Create do
109111
try
@@ -116,8 +118,8 @@ function UnionPolygons(const polygons: TPathsD;
116118
end;
117119
//------------------------------------------------------------------------------
118120

119-
function UnionPolygons(const polygon1, polygon2: TPathD;
120-
fillRule: TFillRule): TPathsD;
121+
function UnionPolygons(const polygon1, polygon2: Img32.TPathD;
122+
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
121123
begin
122124
with TClipperD.Create do
123125
try
@@ -131,8 +133,8 @@ function UnionPolygons(const polygon1, polygon2: TPathD;
131133
end;
132134
//------------------------------------------------------------------------------
133135

134-
function UnionPolygons(const polygons1, polygons2: TPathsD;
135-
fillRule: TFillRule): TPathsD;
136+
function UnionPolygons(const polygons1, polygons2: Img32.TPathsD;
137+
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
136138
begin
137139
with TClipperD.Create do
138140
try
@@ -146,8 +148,8 @@ function UnionPolygons(const polygons1, polygons2: TPathsD;
146148
end;
147149
//------------------------------------------------------------------------------
148150

149-
function IntersectPolygons(const polygons1, polygons2: TPathsD;
150-
fillRule: TFillRule): TPathsD;
151+
function IntersectPolygons(const polygons1, polygons2: Img32.TPathsD;
152+
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
151153
begin
152154
with TClipperD.Create do
153155
try
@@ -161,8 +163,8 @@ function IntersectPolygons(const polygons1, polygons2: TPathsD;
161163
end;
162164
//------------------------------------------------------------------------------
163165

164-
function DifferencePolygons(const polygons1, polygons2: TPathsD;
165-
fillRule: TFillRule): TPathsD;
166+
function DifferencePolygons(const polygons1, polygons2: Img32.TPathsD;
167+
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
166168
begin
167169
with TClipperD.Create do
168170
try

Ext/SVGIconImageList/Image32/source/Img32.Draw.pas

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
(*******************************************************************************
44
* Author : Angus Johnson *
5-
* Version : 4.0 *
6-
* Date : 22 December 2021 *
5+
* Version : 4.2 *
6+
* Date : 30 May 2022 *
77
* Website : http://www.angusj.com *
88
* Copyright : Angus Johnson 2019-2021 *
99
* *
@@ -21,8 +21,7 @@ interface
2121
{.$DEFINE MemCheck} //for debugging only (adds a minimal cost to performance)
2222

2323
uses
24-
SysUtils, Classes, Types, Math, Img32, Img32.Vector,
25-
Img32.Transform; //experimental;
24+
SysUtils, Classes, Types, Math, Img32, Img32.Vector;
2625

2726
type
2827
TFillRule = Img32.Vector.TFillRule;
@@ -1028,13 +1027,23 @@ procedure Rasterize(const paths: TPathsD; const clipRec: TRect;
10281027
end;
10291028
frPositive:
10301029
begin
1030+
{$IFDEF REVERSE_ORIENTATION}
1031+
if accum < -0.002 then
1032+
byteBuffer[j] := Min(255, Round(-accum * 318));
1033+
{$ELSE}
10311034
if accum > 0.002 then
10321035
byteBuffer[j] := Min(255, Round(accum * 318));
1036+
{$ENDIF}
10331037
end;
10341038
frNegative:
10351039
begin
1040+
{$IFDEF REVERSE_ORIENTATION}
1041+
if accum > 0.002 then
1042+
byteBuffer[j] := Min(255, Round(accum * 318));
1043+
{$ELSE}
10361044
if accum < -0.002 then
10371045
byteBuffer[j] := Min(255, Round(-accum * 318));
1046+
{$ENDIF}
10381047
end;
10391048
end;
10401049
end;

0 commit comments

Comments
 (0)