Fix "Mac: Most fl_symbols missing corner pixels" (#1409).
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

+ Fix line loop drawing on macOS (#1409)
+ macOS: yet another fix of line drawing (#1409)

All fixes backported and merged from master, commits:

 - ea1b1bddd9
 - e19bc59ec1
 - 3c8bc27458
This commit is contained in:
ManoloFLTK
2026-04-14 16:10:48 +02:00
committed by Albrecht Schlosser
parent 1869ba9455
commit efef8eb219
2 changed files with 13 additions and 0 deletions
@@ -108,7 +108,9 @@ protected:
int not_clipped(int x, int y, int w, int h) FL_OVERRIDE;
void restore_clip() FL_OVERRIDE;
void end_points() FL_OVERRIDE;
void end_loop() FL_OVERRIDE;
void end_line() FL_OVERRIDE;
void end_line_or_loop(bool is_loop);
void end_polygon() FL_OVERRIDE;
void end_complex_polygon() FL_OVERRIDE;
void circle(double x, double y, double r) FL_OVERRIDE;
@@ -33,7 +33,16 @@ void Fl_Quartz_Graphics_Driver::end_points() {
}
}
void Fl_Quartz_Graphics_Driver::end_loop() {
fixloop();
end_line_or_loop(true);
}
void Fl_Quartz_Graphics_Driver::end_line() {
end_line_or_loop(false);
}
void Fl_Quartz_Graphics_Driver::end_line_or_loop(bool is_loop) {
if (n < 2) {
end_points();
return;
@@ -43,6 +52,8 @@ void Fl_Quartz_Graphics_Driver::end_line() {
CGContextMoveToPoint(gc_, xpoint[0].x, xpoint[0].y);
for (int i=1; i<n; i++)
CGContextAddLineToPoint(gc_, xpoint[i].x, xpoint[i].y);
if (is_loop)
CGContextClosePath(gc_);
CGContextStrokePath(gc_);
CGContextSetShouldAntialias(gc_, false);
}