summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-05 15:21:34 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-05 15:21:34 +0500
commitdb214d1145e46d527a46d1fc2519548d2c4d23f1 (patch)
treecf0fd9922e4d54f6beb63888f9b28c8e2a787bdf /src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
parent75fc94d6c71fe686f6dde5b41ad91cba2f6bdd6f (diff)
wip: fork
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx98
1 files changed, 0 insertions, 98 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
deleted file mode 100644
index 16c6c6c29..000000000
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_vertex.cxx
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// Portable drawing routines for the Fast Light Tool Kit (FLTK).
-//
-// Copyright 1998-2022 by Bill Spitzak and others.
-//
-// This library is free software. Distribution and use rights are outlined in
-// the file "COPYING" which should have been included with this file. If this
-// file is missing or damaged, see the license at:
-//
-// https://www.fltk.org/COPYING.php
-//
-// Please see the following page on how to report bugs and issues:
-//
-// https://www.fltk.org/bugs.php
-//
-
-/**
- \file quartz_vertex.cxx
- \brief Portable drawing code for drawing arbitrary shapes with
- simple 2D transformations, implemented for OS X Quartz.
-*/
-
-#include "Fl_Quartz_Graphics_Driver.H"
-
-#include <FL/fl_draw.H>
-#include <FL/platform.H>
-#include <FL/math.h>
-
-
-void Fl_Quartz_Graphics_Driver::end_points() {
- for (int i = 0; i < n; i++) {
- point(xpoint[i].x, xpoint[i].y);
- }
-}
-
-void Fl_Quartz_Graphics_Driver::end_line() {
- if (n < 2) {
- end_points();
- return;
- }
- if (n<=1) return;
- CGContextSetShouldAntialias(gc_, true);
- CGContextMoveToPoint(gc_, xpoint[0].x, xpoint[0].y);
- for (int i=1; i<n; i++)
- CGContextAddLineToPoint(gc_, xpoint[i].x, xpoint[i].y);
- CGContextStrokePath(gc_);
- CGContextSetShouldAntialias(gc_, false);
-}
-
-void Fl_Quartz_Graphics_Driver::end_polygon() {
- fixloop();
- if (n < 3) {
- end_line();
- return;
- }
- if (n<=1) return;
- CGContextSetShouldAntialias(gc_, true);
- CGContextMoveToPoint(gc_, xpoint[0].x, xpoint[0].y);
- for (int i=1; i<n; i++)
- CGContextAddLineToPoint(gc_, xpoint[i].x, xpoint[i].y);
- CGContextClosePath(gc_);
- CGContextFillPath(gc_);
- CGContextSetShouldAntialias(gc_, false);
-}
-
-void Fl_Quartz_Graphics_Driver::end_complex_polygon() {
- gap();
- if (n < 3) {
- end_line();
- return;
- }
- if (n<=1) return;
- CGContextSetShouldAntialias(gc_, true);
- CGContextMoveToPoint(gc_, xpoint[0].x, xpoint[0].y);
- for (int i=1; i<n; i++)
- CGContextAddLineToPoint(gc_, xpoint[i].x, xpoint[i].y);
- CGContextClosePath(gc_);
- CGContextFillPath(gc_);
- CGContextSetShouldAntialias(gc_, false);
-}
-
-void Fl_Quartz_Graphics_Driver::circle(double x, double y,double r) {
- double xt = transform_x(x,y);
- double yt = transform_y(x,y);
- double rx = r * (m.c ? sqrt(m.a*m.a+m.c*m.c) : fabs(m.a));
- double ry = r * (m.b ? sqrt(m.b*m.b+m.d*m.d) : fabs(m.d));
- int llx = (int)rint(xt-rx);
- int w = (int)rint(xt+rx)-llx;
- int lly = (int)rint(yt-ry);
- int h = (int)rint(yt+ry)-lly;
-
- // Quartz warning: circle won't scale to current matrix!
- // Last argument must be 0 (counter-clockwise) or it draws nothing under __LP64__ !!!!
- CGContextSetShouldAntialias(gc_, true);
- CGContextAddArc(gc_, xt, yt, (w+h)*0.25f, 0, 2.0f*M_PI, 0);
- (what == POLYGON ? CGContextFillPath : CGContextStrokePath)(gc_);
- CGContextSetShouldAntialias(gc_, false);
-}