question: public static Rect addJoint2Bounds ( List < ShapeRecord > records , LineStyle ls , AbstractStrokeNode stroke , double halfWeight , Rect pathBBox ) { Rect newRect = pathBBox ; int count = records . size ( ) ; int start = 0 ; int end = 0 ; int lastMoveX = 0 ; int lastMoveY = 0 ; int lastOpenSegment = 0 ; int x = 0 , y = 0 ; double miterLimit = stroke . miterLimit ; if ( miterLimit < 1 ) miterLimit = 1 ; int [ ] [ ] cooridinates = getCoordinates ( records ) ; while ( true ) { while ( start < count && ! ( records . get ( start ) instanceof StyleChangeRecord ) ) { x = cooridinates [ start - 1 ] [ 0 ] ; y = cooridinates [ start - 1 ] [ 1 ] ; if ( tangentIsValid ( records . get ( start ) , x , y ) ) break ; start ++ ; } if ( start >= count ) break ; ShapeRecord startSegment = records . get ( start ) ; if ( startSegment instanceof StyleChangeRecord ) { lastOpenSegment = start + 1 ; lastMoveX = ( ( StyleChangeRecord ) startSegment ) . moveDeltaX ; lastMoveY = ( ( StyleChangeRecord ) startSegment ) . moveDeltaY ; start ++ ; continue ; } int startSegmentX = cooridinates [ start ] [ 0 ] ; int startSegmentY = cooridinates [ start ] [ 1 ] ; if ( ( start == count - 1 || records . get ( start + 1 ) instanceof StyleChangeRecord ) && startSegmentX == lastMoveX && startSegmentY == lastMoveY ) { end = lastOpenSegment ; } else { end = start + 1 ; } while ( end < count && ! ( records . get ( end ) instanceof StyleChangeRecord ) ) { if ( tangentIsValid ( records . get ( end ) , startSegmentX , startSegmentY ) ) break ; end ++ ; } if ( end >= count ) break ; ShapeRecord endSegment = records . get ( end ) ; if ( ! ( endSegment instanceof StyleChangeRecord ) ) { newRect = addMiterLimitStrokeToBounds ( startSegment , endSegment , miterLimit , halfWeight , newRect , x , y , startSegmentX , startSegmentY ) ; } start = start > end ? start + 1 : end ; } return newRect ; }
target:  Adds the joint to bounds.