mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 01:03:08 +00:00
!39085 卡片SurfaceNode调用SetBounds时做四舍五入取整
Merge pull request !39085 from crecsent2021/20240727
This commit is contained in:
commit
62f6b5528a
@ -1366,7 +1366,8 @@ void FormPattern::AttachRSNode(const std::shared_ptr<Rosen::RSSurfaceNode>& node
|
||||
boundWidth = size.Width() - cardInfo_.borderWidth * DOUBLE;
|
||||
boundHeight = size.Height() - cardInfo_.borderWidth * DOUBLE;
|
||||
}
|
||||
externalRenderContext->SetBounds(cardInfo_.borderWidth, cardInfo_.borderWidth, boundWidth, boundHeight);
|
||||
externalRenderContext->SetBounds(round(cardInfo_.borderWidth), round(cardInfo_.borderWidth),
|
||||
round(boundWidth), round(boundHeight));
|
||||
|
||||
bool isRecover = want.GetBoolParam(OHOS::AppExecFwk::Constants::FORM_IS_RECOVER_FORM, false);
|
||||
if (isRecover || formChildrenNodeMap_.find(FormChildNodeType::FORM_FORBIDDEN_ROOT_NODE)
|
||||
@ -1445,8 +1446,8 @@ void FormPattern::FireFormSurfaceChangeCallback(float width, float height, float
|
||||
{
|
||||
auto externalRenderContext = DynamicCast<NG::RosenRenderContext>(GetExternalRenderContext());
|
||||
CHECK_NULL_VOID(externalRenderContext);
|
||||
externalRenderContext->SetBounds(borderWidth, borderWidth, width - borderWidth * DOUBLE,
|
||||
height - borderWidth * DOUBLE);
|
||||
externalRenderContext->SetBounds(round(borderWidth), round(borderWidth), round(width - borderWidth * DOUBLE),
|
||||
round(height - borderWidth * DOUBLE));
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_VOID(host);
|
||||
auto renderContext = host->GetRenderContext();
|
||||
|
@ -112,8 +112,8 @@ void FormRenderer::RunFormPageInner(const OHOS::AAFwk::Want& want, const OHOS::A
|
||||
if (rsSurfaceNode == nullptr) {
|
||||
return;
|
||||
}
|
||||
rsSurfaceNode->SetBounds(borderWidth_, borderWidth_, width_ - borderWidth_ * DOUBLE,
|
||||
height_ - borderWidth_ * DOUBLE);
|
||||
rsSurfaceNode->SetBounds(round(borderWidth_), round(borderWidth_), round(width_ - borderWidth_ * DOUBLE),
|
||||
round(height_ - borderWidth_ * DOUBLE));
|
||||
if (renderingMode_ == AppExecFwk::Constants::RenderingMode::SINGLE_COLOR) {
|
||||
HILOG_INFO("InitUIContent SetFormBackgroundColor #00FFFFFF");
|
||||
uiContent_->SetFormBackgroundColor(TRANSPARENT_COLOR);
|
||||
|
Loading…
Reference in New Issue
Block a user