Table of Contents

Method PrepareDisplay

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

PrepareDisplay(CadSpace, IProgress<double>, CancellationToken)

Makes the display list and the pick index of a space now, as the first GetDisplay(CadSpace) and GetPickIndex(CadSpace) make them, saying how far it has got and stopping when asked: the window does it on a worker thread for a drawing it opens, so that a drawing of 1 000 000 entities, 7 s to draw, does not hold the window. The list is the one GetDisplay(CadSpace) makes, item for item. A document is not safe to use from two threads at once: nothing else may use it, nor another document's fonts be set, until this returns.

public void PrepareDisplay(CadSpace space, IProgress<double> progress, CancellationToken cancellationToken)

Parameters

space CadSpace

The space; a layout draws model space first.

progress IProgress<double>

Told the share of the space's entities drawn, from 0 to 1, every 4 096 of them; null for nothing.

cancellationToken CancellationToken

Stops the drawing, looked at every 4 096 entities; nothing drawn so far is kept.

Exceptions

ArgumentNullException

Thrown when the space is null.

OperationCanceledException

Thrown when stopped.