mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
!48233 USE_ROSEN_DRAWING代码冗余整改
Merge pull request !48233 from 冯峰/rosen_drawing
This commit is contained in:
commit
08614bd8e6
@ -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);
|
||||
};
|
||||
|
@ -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
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user