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
564 B
C++

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