Browse Source

Fehler beim zeichnen von texten mit scroll offset behoben

Kolja Strohm 5 years ago
parent
commit
290edd1703
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Schrift.cpp

+ 2 - 1
Schrift.cpp

@@ -517,9 +517,10 @@ void TextRenderer::renderText( int x, int y, const char *txt, Bild & zRObj, std:
         fbeg = cpos;
     int zRObjBr = zRObj.getBreite();
     int zRObjHi = zRObj.getHeight();
+    const Punkt &zRObjOff = zRObj.getDrawOff();
     int beginX = x;
     int zh = getZeilenHeight();
-    if( y + ( zh + zeilenAbstand ) * Text( txt ).anzahlVon( '\n' ) + zh < 0 || x >= zRObjBr || y >= zRObjHi )
+    if( y + ( zh + zeilenAbstand ) * Text( txt ).anzahlVon( '\n' ) + zh + zRObjOff.y < 0 || x + zRObjOff.x >= zRObjBr || y + zRObjOff.y >= zRObjHi )
         return;
     bool faerb = 0;
     int len = textLength( txt );