LibGfx: Remove some unused AntiAliasingPainter methods

This commit is contained in:
MacDue 2022-12-02 00:20:56 +00:00 committed by Linus Groh
parent b85af4e9bf
commit acc0fceaae
Notes: sideshowbarker 2024-07-17 17:40:13 +09:00
2 changed files with 0 additions and 26 deletions

View file

@ -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)) });
}
}

View file

@ -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;