Home
last modified time | relevance | path

Searched refs:viewBox (Results 1 - 23 of 23) sorted by relevance

/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/parse/
H A Dsvg_svg.cpp22 const char DOM_SVG_SRC_VIEW_BOX[] = "viewBox";
58 auto viewBox = GetViewBox(); in AdjustContentAreaByViewBox() local
59 if (LessOrEqual(viewBox.Width(), 0.0) || LessOrEqual(viewBox.Height(), 0.0)) { in AdjustContentAreaByViewBox()
68 auto scale = std::min(viewPort.Width() / viewBox.Width(), viewPort.Height() / viewBox.Height()); in AdjustContentAreaByViewBox()
69 auto translateX = (viewPort.Width() - viewBox.Width() * scale) * HALF; in AdjustContentAreaByViewBox()
70 auto translateY = (viewPort.Height() - viewBox.Height() * scale) * HALF; in AdjustContentAreaByViewBox()
73 canvas.Translate(-1 * viewBox.Left(), -1 * viewBox in AdjustContentAreaByViewBox()
[all...]
H A Dsvg_use.cpp22 const char DOM_SVG_SRC_VIEW_BOX[] = "viewBox";
96 std::vector<double> viewBox; in ParseAndSetSpecializedAttr()
97 StringUtils::StringSplitter(val, ' ', viewBox); in ParseAndSetSpecializedAttr()
98 if (viewBox.size() == 4) { in ParseAndSetSpecializedAttr()
99 attr.viewBox = Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3]); in ParseAndSetSpecializedAttr()
107 std::vector<double> viewBox; in ParseAndSetSpecializedAttr()
[all...]
H A Dsvg_pattern.cpp75 std::vector<double> viewBox; in ParseAndSetSpecializedAttr()
76 StringUtils::StringSplitter(val, ' ', viewBox); in ParseAndSetSpecializedAttr()
77 if (viewBox.size() == 4) { in ParseAndSetSpecializedAttr()
78 attr.viewBox = Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3]); in ParseAndSetSpecializedAttr()
H A Dsvg_image.cpp152 RSRect SvgImage::CalcDstRect(const Size& realSize, const Rect& viewBox) in CalcDstRect() argument
157 auto scaleValue = std::min(viewBox.Width() / realSize.Width(), viewBox.Height() / realSize.Height()); in CalcDstRect()
158 auto spaceX = viewBox.Width() - realSize.Width() * scaleValue; in CalcDstRect()
159 auto spaceY = viewBox.Height() - realSize.Height() * scaleValue; in CalcDstRect()
160 auto offsetX = viewBox.Left() + spaceX * 0.5f; // 0.5f Align Center in CalcDstRect()
161 auto offsetY = viewBox.Top() + spaceY * 0.5f; // 0.5f Align Center in CalcDstRect()
H A Dsvg_image.h36 RSRect CalcDstRect(const Size& realSize, const Rect& viewBox);
H A Dsvg_attributes_parser.h93 Rect viewBox; member
219 Rect viewBox; member
/foundation/arkui/ace_engine/frameworks/core/components/declaration/svg/
H A Dsvg_declaration.cpp23 const char DOM_SVG_SRC_VIEW_BOX[] = "viewBox";
68 std::vector<double> viewBox; in SetSpecializedValue()
69 StringUtils::StringSplitter(val, ' ', viewBox); in SetSpecializedValue()
70 if (viewBox.size() == 4) { in SetSpecializedValue()
71 declaration.SetViewBox(Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3])); in SetSpecializedValue()
79 std::vector<double> viewBox; in SetSpecializedValue()
80 StringUtils::StringSplitter(val, ' ', viewBox); in SetSpecializedValue()
[all...]
H A Dsvg_pattern_declaration.cpp59 std::vector<double> viewBox; in SetSpecializedAttr()
60 StringUtils::StringSplitter(val, ' ', viewBox); in SetSpecializedAttr()
61 if (viewBox.size() == 4) { in SetSpecializedAttr()
62 declaration.SetViewBox(Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3])); in SetSpecializedAttr()
H A Dsvg_declaration.h43 Rect viewBox; member
109 void SetViewBox(const Rect& viewBox) in SetViewBox() argument
112 attribute.viewBox = viewBox; in SetViewBox()
118 return attribute.viewBox; in GetViewBox()
H A Dsvg_pattern_declaration.h31 Rect viewBox; member
130 return attribute.viewBox; in GetViewBox()
133 void SetViewBox(const Rect& viewBox) in SetViewBox() argument
136 attribute.viewBox = viewBox; in SetViewBox()
/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/
H A Dsvg_utils.cpp21 const Size& svgSize, const Rect& viewBox) in CalculateSvgConentSize()
23 if (LessOrEqual(viewBox.Width(), 0.0) || LessOrEqual(viewBox.Height(), 0.0)) { in CalculateSvgConentSize()
34 svgContentSize.SetWidth(viewBox.Width() / viewBox.Height() * svgSize.Height()); in CalculateSvgConentSize()
40 svgContentSize.SetHeight(viewBox.Height() / viewBox.Width() * svgSize.Width()); in CalculateSvgConentSize()
20 CalculateSvgConentSize(Size& svgContentSize, const Size& svgContainerSize, const Size& svgSize, const Rect& viewBox) CalculateSvgConentSize() argument
H A Dsvg_ulils.h27 const Size& svgSize, const Rect& viewBox);
H A Dsvg_context.h88 void SetRootViewBox(const Rect& viewBox) in SetRootViewBox() argument
90 rootViewBox_ = viewBox; in SetRootViewBox()
/foundation/arkui/ace_engine/test/unittest/core/svg/
H A Dsvg_manager_test_ng.cpp85 "<svg width=\"900\" height=\"900\" viewBox=\"0 0 150 120\" xmlns=\"http://www.w3.org/2000/svg\">"
109 Rect viewBox(10.0f, 10.0f, 100.0f, 100.0f); in HWTEST_F()
110 RSRect ret = svgImage.CalcDstRect(realSize, viewBox); in HWTEST_F()
112 ret = svgImage.CalcDstRect(realSize, viewBox); in HWTEST_F()
114 ret = svgImage.CalcDstRect(realSize, viewBox); in HWTEST_F()
116 ret = svgImage.CalcDstRect(realSize, viewBox); in HWTEST_F()
H A Dparse_test_ng.cpp88 "<svg width=\"120\" height=\"120\" viewBox=\"0 0 120 120\" version=\"1.1\"><defs><clipPath id=\"myClip\"><circle "
92 const std::string SVG_LABEL = "<svg width=\"400\" height=\"500\" viewBox=\"-4 -10 300 300\"></svg>";
101 "version=\"1.1\" viewBox=\"0 0 24 24\"><defs><path id=\"uxs-a\" d=\"M11.5,13.5 C12.7426407,13.5 13.75,14.5073593 "
126 const std::string STYLE_SVG_LABEL = "<svg viewBox=\"0 0 10 10\"><style>circle{fill:gold;stroke:maroon;stroke-width : "
164 "<svg viewBox=\"0 0 230 100\"><defs><pattern id=\"star\" viewBox=\"0 0 10 10\" width=\"10\" "
183 "<svg width=\"-400\" height=\"-400\" viewBox=\"-4 -10 300 300\" version=\"1.1\" "
188 "<svg width=\"300\" height=\"400\" viewBox=\"-4 -10 300 300\" version=\"1.1\" "
193 "<svg width=\"400\" height=\"400\" viewBox=\"-4 -10 -300 -300\" version=\"1.1\" "
199 "<svg width=\"50px\" height=\"50px\" viewBox
[all...]
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/
H A Dshape_model_impl.cpp51 ShapeViewBox viewBox; in SetViewPort() local
52 viewBox.SetLeft(dimLeft, option); in SetViewPort()
53 viewBox.SetTop(dimTop, option); in SetViewPort()
54 viewBox.SetWidth(dimWidth, option); in SetViewPort()
55 viewBox.SetHeight(dimHeight, option); in SetViewPort()
56 component->SetViewBox(viewBox); in SetViewPort()
/foundation/arkui/ace_engine/frameworks/core/components/svg/
H A Dsvg_component.cpp92 void SvgComponent::SetViewBox(const Rect& viewBox) in SetViewBox() argument
94 declaration_->SetViewBox(viewBox); in SetViewBox()
H A Dsvg_component.h42 void SetViewBox(const Rect& viewBox);
H A Drender_svg_base.cpp98 const auto& viewBox = svg->GetViewBox(); in FindSvgViewBox() local
99 if (!NearZero(viewBox.Width()) && !NearZero(viewBox.Height())) { in FindSvgViewBox()
100 return viewBox; in FindSvgViewBox()
779 auto viewBox = svgViewBox_.value(); in GetViewBoxFromRoot() local
780 if (!NearZero(viewBox.Width()) && !NearZero(viewBox.Height())) { in GetViewBoxFromRoot()
781 return viewBox; in GetViewBoxFromRoot()
/foundation/arkui/ace_engine/test/mock/core/svg/
H A Dmock_svg_utils.cpp21 const Size& svgSize, const Rect& viewBox) in CalculateSvgConentSize()
20 CalculateSvgConentSize(Size& svgContentSize, const Size& svgContainerSize, const Size& svgSize, const Rect& viewBox) CalculateSvgConentSize() argument
/foundation/arkui/ace_engine/frameworks/core/components_v2/inspector/
H A Dshape_container_composed_element.cpp212 auto viewBox = render->GetShapeViewBox(); in GetViewBox() local
213 jsonViewBox->Put("x", viewBox.Left().ToString().c_str()); in GetViewBox()
214 jsonViewBox->Put("y", viewBox.Top().ToString().c_str()); in GetViewBox()
215 jsonViewBox->Put("width", viewBox.Width().ToString().c_str()); in GetViewBox()
216 jsonViewBox->Put("height", viewBox.Height().ToString().c_str()); in GetViewBox()
/foundation/arkui/ace_engine/frameworks/core/components/shape/
H A Dshape_container_component.h121 void SetViewBox(const ShapeViewBox& viewBox) in SetViewBox() argument
123 viewBox_ = viewBox; in SetViewBox()
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/
H A Djs_shape.cpp79 ShapeViewBox viewBox; in SetViewPort() local

Completed in 14 milliseconds