mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -07:00
Apply exclusion to grayscale filters as well
(cherry picked from commit e0b04a11f02e6188e364ea26de96944d9927291a)
This commit is contained in:
parent
2d06917518
commit
dd0cdf4724
2 changed files with 5 additions and 1 deletions
|
@ -396,7 +396,7 @@ namespace Greenshot.Editor.Drawing
|
|||
|
||||
public bool HasFilters => Filters.Count > 0;
|
||||
|
||||
public bool IsAreaHighlightContainer => Filters.Any(f => f is BrightnessFilter) && Filters.Any(f => f is BlurFilter);
|
||||
public bool IsAreaHighlightContainer => Filters.Any(f => f.Invert && (f is BrightnessFilter || f is BlurFilter || f is GrayscaleFilter));
|
||||
|
||||
public abstract void Draw(Graphics graphics, RenderMode renderMode);
|
||||
|
||||
|
|
|
@ -55,6 +55,10 @@ namespace Greenshot.Editor.Drawing.Filters
|
|||
{
|
||||
graphics.SetClip(applyRect);
|
||||
graphics.ExcludeClip(rect);
|
||||
foreach (NativeRect area in areasToExcludeFromFilters)
|
||||
{
|
||||
graphics.ExcludeClip(area);
|
||||
}
|
||||
}
|
||||
|
||||
ColorMatrix grayscaleMatrix = new ColorMatrix(new[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue