mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:02:44 +00:00 
			
		
		
		
	LibGfx: Remove some unused AntiAliasingPainter methods
This commit is contained in:
		
							parent
							
								
									b85af4e9bf
								
							
						
					
					
						commit
						acc0fceaae
					
				
					 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
		Add a link
		
	
		Reference in a new issue
	
	 MacDue
						MacDue