Skip to content

Commit

Permalink
Version 2.9
Browse files Browse the repository at this point in the history
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
  • Loading branch information
carloBarazzetta committed Sep 19, 2022
1 parent 0662260 commit 929dd72
Show file tree
Hide file tree
Showing 68 changed files with 5,065 additions and 6,582 deletions.
37 changes: 23 additions & 14 deletions Debug/Preview Handlers/PreviewHandler Host/PreviewHost.dproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{4BBCE26D-2844-4147-BD21-3D736FC10602}</ProjectGuid>
<ProjectVersion>19.3</ProjectVersion>
<ProjectVersion>19.5</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<MainSource>PreviewHost.dpr</MainSource>
<Base>True</Base>
Expand Down Expand Up @@ -45,6 +45,12 @@
<CfgParent>Base</CfgParent>
<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="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
<Cfg_2_Win64>true</Cfg_2_Win64>
<CfgParent>Cfg_2</CfgParent>
Expand All @@ -56,20 +62,20 @@
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
<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>
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_ExeOutput>.\Bin</DCC_ExeOutput>
<SanitizedProjectName>PreviewHost</SanitizedProjectName>
<VerInfo_Locale>1040</VerInfo_Locale>
<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>
<DCC_UnitSearchPath>D:\ETHEA\ShellControls\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<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>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<DCC_ExeOutput>.\Bin</DCC_ExeOutput>
<UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
Expand All @@ -83,37 +89,43 @@
<VerInfo_Locale>1033</VerInfo_Locale>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<Debugger_RunParams>D:\ETHEA\SVGIconImageList\Demo\NewSydneyVectors</Debugger_RunParams>
<AppDPIAwarenessMode>none</AppDPIAwarenessMode>
<DCC_ExeOutput>.\Bin64</DCC_ExeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
<VerInfo_Locale>1040</VerInfo_Locale>
<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>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
<BT_BuildType>Debug</BT_BuildType>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<DCC_UnitSearchPath>D:\ETHEA\ShellControls\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<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>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<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>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
Expand Down Expand Up @@ -168,15 +180,12 @@
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
</VersionInfoKeys>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k270.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp270.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
</Excluded_Packages>
<Excluded_Packages/>
<Source>
<Source Name="MainSource">PreviewHost.dpr</Source>
</Source>
</Delphi.Personality>
<Deployment Version="3"/>
<Deployment Version="4"/>
<Platforms>
<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>
Expand Down
4 changes: 2 additions & 2 deletions Ext/SVGIconImageList/Image32/source/Img32.CQ.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

(*******************************************************************************
* Author : Angus Johnson *
* Version : 4.0 *
* Date : 22 December 2021 *
* Version : 4.2 *
* Date : 30 May 2022 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2021 *
* Purpose : Color reduction for TImage32 *
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
unit Img32.Clipper;
unit Img32.Clipper2;

(*******************************************************************************
* Author : Angus Johnson *
* Version : 2.24 *
* Date : 26 June 2021 *
* Version : 4.2 *
* Date : 30 May 2022 *
* Website : http://www.angusj.com *
* Copyright : Angus Johnson 2019-2021 *
* Copyright : Angus Johnson 2019-2022 *
* Purpose : Wrapper module for the Clipper library *
* License : http://www.boost.org/LICENSE_1_0.txt *
*******************************************************************************)

interface

uses
Clipper, Clipper.Core, Clipper.Engine, Clipper.Offset,
Img32, Img32.Draw, Img32.Vector;

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

implementation

uses Clipper, Clipper.Core, Clipper.Engine, Clipper.Offset;

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------

function InflatePath(const path: TPathD;
function InflatePath(const path: Img32.TPathD;
delta: Double; joinStyle: TJoinStyle; endStyle: TEndStyle;
miterLimit: double; arcTolerance: double; minEdgeLength: double): TPathsD;
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
var
paths: TPathsD;
paths: Img32.TPathsD;
begin
setLength(paths, 1);
paths[0] := path;
Expand All @@ -64,9 +65,9 @@ function InflatePath(const path: TPathD;
end;
//------------------------------------------------------------------------------

function InflatePaths(const paths: TPathsD;
function InflatePaths(const paths: Img32.TPathsD;
delta: Double; joinStyle: TJoinStyle; endStyle: TEndStyle;
miterLimit: double; arcTolerance: double; minEdgeLength: double): TPathsD;
miterLimit: double; arcTolerance: double; minEdgeLength: double): Img32.TPathsD;
var
jt: Clipper.Offset.TJoinType;
et: TEndType;
Expand All @@ -89,7 +90,8 @@ function InflatePaths(const paths: TPathsD;
end;
//------------------------------------------------------------------------------

function UnionPolygon(const polygon: TPathD; fillRule: TFillRule): TPathsD;
function UnionPolygon(const polygon: Img32.TPathD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
Expand All @@ -102,8 +104,8 @@ function UnionPolygon(const polygon: TPathD; fillRule: TFillRule): TPathsD;
end;
//------------------------------------------------------------------------------

function UnionPolygons(const polygons: TPathsD;
fillRule: TFillRule): TPathsD;
function UnionPolygons(const polygons: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
Expand All @@ -116,8 +118,8 @@ function UnionPolygons(const polygons: TPathsD;
end;
//------------------------------------------------------------------------------

function UnionPolygons(const polygon1, polygon2: TPathD;
fillRule: TFillRule): TPathsD;
function UnionPolygons(const polygon1, polygon2: Img32.TPathD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
Expand All @@ -131,8 +133,8 @@ function UnionPolygons(const polygon1, polygon2: TPathD;
end;
//------------------------------------------------------------------------------

function UnionPolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD;
function UnionPolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
Expand All @@ -146,8 +148,8 @@ function UnionPolygons(const polygons1, polygons2: TPathsD;
end;
//------------------------------------------------------------------------------

function IntersectPolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD;
function IntersectPolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
Expand All @@ -161,8 +163,8 @@ function IntersectPolygons(const polygons1, polygons2: TPathsD;
end;
//------------------------------------------------------------------------------

function DifferencePolygons(const polygons1, polygons2: TPathsD;
fillRule: TFillRule): TPathsD;
function DifferencePolygons(const polygons1, polygons2: Img32.TPathsD;
fillRule: Img32.Vector.TFillRule): Img32.TPathsD;
begin
with TClipperD.Create do
try
Expand Down
17 changes: 13 additions & 4 deletions Ext/SVGIconImageList/Image32/source/Img32.Draw.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

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

uses
SysUtils, Classes, Types, Math, Img32, Img32.Vector,
Img32.Transform; //experimental;
SysUtils, Classes, Types, Math, Img32, Img32.Vector;

type
TFillRule = Img32.Vector.TFillRule;
Expand Down Expand Up @@ -1028,13 +1027,23 @@ procedure Rasterize(const paths: TPathsD; const clipRec: TRect;
end;
frPositive:
begin
{$IFDEF REVERSE_ORIENTATION}
if accum < -0.002 then
byteBuffer[j] := Min(255, Round(-accum * 318));
{$ELSE}
if accum > 0.002 then
byteBuffer[j] := Min(255, Round(accum * 318));
{$ENDIF}
end;
frNegative:
begin
{$IFDEF REVERSE_ORIENTATION}
if accum > 0.002 then
byteBuffer[j] := Min(255, Round(accum * 318));
{$ELSE}
if accum < -0.002 then
byteBuffer[j] := Min(255, Round(-accum * 318));
{$ENDIF}
end;
end;
end;
Expand Down
Loading

0 comments on commit 929dd72

Please sign in to comment.