summaryrefslogtreecommitdiff
path: root/src/fl_vertex.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2004-08-31 22:00:49 +0000
committerMatthias Melcher <fltk@matthiasm.com>2004-08-31 22:00:49 +0000
commit98a0be39654892de753912045a36bd7f66eac31c (patch)
treed39bb112c2484c0c8266b91df8fdacc59929a1e4 /src/fl_vertex.cxx
parenta3155cb205973ee1ebd1bbcf807232a119e67806 (diff)
Quartz for FLTK1.1
- Pixmaps now correctly support transparency/masking - subimage drawing aligned correctly - lines with a size over 1 always anti-alias - fl_begin_points/fl_end_points works - fixed refresh problem for multiple open windows Will check Linux compile right after this commit to make sure that I didn't destroy anything. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3800 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_vertex.cxx')
-rw-r--r--src/fl_vertex.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/fl_vertex.cxx b/src/fl_vertex.cxx
index 4cac4a089..ad73f5395 100644
--- a/src/fl_vertex.cxx
+++ b/src/fl_vertex.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_vertex.cxx,v 1.5.2.3.2.11 2004/08/26 18:24:11 easysw Exp $"
+// "$Id: fl_vertex.cxx,v 1.5.2.3.2.12 2004/08/31 22:00:49 matthiaswm Exp $"
//
// Portable drawing routines for the Fast Light Tool Kit (FLTK).
//
@@ -83,6 +83,7 @@ typedef int COORD_T;
typedef float COORD_T;
typedef struct { float x; float y; } QPoint;
# define XPOINT QPoint
+extern float fl_quartz_line_width_;
#else
typedef short COORD_T;
# define XPOINT XPoint
@@ -141,11 +142,13 @@ void fl_end_points() {
#elif defined(__APPLE_QD__)
for (int i=0; i<n; i++) { MoveTo(p[i].x, p[i].y); Line(0, 0); }
#elif defined(__APPLE_QUARTZ__)
+ if (fl_quartz_line_width_==1.0f) CGContextSetShouldAntialias(fl_gc, false);
for (int i=0; i<n; i++) {
CGContextMoveToPoint(fl_gc, p[i].x, p[i].y);
CGContextAddLineToPoint(fl_gc, p[i].x, p[i].y);
CGContextStrokePath(fl_gc);
}
+ if (fl_quartz_line_width_==1.0f) CGContextSetShouldAntialias(fl_gc, false);
#else
if (n>1) XDrawPoints(fl_display, fl_window, fl_gc, p, n, 0);
#endif
@@ -295,7 +298,7 @@ void fl_circle(double x, double y,double r) {
Rect rt; rt.left=llx; rt.right=llx+w; rt.top=lly; rt.bottom=lly+h;
(what == POLYGON ? PaintOval : FrameOval)(&rt);
#elif defined(__APPLE_QUARTZ__)
-# warning quartz : cicle won_t scale to current matrix!
+ // Quartz warning : circle won't scale to current matrix!
CGContextAddArc(fl_gc, xt, yt, (w+h)*0.25f, 0, 2.0f*M_PI, 1);
(what == POLYGON ? CGContextFillPath : CGContextStrokePath)(fl_gc);
#else
@@ -305,5 +308,5 @@ void fl_circle(double x, double y,double r) {
}
//
-// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.11 2004/08/26 18:24:11 easysw Exp $".
+// End of "$Id: fl_vertex.cxx,v 1.5.2.3.2.12 2004/08/31 22:00:49 matthiaswm Exp $".
//