Browse Source
Merge branch 'master' into fixes/Issue_5006
pull/5007/head
Dariusz Komosiński
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
6 deletions
-
src/Windows/Avalonia.Win32/Composition/CompositionConnector.cs
-
src/Windows/Avalonia.Win32/Composition/SaturationEffect.cs
|
|
|
@ -127,17 +127,13 @@ namespace Avalonia.Win32 |
|
|
|
private SpriteVisual CreateBlur() |
|
|
|
{ |
|
|
|
var blurEffect = new GaussianBlurEffect(new CompositionEffectSourceParameter("backdrop")); |
|
|
|
var blurEffectFactory = _compositor.CreateEffectFactory(blurEffect); |
|
|
|
|
|
|
|
var blurBrush = blurEffectFactory.CreateBrush(); |
|
|
|
var backDropBrush = _compositor.CreateBackdropBrush(); |
|
|
|
|
|
|
|
blurBrush.SetSourceParameter("backdrop", backDropBrush); |
|
|
|
|
|
|
|
var saturateEffect = new SaturationEffect(blurEffect); |
|
|
|
var satEffectFactory = _compositor.CreateEffectFactory(saturateEffect); |
|
|
|
|
|
|
|
var satBrush = satEffectFactory.CreateBrush(); |
|
|
|
|
|
|
|
satBrush.SetSourceParameter("backdrop", backDropBrush); |
|
|
|
|
|
|
|
var visual = _compositor.CreateSpriteVisual(); |
|
|
|
|
|
|
|
@ -6,7 +6,7 @@ namespace Avalonia.Win32 |
|
|
|
{ |
|
|
|
class SaturationEffect : EffectBase |
|
|
|
{ |
|
|
|
public SaturationEffect(IGraphicsEffect source) : base(source) |
|
|
|
public SaturationEffect(IGraphicsEffectSource source) : base(source) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
|