diff --git a/ChangeLog b/ChangeLog index 59b5f92..2768121 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,16 @@ +2006-08-10 Christopher Armstrong (carmstrong@fastmail.com.au) + (patch committed by Greg Casamento) + * Source/winlib/WIN32GState.m: Better 24bit image support, Slightly + extended composite method, Dashed-line handling (for selections) + * Headers/winlin/WIN32FontInfo.m: Changed method + signature draw:length:onDC:at: to correct spelling of length. + 2006-08-01 Riccardo Mottola * Headers/xlib/XGPrivate.h, Headers/xlib/GSXftFontInfo.h, Headers/xlib/XGFontSetFontInfo.h: changed method signatures to fix bug intruduced by RFM during typo fixes - 2006-07-09 Fred Kiefer * Header/x11/XGGeneric.h, diff --git a/Headers/winlib/WIN32FontInfo.h b/Headers/winlib/WIN32FontInfo.h index ff74ee2..b6db837 100644 --- a/Headers/winlib/WIN32FontInfo.h +++ b/Headers/winlib/WIN32FontInfo.h @@ -33,7 +33,7 @@ HFONT hFont; } -- (void) draw: (const char*)s lenght: (int)len +- (void) draw: (const char*)s length: (int)len onDC: (HDC)hdc at: (POINT)p; - (void) drawGlyphs: (const NSGlyph*)s length: (int)len diff --git a/Source/winlib/WIN32GState.m b/Source/winlib/WIN32GState.m index d3899e7..8f3db4d 100644 --- a/Source/winlib/WIN32GState.m +++ b/Source/winlib/WIN32GState.m @@ -3,6 +3,8 @@ Copyright (C) 2002 Free Software Foundation, Inc. Written by: 0) + { + penStyle = PS_GEOMETRIC | PS_USERSTYLE; + // The user has defined a dash pattern for stroking on + // the path. Note that we lose the floating point information + // here, as windows only supports DWORD elements, not float. + thePattern = objc_malloc(sizeof(float) * count); + [path getLineDash:thePattern count:&count phase:&phase]; - penStyle = PS_GEOMETRIC | PS_SOLID; - if (path) - { - float thePattern[10]; - int count = 10; - float phase; - - [path getLineDash: thePattern count: &count phase: &phase]; - - if (count && (count < 10)) - { - penStyle = PS_GEOMETRIC | PS_DASH; - } - } + iPattern = objc_malloc(sizeof(DWORD) * count); + int i = 0; + for (i = 0 ; i < count; i ++) + iPattern[i] = (DWORD)thePattern[i]; + objc_free(thePattern); + thePattern = NULL; + } + else + penStyle = PS_GEOMETRIC | PS_SOLID; pen = ExtCreatePen(penStyle | join | cap, lineWidth, &br, 0, NULL); + if (iPattern) + { + objc_free(iPattern); + iPattern = NULL; + } + oldPen = SelectObject(hDC, pen); SetMiterLimit(hDC, miterlimit, NULL);