diff --git a/Demo/Benchmark/UBenchmark.dfm b/Demo/Benchmark/UBenchmark.dfm
index 54416c65..525d09db 100644
--- a/Demo/Benchmark/UBenchmark.dfm
+++ b/Demo/Benchmark/UBenchmark.dfm
@@ -2,8 +2,8 @@ object frmBenchmark: TfrmBenchmark
Left = 0
Top = 0
Caption = 'Benchmark'
- ClientHeight = 545
- ClientWidth = 784
+ ClientHeight = 573
+ ClientWidth = 819
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -16,7 +16,7 @@ object frmBenchmark: TfrmBenchmark
TextHeight = 15
object splHorizontal: TSplitter
Left = 0
- Top = 421
+ Top = 449
Width = 784
Height = 4
Cursor = crVSplit
@@ -26,10 +26,19 @@ object frmBenchmark: TfrmBenchmark
MinSize = 100
ExplicitTop = 422
end
+ object SVGIconImage: TSVGIconImage
+ Left = 0
+ Top = 0
+ Width = 669
+ Height = 449
+ AutoSize = False
+ ImageList = SVGIconVirtualImageList
+ Align = alClient
+ end
object memOutput: TMemo
Left = 0
- Top = 425
- Width = 784
+ Top = 453
+ Width = 819
Height = 120
Align = alBottom
Font.Charset = DEFAULT_CHARSET
@@ -41,17 +50,8 @@ object frmBenchmark: TfrmBenchmark
ReadOnly = True
ScrollBars = ssVertical
TabOrder = 0
- end
- object SVGIconImage: TSVGIconImage
- Left = 0
- Top = 0
- Width = 634
- Height = 421
- AutoSize = False
- ParentDoubleBuffered = False
- DoubleBuffered = True
- ImageList = SVGIconVirtualImageList
- Align = alClient
+ ExplicitTop = 425
+ ExplicitWidth = 784
end
object pnlButtons: TPanel
Left = 634
@@ -60,7 +60,7 @@ object frmBenchmark: TfrmBenchmark
Height = 421
Align = alRight
BevelOuter = bvNone
- TabOrder = 2
+ TabOrder = 1
object btnClear: TButton
AlignWithMargins = True
Left = 10
@@ -68,9 +68,9 @@ object frmBenchmark: TfrmBenchmark
Width = 130
Height = 30
Margins.Left = 10
- Margins.Top = 5
+ Margins.Top = 2
Margins.Right = 10
- Margins.Bottom = 5
+ Margins.Bottom = 2
Align = alBottom
Caption = '&Clear Output'
TabOrder = 0
@@ -98,9 +98,9 @@ object frmBenchmark: TfrmBenchmark
Width = 130
Height = 30
Margins.Left = 10
- Margins.Top = 5
+ Margins.Top = 2
Margins.Right = 10
- Margins.Bottom = 5
+ Margins.Bottom = 2
Align = alBottom
Caption = '&Benchmark'
TabOrder = 2
@@ -108,14 +108,14 @@ object frmBenchmark: TfrmBenchmark
end
object chkGrayScale: TCheckBox
AlignWithMargins = True
- Left = 10
- Top = 256
+ Left = 13
+ Top = 300
Width = 130
Height = 20
Margins.Left = 10
- Margins.Top = 5
+ Margins.Top = 2
Margins.Right = 10
- Margins.Bottom = 5
+ Margins.Bottom = 2
Align = alBottom
Caption = '&Grayscale'
Checked = True
@@ -129,9 +129,9 @@ object frmBenchmark: TfrmBenchmark
Width = 130
Height = 20
Margins.Left = 10
- Margins.Top = 5
+ Margins.Top = 2
Margins.Right = 10
- Margins.Bottom = 5
+ Margins.Bottom = 2
Align = alBottom
Caption = '&Fixed Color'
Checked = True
@@ -151,15 +151,14 @@ object frmBenchmark: TfrmBenchmark
Left = 10
Top = 8
Width = 32
- Height = 17
+ Height = 15
Margins.Left = 10
- Margins.Top = 8
+ Margins.Top = 10
Margins.Right = 5
- Margins.Bottom = 5
+ Margins.Bottom = 2
Align = alLeft
Caption = '&Loops'
FocusControl = speLoops
- ExplicitHeight = 15
end
object speLoops: TSpinEdit
AlignWithMargins = True
@@ -168,9 +167,9 @@ object frmBenchmark: TfrmBenchmark
Width = 88
Height = 24
Margins.Left = 5
- Margins.Top = 5
+ Margins.Top = 2
Margins.Right = 10
- Margins.Bottom = 5
+ Margins.Bottom = 2
MaxValue = 999
MinValue = 1
TabOrder = 0
@@ -195,19 +194,36 @@ object frmBenchmark: TfrmBenchmark
object chkDrawVisible: TCheckBox
AlignWithMargins = True
Left = 10
- Top = 226
+ Top = 228
Width = 130
- Height = 20
+ Height = 19
Margins.Left = 10
- Margins.Top = 5
+ Margins.Top = 2
Margins.Right = 10
- Margins.Bottom = 5
+ Margins.Bottom = 2
Align = alBottom
Caption = '&Draw visible'
Checked = True
State = cbChecked
TabOrder = 7
end
+ object KeepAspectCheckBox: TCheckBox
+ AlignWithMargins = True
+ Left = 10
+ Top = 228
+ Width = 130
+ Height = 19
+ Margins.Left = 10
+ Margins.Top = 2
+ Margins.Right = 10
+ Margins.Bottom = 2
+ Align = alTop
+ Caption = '&Keep aspect ratio'
+ Checked = True
+ State = cbChecked
+ TabOrder = 8
+ OnClick = KeepAspectCheckBoxClick
+ end
end
object SVGIconImageCollection: TSVGIconImageCollection
SVGIconItems = <>
diff --git a/Demo/Benchmark/UBenchmark.pas b/Demo/Benchmark/UBenchmark.pas
index fe87bf82..70cce304 100644
--- a/Demo/Benchmark/UBenchmark.pas
+++ b/Demo/Benchmark/UBenchmark.pas
@@ -36,11 +36,13 @@ TfrmBenchmark = class(TForm)
grpFactory: TRadioGroup;
chkDrawVisible: TCheckBox;
SVGIconVirtualImageList: TSVGIconVirtualImageList;
+ KeepAspectCheckBox: TCheckBox;
procedure btnClearClick(Sender: TObject);
procedure btnLoadClick(Sender: TObject);
procedure btnRunBenchmarkClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure grpFactoryClick(Sender: TObject);
+ procedure KeepAspectCheckBoxClick(Sender: TObject);
private
FSvgSource : string;
FStartTick : Int64;
@@ -104,7 +106,7 @@ procedure TfrmBenchmark.BenchmarkDraw;
LSize := LSize + LStep;
LRect := TRect.Create(0, 0, Round(LSize), Round(LSize));
- SvgIconImageCollection.Draw(ACanvas, LRect, 0, true);
+ SvgIconImageCollection.Draw(ACanvas, LRect, 0, KeepAspectCheckBox.Checked);
end;
end;
@@ -251,6 +253,11 @@ procedure TfrmBenchmark.grpFactoryClick(Sender: TObject);
end;
end;
+procedure TfrmBenchmark.KeepAspectCheckBoxClick(Sender: TObject);
+begin
+ SVGIconImage.Proportional := KeepAspectCheckBox.Checked;
+end;
+
procedure TfrmBenchmark.LogTicks(var AMessage: string; ATick: Int64);
var
LCurrentTick: Int64;
diff --git a/Demo/D10_4/SVGIconImageCollectionIntoControlList.dproj b/Demo/D10_4/SVGIconImageCollectionIntoControlList.dproj
index 2d4f4303..c0721809 100644
--- a/Demo/D10_4/SVGIconImageCollectionIntoControlList.dproj
+++ b/Demo/D10_4/SVGIconImageCollectionIntoControlList.dproj
@@ -58,7 +58,7 @@
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
SVGIconImageCollectionIntoControlList
- ..\..\Source;..\..\Svg;$(DCC_UnitSearchPath)
+ ..\..\Source;..\..\Svg;..\..\Image32\Source;..\..\Image32\Source\Image32_SVG;$(DCC_UnitSearchPath)
1040
CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
diff --git a/Demo/D10_4/SVGIconImageDemoFMX.dproj b/Demo/D10_4/SVGIconImageDemoFMX.dproj
index cf2d0287..4a2863cb 100644
--- a/Demo/D10_4/SVGIconImageDemoFMX.dproj
+++ b/Demo/D10_4/SVGIconImageDemoFMX.dproj
@@ -23,6 +23,21 @@
Base
true
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
true
Base
@@ -99,13 +114,72 @@
$(BDS)\bin\delphi_PROJECTICON.ico
$(BDS)\bin\delphi_PROJECTICNS.icns
SVGIconImageDemoFMX
- ..\..\Source;..\..\Svg;..\..\GDIP;$(DCC_UnitSearchPath)
+ ..\..\Source;..\..\Image32\Source;..\..\Image32\Source\Image32_SVG;$(DCC_UnitSearchPath)
android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+ $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+ $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png
+
+
+ CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers
+ iPhoneAndiPad
+ true
+ Debug
+ $(MSBuildProjectName)
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png
+
+
+ CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers
+ iPhoneAndiPad
+ true
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png
+ $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png
+ $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png
+
+
+ CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers
+ Debug
+ true
DBXSqliteDriver;RESTComponents;IOCore;DBXDb2Driver;DBXInterBaseDriver;DataSnapServerMidas;vclactnband;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;IconFontsImageList;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;ISOpenOffice7;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;SVGImagePackageR;vclib;frxTee26;fs26;FireDACDBXDriver;dbexpress;IndyCore;vclx;frxIntIO26;dsnap;DataSnapCommon;emsclient;FireDACCommon;frxcs26;RESTBackendComponents;DataSnapConnectors;IOFireDAC;VCLRESTComponents;soapserver;fsTee26;ISVcl7;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;fsIBX26;frx26;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;frxIntIOIndy26;inet;bindcompdbx;IndyIPCommon;vcl;DBXSybaseASEDriver;IndyIPServer;frxDB26;IndySystem;fsADO26;FireDACDb2Driver;frxDBX26;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;fsDB26;TeeDB;FireDAC;IOXML;emshosting;frxe26;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;ChromeTabs_R;DBXOdbcDriver;FireDACTDataDriver;FMXTee;SVGPackage;frxIBX26;soaprtl;DbxCommonDriver;ibxpress;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;emsserverresource;DbxClientDriver;FireDACDSDriver;DBXSybaseASADriver;frxADO26;CustomIPTransport;vcldsnap;SynEdit_R10_3;ISRtl7;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;ISFLib7;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;fmxase;$(DCC_UsePackage)
@@ -200,8 +274,13 @@
- Microsoft Office 2000 Sample Automation Server Wrapper Components
Microsoft Office XP Sample Automation Server Wrapper Components
+ Ethea InstantSolutions 6 ReportBuilder Components
+ Ethea InstantSolutions 6 Rtl Library
+ Ethea InstantSolutions 6 Vcl Library
+ Ethea InstantSolutions 6 LibreOffice/OpenOffice Components
+ Ethea InstantSolutions 6 Framework Library
+ Microsoft Office 2000 Sample Automation Server Wrapper Components
@@ -366,6 +445,16 @@
1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
+ res\drawable-xxxhdpi
+ 1
+
+
res\drawable-ldpi
@@ -1262,6 +1351,9 @@
True
True
+ False
+ False
+ False
True
False
diff --git a/Demo/Source/UMainNew.pas b/Demo/Source/UMainNew.pas
index 20f89491..6952c226 100644
--- a/Demo/Source/UMainNew.pas
+++ b/Demo/Source/UMainNew.pas
@@ -249,9 +249,6 @@ procedure TMainForm.FormCreate(Sender: TObject);
OnAfterMonitorDpiChanged := FormAfterMonitorDpiChanged;
{$ENDIF}
- //Increase performance during drawing of SVG Image
- SvgIconImage.DoubleBuffered := True;
-
//Build available VCL Styles
SelectThemeRadioGroup.Items.Clear;
for I := 0 to High(TStyleManager.StyleNames) do
diff --git a/Demo/Source/UMainTest.dfm b/Demo/Source/UMainTest.dfm
index 3e555370..6fbeabdb 100644
--- a/Demo/Source/UMainTest.dfm
+++ b/Demo/Source/UMainTest.dfm
@@ -17,9 +17,21 @@ object MainForm: TMainForm
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
+ object SVGIconImage: TSVGIconImage
+ Left = 224
+ Top = 55
+ Width = 201
+ Height = 187
+ Hint = 'Click to show SVGText property editor'
+ AutoSize = False
+ Center = False
+ ImageList = SVGIconImageList1
+ ImageIndex = 0
+ OnClick = SVGIconImageClick
+ end
object CategoryButtons1: TCategoryButtons
- Left = 120
- Top = 119
+ Left = 32
+ Top = 55
Width = 169
Height = 187
ButtonFlow = cbfVertical
@@ -46,28 +58,6 @@ object MainForm: TMainForm
SelectedButtonColor = 15132390
TabOrder = 0
end
- object Panel1: TPanel
- Left = 8
- Top = 124
- Width = 102
- Height = 102
- Caption = 'Panel1'
- TabOrder = 1
- object SVGIconImage: TSVGIconImage
- Left = 1
- Top = 1
- Width = 100
- Height = 100
- Hint = 'Click to show SVGText property editor'
- AutoSize = False
- Center = False
- Proportional = True
- ImageList = SVGIconImageList1
- ImageIndex = 0
- Align = alClient
- OnClick = SVGIconImageClick
- end
- end
object ToolBar1: TToolBar
Left = 0
Top = 0
@@ -78,7 +68,7 @@ object MainForm: TMainForm
ButtonWidth = 32
Caption = 'ToolBar1'
Images = SVGIconImageList1
- TabOrder = 2
+ TabOrder = 1
object ToolButton1: TToolButton
Left = 0
Top = 0
diff --git a/Demo/Source/UMainTest.pas b/Demo/Source/UMainTest.pas
index b9932a5f..3b2d653b 100644
--- a/Demo/Source/UMainTest.pas
+++ b/Demo/Source/UMainTest.pas
@@ -44,13 +44,12 @@ interface
TMainForm = class(TForm)
SVGIconImageList1: TSVGIconImageList;
CategoryButtons1: TCategoryButtons;
- Panel1: TPanel;
- SVGIconImage: TSVGIconImage;
ToolBar1: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
+ SVGIconImage: TSVGIconImage;
procedure FormCreate(Sender: TObject);
procedure SVGIconImageClick(Sender: TObject);
private
diff --git a/Packages/D10_4/SVGIconImageListFMX.dproj b/Packages/D10_4/SVGIconImageListFMX.dproj
index b83b0cca..ce33b9f9 100644
--- a/Packages/D10_4/SVGIconImageListFMX.dproj
+++ b/Packages/D10_4/SVGIconImageListFMX.dproj
@@ -13,6 +13,16 @@
true
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
true
Base
@@ -74,6 +84,16 @@
true
_D10_4
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+
CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers
iPhoneAndiPad
@@ -1130,6 +1150,8 @@
+ False
+ False
False
False
False
diff --git a/Packages/D10_4/SVGImage32Package.dproj b/Packages/D10_4/SVGImage32Package.dproj
index 6d9852c6..53ac7280 100644
--- a/Packages/D10_4/SVGImage32Package.dproj
+++ b/Packages/D10_4/SVGImage32Package.dproj
@@ -13,6 +13,16 @@
true
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
true
Base
@@ -65,6 +75,16 @@
Ethea SVGIconImageList VCL components
_D10_4
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+
None
@@ -866,6 +886,8 @@
+ False
+ False
False
False
False
diff --git a/Packages/D10_4/dclSVGIconImageListFMX.dproj b/Packages/D10_4/dclSVGIconImageListFMX.dproj
index 265584a8..ac629ed2 100644
--- a/Packages/D10_4/dclSVGIconImageListFMX.dproj
+++ b/Packages/D10_4/dclSVGIconImageListFMX.dproj
@@ -13,6 +13,16 @@
true
+
+ true
+ Base
+ true
+
+
+ true
+ Base
+ true
+
true
Base
@@ -73,6 +83,16 @@
true
1033
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+
+
+ package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=
+ Debug
+ android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar
+
CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers
iPhoneAndiPad
@@ -1138,6 +1158,8 @@
+ False
+ False
False
False
False
diff --git a/Packages/SVGIconImageListEditorUnit.pas b/Packages/SVGIconImageListEditorUnit.pas
index e94ef7bc..97cb3d72 100644
--- a/Packages/SVGIconImageListEditorUnit.pas
+++ b/Packages/SVGIconImageListEditorUnit.pas
@@ -887,7 +887,6 @@ procedure TSVGIconImageListEditor.FormCreate(Sender: TObject);
FOpenDialog.Filter := 'Scalable Vector Graphics (*.svg)|*.svg';
FOpenDialog.Options := [ofHideReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing];
ImageView.LargeImages := FEditingList;
- IconImage.DoubleBuffered := True;
IconImage.ImageList := FEditingList;
FTotIconsLabel := ImageListGroup.Caption;
FChanged := False;
diff --git a/Source/CairoSVGFactory.pas b/Source/CairoSVGFactory.pas
index 19d96ac8..7f78f01f 100644
--- a/Source/CairoSVGFactory.pas
+++ b/Source/CairoSVGFactory.pas
@@ -194,6 +194,7 @@ procedure TCairoSVG.PaintTo(DC: HDC; R: TRectF; KeepAspectRatio: Boolean);
LContext: ICairoContext;
LSvgRect: TRectF;
Ratio : Single;
+ dx,dy: double;
begin
if not Assigned(FSvgObject) then
Exit;
@@ -208,7 +209,9 @@ procedure TCairoSVG.PaintTo(DC: HDC; R: TRectF; KeepAspectRatio: Boolean);
begin
if KeepAspectRatio then
begin
- LSvgRect := TRectF.Create(0, 0, FWidth, FHeight);
+ dx := (R.Width - FWidth) *0.5;
+ dy := (R.Height - FHeight) *0.5;
+ LSvgRect := TRectF.Create(dy, dx, FWidth, FHeight);
LSvgRect := LSvgRect.FitInto(R, Ratio);
LContext.Scale(1 / Ratio, 1 / Ratio);
end
diff --git a/Source/Image32SVGFactory.pas b/Source/Image32SVGFactory.pas
index 585ca724..5e7e7ca5 100644
--- a/Source/Image32SVGFactory.pas
+++ b/Source/Image32SVGFactory.pas
@@ -30,8 +30,8 @@ implementation
Image32_SVG_Core, //because is the best engine available with SVGIconImageList.
Image32_SVG_Reader, //If you don't want to use it change SVGIconImageList.inc
Image32_SVG_Writer, //Otherwise you must add two search path:
- Image32_Ttf //- SVGIconImageList\Images32\Source
- ; //- SVGIconImageList\Images32\Source\Image32_SVG
+ Image32_Ttf //- SVGIconImageList\Image32\Source
+ ; //- SVGIconImageList\Image32\Source\Image32_SVG
resourcestring
D2D_ERROR_NOT_AVAILABLE = 'Windows SVG support is not available';
@@ -181,21 +181,28 @@ procedure TImage32SVG.LoadFromStream(Stream: TStream);
// Restore Position
Stream.Position := OldPos;
// Now create the SVG
- FImage32.LoadFromStream(Stream);
+ fSvgReader.LoadFromStream(Stream);
end;
procedure TImage32SVG.PaintTo(DC: HDC; R: TRectF; KeepAspectRatio: Boolean);
var
- LSvgRect: TRectF;
- LSourceRect, LDestRect: TRect;
+ LMaxSize: Integer;
+ dx,dy: double;
+ LSourceRect: TRect;
+ LDestRect: TRect;
begin
//Define Image32 output size
- FImage32.SetSize(Round(R.Width), Round(R.Height));
+ if not KeepAspectRatio then
+ FImage32.SetSize(Round(R.Width+R.Height), Round(R.Width+R.Height))
+ else
+ FImage32.SetSize(Round(R.Width), Round(R.Height));
- //Draw SVG image to Image32
+ //Draw SVG image to Image32 (scaled to R and with preserved aspect ratio)
FsvgReader.DrawImage(FImage32, True);
+ dx := (R.Width - FImage32.Width) *0.5;
+ dy := (R.Height - FImage32.Height) *0.5;
- //GrayScale and FixedColor applyed to Image32
+ //apply GrayScale and FixedColor to Image32
if FGrayScale then
FImage32.Grayscale
else if (FFixedColor <> TColors.SysDefault) then
@@ -215,18 +222,14 @@ procedure TImage32SVG.PaintTo(DC: HDC; R: TRectF; KeepAspectRatio: Boolean);
if FOpacity <> 1.0 then
FImage32.ReduceOpacity(Round(FOpacity * 255));
- //Centering Image to the output Rect if KeepAspectRatio is requested
- if KeepAspectRatio then
+ if not KeepAspectRatio then
begin
- LSvgRect := TRectF.Create(0, 0, FImage32.Width, FImage32.Height);
- LSvgRect := RectCenter(LSvgRect, R);
+ LSourceRect := TRect.Create(0, 0, FImage32.Width, FImage32.Height);
+ LDestRect := TRect.Create(Round(R.Left), Round(R.Top), Round(R.Right), Round(R.Bottom));
+ FImage32.CopyToDc(LSourceRect, LDestRect, DC, True);
end
else
- LSvgRect := R;
-
- LSourceRect := TRect.Create(0, 0, FImage32.Width, FImage32.Height);
- LDestRect := TRect.Create(Round(LSvgRect.Left), Round(LSvgRect.Top), Round(LSvgRect.Right), Round(LSvgRect.Bottom));
- FImage32.CopyToDc(LSourceRect, LDestRect, DC, True);
+ FImage32.CopyToDc(DC, Round(R.Left + dx), Round(R.Top + dy), True);
end;
procedure TImage32SVG.SaveToFile(const FileName: string);