diff --git a/packages/flutter/lib/src/rendering/paragraph.dart b/packages/flutter/lib/src/rendering/paragraph.dart index b5afa6a567..31f7b8b5b3 100644 --- a/packages/flutter/lib/src/rendering/paragraph.dart +++ b/packages/flutter/lib/src/rendering/paragraph.dart @@ -355,7 +355,13 @@ class RenderParagraph extends RenderBox { if (_hasVisualOverflow) { final Rect bounds = offset & size; + if (_overflowShader != null) { + // This layer limits what the shader below blends with to be just the text + // (as opposed to the text and its background). + canvas.saveLayer(bounds, new Paint()); + } else { canvas.save(); + } canvas.clipRect(bounds); } _textPainter.paint(canvas, offset);