mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
# Summary Implement custom shadow nodes for nearly all `Svg` components. While it's a foundation for numerous upcoming changes, it currently addresses and resolves #2544. ## Test Plan There shouldn't be any noticeable changes, and everything should function as before, except that `onLayout` will now be triggered only once and with the correct dimensions. ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ✅ | | MacOS | ✅ | | Android | ✅ | --------- Co-authored-by: Jakub Piasecki <jakubpiasecki67@gmail.com>
33 lines
928 B
C++
33 lines
928 B
C++
#pragma once
|
|
|
|
#include <ReactCommon/JavaTurboModule.h>
|
|
#include <ReactCommon/TurboModule.h>
|
|
#include <jsi/jsi.h>
|
|
#include <react/renderer/components/rnsvg/RNSVGComponentDescriptors.h>
|
|
#include <react/renderer/components/rnsvg/RNSVGImageComponentDescriptor.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
/**
|
|
* JNI C++ class for module 'NativeSvgRenderableModule'
|
|
*/
|
|
class JSI_EXPORT NativeSvgRenderableModuleSpecJSI : public JavaTurboModule {
|
|
public:
|
|
NativeSvgRenderableModuleSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
};
|
|
|
|
/**
|
|
* JNI C++ class for module 'NativeSvgViewModule'
|
|
*/
|
|
class JSI_EXPORT NativeSvgViewModuleSpecJSI : public JavaTurboModule {
|
|
public:
|
|
NativeSvgViewModuleSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
};
|
|
|
|
|
|
JSI_EXPORT
|
|
std::shared_ptr<TurboModule> rnsvg_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|