mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-22 19:01:36 +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
564 B
C++
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
|