If I draw a partially off the screen object using SharpDX, will NT8 automatically clip the unseen parts for me? or will they just be leaved unhandled outside of the viewable region which will introduce performance issues for later?
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
base.OnRender(chartControl, chartScale);
// Create brush for the line
SharpDX.Direct2D1.SolidColorBrush customDXBrush = new SharpDX.Direct2D1.SolidColorBrush(RenderTarget, SharpDX.Color.DodgerBlue);
// Purposely crate an partially off the screen line
SharpDX.Vector2 startPoint = new SharpDX.Vector2(ChartPanel.X - 20, ChartPanel.Y - 20);
SharpDX.Vector2 endPoint = new SharpDX.Vector2(ChartPanel.X + ChartPanel.W + 20, ChartPanel.Y + ChartPanel.H + 20);
RenderTarget.DrawLine(startPoint, endPoint, customDXBrush, 2);
// Dispose
customDXBrush.Dispose();
}

Comment