Mono.TextEditor.TextViewMargin.DrawCaretLineMarker C# (CSharp) Method

DrawCaretLineMarker() public method

public DrawCaretLineMarker ( Cairo cr, double xPos, double y, double width, double lineHeight ) : void
cr Cairo
xPos double
y double
width double
lineHeight double
return void
		public void DrawCaretLineMarker (Cairo.Context cr, double xPos, double y, double width, double lineHeight)
		{
			if (BackgroundRenderer != null)
				return;
			xPos = System.Math.Floor (xPos);
			cr.Rectangle (xPos, y, width, lineHeight);
			var color = CurrentLineColor;
			cr.SetSourceColor (color.Color);
			cr.Fill ();
			double halfLine = (cr.LineWidth / 2.0);
			cr.MoveTo (xPos, y + halfLine);
			cr.LineTo (xPos + width, y + halfLine);
			cr.MoveTo (xPos, y + lineHeight - halfLine);
			cr.LineTo (xPos + width, y + lineHeight - halfLine);
			cr.SetSourceColor (color.SecondColor);
			cr.Stroke ();
		}