Home
last modified time | relevance | path

Searched refs:viewBox (Results 1 – 25 of 47) sorted by relevance

12

/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/parse/
H A Dsvg_svg.cpp62 auto viewBox = GetViewBox(); in AdjustContentAreaByViewBox() local
63 if (LessOrEqual(viewBox.Width(), 0.0) || LessOrEqual(viewBox.Height(), 0.0)) { in AdjustContentAreaByViewBox()
72 … auto scale = std::min(viewPort.Width() / viewBox.Width(), viewPort.Height() / viewBox.Height()); in AdjustContentAreaByViewBox()
77 canvas.Translate(-1 * viewBox.Left(), -1 * viewBox.Top()); in AdjustContentAreaByViewBox()
85 canvas.Translate(-1 * viewBox.Left(), -1 * viewBox.Top()); in AdjustContentAreaByViewBox()
93 canvas.Translate(-1 * viewBox.Left(), -1 * viewBox.Top()); in AdjustContentAreaByViewBox()
98 auto scale = std::min(svgSize.Width() / viewBox.Width(), svgSize.Height() / viewBox.Height()); in AdjustContentAreaByViewBox()
103 canvas.Translate(-1 * viewBox.Left(), -1 * viewBox.Top()); in AdjustContentAreaByViewBox()
113 return svgAttr_.viewBox; in GetViewBox()
135 attr.viewBox = Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3]); in ParseAndSetSpecializedAttr()
[all …]
H A Dsvg_use.cpp97 std::vector<double> viewBox; in ParseAndSetSpecializedAttr() local
98 StringUtils::StringSplitter(val, ' ', viewBox); in ParseAndSetSpecializedAttr()
99 if (viewBox.size() == 4) { in ParseAndSetSpecializedAttr()
100 attr.viewBox = Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3]); in ParseAndSetSpecializedAttr()
108 std::vector<double> viewBox; in ParseAndSetSpecializedAttr() local
109 StringUtils::StringSplitter(val, ' ', viewBox); in ParseAndSetSpecializedAttr()
110 if (viewBox.size() == 4) { in ParseAndSetSpecializedAttr()
111 attr.viewBox = Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3]); in ParseAndSetSpecializedAttr()
H A Dsvg_pattern.cpp66 std::vector<double> viewBox; in ParseAndSetSpecializedAttr() local
67 StringUtils::StringSplitter(val, ' ', viewBox); in ParseAndSetSpecializedAttr()
68 if (viewBox.size() == 4) { in ParseAndSetSpecializedAttr()
69 attr.viewBox = Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3]); in ParseAndSetSpecializedAttr()
H A Dsvg_image.cpp153 RSRect SvgImage::CalcDstRect(const Size& realSize, const Rect& viewBox) in CalcDstRect() argument
158 …auto scaleValue = std::min(viewBox.Width() / realSize.Width(), viewBox.Height() / realSize.Height(… in CalcDstRect()
159 auto spaceX = viewBox.Width() - realSize.Width() * scaleValue; in CalcDstRect()
160 auto spaceY = viewBox.Height() - realSize.Height() * scaleValue; in CalcDstRect()
161 auto offsetX = viewBox.Left() + spaceX * 0.5f; // 0.5f Align Center in CalcDstRect()
162 auto offsetY = viewBox.Top() + spaceY * 0.5f; // 0.5f Align Center in CalcDstRect()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/declaration/svg/
H A Dsvg_declaration.cpp68 std::vector<double> viewBox; in SetSpecializedValue() local
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() local
80 StringUtils::StringSplitter(val, ' ', viewBox); in SetSpecializedValue()
81 if (viewBox.size() == 4) { in SetSpecializedValue()
82 declaration.SetViewBox(Rect(viewBox[0], viewBox[1], viewBox[2], viewBox[3])); in SetSpecializedValue()
H A Dsvg_pattern_declaration.cpp59 std::vector<double> viewBox; in SetSpecializedAttr() local
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()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/
H A Dsvg_utils.cpp21 const Size& svgSize, const Rect& viewBox) in CalculateSvgConentSize() argument
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()
H A Dsvg_context.h88 void SetRootViewBox(const Rect& viewBox) in SetRootViewBox() argument
90 rootViewBox_ = viewBox; in SetRootViewBox()
H A Dsvg_ulils.h27 const Size& svgSize, const Rect& viewBox);
/ohos5.0/docs/zh-cn/application-dev/reference/apis-arkui/arkui-js/
H A Djs-components-svg.md32viewBox | string | - | 否 | 设置当前svg的视口。支持的格式为&lt;number&nbsp;numb…
41 <svg width="200" height="200" viewBox="0 0 100 100">
45 <svg x="0" y="0" width="200" height="200" viewBox="0 0 200 200">
48 <svg x="0" y="0" width="200" height="200" viewBox="0 0 400 400">
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/
H A Dshape_model_impl.cpp53 ShapeViewBox viewBox; in SetViewPort() local
54 viewBox.SetLeft(dimLeft, option); in SetViewPort()
55 viewBox.SetTop(dimTop, option); in SetViewPort()
56 viewBox.SetWidth(dimWidth, option); in SetViewPort()
57 viewBox.SetHeight(dimHeight, option); in SetViewPort()
58 component->SetViewBox(viewBox); in SetViewPort()
/ohos5.0/docs/zh-cn/application-dev/ui/
H A Dui-js-components-svg-overview.md45 通过设置width、height、x、y和viewBox属性为Svg设置宽度、高度、x轴坐标、y轴坐标和Svg视口。
51 <svg width="400" height="400" viewBox="0 0 100 100">
82 > - viewBox的宽高和svg的宽高不一致,会以中心对齐进行缩放。
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_v2/inspector/
H A Dshape_container_composed_element.cpp213 auto viewBox = render->GetShapeViewBox(); in GetViewBox() local
214 jsonViewBox->Put("x", viewBox.Left().ToString().c_str()); in GetViewBox()
215 jsonViewBox->Put("y", viewBox.Top().ToString().c_str()); in GetViewBox()
216 jsonViewBox->Put("width", viewBox.Width().ToString().c_str()); in GetViewBox()
217 jsonViewBox->Put("height", viewBox.Height().ToString().c_str()); in GetViewBox()
/ohos5.0/docs/en/application-dev/reference/apis-arkui/arkui-js/
H A Djs-components-svg.md32 | viewBox | string | - | No | View box of the curren…
41 <svg width="200" height="200" viewBox="0 0 100 100">
45 <svg x="0" y="0" width="200" height="200" viewBox="0 0 200 200">
48 <svg x="0" y="0" width="200" height="200" viewBox="0 0 400 400">
/ohos5.0/docs/en/application-dev/ui/
H A Dui-js-components-svg-overview.md45 Set the **width**, **height**, **x**, **y**, and **viewBox** attributes to define the width, height…
51 <svg width="400" height="400" viewBox="0 0 100 100">
83 > - If the width and height of **viewBox** are inconsistent with those of the **&lt;svg&gt;** compo…
/ohos5.0/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 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()
/ohos5.0/foundation/arkui/ace_engine/test/mock/core/svg/
H A Dmock_svg_utils.cpp21 const Size& svgSize, const Rect& viewBox) in CalculateSvgConentSize() argument
/ohos5.0/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()
/ohos5.0/base/global/system_resources/systemres/main/resources/base/media/
H A Dohos_ic_public_device_pad.svg1 <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m20.5 3…
H A Dohos_ic_public_device_smartscreen.svg1 <svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="m22.718…
H A Dohos_semi_modal_bar_down.svg1 <svg id="??_2" data-name="?? 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 80"><defs><styl…
H A Dohos_semi_modal_bar_middle.svg1 <svg id="??_2" data-name="?? 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 80"><defs><styl…

12