renderRegionToEnd renders a region in given style and background, to end of line from start
(st lexer.Pos, sty *styles.Style, bg image.Image)
| 339 | |
| 340 | // renderRegionToEnd renders a region in given style and background, to end of line from start |
| 341 | func (ed *Editor) renderRegionToEnd(st lexer.Pos, sty *styles.Style, bg image.Image) { |
| 342 | spos := ed.charStartPosVisible(st) |
| 343 | epos := spos |
| 344 | epos.Y += ed.lineHeight |
| 345 | vsz := epos.Sub(spos) |
| 346 | if vsz.X <= 0 || vsz.Y <= 0 { |
| 347 | return |
| 348 | } |
| 349 | pc := &ed.Scene.PaintContext |
| 350 | pc.FillBox(spos, epos.Sub(spos), bg) // same line, done |
| 351 | } |
| 352 | |
| 353 | // renderAllLines displays all the visible lines on the screen, |
| 354 | // after PushBounds has already been called. |
no test coverage detected