mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
Meta+Userland: Pass Gfx::FloatPoint by value
Just a small 8-byte value like Gfx::IntPoint.
This commit is contained in:
parent
7be0b27dd3
commit
e011eafd37
25 changed files with 106 additions and 106 deletions
|
@ -14,7 +14,7 @@
|
|||
|
||||
namespace Gfx {
|
||||
|
||||
void Path::elliptical_arc_to(FloatPoint const& point, FloatPoint const& radii, double x_axis_rotation, bool large_arc, bool sweep)
|
||||
void Path::elliptical_arc_to(FloatPoint point, FloatPoint radii, double x_axis_rotation, bool large_arc, bool sweep)
|
||||
{
|
||||
auto next_point = point;
|
||||
|
||||
|
@ -120,7 +120,7 @@ void Path::close()
|
|||
if (m_segments.size() <= 1)
|
||||
return;
|
||||
|
||||
auto& last_point = m_segments.last().point();
|
||||
auto last_point = m_segments.last().point();
|
||||
|
||||
for (ssize_t i = m_segments.size() - 1; i >= 0; --i) {
|
||||
auto& segment = m_segments[i];
|
||||
|
@ -243,7 +243,7 @@ void Path::segmentize_path()
|
|||
float max_x = 0;
|
||||
float max_y = 0;
|
||||
|
||||
auto add_point_to_bbox = [&](Gfx::FloatPoint const& point) {
|
||||
auto add_point_to_bbox = [&](Gfx::FloatPoint point) {
|
||||
float x = point.x();
|
||||
float y = point.y();
|
||||
min_x = min(min_x, x);
|
||||
|
@ -291,8 +291,8 @@ void Path::segmentize_path()
|
|||
break;
|
||||
}
|
||||
case Segment::Type::QuadraticBezierCurveTo: {
|
||||
auto& control = static_cast<QuadraticBezierCurveSegment&>(segment).through();
|
||||
Painter::for_each_line_segment_on_bezier_curve(control, cursor, segment.point(), [&](FloatPoint const& p0, FloatPoint const& p1) {
|
||||
auto control = static_cast<QuadraticBezierCurveSegment&>(segment).through();
|
||||
Painter::for_each_line_segment_on_bezier_curve(control, cursor, segment.point(), [&](FloatPoint p0, FloatPoint p1) {
|
||||
add_line(p0, p1);
|
||||
});
|
||||
cursor = segment.point();
|
||||
|
@ -300,9 +300,9 @@ void Path::segmentize_path()
|
|||
}
|
||||
case Segment::Type::CubicBezierCurveTo: {
|
||||
auto& curve = static_cast<CubicBezierCurveSegment const&>(segment);
|
||||
auto& control_0 = curve.through_0();
|
||||
auto& control_1 = curve.through_1();
|
||||
Painter::for_each_line_segment_on_cubic_bezier_curve(control_0, control_1, cursor, segment.point(), [&](FloatPoint const& p0, FloatPoint const& p1) {
|
||||
auto control_0 = curve.through_0();
|
||||
auto control_1 = curve.through_1();
|
||||
Painter::for_each_line_segment_on_cubic_bezier_curve(control_0, control_1, cursor, segment.point(), [&](FloatPoint p0, FloatPoint p1) {
|
||||
add_line(p0, p1);
|
||||
});
|
||||
cursor = segment.point();
|
||||
|
@ -310,7 +310,7 @@ void Path::segmentize_path()
|
|||
}
|
||||
case Segment::Type::EllipticalArcTo: {
|
||||
auto& arc = static_cast<EllipticalArcSegment&>(segment);
|
||||
Painter::for_each_line_segment_on_elliptical_arc(cursor, arc.point(), arc.center(), arc.radii(), arc.x_axis_rotation(), arc.theta_1(), arc.theta_delta(), [&](FloatPoint const& p0, FloatPoint const& p1) {
|
||||
Painter::for_each_line_segment_on_elliptical_arc(cursor, arc.point(), arc.center(), arc.radii(), arc.x_axis_rotation(), arc.theta_1(), arc.theta_delta(), [&](FloatPoint p0, FloatPoint p1) {
|
||||
add_line(p0, p1);
|
||||
});
|
||||
cursor = segment.point();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue