!48233 USE_ROSEN_DRAWING代码冗余整改

Merge pull request !48233 from 冯峰/rosen_drawing
This commit is contained in:
openharmony_ci 2024-11-11 14:45:26 +00:00 committed by Gitee
commit 08614bd8e6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 0 additions and 10 deletions

View File

@ -39,11 +39,7 @@ public:
void PaintRect(RSCanvas& canvas, PaintWrapper* paintWrapper);
private:
#ifndef USE_ROSEN_DRAWING
RSPath path_;
#else
RSRecordingPath path_;
#endif
ACE_DISALLOW_COPY_AND_MOVE(BlankPaintMethod);
};

View File

@ -28,9 +28,7 @@ void EllipsePainter::DrawEllipse(RSCanvas& canvas, const RectF& rect, const Shap
ShapePainter::SetBrush(brush, shapePaintProperty);
canvas.AttachBrush(brush);
canvas.DrawOval(RSRect(rect.GetX(), rect.GetY(), rect.GetX() + rect.Width(), rect.GetY() + rect.Height()));
#ifdef USE_ROSEN_DRAWING
canvas.DetachBrush();
canvas.DetachPen();
#endif
}
} // namespace OHOS::Ace::NG

View File

@ -30,11 +30,7 @@ void PolygonPainter::DrawPolygon(RSCanvas& canvas, const PolygonPaintProperty& p
}
ShapePainter::SetBrush(brush, polygonPaintProperty);
canvas.AttachBrush(brush);
#ifndef USE_ROSEN_DRAWING
RSPath path;
#else
RSRecordingPath path;
#endif
std::vector<RSPoint> points;
for (auto point : polygonPaintProperty.GetPointsValue()) {
points.emplace_back(RSPoint(