Package icyllis.modernui.text.style
Interface LineBackgroundSpan
- All Superinterfaces:
ParagraphStyle
- All Known Implementing Classes:
LineBackgroundSpan.Standard
Used to change the background of lines where the span is attached to.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Default implementation of theLineBackgroundSpan
, which changes the background color of the lines to which the span is attached. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawBackground
(Canvas canvas, Paint paint, int left, int right, int top, int baseline, int bottom, CharSequence text, int start, int end, int lineNumber) Draw the background on the canvas.
-
Method Details
-
drawBackground
void drawBackground(@NonNull Canvas canvas, @NonNull Paint paint, int left, int right, int top, int baseline, int bottom, @NonNull CharSequence text, int start, int end, int lineNumber) Draw the background on the canvas.- Parameters:
canvas
- canvas on which the span should be renderedpaint
- paint used to draw text, which should be left unchanged on exitleft
- left position of the line relative to input canvas, in pixelsright
- right position of the line relative to input canvas, in pixelstop
- top position of the line relative to input canvas, in pixelsbaseline
- baseline of the text relative to input canvas, in pixelsbottom
- bottom position of the line relative to input canvas, in pixelstext
- current textstart
- start character index of the lineend
- end character index of the linelineNumber
- line number in the current text layout
-