@shopify/react-native-skia 0.1.163 → 0.1.165
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/api/JsiSkPaint.h +6 -0
- package/cpp/api/JsiSkRuntimeEffect.h +7 -2
- package/cpp/jsi/JsiHostObject.h +25 -25
- package/cpp/rnskia/RNSkDomView.cpp +1 -1
- package/cpp/rnskia/RNSkPlatformContext.h +2 -6
- package/cpp/rnskia/dom/base/DrawingContext.cpp +23 -41
- package/cpp/rnskia/dom/base/DrawingContext.h +6 -19
- package/cpp/rnskia/dom/base/JsiDomDeclarationNode.h +12 -2
- package/cpp/rnskia/dom/base/JsiDomDrawingNode.h +4 -4
- package/cpp/rnskia/dom/base/JsiDomNode.h +68 -10
- package/cpp/rnskia/dom/base/JsiDomRenderNode.h +26 -61
- package/cpp/rnskia/dom/base/NodeProp.h +2 -1
- package/cpp/rnskia/dom/base/NodePropsContainer.h +10 -0
- package/cpp/rnskia/dom/nodes/JsiBlendNode.h +1 -2
- package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +3 -6
- package/cpp/rnskia/dom/nodes/JsiBoxNode.h +2 -4
- package/cpp/rnskia/dom/nodes/JsiBoxShadowNode.h +1 -2
- package/cpp/rnskia/dom/nodes/JsiCircleNode.h +2 -5
- package/cpp/rnskia/dom/nodes/JsiColorFilterNodes.h +4 -8
- package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +2 -5
- package/cpp/rnskia/dom/nodes/JsiDiffRectNode.h +2 -7
- package/cpp/rnskia/dom/nodes/JsiGlyphsNode.h +4 -8
- package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +20 -38
- package/cpp/rnskia/dom/nodes/JsiImageNode.h +1 -1
- package/cpp/rnskia/dom/nodes/JsiImageSvgNode.h +2 -4
- package/cpp/rnskia/dom/nodes/JsiLineNode.h +2 -7
- package/cpp/rnskia/dom/nodes/JsiOvalNode.h +1 -3
- package/cpp/rnskia/dom/nodes/JsiPaintNode.h +2 -3
- package/cpp/rnskia/dom/nodes/JsiPatchNode.h +4 -8
- package/cpp/rnskia/dom/nodes/JsiPathEffectNodes.h +14 -28
- package/cpp/rnskia/dom/nodes/JsiPathNode.h +6 -16
- package/cpp/rnskia/dom/nodes/JsiPictureNode.h +1 -2
- package/cpp/rnskia/dom/nodes/JsiPointsNode.h +2 -5
- package/cpp/rnskia/dom/nodes/JsiRRectNode.h +1 -2
- package/cpp/rnskia/dom/nodes/JsiRectNode.h +1 -2
- package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +37 -69
- package/cpp/rnskia/dom/nodes/JsiTextBlobNode.h +3 -6
- package/cpp/rnskia/dom/nodes/JsiTextNode.h +4 -8
- package/cpp/rnskia/dom/nodes/JsiTextPathNode.h +1 -2
- package/cpp/rnskia/dom/nodes/JsiVerticesNode.h +2 -4
- package/cpp/rnskia/dom/props/CircleProp.h +2 -0
- package/cpp/rnskia/dom/props/ColorProp.h +9 -4
- package/cpp/rnskia/dom/props/ImageProps.h +3 -2
- package/cpp/rnskia/dom/props/PaintProps.h +15 -7
- package/cpp/rnskia/dom/props/RectProp.h +11 -4
- package/cpp/rnskia/dom/props/TransformProp.h +0 -2
- package/cpp/rnskia/dom/props/UniformsProp.h +86 -123
- package/cpp/rnskia/values/RNSkReadonlyValue.h +2 -6
- package/cpp/utils/RNSkLog.h +1 -1
- package/lib/commonjs/dom/nodes/RenderNode.js +12 -16
- package/lib/commonjs/dom/nodes/RenderNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Circle.js +6 -1
- package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js +3 -3
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/index.js +0 -13
- package/lib/commonjs/dom/nodes/datatypes/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Box.js +6 -6
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/ImageNode.js +2 -2
- package/lib/commonjs/dom/nodes/drawings/ImageNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/PatchNode.js +3 -7
- package/lib/commonjs/dom/nodes/drawings/PatchNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.js +1 -1
- package/lib/commonjs/dom/nodes/drawings/VerticesNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js +1 -3
- package/lib/commonjs/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js +1 -1
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/commonjs/dom/nodes/paint/Shaders.js +1 -3
- package/lib/commonjs/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/commonjs/dom/types/Common.js.map +1 -1
- package/lib/commonjs/dom/types/DrawingContext.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -1
- package/lib/commonjs/renderer/components/Mask.js +2 -6
- package/lib/commonjs/renderer/components/Mask.js.map +1 -1
- package/lib/commonjs/renderer/components/image/Image.js +0 -5
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageShader.js +20 -10
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +10 -5
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +10 -5
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +12 -6
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +12 -6
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +10 -5
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +14 -7
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Shader.js +10 -5
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +14 -7
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Circle.js +0 -6
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/FitBox.js +1 -4
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Oval.js +0 -4
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Path.js +12 -6
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Points.js +10 -5
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +0 -3
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Vertices.js +10 -5
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Glyphs.js +12 -6
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Text.js +12 -6
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextBlob.js +12 -6
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextPath.js +10 -5
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -1
- package/lib/commonjs/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.js +3 -2
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPaint.js +4 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +6 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
- package/lib/commonjs/web/LoadSkiaWeb.js +1 -1
- package/lib/commonjs/web/LoadSkiaWeb.js.map +1 -1
- package/lib/module/dom/nodes/RenderNode.js +12 -16
- package/lib/module/dom/nodes/RenderNode.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.js +8 -1
- package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +7 -3
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/index.js +0 -1
- package/lib/module/dom/nodes/datatypes/index.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Box.js +6 -5
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/module/dom/nodes/drawings/ImageNode.js +4 -2
- package/lib/module/dom/nodes/drawings/ImageNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/PatchNode.js +4 -8
- package/lib/module/dom/nodes/drawings/PatchNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/VerticesNode.js +2 -2
- package/lib/module/dom/nodes/drawings/VerticesNode.js.map +1 -1
- package/lib/module/dom/nodes/paint/ColorFilters.js +1 -2
- package/lib/module/dom/nodes/paint/ColorFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/ImageFilters.js +2 -2
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/module/dom/nodes/paint/Shaders.js +1 -2
- package/lib/module/dom/nodes/paint/Shaders.js.map +1 -1
- package/lib/module/dom/types/Common.js.map +1 -1
- package/lib/module/dom/types/DrawingContext.js.map +1 -1
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/renderer/DrawingContext.js.map +1 -1
- package/lib/module/renderer/components/Mask.js +2 -6
- package/lib/module/renderer/components/Mask.js.map +1 -1
- package/lib/module/renderer/components/image/Image.js +0 -5
- package/lib/module/renderer/components/image/Image.js.map +1 -1
- package/lib/module/renderer/components/image/ImageShader.js +20 -10
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Blur.js +10 -5
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Morphology.js +10 -5
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Offset.js +12 -6
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +12 -6
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js +10 -5
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/shaders/FractalNoise.js +14 -7
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/module/renderer/components/shaders/Shader.js +10 -5
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/module/renderer/components/shaders/Turbulence.js +14 -7
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/module/renderer/components/shapes/Circle.js +0 -6
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/module/renderer/components/shapes/FitBox.js +1 -4
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/module/renderer/components/shapes/Oval.js +0 -4
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/module/renderer/components/shapes/Path.js +12 -6
- package/lib/module/renderer/components/shapes/Path.js.map +1 -1
- package/lib/module/renderer/components/shapes/Points.js +10 -5
- package/lib/module/renderer/components/shapes/Points.js.map +1 -1
- package/lib/module/renderer/components/shapes/RoundedRect.js +0 -3
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Vertices.js +10 -5
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/module/renderer/components/text/Glyphs.js +12 -6
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/module/renderer/components/text/Text.js +12 -6
- package/lib/module/renderer/components/text/Text.js.map +1 -1
- package/lib/module/renderer/components/text/TextBlob.js +12 -6
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/module/renderer/components/text/TextPath.js +10 -5
- package/lib/module/renderer/components/text/TextPath.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/skia/types/Paint/Paint.js.map +1 -1
- package/lib/module/skia/types/RuntimeEffect/RuntimeEffect.js.map +1 -1
- package/lib/module/skia/types/Shader/Shader.js +3 -2
- package/lib/module/skia/types/Shader/Shader.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.js +4 -0
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -1
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -1
- package/lib/module/web/LoadSkiaWeb.js +1 -1
- package/lib/module/web/LoadSkiaWeb.js.map +1 -1
- package/lib/typescript/src/dom/nodes/datatypes/Circle.d.ts +4 -1
- package/lib/typescript/src/dom/nodes/datatypes/index.d.ts +0 -1
- package/lib/typescript/src/dom/nodes/drawings/Box.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/drawings/PatchNode.d.ts +1 -1
- package/lib/typescript/src/dom/types/Common.d.ts +4 -4
- package/lib/typescript/src/dom/types/DrawingContext.d.ts +0 -1
- package/lib/typescript/src/dom/types/Drawings.d.ts +1 -1
- package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -5
- package/lib/typescript/src/renderer/components/Mask.d.ts +3 -9
- package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -8
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -12
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +2 -7
- package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +2 -7
- package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +2 -8
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +2 -8
- package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +2 -7
- package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +2 -9
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -7
- package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +2 -9
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +1 -9
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +2 -7
- package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +1 -7
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +2 -8
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -7
- package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +1 -6
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -7
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +2 -8
- package/lib/typescript/src/renderer/components/text/Text.d.ts +2 -8
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +2 -8
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +2 -7
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +5 -0
- package/lib/typescript/src/skia/types/Paint/Paint.d.ts +4 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +4 -0
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +3 -1
- package/package.json +1 -1
- package/src/dom/nodes/RenderNode.ts +11 -21
- package/src/dom/nodes/datatypes/Circle.ts +1 -1
- package/src/dom/nodes/datatypes/Rect.ts +3 -3
- package/src/dom/nodes/datatypes/index.ts +0 -1
- package/src/dom/nodes/drawings/Box.ts +7 -4
- package/src/dom/nodes/drawings/ImageNode.ts +2 -1
- package/src/dom/nodes/drawings/PatchNode.ts +4 -18
- package/src/dom/nodes/drawings/VerticesNode.ts +2 -2
- package/src/dom/nodes/paint/ColorFilters.ts +1 -2
- package/src/dom/nodes/paint/ImageFilters.ts +2 -2
- package/src/dom/nodes/paint/Shaders.ts +1 -2
- package/src/dom/types/Common.ts +4 -4
- package/src/dom/types/DrawingContext.ts +0 -1
- package/src/dom/types/Drawings.ts +1 -1
- package/src/renderer/DrawingContext.ts +5 -5
- package/src/renderer/components/Mask.tsx +8 -8
- package/src/renderer/components/image/Image.tsx +0 -6
- package/src/renderer/components/image/ImageShader.tsx +24 -12
- package/src/renderer/components/imageFilters/Blur.tsx +6 -7
- package/src/renderer/components/imageFilters/Morphology.tsx +6 -7
- package/src/renderer/components/imageFilters/Offset.tsx +7 -8
- package/src/renderer/components/maskFilters/Blur.tsx +7 -8
- package/src/renderer/components/pathEffects/Discrete.tsx +6 -9
- package/src/renderer/components/shaders/FractalNoise.tsx +18 -9
- package/src/renderer/components/shaders/Shader.tsx +6 -7
- package/src/renderer/components/shaders/Turbulence.tsx +15 -9
- package/src/renderer/components/shapes/Circle.tsx +0 -4
- package/src/renderer/components/shapes/FitBox.tsx +2 -6
- package/src/renderer/components/shapes/Oval.tsx +0 -5
- package/src/renderer/components/shapes/Path.tsx +7 -8
- package/src/renderer/components/shapes/Points.tsx +6 -7
- package/src/renderer/components/shapes/RoundedRect.tsx +0 -4
- package/src/renderer/components/shapes/Vertices.tsx +6 -7
- package/src/renderer/components/text/Glyphs.tsx +7 -8
- package/src/renderer/components/text/Text.tsx +7 -8
- package/src/renderer/components/text/TextBlob.tsx +7 -8
- package/src/renderer/components/text/TextPath.tsx +6 -7
- package/src/renderer/processors/Animations/Animations.ts +9 -3
- package/src/skia/types/Paint/Paint.ts +5 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +5 -0
- package/src/skia/types/Shader/Shader.ts +5 -3
- package/src/skia/web/JsiSkPaint.ts +4 -0
- package/src/skia/web/JsiSkRuntimeEffect.ts +5 -1
- package/src/skia/web/JsiSkRuntimeEffectFactory.ts +1 -1
- package/src/web/LoadSkiaWeb.tsx +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Color.js +0 -27
- package/lib/commonjs/dom/nodes/datatypes/Color.js.map +0 -1
- package/lib/module/dom/nodes/datatypes/Color.js +0 -11
- package/lib/module/dom/nodes/datatypes/Color.js.map +0 -1
- package/lib/typescript/src/dom/nodes/datatypes/Color.d.ts +0 -7
- package/src/dom/nodes/datatypes/Color.ts +0 -15
@@ -85,10 +85,8 @@ protected:
|
|
85
85
|
void defineProperties(NodePropsContainer *container) override {
|
86
86
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
87
87
|
|
88
|
-
_intervals = container->defineProperty(
|
89
|
-
|
90
|
-
_phase = container->defineProperty(
|
91
|
-
std::make_shared<NodeProp>(JsiPropId::get("phase")));
|
88
|
+
_intervals = container->defineProperty<NodeProp>("intervals");
|
89
|
+
_phase = container->defineProperty<NodeProp>("phase");
|
92
90
|
|
93
91
|
_intervals->require();
|
94
92
|
}
|
@@ -123,12 +121,9 @@ protected:
|
|
123
121
|
void defineProperties(NodePropsContainer *container) override {
|
124
122
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
125
123
|
|
126
|
-
_lengthProp = container->defineProperty(
|
127
|
-
|
128
|
-
|
129
|
-
std::make_shared<NodeProp>(JsiPropId::get("deviation")));
|
130
|
-
_seedProp = container->defineProperty(
|
131
|
-
std::make_shared<NodeProp>(JsiPropId::get("seed")));
|
124
|
+
_lengthProp = container->defineProperty<NodeProp>("length");
|
125
|
+
_deviationProp = container->defineProperty<NodeProp>("deviation");
|
126
|
+
_seedProp = container->defineProperty<NodeProp>("seed");
|
132
127
|
|
133
128
|
_lengthProp->require();
|
134
129
|
_deviationProp->require();
|
@@ -161,8 +156,7 @@ protected:
|
|
161
156
|
void defineProperties(NodePropsContainer *container) override {
|
162
157
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
163
158
|
|
164
|
-
_rProp = container->defineProperty(
|
165
|
-
std::make_shared<NodeProp>(JsiPropId::get("r")));
|
159
|
+
_rProp = container->defineProperty<NodeProp>("r");
|
166
160
|
_rProp->require();
|
167
161
|
}
|
168
162
|
|
@@ -193,14 +187,10 @@ protected:
|
|
193
187
|
void defineProperties(NodePropsContainer *container) override {
|
194
188
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
195
189
|
|
196
|
-
_phaseProp = container->defineProperty(
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
_pathProp = container->defineProperty(
|
201
|
-
std::make_shared<PathProp>(JsiPropId::get("path")));
|
202
|
-
_styleProp = container->defineProperty(
|
203
|
-
std::make_shared<NodeProp>(JsiPropId::get("style")));
|
190
|
+
_phaseProp = container->defineProperty<NodeProp>("phase");
|
191
|
+
_advanceProp = container->defineProperty<NodeProp>("advance");
|
192
|
+
_pathProp = container->defineProperty<PathProp>("path");
|
193
|
+
_styleProp = container->defineProperty<NodeProp>("style");
|
204
194
|
|
205
195
|
_phaseProp->require();
|
206
196
|
_advanceProp->require();
|
@@ -248,10 +238,8 @@ protected:
|
|
248
238
|
void defineProperties(NodePropsContainer *container) override {
|
249
239
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
250
240
|
|
251
|
-
_matrixProp = container->defineProperty(
|
252
|
-
|
253
|
-
_pathProp = container->defineProperty(
|
254
|
-
std::make_shared<PathProp>(JsiPropId::get("path")));
|
241
|
+
_matrixProp = container->defineProperty<MatrixProp>("matrix");
|
242
|
+
_pathProp = container->defineProperty<PathProp>("path");
|
255
243
|
|
256
244
|
_matrixProp->require();
|
257
245
|
_pathProp->require();
|
@@ -283,10 +271,8 @@ protected:
|
|
283
271
|
void defineProperties(NodePropsContainer *container) override {
|
284
272
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
285
273
|
|
286
|
-
_matrixProp = container->defineProperty(
|
287
|
-
|
288
|
-
_widthProp = container->defineProperty(
|
289
|
-
std::make_shared<NodeProp>(JsiPropId::get("width")));
|
274
|
+
_matrixProp = container->defineProperty<MatrixProp>("matrix");
|
275
|
+
_widthProp = container->defineProperty<NodeProp>("width");
|
290
276
|
|
291
277
|
_matrixProp->require();
|
292
278
|
_widthProp->require();
|
@@ -15,12 +15,7 @@
|
|
15
15
|
|
16
16
|
namespace RNSkia {
|
17
17
|
|
18
|
-
static PropId PropNamePath = JsiPropId::get("path");
|
19
|
-
static PropId PropNameStart = JsiPropId::get("start");
|
20
|
-
static PropId PropNameEnd = JsiPropId::get("end");
|
21
|
-
static PropId PropNameFillType = JsiPropId::get("fillType");
|
22
18
|
static PropId PropNameMiterLimit = JsiPropId::get("miter_limit");
|
23
|
-
static PropId PropNameStroke = JsiPropId::get("stroke");
|
24
19
|
static PropId PropNamePrecision = JsiPropId::get("precision");
|
25
20
|
|
26
21
|
class JsiPathNode : public JsiDomDrawingNode,
|
@@ -132,16 +127,11 @@ protected:
|
|
132
127
|
|
133
128
|
void defineProperties(NodePropsContainer *container) override {
|
134
129
|
JsiDomDrawingNode::defineProperties(container);
|
135
|
-
_pathProp =
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
container->defineProperty(std::make_shared<NodeProp>(PropNameEnd));
|
141
|
-
_fillTypeProp =
|
142
|
-
container->defineProperty(std::make_shared<NodeProp>(PropNameFillType));
|
143
|
-
_strokeOptsProp =
|
144
|
-
container->defineProperty(std::make_shared<NodeProp>(PropNameStroke));
|
130
|
+
_pathProp = container->defineProperty<PathProp>("path");
|
131
|
+
_startProp = container->defineProperty<NodeProp>("start");
|
132
|
+
_endProp = container->defineProperty<NodeProp>("end");
|
133
|
+
_fillTypeProp = container->defineProperty<NodeProp>("fillType");
|
134
|
+
_strokeOptsProp = container->defineProperty<NodeProp>("stroke");
|
145
135
|
|
146
136
|
_pathProp->require();
|
147
137
|
}
|
@@ -173,7 +163,7 @@ private:
|
|
173
163
|
class StrokeOptsProps : public BaseDerivedProp {
|
174
164
|
public:
|
175
165
|
StrokeOptsProps() : BaseDerivedProp() {
|
176
|
-
_strokeProp = addProperty(std::make_shared<NodeProp>(
|
166
|
+
_strokeProp = addProperty(std::make_shared<NodeProp>("stroke"));
|
177
167
|
}
|
178
168
|
|
179
169
|
private:
|
@@ -20,8 +20,7 @@ protected:
|
|
20
20
|
|
21
21
|
void defineProperties(NodePropsContainer *container) override {
|
22
22
|
JsiDomDrawingNode::defineProperties(container);
|
23
|
-
_pictureProp = container->defineProperty(
|
24
|
-
std::make_shared<PictureProp>(JsiPropId::get("picture")));
|
23
|
+
_pictureProp = container->defineProperty<PictureProp>("picture");
|
25
24
|
_pictureProp->require();
|
26
25
|
}
|
27
26
|
|
@@ -14,7 +14,6 @@
|
|
14
14
|
|
15
15
|
namespace RNSkia {
|
16
16
|
|
17
|
-
static PropId PropNamePoints = JsiPropId::get("points");
|
18
17
|
static PropId PropNamePointsMode = JsiPropId::get("mode");
|
19
18
|
|
20
19
|
class JsiPointsNode : public JsiDomDrawingNode,
|
@@ -34,10 +33,8 @@ protected:
|
|
34
33
|
|
35
34
|
void defineProperties(NodePropsContainer *container) override {
|
36
35
|
JsiDomDrawingNode::defineProperties(container);
|
37
|
-
_pointModeProp = container->defineProperty(
|
38
|
-
|
39
|
-
_pointsProp =
|
40
|
-
container->defineProperty(std::make_shared<PointsProp>(PropNamePoints));
|
36
|
+
_pointModeProp = container->defineProperty<PointModeProp>("mode");
|
37
|
+
_pointsProp = container->defineProperty<PointsProp>("points");
|
41
38
|
|
42
39
|
_pointsProp->require();
|
43
40
|
_pointModeProp->require();
|
@@ -22,8 +22,7 @@ protected:
|
|
22
22
|
void defineProperties(NodePropsContainer *container) override {
|
23
23
|
JsiDomDrawingNode::defineProperties(container);
|
24
24
|
|
25
|
-
_rrectProp =
|
26
|
-
container->defineProperty(std::make_shared<RRectProps>(PropNameRect));
|
25
|
+
_rrectProp = container->defineProperty<RRectProps>("rect");
|
27
26
|
_rrectProp->require();
|
28
27
|
}
|
29
28
|
|
@@ -22,8 +22,7 @@ protected:
|
|
22
22
|
void defineProperties(NodePropsContainer *container) override {
|
23
23
|
JsiDomDrawingNode::defineProperties(container);
|
24
24
|
|
25
|
-
_rectProp =
|
26
|
-
container->defineProperty(std::make_shared<RectProps>(PropNameRect));
|
25
|
+
_rectProp = container->defineProperty<RectProps>("rect");
|
27
26
|
_rectProp->require();
|
28
27
|
}
|
29
28
|
|
@@ -89,12 +89,10 @@ protected:
|
|
89
89
|
|
90
90
|
void defineProperties(NodePropsContainer *container) override {
|
91
91
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
92
|
-
_sourceProp = container->defineProperty(
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
_transformProp = container->defineProperty(
|
97
|
-
std::make_shared<TransformProp>(JsiPropId::get("transform")));
|
92
|
+
_sourceProp = container->defineProperty<NodeProp>("source");
|
93
|
+
_uniformsProp =
|
94
|
+
container->defineProperty<UniformsProp>("uniforms", _sourceProp);
|
95
|
+
_transformProp = container->defineProperty<TransformProp>("transform");
|
98
96
|
|
99
97
|
_sourceProp->require();
|
100
98
|
}
|
@@ -141,18 +139,13 @@ protected:
|
|
141
139
|
|
142
140
|
void defineProperties(NodePropsContainer *container) override {
|
143
141
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
144
|
-
_txProp = container->defineProperty(
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
std::make_shared<NodeProp>(JsiPropId::get("mm")));
|
152
|
-
|
153
|
-
_imageProps = container->defineProperty(std::make_shared<ImageProps>());
|
154
|
-
_transformProp = container->defineProperty(
|
155
|
-
std::make_shared<TransformProp>(JsiPropId::get("transform")));
|
142
|
+
_txProp = container->defineProperty<TileModeProp>("tx");
|
143
|
+
_tyProp = container->defineProperty<TileModeProp>("ty");
|
144
|
+
_filterModeProp = container->defineProperty<NodeProp>("fm");
|
145
|
+
_mipmapModeProp = container->defineProperty<NodeProp>("mm");
|
146
|
+
|
147
|
+
_imageProps = container->defineProperty<ImageProps>();
|
148
|
+
_transformProp = container->defineProperty<TransformProp>("transform");
|
156
149
|
|
157
150
|
_txProp->require();
|
158
151
|
_tyProp->require();
|
@@ -161,10 +154,8 @@ protected:
|
|
161
154
|
|
162
155
|
_transformProp->require();
|
163
156
|
|
164
|
-
//
|
165
|
-
container
|
166
|
-
->defineProperty(std::make_shared<NodeProp>(JsiPropId::get("image")))
|
167
|
-
->require();
|
157
|
+
// Add and require the image
|
158
|
+
container->defineProperty<NodeProp>("image")->require();
|
168
159
|
}
|
169
160
|
|
170
161
|
private:
|
@@ -221,8 +212,7 @@ protected:
|
|
221
212
|
|
222
213
|
void defineProperties(NodePropsContainer *container) override {
|
223
214
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
224
|
-
_colorProp = container->defineProperty(
|
225
|
-
std::make_shared<ColorProp>(JsiPropId::get("color")));
|
215
|
+
_colorProp = container->defineProperty<ColorProp>("color");
|
226
216
|
_colorProp->require();
|
227
217
|
}
|
228
218
|
|
@@ -239,18 +229,12 @@ public:
|
|
239
229
|
protected:
|
240
230
|
void defineProperties(NodePropsContainer *container) override {
|
241
231
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
242
|
-
_freqXProp = container->defineProperty(
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
_seedProp = container->defineProperty(
|
249
|
-
std::make_shared<NodeProp>(JsiPropId::get("seed")));
|
250
|
-
_tileWidthProp = container->defineProperty(
|
251
|
-
std::make_shared<NodeProp>(JsiPropId::get("tileWidth")));
|
252
|
-
_tileHeightProp = container->defineProperty(
|
253
|
-
std::make_shared<NodeProp>(JsiPropId::get("tileHeight")));
|
232
|
+
_freqXProp = container->defineProperty<NodeProp>("freqX");
|
233
|
+
_freqYProp = container->defineProperty<NodeProp>("freqY");
|
234
|
+
_octavesProp = container->defineProperty<NodeProp>("octaves");
|
235
|
+
_seedProp = container->defineProperty<NodeProp>("seed");
|
236
|
+
_tileWidthProp = container->defineProperty<NodeProp>("tileWidth");
|
237
|
+
_tileHeightProp = container->defineProperty<NodeProp>("tileHeight");
|
254
238
|
|
255
239
|
_freqXProp->require();
|
256
240
|
_freqYProp->require();
|
@@ -317,17 +301,12 @@ public:
|
|
317
301
|
|
318
302
|
void defineProperties(NodePropsContainer *container) override {
|
319
303
|
JsiBaseDomDeclarationNode::defineProperties(container);
|
320
|
-
_transformsProps =
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
std::make_shared<NumbersProp>(JsiPropId::get("positions")));
|
327
|
-
_modeProp = container->defineProperty(
|
328
|
-
std::make_shared<TileModeProp>(JsiPropId::get("mode")));
|
329
|
-
_flagsProp = container->defineProperty(
|
330
|
-
std::make_shared<NodeProp>(JsiPropId::get("flags")));
|
304
|
+
_transformsProps = container->defineProperty<TransformsProps>();
|
305
|
+
|
306
|
+
_colorsProp = container->defineProperty<ColorsProp>("colors");
|
307
|
+
_positionsProp = container->defineProperty<NumbersProp>("positions");
|
308
|
+
_modeProp = container->defineProperty<TileModeProp>("mode");
|
309
|
+
_flagsProp = container->defineProperty<NodeProp>("flags");
|
331
310
|
|
332
311
|
_colorsProp->require();
|
333
312
|
}
|
@@ -385,10 +364,8 @@ protected:
|
|
385
364
|
|
386
365
|
void defineProperties(NodePropsContainer *container) override {
|
387
366
|
JsiBaseGradientNode::defineProperties(container);
|
388
|
-
_startProp = container->defineProperty(
|
389
|
-
|
390
|
-
_endProp = container->defineProperty(
|
391
|
-
std::make_shared<PointProp>(JsiPropId::get("end")));
|
367
|
+
_startProp = container->defineProperty<PointProp>("start");
|
368
|
+
_endProp = container->defineProperty<PointProp>("end");
|
392
369
|
|
393
370
|
_startProp->require();
|
394
371
|
_endProp->require();
|
@@ -420,10 +397,8 @@ protected:
|
|
420
397
|
|
421
398
|
void defineProperties(NodePropsContainer *container) override {
|
422
399
|
JsiBaseGradientNode::defineProperties(container);
|
423
|
-
_centerProp = container->defineProperty(
|
424
|
-
|
425
|
-
_radiusProp = container->defineProperty(
|
426
|
-
std::make_shared<NodeProp>(JsiPropId::get("r")));
|
400
|
+
_centerProp = container->defineProperty<PointProp>("c");
|
401
|
+
_radiusProp = container->defineProperty<NodeProp>("r");
|
427
402
|
|
428
403
|
_centerProp->require();
|
429
404
|
_radiusProp->require();
|
@@ -457,12 +432,9 @@ protected:
|
|
457
432
|
|
458
433
|
void defineProperties(NodePropsContainer *container) override {
|
459
434
|
JsiBaseGradientNode::defineProperties(container);
|
460
|
-
_startProp = container->defineProperty(
|
461
|
-
|
462
|
-
|
463
|
-
std::make_shared<NodeProp>(JsiPropId::get("end")));
|
464
|
-
_centerProp = container->defineProperty(
|
465
|
-
std::make_shared<PointProp>(JsiPropId::get("c")));
|
435
|
+
_startProp = container->defineProperty<NodeProp>("start");
|
436
|
+
_endProp = container->defineProperty<NodeProp>("end");
|
437
|
+
_centerProp = container->defineProperty<PointProp>("c");
|
466
438
|
}
|
467
439
|
|
468
440
|
private:
|
@@ -497,14 +469,10 @@ protected:
|
|
497
469
|
|
498
470
|
void defineProperties(NodePropsContainer *container) override {
|
499
471
|
JsiBaseGradientNode::defineProperties(container);
|
500
|
-
_startProp = container->defineProperty(
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
_endProp = container->defineProperty(
|
505
|
-
std::make_shared<PointProp>(JsiPropId::get("end")));
|
506
|
-
_endRProp = container->defineProperty(
|
507
|
-
std::make_shared<NodeProp>(JsiPropId::get("endR")));
|
472
|
+
_startProp = container->defineProperty<PointProp>("start");
|
473
|
+
_startRProp = container->defineProperty<NodeProp>("startR");
|
474
|
+
_endProp = container->defineProperty<PointProp>("end");
|
475
|
+
_endRProp = container->defineProperty<NodeProp>("endR");
|
508
476
|
}
|
509
477
|
|
510
478
|
private:
|
@@ -26,12 +26,9 @@ protected:
|
|
26
26
|
void defineProperties(NodePropsContainer *container) override {
|
27
27
|
JsiDomDrawingNode::defineProperties(container);
|
28
28
|
|
29
|
-
_textBlobProp = container->defineProperty(
|
30
|
-
|
31
|
-
|
32
|
-
std::make_shared<NodeProp>(JsiPropId::get("x")));
|
33
|
-
_yProp = container->defineProperty(
|
34
|
-
std::make_shared<NodeProp>(JsiPropId::get("y")));
|
29
|
+
_textBlobProp = container->defineProperty<TextBlobProp>("blob");
|
30
|
+
_xProp = container->defineProperty<NodeProp>("x");
|
31
|
+
_yProp = container->defineProperty<NodeProp>("y");
|
35
32
|
|
36
33
|
_textBlobProp->require();
|
37
34
|
_xProp->require();
|
@@ -29,14 +29,10 @@ protected:
|
|
29
29
|
void defineProperties(NodePropsContainer *container) override {
|
30
30
|
JsiDomDrawingNode::defineProperties(container);
|
31
31
|
|
32
|
-
_fontProp = container->defineProperty(
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
_xProp = container->defineProperty(
|
37
|
-
std::make_shared<NodeProp>(JsiPropId::get("x")));
|
38
|
-
_yProp = container->defineProperty(
|
39
|
-
std::make_shared<NodeProp>(JsiPropId::get("y")));
|
32
|
+
_fontProp = container->defineProperty<FontProp>("font");
|
33
|
+
_textProp = container->defineProperty<NodeProp>("text");
|
34
|
+
_xProp = container->defineProperty<NodeProp>("x");
|
35
|
+
_yProp = container->defineProperty<NodeProp>("y");
|
40
36
|
|
41
37
|
_fontProp->require();
|
42
38
|
_textProp->require();
|
@@ -21,8 +21,7 @@ protected:
|
|
21
21
|
|
22
22
|
void defineProperties(NodePropsContainer *container) override {
|
23
23
|
JsiDomDrawingNode::defineProperties(container);
|
24
|
-
_textBlobProp =
|
25
|
-
container->defineProperty(std::make_shared<TextPathBlobProp>());
|
24
|
+
_textBlobProp = container->defineProperty<TextPathBlobProp>();
|
26
25
|
}
|
27
26
|
|
28
27
|
private:
|
@@ -29,10 +29,8 @@ protected:
|
|
29
29
|
|
30
30
|
void defineProperties(NodePropsContainer *container) override {
|
31
31
|
JsiDomDrawingNode::defineProperties(container);
|
32
|
-
_verticesProps =
|
33
|
-
|
34
|
-
_blendModeProp = container->defineProperty(
|
35
|
-
std::make_shared<BlendModeProp>(JsiPropId::get("blendMode")));
|
32
|
+
_verticesProps = container->defineProperty<VerticesProps>();
|
33
|
+
_blendModeProp = container->defineProperty<BlendModeProp>("blendMode");
|
36
34
|
}
|
37
35
|
|
38
36
|
private:
|
@@ -9,6 +9,11 @@
|
|
9
9
|
|
10
10
|
namespace RNSkia {
|
11
11
|
|
12
|
+
static PropId PropName0 = JsiPropId::get("0");
|
13
|
+
static PropId PropName1 = JsiPropId::get("1");
|
14
|
+
static PropId PropName2 = JsiPropId::get("2");
|
15
|
+
static PropId PropName3 = JsiPropId::get("3");
|
16
|
+
|
12
17
|
class ColorProp : public DerivedProp<SkColor> {
|
13
18
|
public:
|
14
19
|
explicit ColorProp(PropId name) : DerivedProp<SkColor>() {
|
@@ -28,10 +33,10 @@ public:
|
|
28
33
|
static SkColor parseColorValue(const JsiValue &color) {
|
29
34
|
if (color.getType() == PropType::Object) {
|
30
35
|
// Float array
|
31
|
-
auto r = color.getValue(
|
32
|
-
auto g = color.getValue(
|
33
|
-
auto b = color.getValue(
|
34
|
-
auto a = color.getValue(
|
36
|
+
auto r = color.getValue(PropName0);
|
37
|
+
auto g = color.getValue(PropName1);
|
38
|
+
auto b = color.getValue(PropName2);
|
39
|
+
auto a = color.getValue(PropName3);
|
35
40
|
return SkColorSetARGB(a.getAsNumber() * 255.0f, r.getAsNumber() * 255.0f,
|
36
41
|
g.getAsNumber() * 255.0f, b.getAsNumber() * 255.0f);
|
37
42
|
|
@@ -30,7 +30,8 @@ public:
|
|
30
30
|
}
|
31
31
|
|
32
32
|
void updateDerivedValue() override {
|
33
|
-
if (_imageProp->
|
33
|
+
if (!_imageProp->isSet() ||
|
34
|
+
_imageProp->value().getType() != PropType::HostObject) {
|
34
35
|
throw std::runtime_error("Expected SkImage object for the " +
|
35
36
|
std::string(getName()) + " property.");
|
36
37
|
}
|
@@ -67,7 +68,7 @@ public:
|
|
67
68
|
|
68
69
|
auto rect = _rectProp->getDerivedValue() ? *_rectProp->getDerivedValue()
|
69
70
|
: imageRect;
|
70
|
-
auto fit = _fitProp->isSet() ? _fitProp->value().getAsString() : "
|
71
|
+
auto fit = _fitProp->isSet() ? _fitProp->value().getAsString() : "contain";
|
71
72
|
|
72
73
|
setDerivedValue(fitRects(fit, imageRect, rect));
|
73
74
|
}
|
@@ -92,23 +92,31 @@ public:
|
|
92
92
|
|
93
93
|
// Opacity
|
94
94
|
if (_opacity->isChanged() || context->isChanged()) {
|
95
|
+
auto parent = context->getParent();
|
96
|
+
auto paint = context->getMutablePaint();
|
95
97
|
if (_opacity->isSet()) {
|
96
|
-
|
97
|
-
|
98
|
+
auto currentOpacity = _opacity->value().getAsNumber();
|
99
|
+
auto parent = context->getParent();
|
100
|
+
if (parent != nullptr) {
|
101
|
+
currentOpacity *= parent->getPaint()->getAlphaf();
|
102
|
+
}
|
103
|
+
paint->setAlphaf(currentOpacity);
|
98
104
|
} else {
|
99
|
-
|
105
|
+
if (parent != nullptr) {
|
106
|
+
paint->setAlphaf(parent->getPaint()->getAlphaf());
|
107
|
+
} else {
|
108
|
+
paint->setAlphaf(1.0);
|
109
|
+
}
|
100
110
|
}
|
101
111
|
}
|
102
112
|
|
103
113
|
// COLOR
|
104
114
|
if (_color->isSet() && (_color->isChanged() || context->isChanged())) {
|
105
115
|
auto paint = context->getMutablePaint();
|
116
|
+
auto opacity = paint->getAlphaf();
|
106
117
|
paint->setShader(nullptr);
|
107
118
|
paint->setColor(*_color->getDerivedValue());
|
108
|
-
paint->setAlphaf(
|
109
|
-
} else if (context->isChanged()) {
|
110
|
-
auto paint = context->getMutablePaint();
|
111
|
-
paint->setAlphaf(context->getOpacity());
|
119
|
+
paint->setAlphaf(opacity * paint->getColor4f().fA);
|
112
120
|
}
|
113
121
|
|
114
122
|
// Style
|
@@ -76,10 +76,17 @@ public:
|
|
76
76
|
}
|
77
77
|
|
78
78
|
void updateDerivedValue() override {
|
79
|
-
if (
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
if (_width->isSet() && _height->isSet()) {
|
80
|
+
auto x = 0.0;
|
81
|
+
auto y = 0.0;
|
82
|
+
if (_x->isSet()) {
|
83
|
+
x = _x->value().getAsNumber();
|
84
|
+
}
|
85
|
+
if (_y->isSet()) {
|
86
|
+
y = _y->value().getAsNumber();
|
87
|
+
}
|
88
|
+
setDerivedValue(SkRect::MakeXYWH(x, y, _width->value().getAsNumber(),
|
89
|
+
_height->value().getAsNumber()));
|
83
90
|
}
|
84
91
|
}
|
85
92
|
|
@@ -8,8 +8,6 @@
|
|
8
8
|
|
9
9
|
namespace RNSkia {
|
10
10
|
|
11
|
-
static PropId PropNameTransform = JsiPropId::get("transform");
|
12
|
-
|
13
11
|
static PropId PropNameTranslateX = JsiPropId::get("translateX");
|
14
12
|
static PropId PropNameTranslateY = JsiPropId::get("translateY");
|
15
13
|
static PropId PropNameScale = JsiPropId::get("scale");
|