mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
Add Windows support (#1632)
Adds Windows support. Co-authored-by: Adam Gleitman <adam.gleitman@gmail.com> Co-authored-by: REDMOND\agnel <agnel@microsoft.com>
This commit is contained in:
committed by
Wojciech Lewicki
parent
4d3c521a22
commit
28d51bdf06
24
windows/RNSVG/BrushView.cpp
Normal file
24
windows/RNSVG/BrushView.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "pch.h"
|
||||
#include "BrushView.h"
|
||||
#include "BrushView.g.cpp"
|
||||
|
||||
namespace winrt::RNSVG::implementation {
|
||||
void BrushView::SaveDefinition() {
|
||||
if (auto const &root{SvgRoot()}) {
|
||||
CreateBrush();
|
||||
root.Brushes().Insert(Id(), *this);
|
||||
}
|
||||
}
|
||||
|
||||
void BrushView::SetBounds(Windows::Foundation::Rect const &rect) {
|
||||
m_bounds = rect;
|
||||
UpdateBounds();
|
||||
}
|
||||
|
||||
void BrushView::Unload() {
|
||||
m_brush.Close();
|
||||
m_brush = nullptr;
|
||||
|
||||
__super::Unload();
|
||||
}
|
||||
} // namespace winrt::RNSVG::implementation
|
||||
Reference in New Issue
Block a user