| 56 | } |
| 57 | |
| 58 | HRESULT GaussianBlurEffect::GetProperty(UINT index, ABI::Windows::Foundation::IPropertyValue** value) noexcept try |
| 59 | { |
| 60 | if (value == nullptr) [[unlikely]] |
| 61 | { |
| 62 | return E_INVALIDARG; |
| 63 | } |
| 64 | |
| 65 | switch (index) |
| 66 | { |
| 67 | case D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION: |
| 68 | *value = wf::PropertyValue::CreateSingle(BlurAmount).as<ABI::Windows::Foundation::IPropertyValue>().detach(); |
| 69 | break; |
| 70 | |
| 71 | case D2D1_GAUSSIANBLUR_PROP_OPTIMIZATION: |
| 72 | *value = wf::PropertyValue::CreateUInt32((UINT32)Optimization).as<ABI::Windows::Foundation::IPropertyValue>().detach(); |
| 73 | break; |
| 74 | |
| 75 | case D2D1_GAUSSIANBLUR_PROP_BORDER_MODE: |
| 76 | *value = wf::PropertyValue::CreateUInt32((UINT32)BorderMode).as<ABI::Windows::Foundation::IPropertyValue>().detach(); |
| 77 | break; |
| 78 | |
| 79 | default: |
| 80 | return E_BOUNDS; |
| 81 | } |
| 82 | |
| 83 | return S_OK; |
| 84 | } |
| 85 | catch (...) |
| 86 | { |
| 87 | return winrt::to_hresult(); |
| 88 | } |
| 89 | |
| 90 | HRESULT GaussianBlurEffect::GetSource(UINT index, awge::IGraphicsEffectSource** source) noexcept |
| 91 | { |