Home
last modified time | relevance | path

Searched refs:HALF (Results 1 - 25 of 99) sorted by relevance

1234

/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/slider/
H A Dslider_tip_modifier.cpp35 constexpr float HALF = 0.5f; member
115 textOffset_.SetX(vertex_.GetX() - textSize.Width() * HALF); in PaintText()
117 textOffset_.SetY(vertex_.GetY() + (bubbleSize_.Height() - textSize.Height() + arrowSizeHeight) * HALF); in PaintText()
119 textOffset_.SetY(vertex_.GetY() - (bubbleSize_.Height() + textSize.Height() + arrowSizeHeight) * HALF); in PaintText()
122 textOffset_.SetY(vertex_.GetY() - textSize.Height() * HALF); in PaintText()
126 (bubbleSize_.Width() - textSize.Width() + arrowSizeHeight + circularOffset - arrowSizeWidth) * HALF); in PaintText()
130 (bubbleSize_.Width() + textSize.Width() + arrowSizeHeight + circularOffset - arrowSizeWidth) * HALF); in PaintText()
143 float circularRadius = (bubbleSize_.Height() - arrowSizeHeight) * HALF; in PaintHorizontalBubble()
145 vertex_.AddY(vertexOffsetFromBlock / HALF); in PaintHorizontalBubble()
150 path.LineTo(vertex_.GetX() + arrowSizeWidth * HALF, vertex in PaintHorizontalBubble()
[all...]
H A Dslider_content_modifier.cpp23 constexpr float HALF = 0.5f; member
44 trackBorderRadius_ = AceType::MakeRefPtr<AnimatablePropertyFloat>(parameters.trackThickness * HALF); in SliderContentModifier()
231 canvas.DrawCircle(RSPoint(endX, endY), stepSize * HALF); in DrawStep() local
238 canvas.DrawCircle(RSPoint(startX, startY), stepSize * HALF); in DrawStep() local
251 if (!NearEqual(selectStart_->Get().GetX(), selectEnd_->Get().GetX(), HALF) || in DrawSelect()
252 !NearEqual(selectStart_->Get().GetY(), selectEnd_->Get().GetY(), HALF)) { in DrawSelect()
261 insetOffset = std::max(selectedBorderRadius, trackThickness * HALF); in DrawSelect()
294 float blockRadius = std::min(blockSize.Width(), blockSize.Height()) * HALF; in DrawDefaultBlock()
298 if (GreatOrEqual(borderWidth * HALF, radius)) { in DrawDefaultBlock()
301 radius = std::min(blockSize.Width(), blockSize.Height()) * HALF in DrawDefaultBlock()
[all...]
H A Dslider_paint_method.cpp20 constexpr float HALF = 0.5f; member
76 auto trackBorderRadius = paintProperty->GetTrackBorderRadiusValue(Dimension(parameters_.trackThickness * HALF)); in UpdateBorderRadius()
77 if (GreatOrEqual(trackBorderRadius.ConvertToPx(), parameters_.trackThickness * HALF)) { in UpdateBorderRadius()
78 trackBorderRadius = Dimension(parameters_.trackThickness * HALF); in UpdateBorderRadius()
88 if (GreatOrEqual(selectedBorderRadius.ConvertToPx(), parameters_.trackThickness * HALF)) { in UpdateBorderRadius()
89 selectedBorderRadius = Dimension(parameters_.trackThickness * HALF); in UpdateBorderRadius()
H A Dslider_layout_algorithm.cpp23 constexpr float HALF = 0.5f; member
126 sliderWidth = std::max(sliderWidth, blockWidth + static_cast<float>(hotBlockShadowWidth.ConvertToPx()) / HALF); in CalculateSliderWidth()
217 auto borderBlank = std::max(trackThickness_, blockSize + BlockShadowWidth / HALF); in Layout()
219 borderBlank = (length - sliderLength) * HALF; in Layout()
244 circleCenter.SetY(contentRect.Height() * HALF); in CalculateBlockOffset()
246 circleCenter.SetX(contentRect.Width() * HALF); in CalculateBlockOffset()
252 circleCenter.SetY(contentRect.Height() * HALF); in CalculateBlockOffset()
254 circleCenter.SetX(contentRect.Width() * HALF); in CalculateBlockOffset()
262 circleCenter.GetX() - childSize_.Width() * HALF, circleCenter.GetY() - childSize_.Height() * HALF); in CalculateBlockOffset()
[all...]
H A Dslider_pattern.cpp43 constexpr float HALF = 0.5; member
261 auto pointOffsetWidth = pointSize.Width() * HALF; in UpdateStepAccessibilityVirtualNode()
262 auto pointOffsetHeight = pointSize.Height() * HALF; in UpdateStepAccessibilityVirtualNode()
525 borderBlank_ = std::max(trackThickness_, blockLength + hotBlockShadowWidth_ / HALF); in UpdateParameters()
527 borderBlank_ = trackThickness_ + hotBlockShadowWidth_ / HALF; in UpdateParameters()
533 borderBlank_ = (length - sliderLength_) * HALF; in UpdateParameters()
593 float sideHotSizeX = blockHotSize_.Width() * HALF; in AtMousePanArea()
594 float sideHotSizeY = blockHotSize_.Height() * HALF; in AtMousePanArea()
600 double distanceCircle = std::min(blockSize_.Width(), blockSize_.Height()) * HALF + hotBlockShadowWidth_; in AtMousePanArea()
605 float sideHotSizeX = blockSize_.Width() * HALF; in AtMousePanArea()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/panel/
H A Dsliding_panel_pattern.cpp173 : layoutProperty->GetPanelMode().value_or(PanelMode::HALF); in Update()
181 : layoutProperty->GetPanelMode().value_or(PanelMode::HALF); in Update()
186 if (mode == PanelMode::HALF && type_ == PanelType::MINI_BAR) { in Update()
190 mode = PanelMode::HALF; in Update()
198 AnimateTo(defaultBlankHeights_[mode_.value_or(PanelMode::HALF)], mode_.value_or(PanelMode::HALF)); in Update()
199 if (previousMode_ != mode_.value_or(PanelMode::HALF)) { in Update()
225 defaultBlankHeights_[PanelMode::HALF] = maxSize.Height() - halfHeight; in InitializeLayoutProps()
231 (defaultBlankHeights_[PanelMode::HALF] - defaultBlankHeights_[PanelMode::FULL]) / 2.0; in InitializeLayoutProps()
232 halfMiniBoundary_ = defaultBlankHeights_[PanelMode::HALF] in InitializeLayoutProps()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/tip/
H A Drender_tip.cpp24 constexpr double HALF = 0.5; member
64 border_.SetBorderRadius(direction_ == Axis::VERTICAL ? Radius(Dimension(childSize_.Width() * HALF, in PerformLayout()
65 DimensionUnit::PX)) : Radius(Dimension(childSize_.Height() * HALF, DimensionUnit::PX))); in PerformLayout()
79 padding_.SetTop(Dimension(widthChange * HALF, DimensionUnit::PX)); in AdaptChildPadding()
80 padding_.SetBottom(Dimension(widthChange * HALF, DimensionUnit::PX)); in AdaptChildPadding()
83 double paddingTopBottom = (selfSize.Width() - NormalizeToPx(TIP_SPACING) - childSize.Width()) * HALF; in AdaptChildPadding()
93 padding_.SetLeft(Dimension(widthChange * HALF, DimensionUnit::PX)); in AdaptChildPadding()
94 padding_.SetRight(Dimension(widthChange * HALF, DimensionUnit::PX)); in AdaptChildPadding()
97 double paddingTopBottom = (selfSize.Height() - NormalizeToPx(TIP_SPACING) - childSize.Height()) * HALF; in AdaptChildPadding()
/foundation/arkui/ace_engine/frameworks/core/components/slider/
H A Drosen_render_circle_block.cpp32 constexpr double HALF = 0.5; member
55 double radius = NormalizeToPx(blockSize_) * HALF * radiusScale_; in SyncGeometryProperties()
80 offsetX = hoverRadius > shadowRect.width() * HALF ? hoverRadius : shadowRect.width() * HALF; in SyncGeometryProperties()
81 offsetY = hoverRadius > shadowRect.height() * HALF ? hoverRadius : shadowRect.height() * HALF; in SyncGeometryProperties()
84 offsetX = pressRadius > shadowRect.width() * HALF ? pressRadius : shadowRect.width() * HALF; in SyncGeometryProperties()
85 offsetY = pressRadius > shadowRect.height() * HALF ? pressRadius : shadowRect.height() * HALF; in SyncGeometryProperties()
[all...]
H A Drosen_render_slider.cpp74 double dxOffset = GetLayoutSize().Width() * HALF; in PerformLayout()
89 double dyOffset = GetLayoutSize().Height() * HALF; in PerformLayout()
175 Offset trackPosition = Offset(dxOffset - track->GetTrackThickness() * HALF, trackPositionHorizontal); in ProcessTrack()
193 Offset trackPosition = Offset(trackPositionHorizontal, dyOffset - track->GetTrackThickness() * HALF); in ProcessTrack()
214 double childHalfHeight = renderTip->GetChildSize().Height() * HALF; in SetTipPosition()
216 Offset(-tipLayoutWidth - HALF * (NormalizeToPx(blockHotWidth_) - NormalizeToPx(hotWidth_)), in SetTipPosition()
219 double childHalfWidth = renderTip->GetChildSize().Width() * HALF; in SetTipPosition()
221 renderTip->SetPosition(Offset(blockOffset - childHalfWidth, -tipLayoutHeight - HALF * in SetTipPosition()
344 trackFocusRadius = trackFocusWidth * HALF; in PaintTrackFocus()
349 trackFocusRadius = trackFocusHeight * HALF; in PaintTrackFocus()
[all...]
H A Drender_slider.cpp143 RRect::MakeRRect(Rect(Offset(), focus), focus.Height() * HALF, focus.Height() * HALF), Color::BLUE, in HandleFocus()
144 track->GetGlobalOffset() - Offset(track->GetTrackThickness() * HALF, 0.0)); in HandleFocus()
149 RRect::MakeRRect(Rect(Offset(), focus), focus.Width() * HALF, focus.Width() * HALF), Color::BLUE, in HandleFocus()
150 block->GetGlobalOffset() - Offset(focus.Width() * HALF, focus.Width() * HALF)); in HandleFocus()
571 SetTotalRatio(stepRatio * std::floor((totalRatio_ + HALF * stepRatio) / stepRatio)); in RenderBlockPosition()
607 double endRatio = stepRatio * std::floor((totalRatio + HALF * stepRatio) / stepRatio); in UpdateBlockPosition()
644 return Vertex(x + objectWidth * HALF, in FindCenterVertex()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/track/
H A Drosen_render_linear_track.cpp122 { startRect, offset.GetY(), endRect, offset.GetY() + trackHeight }, trackHeight * HALF, trackHeight * HALF); in Paint()
138 trackHeight * HALF, trackHeight * HALF); in Paint()
152 { startRect, offset.GetY(), endRect, offset.GetY() + trackHeight }, trackHeight * HALF, trackHeight * HALF); in Paint()
166 trackHeight * HALF, trackHeight * HALF); in Paint() local
183 trackHeight * HALF, trackHeight * HALF); in Paint() local
199 trackHeight * HALF, trackHeight * HALF); Paint() local
[all...]
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/animation/
H A Drs_particle_noise_field.cpp21 constexpr float HALF = 0.5f; member
27 return ((point.x_ > fieldCenter_.x_ - width * HALF) && (point.x_ < fieldCenter_.x_ + width * HALF) && in IsPointInField()
28 (point.y_ >= fieldCenter_.y_ - height * HALF) && (point.y_ < fieldCenter_.y_ + height * HALF)); in IsPointInField()
33 (normX / (width * HALF * width * HALF) + normY / (height * HALF * height * HALF) <= 1.0); in IsPointInField()
45 float left = center.x_ - size.x_ * HALF; in CalculateDistanceToRectangleEdge()
[all...]
/foundation/multimedia/image_effect/test/unittest/mock/src/
H A Dmock_picture.cpp23 constexpr uint32_t HALF = 2; member
32 std::make_shared<MockPixelMap>(mainPixelMap_->GetWidth() / HALF, mainPixelMap_->GetHeight() / HALF); in MockPicture()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/progress/
H A Dprogress_paint_method.cpp45 constexpr float HALF = 0.5; in CalculateStrokeWidth() local
52 if (strokeWidth_ >= length * HALF) { in CalculateStrokeWidth()
53 strokeWidth_ = length * HALF * HALF; in CalculateStrokeWidth()
/foundation/arkui/ace_engine/frameworks/component_test/core/
H A Dcomponent_test_tester_impl.cpp227 NG::PointF from(screenRect.Width() * HALF, screenRect.Height() * HALF); in FlingImpl()
230 to.SetX(screenRect.Width() * HALF); in FlingImpl()
231 to.SetY(screenRect.Height() * HALF - screenRect.Height() * QUARTER); in FlingImpl()
234 to.SetX(screenRect.Width() * HALF); in FlingImpl()
235 to.SetY(screenRect.Height() * HALF + screenRect.Width() * QUARTER); in FlingImpl()
238 to.SetX(screenRect.Width() * HALF - screenRect.Width() * QUARTER); in FlingImpl()
239 to.SetY(screenRect.Height() * HALF); in FlingImpl()
242 to.SetX(screenRect.Width() * HALF + screenRect.Width() * QUARTER); in FlingImpl()
243 to.SetY(screenRect.Height() * HALF); in FlingImpl()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/indexer/
H A Drender_indexer_circle.cpp82 outerRadius_ = sizeMax.Width() * HALF; in PerformLayout()
100 double itemRadius = outerRadius_ - itemSize_ * HALF; in SetItemPosition()
110 double itemRadius = outerRadius_ - itemSize_ * HALF; in SetItemPosition()
314 size.Width() * HALF - NormalizeToPx(Dimension(BUBBLE_BOX_SIZE_CIRCLE * HALF, DimensionUnit::VP))); in InitBubbleBox()
316 size.Height() * HALF * HALF - NormalizeToPx(Dimension(BUBBLE_BOX_SIZE_CIRCLE * HALF, DimensionUnit::VP))); in InitBubbleBox()
326 double itemRadius = outerRadius_ - itemSize_ * HALF; in InitIndicatorBox()
750 double hotRgnRadius = hotRgnSize_ * HALF; in CollapseItemHitTest()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/security_component/
H A Dsecurity_component_layout_algorithm.cpp23 constexpr float HALF = 2.0f; member
80 left_.ShrinkWidth((componentWidth_ / HALF) - (componentHeight_ / HALF)); in MeasureButton()
82 top_.ShrinkHeight((componentHeight_ / HALF) - (componentWidth_ / HALF)); in MeasureButton()
145 double remain = left_.ShrinkWidth(diff / HALF); in ShrinkWidth()
146 remain = right_.ShrinkWidth(remain + (diff / HALF)); in ShrinkWidth()
192 double remain = left_.EnlargeWidth(diff / HALF); in EnlargeWidth()
193 remain = right_.EnlargeWidth(remain + (diff / HALF)); in EnlargeWidth()
205 double remain = top_.ShrinkHeight(diff / HALF); in ShrinkHeight()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/panel/
H A Drender_sliding_panel.cpp180 defaultBlankHeights_[PanelMode::HALF] = in InitializeLayoutProps()
188 (defaultBlankHeights_[PanelMode::HALF] - in InitializeLayoutProps()
190 halfMiniBoundary_ = defaultBlankHeights_[PanelMode::HALF] + in InitializeLayoutProps()
192 defaultBlankHeights_[PanelMode::HALF]) / 2.0; // 2.0: half of height in InitializeLayoutProps()
209 defaultBlankHeights_[PanelMode::HALF] = std::clamp(defaultBlankHeights_[PanelMode::HALF], minBlank, maxBlank); in CheckHeightValidity()
228 panel->mode_ = panel->type_ == PanelType::MINI_BAR ? PanelMode::FULL : PanelMode::HALF; in SetDragBarCallBack()
230 panel->mode_ = panel->type_ == PanelType::MINI_BAR ? PanelMode::MINI : PanelMode::HALF; in SetDragBarCallBack()
426 case PanelType::FOLDABLE_BAR: { // FULL & HALF & MINI in HandleDragEnd()
430 case PanelType::TEMP_DISPLAY: { // FULL & HALF in HandleDragEnd()
[all...]
/foundation/multimodalinput/input/service/window_manager/src/
H A Dknuckle_glow_point.cpp37 constexpr double HALF { 2.0 };
94 Rosen::Drawing::Rect dst = Rosen::Drawing::Rect(pointX_ - traceShadow_->GetWidth() / HALF, in Draw()
95 pointY_ - traceShadow_->GetHeight() / HALF, pointX_ + traceShadow_->GetWidth() / HALF, in Draw()
/foundation/arkui/ace_engine/frameworks/core/components/checkable/
H A Drosen_render_radio.cpp23 constexpr double HALF = 0.5; member
131 double focusRadius = focusBorderHeight * HALF; in DrawFocusBorder()
138 rRect.Offset(offset.GetX() - NormalizeToPx(FOCUS_PADDING + FOCUS_BORDER_WIDTH * HALF), in DrawFocusBorder()
139 offset.GetY() - NormalizeToPx(FOCUS_PADDING + FOCUS_BORDER_WIDTH * HALF)); in DrawFocusBorder()
157 width_, height_), Radius(height_ * HALF)), PRESS_COLOR, dipScale); in DrawTouchBoard()
167 RosenUniversalPainter::DrawHoverBackground(canvas, Rect(offset, hoverSize), HOVER_COLOR, height_ * HALF); in DrawHoverBoard()
/foundation/arkui/ace_engine/frameworks/bridge/js_frontend/engine/common/
H A Dbase_animation_bridge.cpp24 constexpr Dimension HALF = 0.5_pct; member
122 { DOM_TRANSFORM_ORIGIN_CENTER_BOTTOM, { HALF, FULL } }, in HandleTransformOrigin()
123 { DOM_TRANSFORM_ORIGIN_CENTER_CENTER, { HALF, HALF } }, in HandleTransformOrigin()
124 { DOM_TRANSFORM_ORIGIN_CENTER_TOP, { HALF, ZERO } }, in HandleTransformOrigin()
126 { DOM_TRANSFORM_ORIGIN_LEFT_CENTER, { ZERO, HALF } }, in HandleTransformOrigin()
129 { DOM_TRANSFORM_ORIGIN_RIGHT_CENTER, { FULL, HALF } }, in HandleTransformOrigin()
/foundation/arkui/ace_engine/frameworks/core/components_ng/svg/parse/
H A Dsvg_svg.cpp23 constexpr float HALF = 0.5f; member
69 auto translateX = (viewPort.Width() - viewBox.Width() * scale) * HALF; in AdjustContentAreaByViewBox()
70 auto translateY = (viewPort.Height() - viewBox.Height() * scale) * HALF; in AdjustContentAreaByViewBox()
95 auto translateX = (svgSize.Width() - viewBox.Width() * scale) * HALF; in AdjustContentAreaByViewBox()
96 auto translateY = (svgSize.Height() - viewBox.Height() * scale) * HALF; in AdjustContentAreaByViewBox()
/foundation/arkui/ace_engine/frameworks/core/components_ng/image_provider/adapter/
H A Dskia_svg_dom.cpp49 constexpr float HALF = 0.5; in FitImage() local
74 tx = (layout_.Width() - svgSize_.Width() * scaleX) * HALF; in FitImage()
75 ty = (layout_.Height() - svgSize_.Height() * scaleY) * HALF; in FitImage()
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/navrouter/
H A Dnavdestination_group_node.cpp25 constexpr double HALF = 0.5; member
171 RectF(0.0f, 0.0f, frameSize.Width() * HALF, REMOVE_CLIP_SIZE), RadiusF(EdgeF(0.0f, 0.0f))); in InitSystemTransitionPush()
174 RectF(frameSize.Width() * HALF, 0.0f, frameSize.Width(), REMOVE_CLIP_SIZE), in InitSystemTransitionPush()
177 GetRenderContext()->UpdateTranslateInXY({ frameSize.Width() * HALF * isRTL, 0.0f }); in InitSystemTransitionPush()
179 titleBarNode->GetRenderContext()->UpdateTranslateInXY({ frameSize.Width() * HALF * isRTL, 0.0f }); in InitSystemTransitionPush()
280 RectF(0.0f, 0.0f, frameSize.Width() * HALF, REMOVE_CLIP_SIZE), RadiusF(EdgeF(0.0f, 0.0f))); in StartSystemTransitionPop()
283 RectF(frameSize.Width() * HALF, 0.0f, frameSize.Width(), REMOVE_CLIP_SIZE), in StartSystemTransitionPop()
287 GetRenderContext()->UpdateTranslateInXY({ frameSize.Width() * HALF * isRTL, 0.0f }); in StartSystemTransitionPop()
289 titleBarNode->GetRenderContext()->UpdateTranslateInXY({ frameSize.Width() * HALF * isRTL, 0.0f }); in StartSystemTransitionPop()
/foundation/arkui/ace_engine/frameworks/core/components/button/
H A Drosen_render_button.cpp27 constexpr double HALF = 0.5; member
503 double focusRadius = focusBorderHeight * HALF; in PaintFocus()
515 rRect.Offset(-NormalizeToPx(FOCUS_PADDING + FOCUS_BORDER_WIDTH * HALF), in PaintFocus()
516 -NormalizeToPx(FOCUS_PADDING + FOCUS_BORDER_WIDTH * HALF)); in PaintFocus()
530 double focusBorderHeight = canvasSize.Height() - NormalizeToPx(FOCUS_BORDER_WIDTH) / HALF; in PaintPopupFocus()
531 double focusBorderWidth = canvasSize.Width() - NormalizeToPx(FOCUS_BORDER_WIDTH) / HALF; in PaintPopupFocus()
532 double focusRadius = focusBorderHeight * HALF; in PaintPopupFocus()
559 Offset boundsOffset = GetPaintOffset() + Offset(-NormalizeToPx(FOCUS_PADDING + FOCUS_BORDER_WIDTH * HALF), in SyncFocusGeometryProperties()
560 -NormalizeToPx(FOCUS_PADDING + FOCUS_BORDER_WIDTH * HALF)); in SyncFocusGeometryProperties()

Completed in 19 milliseconds

1234