summaryrefslogtreecommitdiff
path: root/src/fl_line_style.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2009-12-06 22:21:55 +0000
committerMatthias Melcher <fltk@matthiasm.com>2009-12-06 22:21:55 +0000
commitb2cffc688ea7abbddabc9ed23deea1921f59ac9d (patch)
tree74a50bdb133fd6b5af7c785541bcc46e2e8e9c15 /src/fl_line_style.cxx
parent1ea4b4573538f2d53960dd8a4ef4f35480d2f5f7 (diff)
Moved OS X code base to the more moder Cocoa toolkit thanks to the awesome work of Manolo Gouy (STR #2221). This is a big one! I tested all test applications under 32-bit autoconf and Xcode, and a few apps under 64bit intel. No PPC testing was done. Please verify this patch if you have the machine!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6951 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_line_style.cxx')
-rw-r--r--src/fl_line_style.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fl_line_style.cxx b/src/fl_line_style.cxx
index 287a2eaf7..bf299bbc7 100644
--- a/src/fl_line_style.cxx
+++ b/src/fl_line_style.cxx
@@ -40,7 +40,7 @@
float fl_quartz_line_width_ = 1.0f;
static enum CGLineCap fl_quartz_line_cap_ = kCGLineCapButt;
static enum CGLineJoin fl_quartz_line_join_ = kCGLineJoinMiter;
-static float *fl_quartz_line_pattern = 0;
+static CGFloat *fl_quartz_line_pattern = 0;
static int fl_quartz_line_pattern_size = 0;
void fl_quartz_restore_line_style_() {
CGContextSetLineWidth(fl_gc, fl_quartz_line_width_);
@@ -145,9 +145,9 @@ void fl_line_style(int style, int width, char* dashes) {
fl_quartz_line_cap_ = Cap[(style>>8)&3];
fl_quartz_line_join_ = Join[(style>>12)&3];
char *d = dashes;
- static float pattern[16];
+ static CGFloat pattern[16];
if (d && *d) {
- float *p = pattern;
+ CGFloat *p = pattern;
while (*d) { *p++ = (float)*d++; }
fl_quartz_line_pattern = pattern;
fl_quartz_line_pattern_size = d-dashes;
@@ -162,7 +162,7 @@ void fl_line_style(int style, int width, char* dashes) {
dash = char(3*width);
dot = gap = char(width);
}
- float *p = pattern;
+ CGFloat *p = pattern;
switch (style & 0xff) {
case FL_DASH: *p++ = dash; *p++ = gap; break;
case FL_DOT: *p++ = dot; *p++ = gap; break;
@@ -172,7 +172,8 @@ void fl_line_style(int style, int width, char* dashes) {
fl_quartz_line_pattern_size = p-pattern;
fl_quartz_line_pattern = pattern;
} else {
- fl_quartz_line_pattern = 0; fl_quartz_line_pattern_size = 0;
+ fl_quartz_line_pattern = 0;
+ fl_quartz_line_pattern_size = 0;
}
fl_quartz_restore_line_style_();
#else