question: final void paintTextUsingColor ( Graphics g , Shape a , Color c , int p0 , int p1 ) { g . setColor ( c ) ; painter . paint ( this , g , a , p0 , p1 ) ; boolean underline = isUnderline ( ) ; boolean strike = isStrikeThrough ( ) ; if ( underline || strike ) { Rectangle alloc = ( a instanceof Rectangle ) ? ( Rectangle ) a : a . getBounds ( ) ; View parent = getParent ( ) ; if ( ( parent != null ) && ( parent . getEndOffset ( ) == p1 ) ) { Segment s = getText ( p0 , p1 ) ; while ( Character . isWhitespace ( s . last ( ) ) ) { p1 -= 1 ; s . count -= 1 ; } SegmentCache . releaseSharedSegment ( s ) ; } int x0 = alloc . x ; int p = getStartOffset ( ) ; if ( p != p0 ) { x0 += ( int ) painter . getSpan ( this , p , p0 , getTabExpander ( ) , x0 ) ; } int x1 = x0 + ( int ) painter . getSpan ( this , p0 , p1 , getTabExpander ( ) , x0 ) ; int y = alloc . y + ( int ) ( painter . getHeight ( this ) - painter . getDescent ( this ) ) ; if ( underline ) { int yTmp = y + 1 ; g . drawLine ( x0 , yTmp , x1 , yTmp ) ; } if ( strike ) { int yTmp = y - ( int ) ( painter . getAscent ( this ) * 0.3f ) ; g . drawLine ( x0 , yTmp , x1 , yTmp ) ; } } }
target:  Paints the specified region of text in the specified color.