@react-native-ohos/react-native-svg 15.12.1-rc.1
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 -0
- package/README.OpenSource +11 -0
- package/README.md +13 -0
- package/css/package.json +6 -0
- package/harmony/svg/BuildProfile.ets +17 -0
- package/harmony/svg/build-profile.json5 +9 -0
- package/harmony/svg/hvigorfile.ts +2 -0
- package/harmony/svg/index.ets +7 -0
- package/harmony/svg/oh-package.json5 +13 -0
- package/harmony/svg/src/main/cpp/Attribute.h +52 -0
- package/harmony/svg/src/main/cpp/CMakeLists.txt +32 -0
- package/harmony/svg/src/main/cpp/FallbackProps.h +0 -0
- package/harmony/svg/src/main/cpp/FontHolderBase.cpp +22 -0
- package/harmony/svg/src/main/cpp/FontHolderBase.h +54 -0
- package/harmony/svg/src/main/cpp/SVGPackage.cpp +135 -0
- package/harmony/svg/src/main/cpp/SVGPackage.h +153 -0
- package/harmony/svg/src/main/cpp/SvgArkUINode.cpp +75 -0
- package/harmony/svg/src/main/cpp/SvgArkUINode.h +45 -0
- package/harmony/svg/src/main/cpp/SvgBaseAttribute.h +83 -0
- package/harmony/svg/src/main/cpp/SvgCircle.cpp +29 -0
- package/harmony/svg/src/main/cpp/SvgCircle.h +29 -0
- package/harmony/svg/src/main/cpp/SvgClipPath.h +22 -0
- package/harmony/svg/src/main/cpp/SvgContext.cpp +56 -0
- package/harmony/svg/src/main/cpp/SvgContext.h +71 -0
- package/harmony/svg/src/main/cpp/SvgDefs.h +46 -0
- package/harmony/svg/src/main/cpp/SvgEllipse.cpp +32 -0
- package/harmony/svg/src/main/cpp/SvgEllipse.h +34 -0
- package/harmony/svg/src/main/cpp/SvgFilter.cpp +505 -0
- package/harmony/svg/src/main/cpp/SvgFilter.h +112 -0
- package/harmony/svg/src/main/cpp/SvgGradient.cpp +116 -0
- package/harmony/svg/src/main/cpp/SvgGradient.h +49 -0
- package/harmony/svg/src/main/cpp/SvgGraphic.cpp +553 -0
- package/harmony/svg/src/main/cpp/SvgGraphic.h +77 -0
- package/harmony/svg/src/main/cpp/SvgGroup.cpp +86 -0
- package/harmony/svg/src/main/cpp/SvgGroup.h +41 -0
- package/harmony/svg/src/main/cpp/SvgHost.cpp +27 -0
- package/harmony/svg/src/main/cpp/SvgHost.h +38 -0
- package/harmony/svg/src/main/cpp/SvgImage.cpp +168 -0
- package/harmony/svg/src/main/cpp/SvgImage.h +52 -0
- package/harmony/svg/src/main/cpp/SvgLine.cpp +28 -0
- package/harmony/svg/src/main/cpp/SvgLine.h +32 -0
- package/harmony/svg/src/main/cpp/SvgMarker.cpp +61 -0
- package/harmony/svg/src/main/cpp/SvgMarker.h +86 -0
- package/harmony/svg/src/main/cpp/SvgMask.cpp +72 -0
- package/harmony/svg/src/main/cpp/SvgMask.h +68 -0
- package/harmony/svg/src/main/cpp/SvgNode.cpp +289 -0
- package/harmony/svg/src/main/cpp/SvgNode.h +347 -0
- package/harmony/svg/src/main/cpp/SvgPath.cpp +42 -0
- package/harmony/svg/src/main/cpp/SvgPath.h +29 -0
- package/harmony/svg/src/main/cpp/SvgPattern.cpp +77 -0
- package/harmony/svg/src/main/cpp/SvgPattern.h +64 -0
- package/harmony/svg/src/main/cpp/SvgQuote.h +87 -0
- package/harmony/svg/src/main/cpp/SvgRect.cpp +58 -0
- package/harmony/svg/src/main/cpp/SvgRect.h +33 -0
- package/harmony/svg/src/main/cpp/SvgSvg.cpp +83 -0
- package/harmony/svg/src/main/cpp/SvgSvg.h +52 -0
- package/harmony/svg/src/main/cpp/SvgSymbol.cpp +25 -0
- package/harmony/svg/src/main/cpp/SvgSymbol.h +37 -0
- package/harmony/svg/src/main/cpp/SvgTSpan.cpp +501 -0
- package/harmony/svg/src/main/cpp/SvgTSpan.h +101 -0
- package/harmony/svg/src/main/cpp/SvgText.cpp +48 -0
- package/harmony/svg/src/main/cpp/SvgText.h +29 -0
- package/harmony/svg/src/main/cpp/SvgTextPath.cpp +35 -0
- package/harmony/svg/src/main/cpp/SvgTextPath.h +51 -0
- package/harmony/svg/src/main/cpp/SvgUse.cpp +65 -0
- package/harmony/svg/src/main/cpp/SvgUse.h +46 -0
- package/harmony/svg/src/main/cpp/SvgViewManager.cpp +36 -0
- package/harmony/svg/src/main/cpp/SvgViewManager.h +37 -0
- package/harmony/svg/src/main/cpp/TextBase.cpp +20 -0
- package/harmony/svg/src/main/cpp/TextBase.h +114 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGBaseComponentInstance.h +212 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGCircleComponentInstance.cpp +31 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGCircleComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGClipPathComponentInstance.cpp +23 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGClipPathComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGDefsComponentInstance.cpp +23 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGDefsComponentInstance.h +28 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGEllipseComponentInstance.cpp +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGEllipseComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.cpp +40 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeBlendComponentInstance.h +48 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.cpp +33 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeColorMatrixComponentInstance.h +48 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.cpp +39 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeCompositeComponentInstance.h +55 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.cpp +33 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeFloodComponentInstance.h +49 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.cpp +34 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeGaussianBlurComponentInstance.h +48 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.cpp +35 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFeOffsetComponentInstance.h +46 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.cpp +199 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGFilterComponentInstance.h +48 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGGroupComponentInstance.cpp +32 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGGroupComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGImageComponentInstance.cpp +100 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGImageComponentInstance.h +43 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGLineComponentInstance.cpp +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGLineComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGLinearGradientComponentInstance.cpp +30 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGLinearGradientComponentInstance.h +28 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGMarkerComponentInstance.cpp +35 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGMarkerComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGMaskComponentInstance.cpp +30 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGMaskComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGPathComponentInstance.cpp +33 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGPathComponentInstance.h +29 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGPatternComponentInstance.cpp +40 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGPatternComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGRadialGradientComponentInstance.cpp +32 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGRadialGradientComponentInstance.h +28 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGRectComponentInstance.cpp +36 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGRectComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.cpp +86 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGSvgViewComponentInstance.h +47 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGSymbolComponentInstance.cpp +30 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGSymbolComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGTSpanComponentInstance.cpp +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGTSpanComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextComponentInstance.cpp +25 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextPathComponentInstance.cpp +32 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGTextPathComponentInstance.h +27 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGUseComponentInstance.cpp +32 -0
- package/harmony/svg/src/main/cpp/componentInstances/RNSVGUseComponentInstance.h +32 -0
- package/harmony/svg/src/main/cpp/downloadUtils/HttpTaskProcessor.cpp +207 -0
- package/harmony/svg/src/main/cpp/downloadUtils/HttpTaskProcessor.h +88 -0
- package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.cpp +106 -0
- package/harmony/svg/src/main/cpp/downloadUtils/ImageSourceResolver.h +97 -0
- package/harmony/svg/src/main/cpp/downloadUtils/LRUCache.h +98 -0
- package/harmony/svg/src/main/cpp/drawing/Brush.cpp +50 -0
- package/harmony/svg/src/main/cpp/drawing/Brush.h +52 -0
- package/harmony/svg/src/main/cpp/drawing/GlyPathBag.cpp +20 -0
- package/harmony/svg/src/main/cpp/drawing/GlyPathBag.h +31 -0
- package/harmony/svg/src/main/cpp/drawing/Matrix.cpp +100 -0
- package/harmony/svg/src/main/cpp/drawing/Matrix.h +68 -0
- package/harmony/svg/src/main/cpp/drawing/Path.cpp +173 -0
- package/harmony/svg/src/main/cpp/drawing/Path.h +127 -0
- package/harmony/svg/src/main/cpp/drawing/Pen.cpp +57 -0
- package/harmony/svg/src/main/cpp/drawing/Pen.h +59 -0
- package/harmony/svg/src/main/cpp/drawing/Rect.cpp +47 -0
- package/harmony/svg/src/main/cpp/drawing/Rect.h +56 -0
- package/harmony/svg/src/main/cpp/drawing/RoundRect.cpp +24 -0
- package/harmony/svg/src/main/cpp/drawing/RoundRect.h +39 -0
- package/harmony/svg/src/main/cpp/drawing/ShaderEffect.cpp +37 -0
- package/harmony/svg/src/main/cpp/drawing/ShaderEffect.h +51 -0
- package/harmony/svg/src/main/cpp/drawing/TextStyle.cpp +49 -0
- package/harmony/svg/src/main/cpp/drawing/TextStyle.h +41 -0
- package/harmony/svg/src/main/cpp/drawing/Typography.cpp +9 -0
- package/harmony/svg/src/main/cpp/drawing/Typography.h +25 -0
- package/harmony/svg/src/main/cpp/drawing/TypographyStyle.cpp +31 -0
- package/harmony/svg/src/main/cpp/drawing/TypographyStyle.h +41 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGCircleJSIBinder.h +54 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGClipPathJSIBinder.h +54 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGDefsJSIBinder.h +38 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGEllipseJSIBinder.h +55 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeBlendJSIBinder.h +26 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeColorMatrixJSIBinder.h +26 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeCompositeJSIBinder.h +30 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeFloodJSIBinder.h +26 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeGaussianBlurJSIBinder.h +27 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFeOffsetJSIBinder.h +26 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGFilterJSIBinder.h +44 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGForeignObjectJSIBinder.h +57 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGGroupJSIBinder.h +54 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGImageJSIBinder.h +58 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGLineJSIBinder.h +55 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGLinearGradientJSIBinder.h +45 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGMarkerJSIBinder.h +66 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGMaskJSIBinder.h +60 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGPathJSIBinder.h +52 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGPatternJSIBinder.h +67 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGRadialGradientJSIBinder.h +47 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGRectJSIBinder.h +57 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGSvgViewAndroidJSIBinder.h +67 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGSvgViewJSIBinder.h +36 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGSymbolJSIBinder.h +60 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGTSpanJSIBinder.h +66 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGTextJSIBinder.h +65 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGTextPathJSIBinder.h +71 -0
- package/harmony/svg/src/main/cpp/generated/RNOH/generated/components/RNSVGUseJSIBinder.h +56 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/ComponentDescriptors.h +48 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/EventEmitters.cpp +20 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/EventEmitters.h +253 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.cpp +977 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/Props.h +1280 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/ShadowNodes.cpp +45 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/ShadowNodes.h +331 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/States.cpp +18 -0
- package/harmony/svg/src/main/cpp/generated/react/renderer/components/react_native_svg/States.h +441 -0
- package/harmony/svg/src/main/cpp/properties/Color.cpp +458 -0
- package/harmony/svg/src/main/cpp/properties/Color.h +144 -0
- package/harmony/svg/src/main/cpp/properties/Decoration.cpp +41 -0
- package/harmony/svg/src/main/cpp/properties/Decoration.h +483 -0
- package/harmony/svg/src/main/cpp/properties/Dimension.cpp +64 -0
- package/harmony/svg/src/main/cpp/properties/Dimension.h +243 -0
- package/harmony/svg/src/main/cpp/properties/Font.cpp +166 -0
- package/harmony/svg/src/main/cpp/properties/Font.h +163 -0
- package/harmony/svg/src/main/cpp/properties/Offset.h +119 -0
- package/harmony/svg/src/main/cpp/properties/PaintState.h +240 -0
- package/harmony/svg/src/main/cpp/properties/Rect.h +423 -0
- package/harmony/svg/src/main/cpp/properties/Size.h +246 -0
- package/harmony/svg/src/main/cpp/properties/SvgPaintState.h +452 -0
- package/harmony/svg/src/main/cpp/properties/TextProperties.cpp +91 -0
- package/harmony/svg/src/main/cpp/properties/TextProperties.h +56 -0
- package/harmony/svg/src/main/cpp/properties/ViewBox.h +108 -0
- package/harmony/svg/src/main/cpp/svgImage/RNSVGImageComponentDescriptor.h +41 -0
- package/harmony/svg/src/main/cpp/svgImage/RNSVGImageShadowNode.cpp +62 -0
- package/harmony/svg/src/main/cpp/svgImage/RNSVGImageShadowNode.h +63 -0
- package/harmony/svg/src/main/cpp/svgImage/RNSVGImageState.cpp +17 -0
- package/harmony/svg/src/main/cpp/svgImage/RNSVGImageState.h +58 -0
- package/harmony/svg/src/main/cpp/turboModules/RNSVGImageModule.cpp +54 -0
- package/harmony/svg/src/main/cpp/turboModules/RNSVGImageModule.h +32 -0
- package/harmony/svg/src/main/cpp/turboModules/RNSVGRenderableModule.cpp +101 -0
- package/harmony/svg/src/main/cpp/turboModules/RNSVGRenderableModule.h +32 -0
- package/harmony/svg/src/main/cpp/turboModules/RNSVGSvgViewModule.cpp +71 -0
- package/harmony/svg/src/main/cpp/turboModules/RNSVGSvgViewModule.h +32 -0
- package/harmony/svg/src/main/cpp/utils/DynamicUtils.h +55 -0
- package/harmony/svg/src/main/cpp/utils/FilterManager.h +190 -0
- package/harmony/svg/src/main/cpp/utils/GlyphContext.cpp +221 -0
- package/harmony/svg/src/main/cpp/utils/GlyphContext.h +106 -0
- package/harmony/svg/src/main/cpp/utils/LinearMap.h +69 -0
- package/harmony/svg/src/main/cpp/utils/PathParserUtils.cpp +591 -0
- package/harmony/svg/src/main/cpp/utils/PathParserUtils.h +93 -0
- package/harmony/svg/src/main/cpp/utils/StringUtils.cpp +134 -0
- package/harmony/svg/src/main/cpp/utils/StringUtils.h +644 -0
- package/harmony/svg/src/main/cpp/utils/SvgAttributesParser.cpp +239 -0
- package/harmony/svg/src/main/cpp/utils/SvgAttributesParser.h +277 -0
- package/harmony/svg/src/main/cpp/utils/SvgMarkerPositionUtils.h +200 -0
- package/harmony/svg/src/main/cpp/utils/SvgUtils.h +176 -0
- package/harmony/svg/src/main/cpp/utils/TextPathHelper.cpp +94 -0
- package/harmony/svg/src/main/cpp/utils/TextPathHelper.h +61 -0
- package/harmony/svg/src/main/ets/RNSVGImageModule.ts +21 -0
- package/harmony/svg/src/main/ets/RNSVGRenderableModule.ts +16 -0
- package/harmony/svg/src/main/ets/RNSVGSvgViewModule.ts +18 -0
- package/harmony/svg/src/main/ets/SvgPackage.ts +58 -0
- package/harmony/svg/src/main/module.json5 +7 -0
- package/harmony/svg/src/main/resources/base/element/string.json +8 -0
- package/harmony/svg/src/main/resources/en_US/element/string.json +8 -0
- package/harmony/svg/src/main/resources/zh_CN/element/string.json +8 -0
- package/harmony/svg/ts.ts +8 -0
- package/harmony/svg.har +0 -0
- package/lib/commonjs/css/index.js +55 -0
- package/lib/commonjs/css/index.js.map +1 -0
- package/lib/commonjs/index.js +26 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/css/index.js +4 -0
- package/lib/module/css/index.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/babel.config.d.ts +8 -0
- package/lib/typescript/babel.config.d.ts.map +1 -0
- package/lib/typescript/example/babel.config.d.ts +3 -0
- package/lib/typescript/example/babel.config.d.ts.map +1 -0
- package/lib/typescript/example/contexts.d.ts +3 -0
- package/lib/typescript/example/contexts.d.ts.map +1 -0
- package/lib/typescript/example/harmony/entry/hvigorfile.d.ts +2 -0
- package/lib/typescript/example/harmony/entry/hvigorfile.d.ts.map +1 -0
- package/lib/typescript/example/harmony/hvigorfile.d.ts +2 -0
- package/lib/typescript/example/harmony/hvigorfile.d.ts.map +1 -0
- package/lib/typescript/example/index.d.ts +2 -0
- package/lib/typescript/example/index.d.ts.map +1 -0
- package/lib/typescript/example/jest.config.d.ts +3 -0
- package/lib/typescript/example/jest.config.d.ts.map +1 -0
- package/lib/typescript/example/metro.config.d.ts +3 -0
- package/lib/typescript/example/metro.config.d.ts.map +1 -0
- package/lib/typescript/example/react-native.config.d.ts +3 -0
- package/lib/typescript/example/react-native.config.d.ts.map +1 -0
- package/lib/typescript/example/scripts/create-build-profile.d.ts +2 -0
- package/lib/typescript/example/scripts/create-build-profile.d.ts.map +1 -0
- package/lib/typescript/example/src/index.d.ts +3 -0
- package/lib/typescript/example/src/index.d.ts.map +1 -0
- package/lib/typescript/src/css/index.d.ts +4 -0
- package/lib/typescript/src/css/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +54 -0
- package/src/css/index.tsx +20 -0
- package/src/index.tsx +3 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,239 @@
|
|
|
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
|
+
* This file incorporates from the OpenHarmony project, licensed under
|
|
7
|
+
* the Apache License, Version 2.0. Specifically:
|
|
8
|
+
* - [OpenHarmony/arkui_ace_engine] (https://gitee.com/openharmony/arkui_ace_engine)
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
11
|
+
* use this file except in compliance with the License. You may obtain a copy
|
|
12
|
+
* of the License at:
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
17
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
18
|
+
* License for the specific language governing permissions and limitations
|
|
19
|
+
* under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// from ArkUI "frameworks/core/components_ng/svg/parse/svg_attributes_parser.cpp"
|
|
23
|
+
#include "utils/SvgAttributesParser.h"
|
|
24
|
+
|
|
25
|
+
#include "utils/SvgUtils.h"
|
|
26
|
+
#include "utils/StringUtils.h"
|
|
27
|
+
#include "properties/Color.h"
|
|
28
|
+
#include "utils/LinearMap.h"
|
|
29
|
+
|
|
30
|
+
namespace rnoh {
|
|
31
|
+
namespace svg {
|
|
32
|
+
|
|
33
|
+
namespace {
|
|
34
|
+
const char LINECAP_ROUND[] = "round";
|
|
35
|
+
const char LINECAP_SQUARE[] = "square";
|
|
36
|
+
const char LINEJOIN_BEVEL[] = "bevel";
|
|
37
|
+
const char LINEJOIN_ROUND[] = "round";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
namespace {
|
|
41
|
+
const char LINECAP_ROUND_RN[] = "1";
|
|
42
|
+
const char LINECAP_SQUARE_RN[] = "2";
|
|
43
|
+
const char LINEJOIN_BEVEL_RN[] = "2";
|
|
44
|
+
const char LINEJOIN_ROUND_RN[] = "1";
|
|
45
|
+
} // namespace
|
|
46
|
+
|
|
47
|
+
LineCapStyle SvgAttributesParser::GetLineCapStyle(const std::string& val)
|
|
48
|
+
{
|
|
49
|
+
if (val == LINECAP_ROUND || val == LINECAP_ROUND_RN) {
|
|
50
|
+
return LineCapStyle::ROUND;
|
|
51
|
+
} else if (val == LINECAP_SQUARE || val == LINECAP_SQUARE_RN) {
|
|
52
|
+
return LineCapStyle::SQUARE;
|
|
53
|
+
} else {
|
|
54
|
+
return LineCapStyle::BUTT;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
LineJoinStyle SvgAttributesParser::GetLineJoinStyle(const std::string& val)
|
|
59
|
+
{
|
|
60
|
+
if (val == LINEJOIN_BEVEL || val == LINEJOIN_BEVEL_RN) {
|
|
61
|
+
return LineJoinStyle::BEVEL;
|
|
62
|
+
} else if (val == LINEJOIN_ROUND || val == LINEJOIN_ROUND_RN) {
|
|
63
|
+
return LineJoinStyle::ROUND;
|
|
64
|
+
} else {
|
|
65
|
+
return LineJoinStyle::MITER;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
Color SvgAttributesParser::GetColor(const std::string& value)
|
|
70
|
+
{
|
|
71
|
+
static const LinearMapNode<Color> COLOR_TABLE[] = {
|
|
72
|
+
{ "aliceblue", Color(0xfff0f8ff) },
|
|
73
|
+
{ "antiquewhite", Color(0xfffaebd7) },
|
|
74
|
+
{ "aqua", Color(0xff00ffff) },
|
|
75
|
+
{ "aquamarine", Color(0xff7fffd4) },
|
|
76
|
+
{ "azure", Color(0xfff0ffff) },
|
|
77
|
+
{ "beige", Color(0xfff5f5dc) },
|
|
78
|
+
{ "bisque", Color(0xffffe4c4) },
|
|
79
|
+
{ "black", Color(0XFF000000) },
|
|
80
|
+
{ "blanchedalmond", Color(0xffffebcd) },
|
|
81
|
+
{ "blue", Color(0xff0000ff) },
|
|
82
|
+
{ "blueviolet", Color(0xff8a2be2) },
|
|
83
|
+
{ "brown", Color(0xffa52a2a) },
|
|
84
|
+
{ "burlywood", Color(0xffdeb887) },
|
|
85
|
+
{ "cadetblue", Color(0xff5f9ea0) },
|
|
86
|
+
{ "chartreuse", Color(0xff7fff00) },
|
|
87
|
+
{ "chocolate", Color(0xffd2691e) },
|
|
88
|
+
{ "coral", Color(0xffff7f50) },
|
|
89
|
+
{ "cornflowerblue", Color(0xff6495ed) },
|
|
90
|
+
{ "cornsilk", Color(0xfffff8dc) },
|
|
91
|
+
{ "crimson", Color(0xffdc143c) },
|
|
92
|
+
{ "cyan", Color(0xff00ffff) },
|
|
93
|
+
{ "darkblue", Color(0xff00008b) },
|
|
94
|
+
{ "darkcyan", Color(0xff008b8b) },
|
|
95
|
+
{ "darkgoldenrod", Color(0xffb8860b) },
|
|
96
|
+
{ "darkgray", Color(0xffa9a9a9) },
|
|
97
|
+
{ "darkgreen", Color(0xff006400) },
|
|
98
|
+
{ "darkgrey", Color(0xffa9a9a9) },
|
|
99
|
+
{ "darkkhaki", Color(0xffbdb76b) },
|
|
100
|
+
{ "darkmagenta", Color(0xff8b008b) },
|
|
101
|
+
{ "darkolivegreen", Color(0xff556b2f) },
|
|
102
|
+
{ "darkorange", Color(0xffff8c00) },
|
|
103
|
+
{ "darkorchid", Color(0xff9932cc) },
|
|
104
|
+
{ "darkred", Color(0xff8b0000) },
|
|
105
|
+
{ "darksalmon", Color(0xffe9967a) },
|
|
106
|
+
{ "darkseagreen", Color(0xff8fbc8f) },
|
|
107
|
+
{ "darkslateblue", Color(0xff483d8b) },
|
|
108
|
+
{ "darkslategray", Color(0xff2f4f4f) },
|
|
109
|
+
{ "darkslategrey", Color(0xff2f4f4f) },
|
|
110
|
+
{ "darkturquoise", Color(0xff00ced1) },
|
|
111
|
+
{ "darkviolet", Color(0xff9400D3) },
|
|
112
|
+
{ "deeppink", Color(0xffff1493) },
|
|
113
|
+
{ "deepskyblue", Color(0xff00bfff) },
|
|
114
|
+
{ "dimgray", Color(0xff696969) },
|
|
115
|
+
{ "dimgrey", Color(0xff696969) },
|
|
116
|
+
{ "dodgerblue", Color(0xff1e90ff) },
|
|
117
|
+
{ "firebrick", Color(0xffb22222) },
|
|
118
|
+
{ "floralwhite", Color(0xfffffaf0) },
|
|
119
|
+
{ "forestgreen", Color(0xff228b22) },
|
|
120
|
+
{ "fuchsia", Color(0xffff00ff) },
|
|
121
|
+
{ "gainsboro", Color(0xffdcdcdc) },
|
|
122
|
+
{ "ghostwhite", Color(0xfff8f8ff) },
|
|
123
|
+
{ "gold", Color(0xffffd700) },
|
|
124
|
+
{ "goldenrod", Color(0xffdaa520) },
|
|
125
|
+
{ "gray", Color(0xff808080) },
|
|
126
|
+
{ "green", Color(0xff008000) },
|
|
127
|
+
{ "greenyellow", Color(0xffadff2f) },
|
|
128
|
+
{ "grey", Color(0xff808080) },
|
|
129
|
+
{ "honeydew", Color(0xfff0fff0) },
|
|
130
|
+
{ "hotpink", Color(0xffff69b4) },
|
|
131
|
+
{ "indianred", Color(0xffcd5c5c) },
|
|
132
|
+
{ "indigo", Color(0xff4b0082) },
|
|
133
|
+
{ "ivory", Color(0xfffffff0) },
|
|
134
|
+
{ "khaki", Color(0xfff0e68c) },
|
|
135
|
+
{ "lavender", Color(0xffe6e6fa) },
|
|
136
|
+
{ "lavenderblush", Color(0xfffff0f5) },
|
|
137
|
+
{ "lawngreen", Color(0xff7cfc00) },
|
|
138
|
+
{ "lemonchiffon", Color(0xfffffacd) },
|
|
139
|
+
{ "lightblue", Color(0xffadd8e6) },
|
|
140
|
+
{ "lightcoral", Color(0xfff08080) },
|
|
141
|
+
{ "lightcyan", Color(0xffe0ffff) },
|
|
142
|
+
{ "lightgoldenrodyellow", Color(0xfffafad2) },
|
|
143
|
+
{ "lightgray", Color(0xffd3d3d3) },
|
|
144
|
+
{ "lightgreen", Color(0xff90ee90) },
|
|
145
|
+
{ "lightgrey", Color(0xffd3d3d3) },
|
|
146
|
+
{ "lightpink", Color(0xffffb6c1) },
|
|
147
|
+
{ "lightsalmon", Color(0xffffa07a) },
|
|
148
|
+
{ "lightseagreen", Color(0xff20b2aa) },
|
|
149
|
+
{ "lightskyblue", Color(0xff87cefa) },
|
|
150
|
+
{ "lightslategray", Color(0xff778899) },
|
|
151
|
+
{ "lightslategrey", Color(0xff778899) },
|
|
152
|
+
{ "lightsteelblue", Color(0xffb0c4de) },
|
|
153
|
+
{ "lightyellow", Color(0xffffffe0) },
|
|
154
|
+
{ "lime", Color(0xff00ff00) },
|
|
155
|
+
{ "limegreen", Color(0xff32cd32) },
|
|
156
|
+
{ "linen", Color(0xfffaf0e6) },
|
|
157
|
+
{ "magenta", Color(0xffff00ff) },
|
|
158
|
+
{ "maroon", Color(0xff800000) },
|
|
159
|
+
{ "mediumaquamarine", Color(0xff66cdaa) },
|
|
160
|
+
{ "mediumblue", Color(0xff0000cd) },
|
|
161
|
+
{ "mediumorchid", Color(0xffba55d3) },
|
|
162
|
+
{ "mediumpurple", Color(0xff9370db) },
|
|
163
|
+
{ "mediumseagreen", Color(0xff3cb371) },
|
|
164
|
+
{ "mediumslateblue", Color(0xff7b68ee) },
|
|
165
|
+
{ "mediumspringgreen", Color(0xff00fa9a) },
|
|
166
|
+
{ "mediumturquoise", Color(0xff48d1cc) },
|
|
167
|
+
{ "mediumvioletred", Color(0xffc71585) },
|
|
168
|
+
{ "midnightblue", Color(0xff191970) },
|
|
169
|
+
{ "mintcream", Color(0xfff5fffa) },
|
|
170
|
+
{ "mistyrose", Color(0xffffe4e1) },
|
|
171
|
+
{ "moccasin", Color(0xffffe4b5) },
|
|
172
|
+
{ "navajowhite", Color(0xffffdead) },
|
|
173
|
+
{ "navy", Color(0xff000080) },
|
|
174
|
+
{ "oldlace", Color(0xfffdf5e6) },
|
|
175
|
+
{ "olive", Color(0xff808000) },
|
|
176
|
+
{ "olivedrab", Color(0xff6b8e23) },
|
|
177
|
+
{ "orange", Color(0xffffa500) },
|
|
178
|
+
{ "orangered", Color(0xffff4500) },
|
|
179
|
+
{ "orchid", Color(0xffda70d6) },
|
|
180
|
+
{ "palegoldenrod", Color(0xffeee8aa) },
|
|
181
|
+
{ "palegreen", Color(0xff98fb98) },
|
|
182
|
+
{ "paleturquoise", Color(0xffafeeee) },
|
|
183
|
+
{ "palevioletred", Color(0xffdb7093) },
|
|
184
|
+
{ "papayawhip", Color(0xffffefd5) },
|
|
185
|
+
{ "peachpuff", Color(0xffffdab9) },
|
|
186
|
+
{ "peru", Color(0xffcd853f) },
|
|
187
|
+
{ "pink", Color(0xffffc0cb) },
|
|
188
|
+
{ "plum", Color(0xffdda0dd) },
|
|
189
|
+
{ "powderblue", Color(0xffb0e0e6) },
|
|
190
|
+
{ "purple", Color(0xff800080) },
|
|
191
|
+
{ "red", Color(0xffff0000) },
|
|
192
|
+
{ "rosybrown", Color(0xffbc8f8f) },
|
|
193
|
+
{ "royalblue", Color(0xff4169e1) },
|
|
194
|
+
{ "rebeccapurple", Color(0xff663399) },
|
|
195
|
+
{ "saddlebrown", Color(0xff8b4513) },
|
|
196
|
+
{ "salmon", Color(0xfffa8072) },
|
|
197
|
+
{ "sandybrown", Color(0xfff4a460) },
|
|
198
|
+
{ "seagreen", Color(0xff2e8b57) },
|
|
199
|
+
{ "seashell", Color(0xfffff5ee) },
|
|
200
|
+
{ "sienna", Color(0xffa0522d) },
|
|
201
|
+
{ "silver", Color(0xffc0c0c0) },
|
|
202
|
+
{ "skyblue", Color(0xff87ceeb) },
|
|
203
|
+
{ "slateblue", Color(0xff6a5acd) },
|
|
204
|
+
{ "slategray", Color(0xff708090) },
|
|
205
|
+
{ "slategrey", Color(0xff708090) },
|
|
206
|
+
{ "snow", Color(0xfffffafa) },
|
|
207
|
+
{ "springgreen", Color(0xff00ff7f) },
|
|
208
|
+
{ "steelblue", Color(0xff4682b4) },
|
|
209
|
+
{ "tan", Color(0xffd2b48c) },
|
|
210
|
+
{ "teal", Color(0xff008080) },
|
|
211
|
+
{ "thistle", Color(0xffd8bfd8) },
|
|
212
|
+
{ "tomato", Color(0xffff6347) },
|
|
213
|
+
{ "turquoise", Color(0xff40e0d0) },
|
|
214
|
+
{ "violet", Color(0xffee82ee) },
|
|
215
|
+
{ "wheat", Color(0xfff5deb3) },
|
|
216
|
+
{ "white", Color(0xffffffff) },
|
|
217
|
+
{ "whitesmoke", Color(0xfff5f5f5) },
|
|
218
|
+
{ "yellow", Color(0xffffff00) },
|
|
219
|
+
{ "yellowgreen", Color(0xff9acd32) },
|
|
220
|
+
};
|
|
221
|
+
int64_t colorIndex = BinarySearchFindIndex(COLOR_TABLE, ArraySize(COLOR_TABLE), value.c_str());
|
|
222
|
+
if (colorIndex != -1) {
|
|
223
|
+
return COLOR_TABLE[colorIndex].value;
|
|
224
|
+
}
|
|
225
|
+
return Color::FromString(value);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
Dimension SvgAttributesParser::ParseDimension(const std::string& value, bool useVp)
|
|
229
|
+
{
|
|
230
|
+
return StringUtils::StringToDimension(value, useVp);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
double SvgAttributesParser::ParseDouble(const std::string& value)
|
|
234
|
+
{
|
|
235
|
+
return StringUtils::StringToDouble(value);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
} // namespace svg
|
|
239
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,277 @@
|
|
|
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
|
+
* This file incorporates from the OpenHarmony project, licensed under
|
|
7
|
+
* the Apache License, Version 2.0. Specifically:
|
|
8
|
+
* - [OpenHarmony/arkui_ace_engine] (https://gitee.com/openharmony/arkui_ace_engine)
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
11
|
+
* use this file except in compliance with the License. You may obtain a copy
|
|
12
|
+
* of the License at:
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
17
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
18
|
+
* License for the specific language governing permissions and limitations
|
|
19
|
+
* under the License.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// from ArkUI "frameworks/core/components_ng/svg/parse/svg_attributes_parser.h"
|
|
23
|
+
#pragma once
|
|
24
|
+
#include <string>
|
|
25
|
+
#include "properties/Color.h"
|
|
26
|
+
#include "properties/PaintState.h"
|
|
27
|
+
#include "properties/Dimension.h"
|
|
28
|
+
#include "properties/Rect.h"
|
|
29
|
+
#include "properties/Decoration.h"
|
|
30
|
+
#include <react/renderer/imagemanager/primitives.h>
|
|
31
|
+
|
|
32
|
+
namespace rnoh {
|
|
33
|
+
namespace svg {
|
|
34
|
+
|
|
35
|
+
class SvgAttributesParser {
|
|
36
|
+
public:
|
|
37
|
+
static Color GetColor(const std::string& str);
|
|
38
|
+
static LineCapStyle GetLineCapStyle(const std::string& val);
|
|
39
|
+
static LineJoinStyle GetLineJoinStyle(const std::string& val);
|
|
40
|
+
static Dimension ParseDimension(const std::string& value, bool useVp = false);
|
|
41
|
+
static double ParseDouble(const std::string& value);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
enum class SvgFeColorMatrixType {
|
|
45
|
+
MATRIX,
|
|
46
|
+
SATURATE,
|
|
47
|
+
HUE_ROTATE,
|
|
48
|
+
LUMINACE_TO_ALPHA,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
enum class SvgColorInterpolationType {
|
|
52
|
+
LINEAR_RGB,
|
|
53
|
+
SRGB,
|
|
54
|
+
AUTO
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
enum class SvgFeInType {
|
|
58
|
+
SOURCE_GRAPHIC,
|
|
59
|
+
SOURCE_ALPHA,
|
|
60
|
+
BACKGROUND_IMAGE,
|
|
61
|
+
BACKGROUND_ALPHA,
|
|
62
|
+
FILL_PAINT,
|
|
63
|
+
STROKE_PAINT,
|
|
64
|
+
PRIMITIVE
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
enum class SvgFeEdgeMode {
|
|
68
|
+
EDGE_DUPLICATE,
|
|
69
|
+
EDGE_WRAP,
|
|
70
|
+
EDGE_NONE
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
enum class SvgFeOperatorType {
|
|
74
|
+
FE_ARITHMETIC,
|
|
75
|
+
FE_ATOP,
|
|
76
|
+
FE_IN,
|
|
77
|
+
FE_LIGHTER,
|
|
78
|
+
FE_OUT,
|
|
79
|
+
FE_OVER,
|
|
80
|
+
FE_XOR
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
enum class SvgFeBlendMode {
|
|
84
|
+
NORMAL,
|
|
85
|
+
MULTIPLY,
|
|
86
|
+
SCREEN,
|
|
87
|
+
DARKEN,
|
|
88
|
+
LIGHTEN
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
struct SvgFeIn {
|
|
92
|
+
SvgFeInType in = SvgFeInType::PRIMITIVE;
|
|
93
|
+
std::string id;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
struct SvgAttribute {
|
|
97
|
+
Dimension vbX;
|
|
98
|
+
Dimension vbY;
|
|
99
|
+
Dimension vbWidth;
|
|
100
|
+
Dimension vbHeight;
|
|
101
|
+
Dimension x;
|
|
102
|
+
Dimension y;
|
|
103
|
+
Dimension width = -1.0_px;
|
|
104
|
+
Dimension height = -1.0_px;
|
|
105
|
+
bool autoMirror = false;
|
|
106
|
+
std::string align;
|
|
107
|
+
int meetOrSlice;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
struct SvgAnimateAttribute {
|
|
111
|
+
std::string attributeName;
|
|
112
|
+
int32_t begin = 0;
|
|
113
|
+
int32_t dur = 0;
|
|
114
|
+
int32_t end = 0;
|
|
115
|
+
int32_t repeatCount = 1;
|
|
116
|
+
std::string fillMode;
|
|
117
|
+
std::string calcMode;
|
|
118
|
+
std::vector<std::string> values;
|
|
119
|
+
std::vector<double> keyTimes;
|
|
120
|
+
std::vector<std::string> keySplines;
|
|
121
|
+
std::string from;
|
|
122
|
+
std::string to;
|
|
123
|
+
std::vector<std::string> keyPoints;
|
|
124
|
+
std::string path;
|
|
125
|
+
std::string rotate;
|
|
126
|
+
std::string transformType;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// struct SvgStopAttribute {
|
|
130
|
+
// GradientColor gradientColor;
|
|
131
|
+
// };
|
|
132
|
+
|
|
133
|
+
struct SvgRectAttribute {
|
|
134
|
+
Dimension x;
|
|
135
|
+
Dimension y;
|
|
136
|
+
Dimension rx = -1.0_px;
|
|
137
|
+
Dimension ry = -1.0_px;
|
|
138
|
+
Dimension width;
|
|
139
|
+
Dimension height;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
struct SvgMaskAttribute {
|
|
143
|
+
Dimension x = Dimension(-0.1, DimensionUnit::PERCENT); // x-axis default value
|
|
144
|
+
Dimension y = Dimension(-0.1, DimensionUnit::PERCENT); // y-axis default value
|
|
145
|
+
Dimension width = Dimension(1.2, DimensionUnit::PERCENT); // masking area width default value
|
|
146
|
+
Dimension height = Dimension(1.2, DimensionUnit::PERCENT); // masking area height default value
|
|
147
|
+
Unit maskContentUnits = Unit::userSpaceOnUse;
|
|
148
|
+
Unit maskUnits = Unit::objectBoundingBox;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
struct SvgCircleAttribute {
|
|
152
|
+
Dimension cx;
|
|
153
|
+
Dimension cy;
|
|
154
|
+
Dimension r;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
struct SvgPolygonAttribute {
|
|
158
|
+
std::string points;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
struct SvgEllipseAttribute {
|
|
162
|
+
Dimension cx;
|
|
163
|
+
Dimension cy;
|
|
164
|
+
Dimension rx = -1.0_px;
|
|
165
|
+
Dimension ry = -1.0_px;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
struct SvgLineAttribute {
|
|
169
|
+
Dimension x1;
|
|
170
|
+
Dimension y1;
|
|
171
|
+
Dimension x2;
|
|
172
|
+
Dimension y2;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
struct SvgPatternAttribute {
|
|
176
|
+
Dimension x; // x-axis default value
|
|
177
|
+
Dimension y; // y-axis default value
|
|
178
|
+
Dimension width; // pattern area width default value
|
|
179
|
+
Dimension height; // pattern area height default value
|
|
180
|
+
int patternUnits;
|
|
181
|
+
int patternContentUnits;
|
|
182
|
+
std::string patternTransform;
|
|
183
|
+
Rect viewBox;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
struct SvgImageAttribute {
|
|
187
|
+
Dimension x = Dimension(0, DimensionUnit::PX); // x-axis default value
|
|
188
|
+
Dimension y = Dimension(0, DimensionUnit::PX); // y-axis default value
|
|
189
|
+
Dimension width = Dimension(0.0, DimensionUnit::PX); // image width default value
|
|
190
|
+
Dimension height = Dimension(0.0, DimensionUnit::PX); // image height default value
|
|
191
|
+
facebook::react::ImageSource src;
|
|
192
|
+
std::string align;
|
|
193
|
+
int meetOrSlice = 0;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
struct SvgSymbolAttribute {
|
|
197
|
+
Dimension minX;
|
|
198
|
+
Dimension minY;
|
|
199
|
+
Dimension vbWidth;
|
|
200
|
+
Dimension vbHeight;
|
|
201
|
+
std::string align;
|
|
202
|
+
int meetOrSlice;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
struct SvgFilterAttribute {
|
|
206
|
+
Dimension x = Dimension(-0.1, DimensionUnit::PERCENT); // x-axis default value
|
|
207
|
+
Dimension y = Dimension(-0.1, DimensionUnit::PERCENT); // y-axis default value
|
|
208
|
+
Dimension width = Dimension(1.2, DimensionUnit::PERCENT); // masking area width default value
|
|
209
|
+
Dimension height = Dimension(1.2, DimensionUnit::PERCENT); // masking area height default value
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
struct SvgFeCommonAttribute {
|
|
213
|
+
Dimension x = Dimension(0.0, DimensionUnit::PERCENT);
|
|
214
|
+
Dimension y = Dimension(0.0, DimensionUnit::PERCENT);
|
|
215
|
+
Dimension height = Dimension(1.0, DimensionUnit::PERCENT);
|
|
216
|
+
Dimension width = Dimension(1.0, DimensionUnit::PERCENT);
|
|
217
|
+
std::string result;
|
|
218
|
+
SvgFeIn in;
|
|
219
|
+
SvgColorInterpolationType colorInterpolationType = SvgColorInterpolationType::SRGB;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
struct SvgFeFloodAttribute {
|
|
223
|
+
Color floodColor = Color::BLACK;
|
|
224
|
+
double floodOpacity = 1.0;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
struct SvgFeGaussianBlurAttribute {
|
|
228
|
+
float stdDeviationX = 0.0f;
|
|
229
|
+
float stdDeviationY = 0.0f;
|
|
230
|
+
SvgFeEdgeMode edgeMode = SvgFeEdgeMode::EDGE_DUPLICATE;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
struct SvgFeOffsetAttribute {
|
|
234
|
+
Dimension dx;
|
|
235
|
+
Dimension dy;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
struct SvgFeCompositeAttribute {
|
|
239
|
+
SvgFeIn in2;
|
|
240
|
+
SvgFeOperatorType operatorType = SvgFeOperatorType::FE_OVER;
|
|
241
|
+
float k1 = 0.0f;
|
|
242
|
+
float k2 = 0.0f;
|
|
243
|
+
float k3 = 0.0f;
|
|
244
|
+
float k4 = 0.0f;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
struct SvgFeBlendAttribute {
|
|
248
|
+
SvgFeIn in2;
|
|
249
|
+
SvgFeBlendMode blendMode = SvgFeBlendMode::NORMAL;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
struct SvgFeColorMatrixAttribute {
|
|
253
|
+
SvgFeColorMatrixType type = SvgFeColorMatrixType::MATRIX;
|
|
254
|
+
std::string values;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
struct SvgGradientAttribute {
|
|
258
|
+
Gradient gradient = Gradient();
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
struct SvgMarkerAttribute {
|
|
262
|
+
Dimension refX;
|
|
263
|
+
Dimension refY;
|
|
264
|
+
Dimension markerWidth;
|
|
265
|
+
Dimension markerHeight;
|
|
266
|
+
Dimension minX;
|
|
267
|
+
Dimension minY;
|
|
268
|
+
Dimension vbWidth;
|
|
269
|
+
Dimension vbHeight;
|
|
270
|
+
std::string markerUnits;
|
|
271
|
+
std::string orient;
|
|
272
|
+
std::string align;
|
|
273
|
+
int meetOrSlice;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
} // namespace svg
|
|
277
|
+
} // namespace rnoh
|