Lines Matching refs:vBox
43 static bool _appendShape(SvgLoaderData& loaderData, SvgNode* node, Shape* shape, const Box& vBox, c…
44 …pShape(SvgLoaderData& loaderData, SvgNode* node, Shape* shape, const Box& vBox, const string& svgP…
45 …eneBuildHelper(SvgLoaderData& loaderData, const SvgNode* node, const Box& vBox, const string& svgP…
93 static unique_ptr<LinearGradient> _applyLinearGradientProperty(SvgStyleGradient* g, const Box& vBox… in _applyLinearGradientProperty() argument
104 g->linear->x1 = g->linear->x1 * vBox.w; in _applyLinearGradientProperty()
105 g->linear->y1 = g->linear->y1 * vBox.h; in _applyLinearGradientProperty()
106 g->linear->x2 = g->linear->x2 * vBox.w; in _applyLinearGradientProperty()
107 g->linear->y2 = g->linear->y2 * vBox.h; in _applyLinearGradientProperty()
109 Matrix m = {vBox.w, 0, vBox.x, 0, vBox.h, vBox.y, 0, 0, 1}; in _applyLinearGradientProperty()
148 static unique_ptr<RadialGradient> _applyRadialGradientProperty(SvgStyleGradient* g, const Box& vBox… in _applyRadialGradientProperty() argument
161 g->radial->cx = g->radial->cx * vBox.w; in _applyRadialGradientProperty()
162 g->radial->cy = g->radial->cy * vBox.h; in _applyRadialGradientProperty()
163 g->radial->r = g->radial->r * sqrtf(powf(vBox.w, 2.0f) + powf(vBox.h, 2.0f)) / sqrtf(2.0f); in _applyRadialGradientProperty()
164 g->radial->fx = g->radial->fx * vBox.w; in _applyRadialGradientProperty()
165 g->radial->fy = g->radial->fy * vBox.h; in _applyRadialGradientProperty()
166 … g->radial->fr = g->radial->fr * sqrtf(powf(vBox.w, 2.0f) + powf(vBox.h, 2.0f)) / sqrtf(2.0f); in _applyRadialGradientProperty()
168 Matrix m = {vBox.w, 0, vBox.x, 0, vBox.h, vBox.y, 0, 0, 1}; in _applyRadialGradientProperty()
208 …seNode(SvgLoaderData& loaderData, SvgNode* node, Shape* shape, const Box& vBox, const string& svgP… in _appendClipUseNode() argument
221 …return _appendClipShape(loaderData, child, shape, vBox, svgPath, identity((const Matrix*)(&finalTr… in _appendClipUseNode()
225 …pChild(SvgLoaderData& loaderData, SvgNode* node, Shape* shape, const Box& vBox, const string& svgP… in _appendClipChild() argument
228 return _appendClipUseNode(loaderData, node, shape, vBox, svgPath); in _appendClipChild()
230 return _appendClipShape(loaderData, node, shape, vBox, svgPath, nullptr); in _appendClipChild()
254 …(SvgLoaderData& loaderData, Paint* paint, const SvgNode* node, const Box& vBox, const string& svgP… in _applyComposition() argument
272 …if (_appendClipChild(loaderData, *child, comp.get(), vBox, svgPath, compNode->child.count > 1)) va… in _applyComposition()
296 … if (auto comp = _sceneBuildHelper(loaderData, compNode, vBox, svgPath, true, 0, &isMaskWhite)) { in _applyComposition()
317 static void _applyProperty(SvgLoaderData& loaderData, SvgNode* node, Shape* vg, const Box& vBox, co… in _applyProperty() argument
329 Box bBox = vBox; in _applyProperty()
373 Box bBox = vBox; in _applyProperty()
394 _applyComposition(loaderData, vg, node, vBox, svgPath); in _applyProperty()
398 …e> _shapeBuildHelper(SvgLoaderData& loaderData, SvgNode* node, const Box& vBox, const string& svgP… in _shapeBuildHelper() argument
401 if (_appendShape(loaderData, node, shape.get(), vBox, svgPath)) return shape; in _shapeBuildHelper()
462 static bool _appendShape(SvgLoaderData& loaderData, SvgNode* node, Shape* shape, const Box& vBox, c… in _appendShape() argument
466 _applyProperty(loaderData, node, shape, vBox, svgPath, false); in _appendShape()
471 …pShape(SvgLoaderData& loaderData, SvgNode* node, Shape* shape, const Box& vBox, const string& svgP… in _appendClipShape() argument
495 _applyProperty(loaderData, node, shape, vBox, svgPath, true); in _appendClipShape()
574 …e> _imageBuildHelper(SvgLoaderData& loaderData, SvgNode* node, const Box& vBox, const string& svgP… in _imageBuildHelper() argument
637 _applyComposition(loaderData, picture.get(), node, vBox, svgPath); in _imageBuildHelper()
717 …useBuildHelper(SvgLoaderData& loaderData, const SvgNode* node, const Box& vBox, const string& svgP… in _useBuildHelper() argument
719 auto scene = _sceneBuildHelper(loaderData, node, vBox, svgPath, false, depth + 1, isMaskWhite); in _useBuildHelper()
732 auto width = (symbol.hasWidth ? symbol.w : vBox.w); in _useBuildHelper()
734 auto height = (symbol.hasHeight ? symbol.h : vBox.h);; in _useBuildHelper()
776 static void _applyTextFill(SvgStyleProperty* style, Text* text, const Box& vBox) in _applyTextFill() argument
782 Box bBox = vBox; in _applyTextFill()
807 …extBuildHelper(SvgLoaderData& loaderData, const SvgNode* node, const Box& vBox, const string& svgP… in _textBuildHelper() argument
824 _applyTextFill(node->style, text.get(), vBox); in _textBuildHelper()
825 _applyComposition(loaderData, text.get(), node, vBox, svgPath); in _textBuildHelper()
831 …eneBuildHelper(SvgLoaderData& loaderData, const SvgNode* node, const Box& vBox, const string& svgP… in _sceneBuildHelper() argument
850 … scene->push(_useBuildHelper(loaderData, *child, vBox, svgPath, depth + 1, isMaskWhite)); in _sceneBuildHelper()
852 … scene->push(_sceneBuildHelper(loaderData, *child, vBox, svgPath, false, depth + 1, isMaskWhite)); in _sceneBuildHelper()
854 auto image = _imageBuildHelper(loaderData, *child, vBox, svgPath); in _sceneBuildHelper()
860 auto text = _textBuildHelper(loaderData, *child, vBox, svgPath); in _sceneBuildHelper()
863 auto shape = _shapeBuildHelper(loaderData, *child, vBox, svgPath); in _sceneBuildHelper()
877 _applyComposition(loaderData, scene.get(), node, vBox, svgPath); in _sceneBuildHelper()
886 static void _updateInvalidViewSize(const Scene* scene, Box& vBox, float& w, float& h, SvgViewFlag v… in _updateInvalidViewSize() argument
892 scene->bounds(&x, &y, &vBox.w, &vBox.h, false); in _updateInvalidViewSize()
894 vBox.x = x; in _updateInvalidViewSize()
895 vBox.y = y; in _updateInvalidViewSize()
897 if (validWidth) vBox.w = w; in _updateInvalidViewSize()
898 if (validHeight) vBox.h = h; in _updateInvalidViewSize()
902 if (!validWidth) w *= vBox.w; in _updateInvalidViewSize()
903 if (!validHeight) h *= vBox.h; in _updateInvalidViewSize()
910 Scene* svgSceneBuild(SvgLoaderData& loaderData, Box vBox, float w, float h, AspectRatioAlign align,… in svgSceneBuild() argument
916 auto docNode = _sceneBuildHelper(loaderData, loaderData.doc, vBox, svgPath, false, 0); in svgSceneBuild()
918 …if (!(viewFlag & SvgViewFlag::Viewbox)) _updateInvalidViewSize(docNode.get(), vBox, w, h, viewFlag… in svgSceneBuild()
920 if (!tvg::equal(w, vBox.w) || !tvg::equal(h, vBox.h)) { in svgSceneBuild()
921 Matrix m = _calculateAspectRatioMatrix(align, meetOrSlice, w, h, vBox); in svgSceneBuild()
923 } else if (!tvg::zero(vBox.x) || !tvg::zero(vBox.y)) { in svgSceneBuild()
924 docNode->translate(-vBox.x, -vBox.y); in svgSceneBuild()
937 loaderData.doc->node.doc.vx = vBox.x; in svgSceneBuild()
938 loaderData.doc->node.doc.vy = vBox.y; in svgSceneBuild()
939 loaderData.doc->node.doc.vw = vBox.w; in svgSceneBuild()
940 loaderData.doc->node.doc.vh = vBox.h; in svgSceneBuild()