| 42 | } |
| 43 | |
| 44 | HRESULT FloodEffect::GetProperty(UINT index, ABI::Windows::Foundation::IPropertyValue** value) noexcept try |
| 45 | { |
| 46 | if (value == nullptr) [[unlikely]] |
| 47 | { |
| 48 | return E_INVALIDARG; |
| 49 | } |
| 50 | |
| 51 | switch (index) |
| 52 | { |
| 53 | case D2D1_FLOOD_PROP_COLOR: |
| 54 | *value = wf::PropertyValue::CreateSingleArray({ Color.x, Color.y, Color.z, Color.w }).as<ABI::Windows::Foundation::IPropertyValue>().detach(); |
| 55 | break; |
| 56 | |
| 57 | default: |
| 58 | return E_BOUNDS; |
| 59 | } |
| 60 | |
| 61 | return S_OK; |
| 62 | } |
| 63 | catch (...) |
| 64 | { |
| 65 | return winrt::to_hresult(); |
| 66 | } |
| 67 | |
| 68 | HRESULT FloodEffect::GetSource(UINT, awge::IGraphicsEffectSource** source) noexcept |
| 69 | { |