Home
last modified time | relevance | path

Searched refs:aspectRatio_ (Results 1 - 25 of 28) sorted by relevance

12

/foundation/arkui/ace_engine_lite/frameworks/src/core/base/
H A Dsystem_info.cpp37 aspectRatio_ = (float)screenWidth_ / (float)screenHeight_; in Initialize()
39 aspectRatio_ = 0; in Initialize()
47 return aspectRatio_; in GetAspectRatio()
H A Dsystem_info.h54 SystemInfo() : screenWidth_(0), screenHeight_(0), aspectRatio_(0.0), deviceType_(nullptr), isRoundScreen_(false) {} in SystemInfo()
59 float aspectRatio_; member in OHOS::ACELite::final
/foundation/arkui/ace_engine/frameworks/core/components/box/
H A Dbox_base_component.h161 aspectRatio_ = AnimatableDimension(aspectRatio); in SetAspectRatio()
166 aspectRatio_ = AnimatableDimension(aspectRatio, DimensionUnit::PX, option); in SetAspectRatio()
171 return aspectRatio_; in GetAspectRatio()
383 AnimatableDimension aspectRatio_ = AnimatableDimension(); member in OHOS::Ace::BoxBaseComponent
H A Drender_box_base.cpp417 if (GreatNotEqual(aspectRatio_.Value(), 0.0)) {
476 selfMaxHeight_ = selfMaxWidth_ / aspectRatio_.Value();
478 selfMaxWidth_ = selfMaxHeight_ * aspectRatio_.Value();
480 selfMaxWidth_ = selfMaxHeight_ * aspectRatio_.Value();
482 selfMaxHeight_ = selfMaxWidth_ / aspectRatio_.Value();
486 selfMaxHeight_ = selfMaxWidth_ / aspectRatio_.Value();
490 selfMaxWidth_ = selfMaxHeight_ * aspectRatio_.Value();
494 selfMaxHeight_ = selfMaxWidth_ / aspectRatio_.Value();
498 selfMaxWidth_ = selfMaxHeight_ * aspectRatio_.Value();
743 aspectRatio_
[all...]
H A Drender_box_base.h78 aspectRatio_.SetContextAndCallback(context_, [weak = WeakClaim(this)] {
244 return aspectRatio_.Value(); in GetAspectRatio()
249 aspectRatio_ = aspectRatio; in SetAspectRatio()
322 AnimatableDimension aspectRatio_ = AnimatableDimension(); member in OHOS::Ace::RenderBoxBase
/foundation/arkui/ace_engine/frameworks/core/components/checkable/
H A Drender_checkable.cpp45 aspectRatio_ = checkable->GetAspectRatio(); in Update()
204 if (drawAreaAspectRatio > aspectRatio_) { in ApplyAspectRatio()
205 drawSize.SetWidth(drawSize.Height() * aspectRatio_); in ApplyAspectRatio()
206 } else if (!NearZero(aspectRatio_)) { in ApplyAspectRatio()
207 drawSize.SetHeight(drawSize.Width() / aspectRatio_); in ApplyAspectRatio()
H A Dcheckable_component.cpp43 aspectRatio_ = theme->GetAspectRatio(); in ApplyTheme()
H A Dcheckable_component.h157 aspectRatio_ = aspectRatio; in SetAspectRatio()
162 return aspectRatio_; in GetAspectRatio()
332 double aspectRatio_ = 1.0; member in OHOS::Ace::CheckableComponent
H A Dcheckable_theme.h67 return aspectRatio_; in GetAspectRatio()
198 double aspectRatio_ = 1.0; member in OHOS::Ace::CheckableTheme
343 theme->aspectRatio_ = switchPattern->GetAttr<double>("switch_aspect_ratio", 0.0); in ParsePattern()
H A Drender_checkable.h130 double aspectRatio_ = 1.0; member in OHOS::Ace::RenderCheckable
H A Drender_switch.cpp209 Size(pointUseHeightAsWidth ? drawSize_.Width() : (rawPointSize_.Width() + pointPadding) * aspectRatio_, in PerformLayout()
/foundation/window/window_manager/window_scene/session/host/src/
H A Dmove_drag_controller.cpp281 aspectRatio_ = ratio; in SetAspectRatio()
425 moveDragProperty_.targetRect_ = MathHelper::GreatNotEqual(aspectRatio_, NEAR_ZERO) ? in CalcDragTargetRect()
427 type_, trans.first, trans.second, aspectRatio_, moveDragProperty_.originalRect_) : in CalcDragTargetRect()
617 if (aspectRatio_ <= NEAR_ZERO) { in EventDownInit()
741 if (SessionUtils::ToLayoutWidth(minW, vpr_) < SessionUtils::ToLayoutHeight(minH, vpr_) * aspectRatio_) { in CalcFixedAspectRatioTranslateLimits()
742 minW = SessionUtils::ToWinWidth(SessionUtils::ToLayoutHeight(minH, vpr_) * aspectRatio_, vpr_); in CalcFixedAspectRatioTranslateLimits()
744 minH = SessionUtils::ToWinHeight(SessionUtils::ToLayoutWidth(minW, vpr_) / aspectRatio_, vpr_); in CalcFixedAspectRatioTranslateLimits()
746 if (SessionUtils::ToLayoutWidth(maxW, vpr_) < SessionUtils::ToLayoutHeight(maxH, vpr_) * aspectRatio_) { in CalcFixedAspectRatioTranslateLimits()
747 maxH = SessionUtils::ToWinHeight(SessionUtils::ToLayoutWidth(maxW, vpr_) * aspectRatio_, vpr_); in CalcFixedAspectRatioTranslateLimits()
749 maxW = SessionUtils::ToWinWidth(SessionUtils::ToLayoutHeight(maxH, vpr_) / aspectRatio_, vpr in CalcFixedAspectRatioTranslateLimits()
[all...]
H A Dmain_session.cpp48 ScenePersistentStorage::Get(key, aspectRatio_, ScenePersistentStorageType::ASPECT_RATIO); in MainSession()
49 WLOGFD("init aspectRatio, key %{public}s, value: %{public}f", key.c_str(), aspectRatio_); in MainSession()
50 moveDragController_->SetAspectRatio(aspectRatio_); in MainSession()
H A Dscene_session.cpp743 session->aspectRatio_ = ratio; in SetAspectRatio()
747 session->SaveAspectRatio(session->aspectRatio_); in SetAspectRatio()
2174 WLOGD("SceneSession save aspectRatio , key %{public}s, value: %{public}f", key.c_str(), aspectRatio_); in SaveAspectRatio()
2218 if (MathHelper::NearZero(aspectRatio_)) { in FixRectByAspectRatio()
2238 SessionUtils::ToLayoutHeight(rect.height_, vpr) * aspectRatio_) { in FixRectByAspectRatio()
2239 rect.width_ = SessionUtils::ToWinWidth(SessionUtils::ToLayoutHeight(rect.height_, vpr)* aspectRatio_, vpr); in FixRectByAspectRatio()
2241 rect.height_ = SessionUtils::ToWinHeight(SessionUtils::ToLayoutWidth(rect.width_, vpr) / aspectRatio_, vpr); in FixRectByAspectRatio()
2244 if (rect.width_ > rect.height_ * aspectRatio_) { in FixRectByAspectRatio()
2245 rect.width_ = rect.height_ * aspectRatio_; in FixRectByAspectRatio()
2247 rect.height_ = rect.width_ / aspectRatio_; in FixRectByAspectRatio()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/button/
H A Dbutton_component.h236 aspectRatio_ = ratio; in SetAspectRatio()
241 return aspectRatio_; in GetAspectRatio()
269 double aspectRatio_ = 0.0; member in OHOS::Ace::ButtonComponent
H A Drender_button.cpp455 aspectRatio_ = buttonComponent_->GetAspectRatio(); in Update()
549 if (GreatNotEqual(aspectRatio_, 0.0)) { in CalculateLayoutSize()
552 layoutWidth = layoutHeight * aspectRatio_; in CalculateLayoutSize()
554 layoutHeight = layoutWidth / aspectRatio_; in CalculateLayoutSize()
H A Drender_button.h176 double aspectRatio_ = 0.0; member in OHOS::Ace::RenderButton
/foundation/window/window_manager/utils/include/
H A Dwindow_property.h219 float aspectRatio_ {0.0};
/foundation/window/window_manager/window_scene/session/host/include/
H A Dmove_drag_controller.h178 float aspectRatio_ = 0.0f; member in OHOS::OHOS::Rosen::MoveDragController
H A Dsession.h643 float aspectRatio_ = 0.0f; member in OHOS::OHOS::OHOS::Rosen::Session
/foundation/window/window_manager/utils/src/
H A Dwindow_property.cpp576 aspectRatio_ = ratio; in SetAspectRatio()
586 return aspectRatio_; in GetAspectRatio()
867 ret = ret && parcel.WriteFloat(aspectRatio_); in Write()
/foundation/window/window_manager/window_scene/test/unittest/
H A Dsession_test3.cpp1111 session_->aspectRatio_ = 0.0f; in HWTEST_F()
1114 session_->aspectRatio_ = 0.5f; in HWTEST_F()
1120 session_->aspectRatio_ = 1.0f; in HWTEST_F()
H A Dsession_test.cpp707 sceneSession->moveDragController_->aspectRatio_ = 0.0f; in HWTEST_F()
714 sceneSession->moveDragController_->aspectRatio_ = 1.0f; in HWTEST_F()
H A Dsession_test2.cpp1093 float ret = session_->aspectRatio_; in HWTEST_F()
1108 float ret = session_->aspectRatio_; in HWTEST_F()
H A Dmove_drag_controller_test.cpp502 moveDragController->aspectRatio_ = 1.0f; in HWTEST_F()

Completed in 30 milliseconds

12