|
@@ -17,10 +17,10 @@
|
|
|
|
|
|
namespace Gfx {
|
|
namespace Gfx {
|
|
|
|
|
|
-void AntiAliasingPainter::draw_anti_aliased_line(FloatPoint actual_from, FloatPoint actual_to, Color color, float thickness, Painter::LineStyle style, Color, LineLengthMode line_length_mode)
|
|
|
|
|
|
+void AntiAliasingPainter::draw_anti_aliased_line(FloatPoint actual_from, FloatPoint actual_to, Color color, float thickness, LineStyle style, Color, LineLengthMode line_length_mode)
|
|
{
|
|
{
|
|
// FIXME: Implement this :P
|
|
// FIXME: Implement this :P
|
|
- VERIFY(style == Painter::LineStyle::Solid);
|
|
|
|
|
|
+ VERIFY(style == LineStyle::Solid);
|
|
|
|
|
|
if (color.alpha() == 0)
|
|
if (color.alpha() == 0)
|
|
return;
|
|
return;
|
|
@@ -142,7 +142,7 @@ void AntiAliasingPainter::draw_dotted_line(IntPoint point1, IntPoint point2, Col
|
|
{
|
|
{
|
|
// AA circles don't really work below a radius of 2px.
|
|
// AA circles don't really work below a radius of 2px.
|
|
if (thickness < 4)
|
|
if (thickness < 4)
|
|
- return m_underlying_painter.draw_line(point1, point2, color, thickness, Painter::LineStyle::Dotted);
|
|
|
|
|
|
+ return m_underlying_painter.draw_line(point1, point2, color, thickness, LineStyle::Dotted);
|
|
|
|
|
|
auto draw_spaced_dots = [&](int start, int end, auto to_point) {
|
|
auto draw_spaced_dots = [&](int start, int end, auto to_point) {
|
|
int step = thickness * 2;
|
|
int step = thickness * 2;
|
|
@@ -180,14 +180,14 @@ void AntiAliasingPainter::draw_dotted_line(IntPoint point1, IntPoint point2, Col
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-void AntiAliasingPainter::draw_line(IntPoint actual_from, IntPoint actual_to, Color color, float thickness, Painter::LineStyle style, Color alternate_color, LineLengthMode line_length_mode)
|
|
|
|
|
|
+void AntiAliasingPainter::draw_line(IntPoint actual_from, IntPoint actual_to, Color color, float thickness, LineStyle style, Color alternate_color, LineLengthMode line_length_mode)
|
|
{
|
|
{
|
|
draw_line(actual_from.to_type<float>(), actual_to.to_type<float>(), color, thickness, style, alternate_color, line_length_mode);
|
|
draw_line(actual_from.to_type<float>(), actual_to.to_type<float>(), color, thickness, style, alternate_color, line_length_mode);
|
|
}
|
|
}
|
|
|
|
|
|
-void AntiAliasingPainter::draw_line(FloatPoint actual_from, FloatPoint actual_to, Color color, float thickness, Painter::LineStyle style, Color alternate_color, LineLengthMode line_length_mode)
|
|
|
|
|
|
+void AntiAliasingPainter::draw_line(FloatPoint actual_from, FloatPoint actual_to, Color color, float thickness, LineStyle style, Color alternate_color, LineLengthMode line_length_mode)
|
|
{
|
|
{
|
|
- if (style == Painter::LineStyle::Dotted)
|
|
|
|
|
|
+ if (style == LineStyle::Dotted)
|
|
return draw_dotted_line(actual_from.to_rounded<int>(), actual_to.to_rounded<int>(), color, static_cast<int>(round(thickness)));
|
|
return draw_dotted_line(actual_from.to_rounded<int>(), actual_to.to_rounded<int>(), color, static_cast<int>(round(thickness)));
|
|
draw_anti_aliased_line(actual_from, actual_to, color, thickness, style, alternate_color, line_length_mode);
|
|
draw_anti_aliased_line(actual_from, actual_to, color, thickness, style, alternate_color, line_length_mode);
|
|
}
|
|
}
|