mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
Adds Windows support. Co-authored-by: Adam Gleitman <adam.gleitman@gmail.com> Co-authored-by: REDMOND\agnel <agnel@microsoft.com>
30 lines
953 B
C++
30 lines
953 B
C++
#include "pch.h"
|
|
#include "EllipseViewManager.h"
|
|
#include "EllipseViewManager.g.cpp"
|
|
|
|
using namespace winrt;
|
|
using namespace Microsoft::ReactNative;
|
|
|
|
namespace winrt::RNSVG::implementation {
|
|
EllipseViewManager::EllipseViewManager() {
|
|
m_class = RNSVG::SVGClass::RNSVGEllipse;
|
|
m_name = L"RNSVGEllipse";
|
|
}
|
|
|
|
IMapView<hstring, ViewManagerPropertyType> EllipseViewManager::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());
|
|
}
|
|
|
|
nativeProps.Insert(L"cx", ViewManagerPropertyType::String);
|
|
nativeProps.Insert(L"cy", ViewManagerPropertyType::String);
|
|
nativeProps.Insert(L"rx", ViewManagerPropertyType::String);
|
|
nativeProps.Insert(L"ry", ViewManagerPropertyType::String);
|
|
|
|
return nativeProps.GetView();
|
|
}
|
|
} // namespace winrt::RNSVG::implementation
|