Files
hackathon-v-escape-4ff8b5a6…/frontend/node_modules/react-native-svg/windows/RNSVG/BrushView.cpp
marianesaldana 80dbd947e5 Initial commit
2026-05-23 08:59:34 -06:00

28 lines
522 B
C++

#include "pch.h"
#include "BrushView.h"
#include "BrushView.g.cpp"
#include "D2DHelpers.h"
namespace winrt::RNSVG::implementation {
void BrushView::SaveDefinition() {
if (auto const &root{SvgRoot()}) {
CreateBrush();
root.Brushes().Insert(Id(), *this);
}
}
void BrushView::SetBounds(Rect const &rect) {
m_bounds = D2DHelpers::AsD2DRect(rect);
UpdateBounds();
}
void BrushView::Unload() {
if (m_brush) {
m_brush = nullptr;
}
__super::Unload();
}
} // namespace winrt::RNSVG::implementation