/
Blur.h
47 lines (43 loc) · 868 Bytes
/
Blur.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Blur.h
#pragma once
#include "Stdafx.h"
#include "GdipEffects.h"
using namespace System;
using namespace System::Drawing;
using namespace System::Runtime::CompilerServices;
namespace GdipEffects {
public ref class Blur sealed :
public Effect
{
public:
Blur();
~Blur();
virtual IntPtr GetNativeWrapper() override {return IntPtr(dynamic_cast<gdip_call_e*>(nativeMember));}
property float Radius
{
float get()
{
return GetParams().radius;
}
void set(float val)
{
SetParams(val, !!GetParams().expandEdge);
}
}
property bool ExpandEdge
{
bool get()
{
return !!GetParams().expandEdge;
}
void set(bool val)
{
SetParams(GetParams().radius, val);
}
}
private:
gdip_effect_wrap<Gdiplus::Blur>* nativeMember;
Gdiplus::BlurParams GetParams();
void SetParams(float radius, bool edge);
};
}