- const NCollection_Vec2<Standard_ShortReal>& aNextLeftCorner = BottomLeft (theIndex + 1);
- theBndBox.Left = aLeftCorner.x();
- theBndBox.Bottom = aLeftCorner.y();
- theBndBox.Top = theBndBox.Bottom + myLineSpacing;
- if (Abs (aLeftCorner.y() - aNextLeftCorner.y()) < Precision::Confusion()) // in the same row
- {
- theBndBox.Right = aNextLeftCorner.x();
- }
- else
- {
- // the next symbol is on the next row either by '\n' or by wrapping
- Standard_ShortReal aLineWidth = LineWidth (LineIndex (theIndex));
- theBndBox.Left = aLeftCorner.x();
- switch (myAlignX)
- {
- case Graphic3d_HTA_LEFT: theBndBox.Right = aLineWidth; break;
- case Graphic3d_HTA_RIGHT: theBndBox.Right = myBndWidth; break;
- case Graphic3d_HTA_CENTER: theBndBox.Right = 0.5f * (myBndWidth + aLineWidth); break;
- }
- }
+ // the last symbol
+ return Standard_True;
+ }
+
+ const NCollection_Vec2<Standard_ShortReal>& aNextLeftCorner = BottomLeft (theIndex + 1);
+ if (Abs (aLeftCorner.y() - aNextLeftCorner.y()) < Precision::Confusion()) // in the same row
+ {
+ theBndBox.Right = aNextLeftCorner.x();