mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-25 12:03:27 +00:00
f88532d195
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.
20 lines
535 B
C++
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
|