Skip to content

Commit 9c11be7

Browse files
committed
Revert WithInkscapeEnabled due to changes in ImageMagick.
1 parent 3ae87c1 commit 9c11be7

File tree

4 files changed

+12
-109
lines changed

4 files changed

+12
-109
lines changed

src/Magick.NET.Core/Configuration/IConfigurationFiles.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,4 @@ public interface IConfigurationFiles
6969
/// Gets the type-ghostscript configuration.
7070
/// </summary>
7171
IConfigurationFile TypeGhostscript { get; }
72-
73-
/// <summary>
74-
/// Creates a new configuration with Inkscape enabled.
75-
/// </summary>
76-
/// <returns>A new configuration with Inkscape enabled.</returns>
77-
public IConfigurationFiles WithInkscapeEnabled();
7872
}

src/Magick.NET/Configuration/ConfigurationFile.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ public ConfigurationFile(string fileName)
1313
Data = LoadData();
1414
}
1515

16-
public ConfigurationFile(IConfigurationFile configurationFile)
17-
{
18-
FileName = configurationFile.FileName;
19-
Data = configurationFile.Data;
20-
}
21-
2216
public string FileName { get; }
2317

2418
public string Data { get; set; }

src/Magick.NET/Configuration/ConfigurationFiles.cs

Lines changed: 12 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,25 @@ namespace ImageMagick.Configuration;
1010
/// </summary>
1111
public sealed class ConfigurationFiles : IConfigurationFiles
1212
{
13-
private ConfigurationFiles(
14-
IConfigurationFile colors,
15-
IConfigurationFile configure,
16-
IConfigurationFile delegates,
17-
IConfigurationFile english,
18-
IConfigurationFile locale,
19-
IConfigurationFile log,
20-
IConfigurationFile policy,
21-
IConfigurationFile thresholds,
22-
IConfigurationFile type,
23-
IConfigurationFile typeGhostscript)
13+
private ConfigurationFiles()
2414
{
25-
Colors = colors;
26-
Configure = configure;
27-
Delegates = delegates;
28-
English = english;
29-
Locale = locale;
30-
Log = log;
31-
Policy = policy;
32-
Thresholds = thresholds;
33-
Type = type;
34-
TypeGhostscript = typeGhostscript;
15+
Colors = new ConfigurationFile("colors.xml");
16+
Configure = new ConfigurationFile("configure.xml");
17+
Delegates = new ConfigurationFile("delegates.xml");
18+
English = new ConfigurationFile("english.xml");
19+
Locale = new ConfigurationFile("locale.xml");
20+
Log = new ConfigurationFile("log.xml");
21+
Policy = new ConfigurationFile("policy.xml");
22+
Thresholds = new ConfigurationFile("thresholds.xml");
23+
Type = new ConfigurationFile("type.xml");
24+
TypeGhostscript = new ConfigurationFile("type-ghostscript.xml");
3525
}
3626

3727
/// <summary>
3828
/// Gets the default configuration.
3929
/// </summary>
4030
public static IConfigurationFiles Default
41-
=> new ConfigurationFiles(
42-
colors: new ConfigurationFile("colors.xml"),
43-
configure: new ConfigurationFile("configure.xml"),
44-
delegates: new ConfigurationFile("delegates.xml"),
45-
english: new ConfigurationFile("english.xml"),
46-
locale: new ConfigurationFile("locale.xml"),
47-
log: new ConfigurationFile("log.xml"),
48-
policy: new ConfigurationFile("policy.xml"),
49-
thresholds: new ConfigurationFile("thresholds.xml"),
50-
type: new ConfigurationFile("type.xml"),
51-
typeGhostscript: new ConfigurationFile("type-ghostscript.xml"));
31+
=> new ConfigurationFiles();
5232

5333
/// <summary>
5434
/// Gets all the configuration files.
@@ -125,26 +105,4 @@ IConfigurationFiles IConfigurationFiles.Default
125105
/// Gets the type-ghostscript configuration.
126106
/// </summary>
127107
public IConfigurationFile TypeGhostscript { get; }
128-
129-
/// <summary>
130-
/// Creates a new configuration with Inkscape enabled.
131-
/// </summary>
132-
/// <returns>A new configuration with Inkscape enabled.</returns>
133-
public IConfigurationFiles WithInkscapeEnabled()
134-
{
135-
var delegates = new ConfigurationFile(Delegates);
136-
delegates.Data = delegates.Data.Replace(@"<!--<delegate decode=""svg:decode"" stealth=""True"" command=""&quot;inkscape&quot; &quot;%s&quot; - -export-filename=&quot;%s&quot; - -export-dpi=&quot;%s&quot; - -export-background=&quot;%s&quot; - -export-background-opacity=&quot;%s&quot; &gt; &quot;%s&quot; 2&gt;&amp;1""/>-->", @"<delegate decode=""svg:decode"" stealth=""True"" command=""&quot;inkscape&quot; &quot;%s&quot; --export-filename=&quot;%s&quot; --export-dpi=&quot;%s&quot; --export-background=&quot;%s&quot; --export-background-opacity=&quot;%s&quot; &gt; &quot;%s&quot; 2&gt;&amp;1""/>");
137-
138-
return new ConfigurationFiles(
139-
colors: new ConfigurationFile(Colors),
140-
configure: new ConfigurationFile(Configure),
141-
delegates: new ConfigurationFile(delegates),
142-
english: new ConfigurationFile(English),
143-
locale: new ConfigurationFile(Locale),
144-
log: new ConfigurationFile(Log),
145-
policy: new ConfigurationFile(Policy),
146-
thresholds: new ConfigurationFile(Thresholds),
147-
type: new ConfigurationFile(Type),
148-
typeGhostscript: new ConfigurationFile(TypeGhostscript));
149-
}
150108
}

tests/Magick.NET.Tests/Configuration/ConfigurationFilesTests/TheWithInkscapeEnabledMethod.cs

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)