Переглянути джерело

LibGfx: Remove some unused AntiAliasingPainter methods

MacDue 2 роки тому
батько
коміт
acc0fceaae

+ 0 - 25
Userland/Libraries/LibGfx/AntiAliasingPainter.cpp

@@ -770,29 +770,4 @@ void AntiAliasingPainter::stroke_segment_intersection(FloatPoint const& current_
     fill_path(intersection_edge_path, color);
 }
 
-FloatQuad AntiAliasingPainter::build_rotated_rectangle(FloatPoint const& direction, float width)
-{
-    // Rotates a rectangle around 0,0
-    double half_size = width / 2;
-    double radian = atan2(direction.y(), direction.x());
-    if (radian < 0) {
-        radian += (2 * M_PI);
-    }
-    // Rotated by: (xcosθ−ysinθ ,xsinθ+ycosθ)
-    // p1     p2
-    //
-    //   x,y
-    //
-    // p4     p3
-    double cos_radian = cos(radian);
-    double sin_radian = sin(radian);
-
-    // FIXME: Performing the rotation with AffineTransform::rotate_quad seems to generate more glitches at the edges than rotating manually
-    return FloatQuad(
-        { ((-half_size * cos_radian) - (-half_size * sin_radian)), ((-half_size * sin_radian) + (-half_size * cos_radian)) },
-        { ((half_size * cos_radian) - (-half_size * sin_radian)), ((half_size * sin_radian) + (-half_size * cos_radian)) },
-        { ((half_size * cos_radian)) - (half_size * sin_radian), ((half_size * sin_radian) + (half_size * cos_radian)) },
-        { ((-half_size * cos_radian) - (half_size * sin_radian)), ((-half_size * sin_radian) + (half_size * cos_radian)) });
-}
-
 }

+ 0 - 1
Userland/Libraries/LibGfx/AntiAliasingPainter.h

@@ -84,7 +84,6 @@ private:
     template<FixmeEnableHacksForBetterPathPainting path_hacks>
     void draw_anti_aliased_line(FloatPoint, FloatPoint, Color, float thickness, Painter::LineStyle style, Color alternate_color);
     void stroke_segment_intersection(FloatPoint const& current_line_a, FloatPoint const& current_line_b, FloatLine const& previous_line, Color, float thickness);
-    FloatQuad build_rotated_rectangle(FloatPoint const& direction, float width);
 
     Painter& m_underlying_painter;
     AffineTransform m_transform;