Home
last modified time | relevance | path

Searched refs:svgSize (Results 1 – 11 of 11) sorted by relevance

/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/
H A Dsvg_fit_convertor.cpp45 if (NearZero(svgSize.Width()) || NearZero(svgSize.Height())) { in ApplyFit()
52 FIT_OPERATIONS[fitIndex](canvas, layoutSize, svgSize); in ApplyFit()
57 canvas.Scale(layoutSize.Width() / svgSize.Width(), layoutSize.Height() / svgSize.Height()); in ApplyFill()
62 AdjustContentFit(canvas, layoutSize, svgSize, in ApplyContain()
63 …std::min(layoutSize.Width() / svgSize.Width(), layoutSize.Height() / svgSize.Height()), Alignment:… in ApplyContain()
68 AdjustContentFit(canvas, layoutSize, svgSize, in ApplyCover()
69 …std::max(layoutSize.Width() / svgSize.Width(), layoutSize.Height() / svgSize.Height()), Alignment:… in ApplyCover()
74 …AdjustContentFit(canvas, layoutSize, svgSize, layoutSize.Width() / svgSize.Width(), Alignment::CEN… in ApplyWidth()
79 …AdjustContentFit(canvas, layoutSize, svgSize, layoutSize.Height() / svgSize.Height(), Alignment::C… in ApplyHeight()
89 …auto scale = std::min(layoutSize.Width() / svgSize.Width(), layoutSize.Height() / svgSize.Height()… in ApplyScaleDown()
[all …]
H A Dsvg_fit_convertor.h30 static void ApplyFill(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
31 static void ApplyContain(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
32 static void ApplyCover(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
33 static void ApplyWidth(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
34 static void ApplyHeight(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
35 static void ApplyNone(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
36 static void ApplyScaleDown(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
37 … static void ApplyAlignmentTopLeft(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
38 static void ApplyAlignmentTop(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
41 static void ApplyAlignmentCenter(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize);
[all …]
H A Dsvg_utils.cpp21 const Size& svgSize, const Rect& viewBox) in CalculateSvgConentSize() argument
24 …svgContentSize.SetWidth(LessNotEqual(svgSize.Width(), 0.0) ? svgContainerSize.Width() : svgSize.Wi… in CalculateSvgConentSize()
25 …svgContentSize.SetHeight(LessNotEqual(svgSize.Height(), 0.0) ? svgContainerSize.Height() : svgSize in CalculateSvgConentSize()
28 if (LessNotEqual(svgSize.Width(), 0.0) && LessNotEqual(svgSize.Height(), 0.0)) { in CalculateSvgConentSize()
33 if (LessNotEqual(svgSize.Width(), 0.0)) { in CalculateSvgConentSize()
34 svgContentSize.SetWidth(viewBox.Width() / viewBox.Height() * svgSize.Height()); in CalculateSvgConentSize()
35 svgContentSize.SetHeight(svgSize.Height()); in CalculateSvgConentSize()
38 if (LessNotEqual(svgSize.Height(), 0.0)) { in CalculateSvgConentSize()
39 svgContentSize.SetWidth(svgSize.Width()); in CalculateSvgConentSize()
43 svgContentSize.SetWidth(svgSize.Width()); in CalculateSvgConentSize()
[all …]
H A Dsvg_ulils.h27 const Size& svgSize, const Rect& viewBox);
/ohos5.0/foundation/arkui/ace_engine/test/mock/core/svg/
H A Dmock_svg_fit_convertor.cpp19 const Size& layoutSize, const Size& svgSize)> SvgFitConvertor::FIT_OPERATIONS = {
24 FIT_OPERATIONS[0](canvas, layoutSize, svgSize); in ApplyFit()
27 void SvgFitConvertor::ApplyFill(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyFill() argument
30 void SvgFitConvertor::ApplyContain(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyContain() argument
33 void SvgFitConvertor::ApplyCover(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyCover() argument
36 void SvgFitConvertor::ApplyWidth(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyWidth() argument
39 void SvgFitConvertor::ApplyHeight(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyHeight() argument
42 void SvgFitConvertor::ApplyNone(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyNone() argument
45 void SvgFitConvertor::ApplyScaleDown(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyScaleDown() argument
51 …d SvgFitConvertor::ApplyAlignmentTop(RSCanvas& canvas, const Size& layoutSize, const Size& svgSize) in ApplyAlignmentTop() argument
[all …]
H A Dmock_svg_utils.cpp21 const Size& svgSize, const Rect& viewBox) in CalculateSvgConentSize() argument
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/parse/
H A Dsvg_svg.cpp61 auto svgSize = GetSize(); in AdjustContentAreaByViewBox() local
64 …RSRect clipRect(0.0f, 0.0f, LessNotEqual(svgSize.Width(), 0.0) ? viewPort.Width() : svgSize.Width(… in AdjustContentAreaByViewBox()
65 LessNotEqual(svgSize.Height(), 0.0) ? viewPort.Height() : svgSize.Height()); in AdjustContentAreaByViewBox()
69 if (LessNotEqual(svgSize.Width(), 0.0) && LessNotEqual(svgSize.Height(), 0.0)) { in AdjustContentAreaByViewBox()
80 if (LessNotEqual(svgSize.Width(), 0.0)) { in AdjustContentAreaByViewBox()
81 …RSRect clipRect(0.0f, 0.0f, viewBox.Width() / viewBox.Height() * svgSize.Height(), svgSize.Height(… in AdjustContentAreaByViewBox()
88 if (LessNotEqual(svgSize.Height(), 0.0)) { in AdjustContentAreaByViewBox()
89 …RSRect clipRect(0.0f, 0.0f, svgSize.Width(), viewBox.Height() / viewBox.Width() * svgSize.Width()); in AdjustContentAreaByViewBox()
91 auto scaleX = svgSize.Width() / viewBox.Width(); in AdjustContentAreaByViewBox()
96 RSRect clipRect(0.0f, 0.0f, svgSize.Width(), svgSize.Height()); in AdjustContentAreaByViewBox()
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/box/
H A Drosen_mask_painter.cpp215 if (svgSize.IsInfinite() || !svgSize.IsValid()) { in UpadteSVGImageDom()
219 boxSize = svgSize; in UpadteSVGImageDom()
236 if (svgSize.Width() <= 0 || svgSize.Height() <= 0) { in UpadteSVGImageDom()
265 scaleX_ = fmax(boxSize.Width() / svgSize.Width(), boxSize.Height() / svgSize.Height()); in UpdateSVGScale()
267 svgSize.ApplyScale(scaleX_); in UpdateSVGScale()
273 scaleX_ = fmin(boxSize.Width() / svgSize.Width(), boxSize.Height() / svgSize.Height()); in UpdateSVGScale()
282 svgSize.SetWidth(valueX); in UpdateSVGScale()
285 svgSize.SetWidth(svgSize.Width() * scaleX_); in UpdateSVGScale()
291 svgSize.SetHeight(svgSize.Height() * scaleY_); in UpdateSVGScale()
294 svgSize.SetHeight(valueY); in UpdateSVGScale()
[all …]
H A Drosen_mask_painter.h58 void UpdateSVGScale(const Size& boxSize, Size& svgSize);
/ohos5.0/foundation/multimedia/image_framework/plugins/common/libs/image/libsvgplugin/src/
H A Dsvg_decoder.cpp138 .width = svgSize.width(), in AllocDmaBuffer()
139 .height = svgSize.height(), in AllocDmaBuffer()
412 auto svgSize = svgDom_->containerSize(); in AllocBuffer() local
413 if (svgSize.isEmpty()) { in AllocBuffer()
417 uint32_t width = Float2UInt32(svgSize.width()); in AllocBuffer()
418 uint32_t height = Float2UInt32(svgSize.height()); in AllocBuffer()
423 ret = AllocDmaBuffer(context, byteCount, svgSize); in AllocBuffer()
539 auto svgSize = svgDom_->containerSize(); in DoSetDecodeOptions() local
540 if (svgSize.isEmpty()) { in DoSetDecodeOptions()
582 auto svgSize = svgDom_->containerSize(); in DoGetImageSize() local
[all …]
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/svg/parse/
H A Dsvg_dom.h51 Size svgSize; member