/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/list/ |
H A D | list_item_layout_algorithm.cpp | 107 float mainOffset = (size.MainSize(axis_) - childSize.MainSize(axis_)) / 2; in Layout() local 108 OffsetF offset = axis_ == Axis::VERTICAL ? OffsetF(crossOffset, mainOffset) : OffsetF(mainOffset, crossOffset); in Layout() 117 float mainOffset = (size.MainSize(axis_) - childSize.MainSize(axis_)) / 2; in Layout() local 118 OffsetF offset = axis_ == Axis::VERTICAL ? OffsetF(crossOffset, mainOffset) : OffsetF(mainOffset, crossOffset); in Layout()
|
H A D | list_pattern.cpp | 2338 float mainOffset = GetAxis() == Axis::VERTICAL ? relativeY : relativeX; 2346 if (mainOffset <= pos.second.endPos + spaceWidth_ / 2) { /* 2:half */
|
/foundation/arkui/ace_engine/frameworks/core/components/list/ |
H A D | rosen_render_list_item.cpp | 359 double mainOffset = offset.GetY(); in PaintCurrentSticky() local 370 gray *= (-mainOffset) / itemSize.Height(); in PaintCurrentSticky() 381 double mainOffset = offset.GetY(); in PaintNextSticky() local 385 mainOffset = 0.0; // Make the background same as current sticky item. in PaintNextSticky() 387 mainOffset = std::clamp(mainOffset, 0.0, itemSize.Height()); in PaintNextSticky() 389 radius = radius + (RADIUS_START - radius) * pow(mainOffset / itemSize.Height(), 3.0); in PaintNextSticky() 392 uint8_t gray = GREY_END1 * (itemSize.Height() - mainOffset) / itemSize.Height(); in PaintNextSticky() 418 double mainOffset = std::abs(offset.GetY()); in PaintFadeOutEffect() local 419 double opacity = std::max(FADE_END1, FADE_START1 - mainOffset / heigh in PaintFadeOutEffect() [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/waterflow/layout/top_down/ |
H A D | water_flow_segmented_layout.cpp | 145 : info->currentOffset_ + info->itemInfos_[info->startIndex_].mainOffset; in PrepareJump() 387 const bool isAbove = Negative(info_->currentOffset_ + item.mainOffset); in TransformAutoScroll() 388 const bool isBelow = GreatNotEqual(info_->currentOffset_ + item.mainOffset + item.mainSize, mainSize_); in TransformAutoScroll() 407 offset = -item.mainOffset; in SolveJumpOffset() 411 offset = -(item.mainOffset + item.mainSize / 2.0f) + mainSize_ / 2.0f; in SolveJumpOffset() 415 offset = -(item.mainOffset + item.mainSize) + mainSize_; in SolveJumpOffset() 492 auto mainOffset = item.mainOffset + info_->currentOffset_; in LayoutItem() local 494 mainOffset = mainSize_ - item.mainSize - mainOffset; in LayoutItem() [all...] |
H A D | water_flow_layout_info.h | 200 // Map structure: [crossIndex, [index, {mainOffset, itemMainSize}]], 233 ItemInfo(int32_t cross, float offset, float size) : crossIdx(cross), mainOffset(offset), mainSize(size) {} in ItemInfo() 236 return crossIdx == other.crossIdx && mainOffset == other.mainOffset && mainSize == other.mainSize; in operator ==() 240 float mainOffset = 0.0f; member
|
H A D | water_flow_layout_algorithm.cpp | 229 auto mainOffset = item.second.first + layoutInfo_->currentOffset_; in Layout() local 234 mainOffset = mainSize_ - item.second.second - mainOffset; in Layout() 237 currentOffset += OffsetF(crossOffset, mainOffset); in Layout() 239 currentOffset += OffsetF(mainOffset, crossOffset); in Layout() 250 layoutInfo_->storedOffset_ = mainOffset; in Layout() 253 if (!isCache && NonNegative(mainOffset + item.second.second)) { in Layout() 279 auto mainOffset = layoutInfo_->GetMaxMainHeight() + layoutInfo_->currentOffset_; in LayoutFooter() local 281 mainOffset = mainSize_ - footerMainSize_ - mainOffset; in LayoutFooter() [all...] |
H A D | water_flow_layout_info.cpp | 118 return itemInfos_[itemIndex].mainOffset + itemInfos_[itemIndex].mainSize; in GetMainHeight() 138 return itemInfos_[itemIndex].mainOffset; in GetStartMainPos() 370 [](const ItemInfo& info, float value) { return LessNotEqual(info.mainOffset, value); }); in FastSolveEndIndex() 373 while (it != itemInfos_.end() && NearZero(it->mainSize) && NearEqual(it->mainOffset, endBound)) { in FastSolveEndIndex()
|
/foundation/arkui/ace_engine/frameworks/base/geometry/ng/ |
H A D | offset_t.h | 35 OffsetT(T crossOffset, T mainOffset, Axis axis) in OffsetT() argument 38 x_ = mainOffset; in OffsetT() 42 y_ = mainOffset; in OffsetT()
|
/foundation/arkui/ace_engine/frameworks/core/components/scroll/ |
H A D | render_multi_child_scroll.cpp | 367 double mainOffset = GetMainOffset(curOffset); in OnPredictLayout() local 372 layoutHead = layoutHead - cacheExtent_ + mainOffset; in OnPredictLayout() 373 layoutTail = layoutTail + cacheExtent_ + mainOffset; in OnPredictLayout() 375 layoutHead = layoutHead - cacheExtent_ - mainOffset; in OnPredictLayout() 376 layoutTail = layoutTail + cacheExtent_ - mainOffset; in OnPredictLayout() 405 double mainOffset = GetMainOffset(curOffset); in LayoutChild() local 408 if (lastChild && mainOffset >= mainExtent + cacheExtent_) { in LayoutChild() 413 if (mainOffset <= -cacheExtent_) { in LayoutChild() 421 layoutHead = layoutHead - cacheExtent_ + mainOffset; in LayoutChild() 422 layoutTail = layoutTail + cacheExtent_ + mainOffset; in LayoutChild() [all...] |
H A D | render_scroll.cpp | 295 double mainOffset = GetMainOffset(currentOffset); in CanScrollVertically() local 296 if (NearZero(mainOffset)) { in CanScrollVertically() 299 } else if (NearEqual(mainOffset, mainScrollExtent_ - GetMainSize(viewPort_)) && ReachMaxCount()) { in CanScrollVertically() 509 double mainOffset = GetMainOffset(currentOffset_); in ResetScrollEventCallBack() local 511 if (NearZero(mainOffset)) { in ResetScrollEventCallBack()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/waterflow/ |
H A D | water_flow_segment_integrated.cpp | 82 EXPECT_EQ(info->itemInfos_[60].mainOffset, 6658.0f); in HWTEST_F() 83 EXPECT_EQ(info->itemInfos_[9].mainOffset, 306.0f); in HWTEST_F() 84 EXPECT_EQ(info->itemInfos_[10].mainOffset, 511.0f); in HWTEST_F() 128 EXPECT_EQ(info->itemInfos_[5].mainOffset, 408.0f); in HWTEST_F() 260 EXPECT_EQ(info->itemInfos_[3].mainOffset, 319.0f); in HWTEST_F() 304 EXPECT_EQ(info->itemInfos_[3].mainOffset, 305.0f); in HWTEST_F() 311 EXPECT_EQ(info->itemInfos_[7].mainOffset, 613.0f); in HWTEST_F()
|
H A D | water_flow_segment_layout_test.cpp | 237 EXPECT_EQ(info->itemInfos_[12].mainOffset, 503.0f); in HWTEST_F() 259 EXPECT_EQ(info->itemInfos_[8].mainOffset, 202.0f); in HWTEST_F() 284 EXPECT_EQ(info->itemInfos_[8].mainOffset, 401.0f); in HWTEST_F() 754 EXPECT_EQ(info->itemInfos_[info->startIndex_].mainOffset + info->currentOffset_, -188.0f); in HWTEST_F() 1054 EXPECT_EQ(info->itemInfos_[69].mainOffset, 7283.0f); in HWTEST_F() 1093 EXPECT_EQ(info->itemInfos_[4].mainOffset, 438.0f); in HWTEST_F()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/grid/irregular/ |
H A D | grid_irregular_layout_algorithm.cpp | 379 /* adjust mainOffset to the first cache line */ 381 float mainGap, float& mainOffset) in AdjustStartOffset() 385 mainOffset -= mainGap + it->second; in AdjustStartOffset() 390 void GridIrregularLayoutAlgorithm::LayoutChildren(float mainOffset, int32_t cacheLine) in LayoutChildren() argument 397 mainOffset += info.axis_ == Axis::HORIZONTAL ? 0.0f : padding.top.value_or(0.0f); in LayoutChildren() 404 AdjustStartOffset(info.lineHeightMap_, info.startMainLineIndex_, cacheStartLine, mainGap_, mainOffset); in LayoutChildren() 428 OffsetF offset = OffsetF(crossPos[c], mainOffset, info.axis_); in LayoutChildren() 442 mainOffset += lineHeightIt->second + mainGap_; in LayoutChildren() 380 AdjustStartOffset(const std::map<int32_t, float>& lineHeights, int32_t startLine, int32_t cacheStartLine, float mainGap, float& mainOffset) AdjustStartOffset() argument
|
H A D | grid_irregular_layout_algorithm.h | 90 * @param mainOffset The main offset of the layout. 93 void LayoutChildren(float mainOffset, int32_t cacheLine);
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/toggle/ |
H A D | switch_pattern.h | 178 bool IsOutOfBoundary(double mainOffset) const;
|
H A D | switch_pattern.cpp | 547 bool SwitchPattern::IsOutOfBoundary(double mainOffset) const in IsOutOfBoundary() 549 return mainOffset < 0 || mainOffset > GetSwitchWidth(); in IsOutOfBoundary()
|
/foundation/arkui/ace_engine/frameworks/core/components_v2/grid/ |
H A D | render_grid_scroll.cpp | 295 double mainOffset = (mainLen - GetSize(child->GetLayoutSize())) / 2.0; in SetChildPosition() local 300 offset = Offset(positionCross + crossOffset, positionMain + mainOffset - firstItemOffset_); in SetChildPosition() 303 offset = Offset(positionMain + mainOffset + firstItemOffset_, positionCross + crossOffset); in SetChildPosition() 305 offset = Offset(positionMain + mainOffset - firstItemOffset_, positionCross + crossOffset); in SetChildPosition() 1559 auto mainOffset = ctx->ConvertPxToVp(Dimension(GetCurrentOffset(), DimensionUnit::PX)); in CurrentOffset() local 1560 Offset currentOffset = useScrollable_ == SCROLLABLE::HORIZONTAL ? Offset(mainOffset, 0.0) : Offset(0.0, mainOffset); in CurrentOffset()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/swiper/ |
H A D | swiper_pattern.h | 724 bool IsOutOfBoundary(float mainOffset = 0.0f) const; 725 bool IsOutOfStart(float mainOffset = 0.0f) const; 726 bool IsOutOfEnd(float mainOffset = 0.0f) const; 727 bool AutoLinearIsOutOfBoundary(float mainOffset) const;
|
H A D | swiper_pattern.cpp | 3848 bool SwiperPattern::IsOutOfBoundary(float mainOffset) const 3854 mainOffset = -mainOffset; 3859 auto isOutOfStart = itemPosition_.begin()->first == 0 && GreatNotEqual(startPos + mainOffset, 0.0); 3861 auto endPos = itemPosition_.rbegin()->second.endPos + mainOffset + AdjustIgnoreBlankOverScrollOffSet(false); 3867 bool SwiperPattern::IsOutOfStart(float mainOffset) const 3873 mainOffset = -mainOffset; 3878 return itemPosition_.begin()->first == 0 && GreatNotEqual(startPos + mainOffset, 0.f); 3881 bool SwiperPattern::IsOutOfEnd(float mainOffset) cons [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_v2/list/ |
H A D | render_list.h | 353 size_t GetNearChildByPosition(double mainOffset) const;
|
H A D | render_list.cpp | 1785 auto mainOffset = ctx->ConvertPxToVp(Dimension(currentOffset, DimensionUnit::PX)); in CurrentOffset() local 1786 return vertical_ ? Offset(0.0, mainOffset) : Offset(mainOffset, 0.0); in CurrentOffset() 2090 size_t RenderList::GetNearChildByPosition(double mainOffset) const in GetNearChildByPosition() 2097 if (childMainOffset > mainOffset) { in GetNearChildByPosition()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/scrollable/ |
H A D | scrollable_pattern.cpp | 1892 auto mainOffset = mouseEndOffset_.GetMainOffset(axis_); in LimitMouseEndOffset() local 1894 if (LessNotEqual(mainOffset, 0.0f)) { in LimitMouseEndOffset() 1897 if (GreatNotEqual(mainOffset, mainSize)) { in LimitMouseEndOffset()
|