From fca196fc527c96b9ca353a7a3b78eb7df364c4c9 Mon Sep 17 00:00:00 2001 From: ldy Date: Tue, 11 Mar 2025 02:31:28 +0000 Subject: [PATCH] update services/ui/driver/ui_rotation.cpp. Signed-off-by: ldy --- services/ui/driver/ui_rotation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/ui/driver/ui_rotation.cpp b/services/ui/driver/ui_rotation.cpp index ef483976..6c805c71 100644 --- a/services/ui/driver/ui_rotation.cpp +++ b/services/ui/driver/ui_rotation.cpp @@ -108,8 +108,8 @@ void UiRotation::RotateBuffer(const uint8_t *origBuf, uint8_t *dstBuf, uint32_t int x {}, y {}; const uint8_t *srcP = nullptr; uint8_t *dstP = nullptr; - for (int h = rect_.GetTop(); h < rect_.GetBottom(); h++) { - for (int w = rect_.GetLeft(); w < rect_.GetRight(); w++) { + for (int h = rect_.GetTop(); h <= rect_.GetBottom(); h++) { + for (int w = rect_.GetLeft(); w <= rect_.GetRight(); w++) { x = offsetX_ + w * cosR_ - h * sinR_; y = offsetY_ + h * cosR_ + w * sinR_; srcP = origBuf + h * oldRowBytes_ + w * pixelBytes_; -- Gitee