@react-native-ohos/react-native-svg 15.12.1-rc.1 → 15.12.1-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.OpenSource +10 -10
- package/README.md +13 -13
- package/css/package.json +5 -5
- package/harmony/svg/BuildProfile.ets +16 -16
- package/harmony/svg/build-profile.json5 +9 -9
- package/harmony/svg/hvigorfile.ts +1 -1
- package/harmony/svg/index.ets +6 -6
- package/harmony/svg/oh-package.json5 +13 -13
- package/harmony/svg/src/main/cpp/SVGPackage.h +4 -0
- package/harmony/svg/src/main/cpp/SvgArkUINode.cpp +3 -0
- package/harmony/svg/src/main/cpp/SvgArkUINode.h +15 -9
- package/harmony/svg/src/main/cpp/SvgFilter.cpp +505 -505
- package/harmony/svg/src/main/cpp/SvgFilter.h +112 -112
- package/harmony/svg/src/main/cpp/SvgForeignObjectNode.cpp +74 -0
- package/harmony/svg/src/main/cpp/SvgForeignObjectNode.h +54 -0
- package/harmony/svg/src/main/cpp/SvgForeignObjectNodeDelegate.h +30 -0
- package/harmony/svg/src/main/cpp/SvgNode.cpp +64 -0
- package/harmony/svg/src/main/cpp/SvgNode.h +17 -1
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.cpp +40 -40
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.h +48 -48
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.cpp +33 -33
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.h +48 -48
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.cpp +39 -39
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.h +55 -55
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.cpp +33 -33
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.h +49 -49
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.cpp +34 -34
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.h +48 -48
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.cpp +35 -35
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.h +45 -45
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.cpp +198 -198
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.h +48 -48
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGForeignObjectComponentInstance.cpp +65 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGForeignObjectComponentInstance.h +50 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGGroupComponentInstance.h +8 -4
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGImageComponentInstance.cpp +4 -1
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.cpp +37 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.h +10 -2
- package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.cpp +36 -15
- package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.h +6 -10
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeBlendJSIBinder.h +26 -26
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeColorMatrixJSIBinder.h +26 -26
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeCompositeJSIBinder.h +30 -30
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeFloodJSIBinder.h +26 -26
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeGaussianBlurJSIBinder.h +26 -26
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeOffsetJSIBinder.h +26 -26
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFilterJSIBinder.h +44 -44
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.cpp +977 -977
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.h +1280 -1280
- package/harmony/svg/src/main/cpp/utils/DynamicUtils.h +55 -55
- package/harmony/svg/src/main/cpp/utils/FilterManager.h +190 -190
- package/harmony/svg/src/main/ets/RNSVGImageModule.ts +21 -21
- package/harmony/svg/src/main/ets/RNSVGRenderableModule.ts +16 -16
- package/harmony/svg/src/main/ets/RNSVGSvgViewModule.ts +18 -18
- package/harmony/svg/src/main/ets/SvgPackage.ts +57 -57
- package/harmony/svg/src/main/module.json5 +7 -7
- package/harmony/svg/src/main/resources/base/element/string.json +8 -8
- package/harmony/svg/src/main/resources/en_US/element/string.json +8 -8
- package/harmony/svg/src/main/resources/zh_CN/element/string.json +8 -8
- package/harmony/svg/ts.ts +7 -7
- package/harmony/svg.har +0 -0
- package/lib/commonjs/css/index.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/css/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/package.json +53 -54
- package/src/css/index.tsx +19 -19
- package/src/index.tsx +2 -2
- package/tsconfig.json +11 -11
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#pragma once
|
|
8
|
-
|
|
9
|
-
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
-
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
namespace rnoh {
|
|
14
|
-
namespace svg {
|
|
15
|
-
|
|
16
|
-
class RNSVGFeBlendComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeBlendShadowNode> {
|
|
17
|
-
public:
|
|
18
|
-
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeBlendProps>;
|
|
19
|
-
|
|
20
|
-
RNSVGFeBlendComponentInstance(Context context);
|
|
21
|
-
|
|
22
|
-
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
23
|
-
void UpdateElementProps() override;
|
|
24
|
-
|
|
25
|
-
std::string getIn() const { return in_; }
|
|
26
|
-
std::string getIn2() const { return in2_; }
|
|
27
|
-
std::string getMode() const { return mode_; }
|
|
28
|
-
std::string getResult() const { return result_; }
|
|
29
|
-
std::string getX() const { return x_; }
|
|
30
|
-
std::string getY() const { return y_; }
|
|
31
|
-
std::string getWidth() const { return width_; }
|
|
32
|
-
std::string getHeight() const { return height_; }
|
|
33
|
-
|
|
34
|
-
private:
|
|
35
|
-
std::string x_ = "0";
|
|
36
|
-
std::string y_ = "0";
|
|
37
|
-
std::string width_ = "0";
|
|
38
|
-
std::string height_ = "0";
|
|
39
|
-
std::string in_ = "SourceGraphic";
|
|
40
|
-
std::string in2_ = "";
|
|
41
|
-
std::string mode_ = "normal";
|
|
42
|
-
std::string result_ = "";
|
|
43
|
-
|
|
44
|
-
void extractAttributes();
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
} // namespace svg
|
|
48
|
-
} // namespace rnoh
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#pragma once
|
|
8
|
+
|
|
9
|
+
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
+
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
namespace rnoh {
|
|
14
|
+
namespace svg {
|
|
15
|
+
|
|
16
|
+
class RNSVGFeBlendComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeBlendShadowNode> {
|
|
17
|
+
public:
|
|
18
|
+
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeBlendProps>;
|
|
19
|
+
|
|
20
|
+
RNSVGFeBlendComponentInstance(Context context);
|
|
21
|
+
|
|
22
|
+
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
23
|
+
void UpdateElementProps() override;
|
|
24
|
+
|
|
25
|
+
std::string getIn() const { return in_; }
|
|
26
|
+
std::string getIn2() const { return in2_; }
|
|
27
|
+
std::string getMode() const { return mode_; }
|
|
28
|
+
std::string getResult() const { return result_; }
|
|
29
|
+
std::string getX() const { return x_; }
|
|
30
|
+
std::string getY() const { return y_; }
|
|
31
|
+
std::string getWidth() const { return width_; }
|
|
32
|
+
std::string getHeight() const { return height_; }
|
|
33
|
+
|
|
34
|
+
private:
|
|
35
|
+
std::string x_ = "0";
|
|
36
|
+
std::string y_ = "0";
|
|
37
|
+
std::string width_ = "0";
|
|
38
|
+
std::string height_ = "0";
|
|
39
|
+
std::string in_ = "SourceGraphic";
|
|
40
|
+
std::string in2_ = "";
|
|
41
|
+
std::string mode_ = "normal";
|
|
42
|
+
std::string result_ = "";
|
|
43
|
+
|
|
44
|
+
void extractAttributes();
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
} // namespace svg
|
|
48
|
+
} // namespace rnoh
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#include "RNSVGFeColorMatrixComponentInstance.h"
|
|
8
|
-
#include "utils/DynamicUtils.h"
|
|
9
|
-
#include <glog/logging.h>
|
|
10
|
-
|
|
11
|
-
namespace rnoh {
|
|
12
|
-
namespace svg {
|
|
13
|
-
|
|
14
|
-
RNSVGFeColorMatrixComponentInstance::RNSVGFeColorMatrixComponentInstance(Context context)
|
|
15
|
-
: RNSVGBaseComponentInstance(std::move(context)) {}
|
|
16
|
-
|
|
17
|
-
void RNSVGFeColorMatrixComponentInstance::onPropsChanged(SharedConcreteProps const &props) {
|
|
18
|
-
if (props) {
|
|
19
|
-
type_ = facebook::react::toString(props->type);
|
|
20
|
-
in_ = props->in1;
|
|
21
|
-
values_ = std::vector<float>(props->values.begin(), props->values.end());
|
|
22
|
-
x_ = DynamicUtils::DynamicToString(props->x);
|
|
23
|
-
y_ = DynamicUtils::DynamicToString(props->y);
|
|
24
|
-
width_ = DynamicUtils::DynamicToString(props->width);
|
|
25
|
-
height_ = DynamicUtils::DynamicToString(props->height);
|
|
26
|
-
result_ = props->result;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
void RNSVGFeColorMatrixComponentInstance::UpdateElementProps() {}
|
|
31
|
-
|
|
32
|
-
} // namespace svg
|
|
33
|
-
} // namespace rnoh
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#include "RNSVGFeColorMatrixComponentInstance.h"
|
|
8
|
+
#include "utils/DynamicUtils.h"
|
|
9
|
+
#include <glog/logging.h>
|
|
10
|
+
|
|
11
|
+
namespace rnoh {
|
|
12
|
+
namespace svg {
|
|
13
|
+
|
|
14
|
+
RNSVGFeColorMatrixComponentInstance::RNSVGFeColorMatrixComponentInstance(Context context)
|
|
15
|
+
: RNSVGBaseComponentInstance(std::move(context)) {}
|
|
16
|
+
|
|
17
|
+
void RNSVGFeColorMatrixComponentInstance::onPropsChanged(SharedConcreteProps const &props) {
|
|
18
|
+
if (props) {
|
|
19
|
+
type_ = facebook::react::toString(props->type);
|
|
20
|
+
in_ = props->in1;
|
|
21
|
+
values_ = std::vector<float>(props->values.begin(), props->values.end());
|
|
22
|
+
x_ = DynamicUtils::DynamicToString(props->x);
|
|
23
|
+
y_ = DynamicUtils::DynamicToString(props->y);
|
|
24
|
+
width_ = DynamicUtils::DynamicToString(props->width);
|
|
25
|
+
height_ = DynamicUtils::DynamicToString(props->height);
|
|
26
|
+
result_ = props->result;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
void RNSVGFeColorMatrixComponentInstance::UpdateElementProps() {}
|
|
31
|
+
|
|
32
|
+
} // namespace svg
|
|
33
|
+
} // namespace rnoh
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#pragma once
|
|
8
|
-
|
|
9
|
-
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
-
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
namespace rnoh {
|
|
14
|
-
namespace svg {
|
|
15
|
-
|
|
16
|
-
class RNSVGFeColorMatrixComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeColorMatrixShadowNode> {
|
|
17
|
-
public:
|
|
18
|
-
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeColorMatrixProps>;
|
|
19
|
-
|
|
20
|
-
RNSVGFeColorMatrixComponentInstance(Context context);
|
|
21
|
-
|
|
22
|
-
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
23
|
-
void UpdateElementProps() override;
|
|
24
|
-
|
|
25
|
-
std::string getX() const { return x_; }
|
|
26
|
-
std::string getY() const { return y_; }
|
|
27
|
-
std::string getWidth() const { return width_; }
|
|
28
|
-
std::string getHeight() const { return height_; }
|
|
29
|
-
std::string getResult() const { return result_; }
|
|
30
|
-
std::string getType() const { return type_; }
|
|
31
|
-
std::string getIn() const { return in_; }
|
|
32
|
-
std::vector<float> getValues() const { return values_; }
|
|
33
|
-
|
|
34
|
-
private:
|
|
35
|
-
std::string x_ = "0";
|
|
36
|
-
std::string y_ = "0";
|
|
37
|
-
std::string width_ = "0";
|
|
38
|
-
std::string height_ = "0";
|
|
39
|
-
std::string result_ = "";
|
|
40
|
-
std::string type_ = "saturate";
|
|
41
|
-
std::string in_ = "SourceGraphic";
|
|
42
|
-
std::vector<float> values_ = {1.0f};
|
|
43
|
-
|
|
44
|
-
void extractAttributes();
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
} // namespace svg
|
|
48
|
-
} // namespace rnoh
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#pragma once
|
|
8
|
+
|
|
9
|
+
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
+
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
namespace rnoh {
|
|
14
|
+
namespace svg {
|
|
15
|
+
|
|
16
|
+
class RNSVGFeColorMatrixComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeColorMatrixShadowNode> {
|
|
17
|
+
public:
|
|
18
|
+
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeColorMatrixProps>;
|
|
19
|
+
|
|
20
|
+
RNSVGFeColorMatrixComponentInstance(Context context);
|
|
21
|
+
|
|
22
|
+
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
23
|
+
void UpdateElementProps() override;
|
|
24
|
+
|
|
25
|
+
std::string getX() const { return x_; }
|
|
26
|
+
std::string getY() const { return y_; }
|
|
27
|
+
std::string getWidth() const { return width_; }
|
|
28
|
+
std::string getHeight() const { return height_; }
|
|
29
|
+
std::string getResult() const { return result_; }
|
|
30
|
+
std::string getType() const { return type_; }
|
|
31
|
+
std::string getIn() const { return in_; }
|
|
32
|
+
std::vector<float> getValues() const { return values_; }
|
|
33
|
+
|
|
34
|
+
private:
|
|
35
|
+
std::string x_ = "0";
|
|
36
|
+
std::string y_ = "0";
|
|
37
|
+
std::string width_ = "0";
|
|
38
|
+
std::string height_ = "0";
|
|
39
|
+
std::string result_ = "";
|
|
40
|
+
std::string type_ = "saturate";
|
|
41
|
+
std::string in_ = "SourceGraphic";
|
|
42
|
+
std::vector<float> values_ = {1.0f};
|
|
43
|
+
|
|
44
|
+
void extractAttributes();
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
} // namespace svg
|
|
48
|
+
} // namespace rnoh
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#include "RNSVGFeCompositeComponentInstance.h"
|
|
8
|
-
#include "utils/DynamicUtils.h"
|
|
9
|
-
#include <glog/logging.h>
|
|
10
|
-
|
|
11
|
-
namespace rnoh {
|
|
12
|
-
namespace svg {
|
|
13
|
-
|
|
14
|
-
RNSVGFeCompositeComponentInstance::RNSVGFeCompositeComponentInstance(Context context)
|
|
15
|
-
: RNSVGBaseComponentInstance(std::move(context)) {}
|
|
16
|
-
|
|
17
|
-
void RNSVGFeCompositeComponentInstance::onPropsChanged(SharedConcreteProps const &props) {
|
|
18
|
-
if (props) {
|
|
19
|
-
x_ = DynamicUtils::DynamicToString(props->x);
|
|
20
|
-
y_ = DynamicUtils::DynamicToString(props->y);
|
|
21
|
-
width_ = DynamicUtils::DynamicToString(props->width);
|
|
22
|
-
height_ = DynamicUtils::DynamicToString(props->height);
|
|
23
|
-
in_ = props->in1;
|
|
24
|
-
in2_ = props->in2;
|
|
25
|
-
operator_ = facebook::react::toString(props->operator1);
|
|
26
|
-
result_ = props->result;
|
|
27
|
-
k1_ = std::to_string(props->k1);
|
|
28
|
-
k2_ = std::to_string(props->k2);
|
|
29
|
-
k3_ = std::to_string(props->k3);
|
|
30
|
-
k4_ = std::to_string(props->k4);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
void RNSVGFeCompositeComponentInstance::UpdateElementProps() {}
|
|
35
|
-
|
|
36
|
-
void RNSVGFeCompositeComponentInstance::extractAttributes() {}
|
|
37
|
-
|
|
38
|
-
} // namespace svg
|
|
39
|
-
} // namespace rnoh
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#include "RNSVGFeCompositeComponentInstance.h"
|
|
8
|
+
#include "utils/DynamicUtils.h"
|
|
9
|
+
#include <glog/logging.h>
|
|
10
|
+
|
|
11
|
+
namespace rnoh {
|
|
12
|
+
namespace svg {
|
|
13
|
+
|
|
14
|
+
RNSVGFeCompositeComponentInstance::RNSVGFeCompositeComponentInstance(Context context)
|
|
15
|
+
: RNSVGBaseComponentInstance(std::move(context)) {}
|
|
16
|
+
|
|
17
|
+
void RNSVGFeCompositeComponentInstance::onPropsChanged(SharedConcreteProps const &props) {
|
|
18
|
+
if (props) {
|
|
19
|
+
x_ = DynamicUtils::DynamicToString(props->x);
|
|
20
|
+
y_ = DynamicUtils::DynamicToString(props->y);
|
|
21
|
+
width_ = DynamicUtils::DynamicToString(props->width);
|
|
22
|
+
height_ = DynamicUtils::DynamicToString(props->height);
|
|
23
|
+
in_ = props->in1;
|
|
24
|
+
in2_ = props->in2;
|
|
25
|
+
operator_ = facebook::react::toString(props->operator1);
|
|
26
|
+
result_ = props->result;
|
|
27
|
+
k1_ = std::to_string(props->k1);
|
|
28
|
+
k2_ = std::to_string(props->k2);
|
|
29
|
+
k3_ = std::to_string(props->k3);
|
|
30
|
+
k4_ = std::to_string(props->k4);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
void RNSVGFeCompositeComponentInstance::UpdateElementProps() {}
|
|
35
|
+
|
|
36
|
+
void RNSVGFeCompositeComponentInstance::extractAttributes() {}
|
|
37
|
+
|
|
38
|
+
} // namespace svg
|
|
39
|
+
} // namespace rnoh
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#pragma once
|
|
8
|
-
|
|
9
|
-
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
-
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
namespace rnoh {
|
|
14
|
-
namespace svg {
|
|
15
|
-
|
|
16
|
-
class RNSVGFeCompositeComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeCompositeShadowNode> {
|
|
17
|
-
public:
|
|
18
|
-
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeCompositeProps>;
|
|
19
|
-
|
|
20
|
-
RNSVGFeCompositeComponentInstance(Context context);
|
|
21
|
-
|
|
22
|
-
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
23
|
-
void UpdateElementProps() override;
|
|
24
|
-
|
|
25
|
-
std::string getIn() const { return in_; }
|
|
26
|
-
std::string getIn2() const { return in2_; }
|
|
27
|
-
std::string getOperator() const { return operator_; }
|
|
28
|
-
std::string getResult() const { return result_; }
|
|
29
|
-
std::string getK1() const { return k1_; }
|
|
30
|
-
std::string getK2() const { return k2_; }
|
|
31
|
-
std::string getK3() const { return k3_; }
|
|
32
|
-
std::string getK4() const { return k4_; }
|
|
33
|
-
std::string getX() const { return x_; }
|
|
34
|
-
std::string getY() const { return y_; }
|
|
35
|
-
std::string getWidth() const { return width_; }
|
|
36
|
-
std::string getHeight() const { return height_; }
|
|
37
|
-
|
|
38
|
-
private:
|
|
39
|
-
std::string x_ = "0";
|
|
40
|
-
std::string y_ = "0";
|
|
41
|
-
std::string width_ = "0";
|
|
42
|
-
std::string height_ = "0";
|
|
43
|
-
std::string in_ = "SourceGraphic";
|
|
44
|
-
std::string in2_ = "";
|
|
45
|
-
std::string operator_ = "over";
|
|
46
|
-
std::string result_ = "";
|
|
47
|
-
std::string k1_ = "0";
|
|
48
|
-
std::string k2_ = "0";
|
|
49
|
-
std::string k3_ = "0";
|
|
50
|
-
std::string k4_ = "0";
|
|
51
|
-
void extractAttributes();
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
} // namespace svg
|
|
55
|
-
} // namespace rnoh
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#pragma once
|
|
8
|
+
|
|
9
|
+
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
+
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
namespace rnoh {
|
|
14
|
+
namespace svg {
|
|
15
|
+
|
|
16
|
+
class RNSVGFeCompositeComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeCompositeShadowNode> {
|
|
17
|
+
public:
|
|
18
|
+
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeCompositeProps>;
|
|
19
|
+
|
|
20
|
+
RNSVGFeCompositeComponentInstance(Context context);
|
|
21
|
+
|
|
22
|
+
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
23
|
+
void UpdateElementProps() override;
|
|
24
|
+
|
|
25
|
+
std::string getIn() const { return in_; }
|
|
26
|
+
std::string getIn2() const { return in2_; }
|
|
27
|
+
std::string getOperator() const { return operator_; }
|
|
28
|
+
std::string getResult() const { return result_; }
|
|
29
|
+
std::string getK1() const { return k1_; }
|
|
30
|
+
std::string getK2() const { return k2_; }
|
|
31
|
+
std::string getK3() const { return k3_; }
|
|
32
|
+
std::string getK4() const { return k4_; }
|
|
33
|
+
std::string getX() const { return x_; }
|
|
34
|
+
std::string getY() const { return y_; }
|
|
35
|
+
std::string getWidth() const { return width_; }
|
|
36
|
+
std::string getHeight() const { return height_; }
|
|
37
|
+
|
|
38
|
+
private:
|
|
39
|
+
std::string x_ = "0";
|
|
40
|
+
std::string y_ = "0";
|
|
41
|
+
std::string width_ = "0";
|
|
42
|
+
std::string height_ = "0";
|
|
43
|
+
std::string in_ = "SourceGraphic";
|
|
44
|
+
std::string in2_ = "";
|
|
45
|
+
std::string operator_ = "over";
|
|
46
|
+
std::string result_ = "";
|
|
47
|
+
std::string k1_ = "0";
|
|
48
|
+
std::string k2_ = "0";
|
|
49
|
+
std::string k3_ = "0";
|
|
50
|
+
std::string k4_ = "0";
|
|
51
|
+
void extractAttributes();
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
} // namespace svg
|
|
55
|
+
} // namespace rnoh
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#include "RNSVGFeFloodComponentInstance.h"
|
|
8
|
-
#include "utils/DynamicUtils.h"
|
|
9
|
-
#include <glog/logging.h>
|
|
10
|
-
|
|
11
|
-
namespace rnoh {
|
|
12
|
-
namespace svg {
|
|
13
|
-
|
|
14
|
-
RNSVGFeFloodComponentInstance::RNSVGFeFloodComponentInstance(Context context)
|
|
15
|
-
: RNSVGBaseComponentInstance(std::move(context)) {}
|
|
16
|
-
|
|
17
|
-
void RNSVGFeFloodComponentInstance::onPropsChanged(SharedConcreteProps const &props) {
|
|
18
|
-
if (props) {
|
|
19
|
-
x_ = DynamicUtils::DynamicToString(props->x);
|
|
20
|
-
y_ = DynamicUtils::DynamicToString(props->y);
|
|
21
|
-
width_ = DynamicUtils::DynamicToString(props->width);
|
|
22
|
-
height_ = DynamicUtils::DynamicToString(props->height);
|
|
23
|
-
result_ = props->result;
|
|
24
|
-
floodColor_ = DynamicUtils::DynamicToString(props->floodColor);
|
|
25
|
-
floodOpacity_ = props->floodOpacity;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
void RNSVGFeFloodComponentInstance::UpdateElementProps() {}
|
|
30
|
-
void RNSVGFeFloodComponentInstance::extractAttributes() {}
|
|
31
|
-
|
|
32
|
-
} // namespace svg
|
|
33
|
-
} // namespace rnoh
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#include "RNSVGFeFloodComponentInstance.h"
|
|
8
|
+
#include "utils/DynamicUtils.h"
|
|
9
|
+
#include <glog/logging.h>
|
|
10
|
+
|
|
11
|
+
namespace rnoh {
|
|
12
|
+
namespace svg {
|
|
13
|
+
|
|
14
|
+
RNSVGFeFloodComponentInstance::RNSVGFeFloodComponentInstance(Context context)
|
|
15
|
+
: RNSVGBaseComponentInstance(std::move(context)) {}
|
|
16
|
+
|
|
17
|
+
void RNSVGFeFloodComponentInstance::onPropsChanged(SharedConcreteProps const &props) {
|
|
18
|
+
if (props) {
|
|
19
|
+
x_ = DynamicUtils::DynamicToString(props->x);
|
|
20
|
+
y_ = DynamicUtils::DynamicToString(props->y);
|
|
21
|
+
width_ = DynamicUtils::DynamicToString(props->width);
|
|
22
|
+
height_ = DynamicUtils::DynamicToString(props->height);
|
|
23
|
+
result_ = props->result;
|
|
24
|
+
floodColor_ = DynamicUtils::DynamicToString(props->floodColor);
|
|
25
|
+
floodOpacity_ = props->floodOpacity;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
void RNSVGFeFloodComponentInstance::UpdateElementProps() {}
|
|
30
|
+
void RNSVGFeFloodComponentInstance::extractAttributes() {}
|
|
31
|
+
|
|
32
|
+
} // namespace svg
|
|
33
|
+
} // namespace rnoh
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
-
* Use of this source code is governed by a MIT license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#pragma once
|
|
8
|
-
|
|
9
|
-
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
-
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
-
#include <react/renderer/components/react_native_svg/Props.h>
|
|
12
|
-
|
|
13
|
-
namespace rnoh {
|
|
14
|
-
namespace svg {
|
|
15
|
-
|
|
16
|
-
class RNSVGFeFloodComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeFloodShadowNode> {
|
|
17
|
-
public:
|
|
18
|
-
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeFloodProps>;
|
|
19
|
-
|
|
20
|
-
RNSVGFeFloodComponentInstance(Context context);
|
|
21
|
-
virtual ~RNSVGFeFloodComponentInstance() = default;
|
|
22
|
-
|
|
23
|
-
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
24
|
-
void UpdateElementProps() override;
|
|
25
|
-
|
|
26
|
-
std::string getX() const { return x_; }
|
|
27
|
-
std::string getY() const { return y_; }
|
|
28
|
-
std::string getWidth() const { return width_; }
|
|
29
|
-
std::string getHeight() const { return height_; }
|
|
30
|
-
std::string getResult() const { return result_; }
|
|
31
|
-
std::string getIn() const { return in_; }
|
|
32
|
-
std::string getFloodColor() const { return floodColor_; }
|
|
33
|
-
float getFloodOpacity() const { return floodOpacity_; }
|
|
34
|
-
|
|
35
|
-
private:
|
|
36
|
-
std::string x_ = "0";
|
|
37
|
-
std::string y_ = "0";
|
|
38
|
-
std::string width_ = "0";
|
|
39
|
-
std::string height_ = "0";
|
|
40
|
-
std::string result_ = "";
|
|
41
|
-
std::string in_ = "SourceGraphic";
|
|
42
|
-
std::string floodColor_{};
|
|
43
|
-
float floodOpacity_ = 1.0f;
|
|
44
|
-
|
|
45
|
-
void extractAttributes();
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
} // namespace svg
|
|
49
|
-
} // namespace rnoh
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved
|
|
3
|
+
* Use of this source code is governed by a MIT license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#pragma once
|
|
8
|
+
|
|
9
|
+
#include "RNSVGBaseComponentInstance.h"
|
|
10
|
+
#include <react/renderer/components/react_native_svg/ShadowNodes.h>
|
|
11
|
+
#include <react/renderer/components/react_native_svg/Props.h>
|
|
12
|
+
|
|
13
|
+
namespace rnoh {
|
|
14
|
+
namespace svg {
|
|
15
|
+
|
|
16
|
+
class RNSVGFeFloodComponentInstance : public RNSVGBaseComponentInstance<facebook::react::RNSVGFeFloodShadowNode> {
|
|
17
|
+
public:
|
|
18
|
+
using SharedConcreteProps = std::shared_ptr<const facebook::react::RNSVGFeFloodProps>;
|
|
19
|
+
|
|
20
|
+
RNSVGFeFloodComponentInstance(Context context);
|
|
21
|
+
virtual ~RNSVGFeFloodComponentInstance() = default;
|
|
22
|
+
|
|
23
|
+
void onPropsChanged(SharedConcreteProps const &props) override;
|
|
24
|
+
void UpdateElementProps() override;
|
|
25
|
+
|
|
26
|
+
std::string getX() const { return x_; }
|
|
27
|
+
std::string getY() const { return y_; }
|
|
28
|
+
std::string getWidth() const { return width_; }
|
|
29
|
+
std::string getHeight() const { return height_; }
|
|
30
|
+
std::string getResult() const { return result_; }
|
|
31
|
+
std::string getIn() const { return in_; }
|
|
32
|
+
std::string getFloodColor() const { return floodColor_; }
|
|
33
|
+
float getFloodOpacity() const { return floodOpacity_; }
|
|
34
|
+
|
|
35
|
+
private:
|
|
36
|
+
std::string x_ = "0";
|
|
37
|
+
std::string y_ = "0";
|
|
38
|
+
std::string width_ = "0";
|
|
39
|
+
std::string height_ = "0";
|
|
40
|
+
std::string result_ = "";
|
|
41
|
+
std::string in_ = "SourceGraphic";
|
|
42
|
+
std::string floodColor_{};
|
|
43
|
+
float floodOpacity_ = 1.0f;
|
|
44
|
+
|
|
45
|
+
void extractAttributes();
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
} // namespace svg
|
|
49
|
+
} // namespace rnoh
|