Skip to content

Commit 83f5d4b

Browse files
committed
Updates to ImageManager update 1
Restored modified/deprecated method signatures in PluginCore so that it does not break other 3rd-Party plugins.
1 parent daab8a0 commit 83f5d4b

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

FlashDevelop/MainForm.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ public IPlugin FindPlugin(String guid)
16841684
/// Finds the specified composed/ready image that is automatically adjusted according to the theme.
16851685
/// <para/>
16861686
/// WARNING! Do not call <see cref="ScaleHelper.Scale(Bitmap)"/> on the image returned by this method.
1687-
/// Call it before passing the image to this method instead.
1687+
/// Instead, call it before passing the image to this method.
16881688
/// </summary>
16891689
// TODO: Find all references to this method that creates a copy of the image returned, such as adding it to ImageList, and call FindImage(image, false) instead.
16901690
public Image FindImage(String data)
@@ -1696,7 +1696,7 @@ public Image FindImage(String data)
16961696
/// Finds the specified composed/ready image.
16971697
/// <para/>
16981698
/// WARNING! Do not call <see cref="ScaleHelper.Scale(Bitmap)"/> on the image returned by this method if <code>autoAdjusted</code> is <code>true</code>.
1699-
/// Call it before passing the image to this method instead.
1699+
/// Instead, call it before passing the image to this method.
17001700
/// </summary>
17011701
public Image FindImage(String data, Boolean autoAdjusted)
17021702
{
@@ -1714,6 +1714,14 @@ public Image FindImage(String data, Boolean autoAdjusted)
17141714
}
17151715
}
17161716

1717+
/// <summary>
1718+
/// Deprecated. Returns <code>image</code>.
1719+
/// </summary>
1720+
public Image ImageSetAdjust(Image image)
1721+
{
1722+
return image;
1723+
}
1724+
17171725
/// <summary>
17181726
/// Gets a copy of the image that gets automatically adjusted according to the theme.
17191727
/// </summary>

PluginCore/PluginCore/Interfaces.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public interface IMainForm : IContainerControl, IWin32Window
129129
String GetThemeValue(String id, String fallback);
130130
Color GetThemeColor(String id, Color fallback);
131131
IPlugin FindPlugin(String guid);
132+
Image ImageSetAdjust(Image image);
132133
Image GetAutoAdjustedImage(Image image);
133134
Image FindImage(String data);
134135
Image FindImage(String data, Boolean autoAdjust);

PluginCore/PluginCore/Utilities/ImageKonverter.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ public static Icon ImageToIcon(Image image)
2626
}
2727
}
2828

29+
/// <summary>
30+
/// Adjusts the saturation and brightness of the image.
31+
/// </summary>
32+
public static Image ImageAdjust(Image image, Int32 saturation, Int32 brightness)
33+
{
34+
Image dest = new Bitmap(image.Width, image.Height);
35+
ImageAdjust(image, dest, saturation, brightness);
36+
return dest;
37+
}
38+
2939
/// <summary>
3040
/// Adjusts the saturation and brightness of the image.
3141
/// </summary>

0 commit comments

Comments
 (0)