diff options
Diffstat (limited to 'dw')
-rw-r--r-- | dw/fltkplatform.cc | 6 | ||||
-rw-r--r-- | dw/fltkviewbase.cc | 4 | ||||
-rw-r--r-- | dw/types.cc | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc index 010aa113..17eb5d51 100644 --- a/dw/fltkplatform.cc +++ b/dw/fltkplatform.cc @@ -358,7 +358,7 @@ int FltkPlatform::textWidth (core::style::Font *font, const char *text, int width = 0; FltkFont *ff = (FltkFont*) font; int curr = 0, next = 0, nb; - + if (font->fontVariant == 1) { int sc_fontsize = lout::misc::roundInt(ff->size * 0.78); for (curr = 0; next < len; curr = next) { @@ -380,10 +380,10 @@ int FltkPlatform::textWidth (core::style::Font *font, const char *text, } else { setfont (ff->font, ff->size); width = (int) getwidth (text, len); - + if (font->letterSpacing) { int curr = 0, next = 0; - + while (next < len) { next = nextGlyph(text, curr); width += font->letterSpacing; diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index 373e5454..cab22cf4 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -422,7 +422,7 @@ void FltkViewBase::drawRectangle (core::style::Color *color, int x2 = translateCanvasXToViewX (x + width); int y2 = translateCanvasYToViewY (y + height); - // We only support rectangles with line width 1px, so we clip with + // We only support rectangles with line width 1px, so we clip with // a rectangle 1px wider and higher than what we actually expose. // This is only really necessary for non-filled rectangles. clipPoint (&x1, &y1, 1); @@ -554,7 +554,7 @@ void FltkWidgetView::drawText (core::style::Font *font, while (next < len) { next = theLayout->nextGlyph(text, curr); drawtext(text + curr, next - curr, viewX, viewY); - viewX += font->letterSpacing + + viewX += font->letterSpacing + (int)getwidth(text + curr,next - curr); curr = next; } diff --git a/dw/types.cc b/dw/types.cc index 047e7705..4d94f494 100644 --- a/dw/types.cc +++ b/dw/types.cc @@ -69,7 +69,7 @@ bool Rectangle::intersectsWith (Rectangle *otherRect, Rectangle *dest) dest->x = dest->y = dest->width = dest->height = 0; } - return doIntersect; + return doIntersect; } /* @@ -180,7 +180,7 @@ bool Polygon::linesCross0(int ax1, int ay1, int ax2, int ay2, int z1 = zOfVectorProduct (ax1 - bx1, ay1 - by1, bx2 - bx1, by2 - by1); int z2 = zOfVectorProduct (ax2 - bx1, ay2 - by1, bx2 - bx1, by2 - by1); - return (z1 <= 0 && z2 >= 0) || (z1 >= 0 && z2 <= 0); + return (z1 <= 0 && z2 >= 0) || (z1 >= 0 && z2 <= 0); } /** |