Files
Marlene Cota f88532d195 [Windows] Port to Direct2D to remove win2d dependency (#2052)
This change removes the win2d (Direct2D wrapper) dependency by using D2D directly. This removes the manual step of adding the win2d to any new react-native-windows projects that want to use react-native-svg. It is also a stepping stone to an easier Fabric implementation for windows.
2023-11-14 11:33:19 +01:00

20 lines
535 B
C++

#pragma once
#include "D2DDevice.g.h"
namespace winrt::RNSVG::implementation {
struct D2DDevice : D2DDeviceT<D2DDevice> {
public:
D2DDevice() = default;
D2DDevice(com_ptr<ID2D1Device> const &device) { m_d2d = device; }
com_ptr<ID2D1Device> Get() { return m_d2d; }
private:
com_ptr<ID2D1Device> m_d2d;
};
} // namespace winrt::RNSVG::implementation
namespace winrt::RNSVG::factory_implementation {
struct D2DDevice : D2DDeviceT<D2DDevice, implementation::D2DDevice> {};
} // namespace winrt::RNSVG::factory_implementation