AvalonStudio.TextEditor.Rendering.SelectedDebugLineBackgroundRenderer.Draw C# (CSharp) Method

Draw() public method

public Draw ( TextView textView, Avalonia.Media.DrawingContext drawingContext ) : void
textView TextView
drawingContext Avalonia.Media.DrawingContext
return void
		public void Draw(TextView textView, DrawingContext drawingContext)
		{
			if (line > 0 && line < textView.TextDocument.LineCount)
			{
				var currentLine = textView.TextDocument.GetLineByNumber(line);

				var rects = VisualLineGeometryBuilder.GetRectsForSegment(textView, currentLine);

				foreach (var rect in rects)
				{
					var drawRect = new Rect(rect.TopLeft.X, rect.TopLeft.Y, textView.Bounds.Width, rect.Height);
					drawingContext.FillRectangle(selectedLineBg, drawRect);
				}
			}
		}