Files
react-native-svg/windows/RNSVG/MarkerViewManager.cpp
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

25 lines
697 B
C++

#include "pch.h"
#include "MarkerViewManager.h"
#include "MarkerViewManager.g.cpp"
using namespace winrt;
using namespace Microsoft::ReactNative;
namespace winrt::RNSVG::implementation {
MarkerViewManager::MarkerViewManager() {
m_class = RNSVG::SVGClass::RNSVGMarker;
m_name = L"RNSVGMarker";
}
IMapView<hstring, ViewManagerPropertyType> MarkerViewManager::NativeProps() {
auto const &parentProps{__super::NativeProps()};
auto const &nativeProps{winrt::single_threaded_map<hstring, ViewManagerPropertyType>()};
for (auto const &prop : parentProps) {
nativeProps.Insert(prop.Key(), prop.Value());
}
return nativeProps.GetView();
}
} // namespace winrt::RNSVG::implementation