Line.Begin() Method (Microsoft.DirectX.Direct3D)

Prepares a device to draw lines.

Definition

Visual Basic Public Sub Begin()
C# public void Begin();
C++ public:
void Begin();
JScript public function Begin();

Remarks

Calling Begin is optional. If called outside of a Begin ... Line.End sequence, the draw methods internally call Begin and End. If more than one draw method will be called successively, use this method to avoid extra overhead.

This method must be called from inside of a Device.BeginScene ... Device.EndScene sequence.

The Begin method cannot be used as a substitute for either Device.BeginScene or RenderToSurface.BeginScene.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

InvalidDataException

The data is invalid.