Fixing corelib would not compile under vc6 following fl_text_extents() addons. checked on win32/vc6,macosx. Please on other win32 compilers.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6578 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Fabien Costantini 2008-12-11 14:38:04 +00:00
parent 26c6437407
commit 7b49e892b8
2 changed files with 7 additions and 6 deletions

View File

@ -69,10 +69,11 @@ void fl_draw(const char* str, int x, int y) {
}
void fl_text_extents(const char *c, int &dx, int &dy, int &w, int &h) {
if (c) return fl_text_extents(c, strlen(c), dx, dy, w, h);
// else
w = 0; h = 0;
dx = 0; dy = 0;
if (c) fl_text_extents(c, strlen(c), dx, dy, w, h);
else {
w = 0; h = 0;
dx = 0; dy = 0;
}
} // fl_text_extents

View File

@ -239,7 +239,7 @@ void fl_text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) {
GLYPHMETRICS metrics;
int maxw = 0, maxh = 0, dh;
int minx = 0, miny = -999999;
unsigned len = 0;
unsigned len = 0, idx = 0;
// Have we loaded the GetGlyphIndicesW function yet?
if (have_loaded_GetGlyphIndices == 0) {
@ -266,7 +266,7 @@ void fl_text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) {
}
// now we have the glyph array we measure each glyph in turn...
for(unsigned idx = 0; idx < len; idx++){
for(idx = 0; idx < len; idx++){
if (GetGlyphOutlineW (fl_gc, gi[idx], GGO_METRICS | GGO_GLYPH_INDEX,
&metrics, 0, NULL, &matrix) == GDI_ERROR) {
goto exit_error;