fix: fill/stroke setters and implement currentColor on Windows (#1928)

Starting in v13, the switch to Fabric changed the color prop values sent to the native side, so all colors on Windows were defaulting to black. Updated the property setters to handle that change and also added support for the SVG color prop / "currentColor".
This commit is contained in:
Marlene Cota
2022-12-05 06:22:39 -08:00
committed by GitHub
parent 1ef46af726
commit fc2e0e091a
7 changed files with 49 additions and 19 deletions

View File

@@ -89,6 +89,8 @@ struct RenderableView : RenderableViewT<RenderableView> {
Microsoft::Graphics::Canvas::Geometry::CanvasLineJoin::Miter};
Microsoft::Graphics::Canvas::Geometry::CanvasFilledRegionDetermination m_fillRule{
Microsoft::Graphics::Canvas::Geometry::CanvasFilledRegionDetermination::Winding};
void SetColor(const Microsoft::ReactNative::JSValueObject &propValue, Windows::UI::Color fallbackColor, std::string propName);
};
} // namespace winrt::RNSVG::implementation