diff options
| author | Manolo Gouy <Manolo> | 2011-02-21 14:05:51 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2011-02-21 14:05:51 +0000 |
| commit | a998c478d5337c270d706471fbff419f2e4f17ad (patch) | |
| tree | b06c9004fc5ac336c8d133bd70de5e8ebe1162b3 /src | |
| parent | 693d12ee8834e57885279bfbdf98f002e3780571 (diff) | |
Removed inadequate use of fl_color() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8459 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_font_mac.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index 77d0f7e48..1ee8342ba 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -439,15 +439,15 @@ static CGColorRef flcolortocgcolor(Fl_Color i) } #endif -static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Font_Descriptor *fl_fontsize) { +static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Graphics_Driver *driver) { // convert to UTF-16 first UniChar *uniStr = mac_Utf8_to_Utf16(str, n, &n); #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if (fl_mac_os_version >= 0x1050) { CFStringRef str16 = CFStringCreateWithCharactersNoCopy(NULL, uniStr, n, kCFAllocatorNull); if (str16 == NULL) return; // shd not happen - CGColorRef color = flcolortocgcolor(fl_color()); - CFDictionarySetValue (attributes, kCTFontAttributeName, fl_fontsize->fontref); + CGColorRef color = flcolortocgcolor(driver->color()); + CFDictionarySetValue (attributes, kCTFontAttributeName, driver->font_descriptor()->fontref); CFDictionarySetValue (attributes, kCTForegroundColorAttributeName, color); CFAttributedStringRef mastr = CFAttributedStringCreate(kCFAllocatorDefault, str16, attributes); CFRelease(str16); @@ -465,7 +465,7 @@ static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Font_Descri #if ! __LP64__ OSStatus err; // now collect our ATSU resources - ATSUTextLayout layout = fl_fontsize->layout; + ATSUTextLayout layout = driver->font_descriptor()->layout; ByteCount iSize = sizeof(CGContextRef); ATSUAttributeTag iTag = kATSUCGContextTag; @@ -485,13 +485,13 @@ static void fl_mac_draw(const char *str, int n, float x, float y, Fl_Font_Descri void Fl_Quartz_Graphics_Driver::draw(const char *str, int n, float x, float y) { // avoid a crash if no font has been selected by user yet ! if (!font_descriptor()) font(FL_HELVETICA, FL_NORMAL_SIZE); - fl_mac_draw(str, n, x, y, font_descriptor()); + fl_mac_draw(str, n, x, y, this); } void Fl_Quartz_Graphics_Driver::draw(const char* str, int n, int x, int y) { // avoid a crash if no font has been selected by user yet ! if (!font_descriptor()) font(FL_HELVETICA, FL_NORMAL_SIZE); - fl_mac_draw(str, n, (float)x-0.0f, (float)y+0.5f, font_descriptor()); + fl_mac_draw(str, n, (float)x-0.0f, (float)y+0.5f, this); } void Fl_Quartz_Graphics_Driver::draw(int angle, const char *str, int n, int x, int y) { |
