LibGfx: Remove some unused AntiAliasingPainter methods
This commit is contained in:
parent
b85af4e9bf
commit
acc0fceaae
Notes:
sideshowbarker
2024-07-17 17:40:13 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/acc0fceaae Pull-request: https://github.com/SerenityOS/serenity/pull/16280
2 changed files with 0 additions and 26 deletions
|
@ -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)) });
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue