summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-01-23 00:39:33 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-01-23 00:39:33 +0000
commitd1d136fa1b94fe33c2b5a5884fbdcb4842102b22 (patch)
tree19adf76d0380dac6537504549cb3ef7c832fee13 /src
parent28b94ce5e78c26a4963f8db5efc2492fbc44b9e9 (diff)
Fixing vertex implementation
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/cfg_gfx/gdi_vertex.cxx6
-rw-r--r--src/cfg_gfx/opengl.H10
-rw-r--r--src/cfg_gfx/quartz.H1
-rw-r--r--src/cfg_gfx/quartz_vertex.cxx4
-rw-r--r--src/cfg_gfx/xlib.H1
-rw-r--r--src/fl_vertex.cxx4
6 files changed, 15 insertions, 11 deletions
diff --git a/src/cfg_gfx/gdi_vertex.cxx b/src/cfg_gfx/gdi_vertex.cxx
index 50f47f6b4..81267f1e0 100644
--- a/src/cfg_gfx/gdi_vertex.cxx
+++ b/src/cfg_gfx/gdi_vertex.cxx
@@ -52,10 +52,6 @@ void Fl_GDI_Graphics_Driver::end_line() {
if (n>1) Polyline(fl_gc, p, n);
}
-void Fl_GDI_Graphics_Driver::fixloop() { // remove equal points from closed path
- while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--;
-}
-
void Fl_GDI_Graphics_Driver::end_loop() {
fixloop();
if (n>2) transformed_vertex((COORD_T)p[0].x, (COORD_T)p[0].y);
@@ -124,7 +120,7 @@ void Fl_GDI_Graphics_Driver::circle(double x, double y,double r) {
Arc(fl_gc, llx, lly, llx+w, lly+h, 0,0, 0,0);
}
-#endif FL_CFG_GFX_GDI_VERTEX_CXX
+#endif // FL_CFG_GFX_GDI_VERTEX_CXX
//
// End of "$Id$".
diff --git a/src/cfg_gfx/opengl.H b/src/cfg_gfx/opengl.H
index 4ad56770a..86abea41a 100644
--- a/src/cfg_gfx/opengl.H
+++ b/src/cfg_gfx/opengl.H
@@ -86,6 +86,16 @@ public:
// void end_complex_polygon();
// void gap();
// void circle(double x, double y, double r);
+ void begin_complex_polygon() { }
+ void transformed_vertex(double xf, double yf) { }
+ void vertex(double x, double y) { }
+ void end_points() { }
+ void end_line() { }
+ void end_loop() { }
+ void end_polygon() { }
+ void end_complex_polygon() { }
+ void gap() { }
+ void circle(double x, double y, double r) { }
};
diff --git a/src/cfg_gfx/quartz.H b/src/cfg_gfx/quartz.H
index 66cee48d2..604e04f97 100644
--- a/src/cfg_gfx/quartz.H
+++ b/src/cfg_gfx/quartz.H
@@ -94,7 +94,6 @@ protected:
void pop_clip();
void restore_clip();
// --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx
- void fixloop();
void begin_complex_polygon();
void transformed_vertex(double xf, double yf);
void vertex(double x, double y);
diff --git a/src/cfg_gfx/quartz_vertex.cxx b/src/cfg_gfx/quartz_vertex.cxx
index 5ae2832eb..6c63a245a 100644
--- a/src/cfg_gfx/quartz_vertex.cxx
+++ b/src/cfg_gfx/quartz_vertex.cxx
@@ -64,10 +64,6 @@ void Fl_Quartz_Graphics_Driver::end_line() {
CGContextSetShouldAntialias(fl_gc, false);
}
-void Fl_Quartz_Graphics_Driver::fixloop() { // remove equal points from closed path
- while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--;
-}
-
void Fl_Quartz_Graphics_Driver::end_loop() {
fixloop();
if (n>2) transformed_vertex((COORD_T)p[0].x, (COORD_T)p[0].y);
diff --git a/src/cfg_gfx/xlib.H b/src/cfg_gfx/xlib.H
index 9b0fbad97..e83fedb26 100644
--- a/src/cfg_gfx/xlib.H
+++ b/src/cfg_gfx/xlib.H
@@ -83,7 +83,6 @@ protected:
void pop_clip();
void restore_clip();
// --- implementation is in src/fl_vertex.cxx which includes src/cfg_gfx/xxx_rect.cxx
- void fixloop();
void begin_complex_polygon();
void transformed_vertex(double xf, double yf);
void vertex(double x, double y);
diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx
index b4cf94492..ae65fa5d4 100644
--- a/src/fl_vertex.cxx
+++ b/src/fl_vertex.cxx
@@ -107,6 +107,10 @@ void Fl_Graphics_Driver::transformed_vertex0(COORD_T x, COORD_T y) {
}
}
+void Fl_Graphics_Driver::fixloop() { // remove equal points from closed path
+ while (n>2 && p[n-1].x == p[0].x && p[n-1].y == p[0].y) n--;
+}
+
// -----------------------------------------------------------------------------