From 9f01a57f5254e00a8e698f051e8491f6b417adfb Mon Sep 17 00:00:00 2001 From: xiexiyun Date: Mon, 18 Apr 2022 12:03:39 +0800 Subject: [PATCH] code check Signed-off-by: xiexiyun Change-Id: I1170196192d87daa6eaaab49f263ee436cb892f7 --- .../painter/rosen_debug_boundary_painter.cpp | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/frameworks/core/components/common/painter/rosen_debug_boundary_painter.cpp b/frameworks/core/components/common/painter/rosen_debug_boundary_painter.cpp index d23cbaad..491b4b74 100644 --- a/frameworks/core/components/common/painter/rosen_debug_boundary_painter.cpp +++ b/frameworks/core/components/common/painter/rosen_debug_boundary_painter.cpp @@ -47,7 +47,7 @@ void RosenDebugBoundaryPainter::PaintDebugBoundary(SkCanvas* canvas, const Offse } void RosenDebugBoundaryPainter::PaintDebugMargin(SkCanvas* canvas, const Offset& offset, - const Size& layoutSize, const EdgePx margin) + const Size& layoutSize, const EdgePx& margin) { SkPaint skpaint; auto startPointX = offset.GetX(); @@ -57,19 +57,19 @@ void RosenDebugBoundaryPainter::PaintDebugMargin(SkCanvas* canvas, const Offset& skpaint.setStyle(SkPaint::Style::kFill_Style); auto layoutRect = SkRect::MakeXYWH(startPointX, startPointY, - layoutSize.Width(), margin.TopPx()); + layoutSize.Width(), margin.TopPx()); canvas->drawRect(layoutRect, skpaint); layoutRect = SkRect::MakeXYWH(startPointX, startPointY + layoutSize.Height() - margin.BottomPx(), - layoutSize.Width(), margin.BottomPx()); + layoutSize.Width(), margin.BottomPx()); canvas->drawRect(layoutRect, skpaint); layoutRect = SkRect::MakeXYWH(startPointX, startPointY + margin.TopPx(), - margin.LeftPx(), verticalRectHeight); + margin.LeftPx(), verticalRectHeight); canvas->drawRect(layoutRect, skpaint); layoutRect = SkRect::MakeXYWH(startPointX + layoutSize.Width() - margin.RightPx(), startPointY + margin.TopPx(), - margin.RightPx(), verticalRectHeight); + margin.RightPx(), verticalRectHeight); canvas->drawRect(layoutRect, skpaint); } @@ -82,20 +82,20 @@ void RosenDebugBoundaryPainter::PaintDebugCorner(SkCanvas* canvas, const Offset& skpaint.setStyle(SkPaint::Style::kStroke_Style); skpaint.setStrokeWidth(BOUNDARY_STROKE_WIDTH); canvas->drawLine(startPointX, startPointY, - startPointX + BOUNDARY_CORNER_LENGTH, startPointY, skpaint); + startPointX + BOUNDARY_CORNER_LENGTH, startPointY, skpaint); canvas->drawLine(startPointX, startPointY, - startPointX, startPointY + BOUNDARY_CORNER_LENGTH, skpaint); + startPointX, startPointY + BOUNDARY_CORNER_LENGTH, skpaint); canvas->drawLine(startPointX + layoutSize.Width() - BOUNDARY_CORNER_LENGTH, startPointY, - startPointX + layoutSize.Width(), startPointY, skpaint); + startPointX + layoutSize.Width(), startPointY, skpaint); canvas->drawLine(startPointX + layoutSize.Width(), startPointY, - startPointX + layoutSize.Width(), startPointY + BOUNDARY_CORNER_LENGTH, skpaint); + startPointX + layoutSize.Width(), startPointY + BOUNDARY_CORNER_LENGTH, skpaint); canvas->drawLine(startPointX, startPointY + layoutSize.Height(), - startPointX + BOUNDARY_CORNER_LENGTH, startPointY + layoutSize.Height(), skpaint); + startPointX + BOUNDARY_CORNER_LENGTH, startPointY + layoutSize.Height(), skpaint); canvas->drawLine(startPointX, startPointY + layoutSize.Height() - BOUNDARY_CORNER_LENGTH, - startPointX, startPointY + layoutSize.Height(), skpaint); + startPointX, startPointY + layoutSize.Height(), skpaint); canvas->drawLine(startPointX + layoutSize.Width() - BOUNDARY_CORNER_LENGTH, startPointY + layoutSize.Height(), - startPointX + layoutSize.Width(), startPointY + layoutSize.Height(), skpaint); + startPointX + layoutSize.Width(), startPointY + layoutSize.Height(), skpaint); canvas->drawLine(startPointX + layoutSize.Width(), startPointY + layoutSize.Height() - BOUNDARY_CORNER_LENGTH, - startPointX + layoutSize.Width(), startPointY + layoutSize.Height(), skpaint); + startPointX + layoutSize.Width(), startPointY + layoutSize.Height(), skpaint); } } \ No newline at end of file