Class CadPreview
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
What a prompt draws under the cursor while it waits, as AutoCAD 2021 drags the object a command is about to make: the entities the command would make were a point picked at the cursor the answer, made by the same code that makes them when it is, and the copies of objects it would move, each under a transformation. RECTANG asking its other corner, the cursor at (30, 20) from a first corner at the origin, previews the closed polyline 30 by 20 it makes when (30, 20) is picked.
public sealed class CadPreview
- Inheritance
-
CadPreview
- Inherited Members
Properties
- Fades
Gets whether Items(GeoPoint2) are pieces the answer takes out of the drawing rather than objects it makes, drawn faded as AutoCAD 2021's TRIM draws the piece under the cursor it would cut away: of a line 150 long crossed at 50, the 50 on the cursor's side. With Shift held at TRIM or EXTEND it is the other command's: TRIM then previews the object extended, not faded, and EXTEND fades the piece a trim takes out.
- FadesOriginals
Gets whether the objects of Handles leave where they stand once the answer is given, so that they are drawn faded there while their copies follow the cursor, as AutoCAD 2021's SCALE and ROTATE draw them; false where they stay, as with the Copy option, or where the preview moves none.
- Handles
Gets the objects whose copies Moves(GeoPoint2) places, in ordinal order; empty where the preview moves none.
- Shift
Gets or sets whether Shift is held, which a window sets before it asks for the preview: the answer previewed then carries it (Shift), as a pick with Shift held does, so that TRIM previews what EXTEND would do to the object under the cursor and EXTEND what TRIM would.
- ShowsBand
Gets whether the rubber band from the prompt's base point is drawn with the preview, as CIRCLE draws its radius to the cursor; false where AutoCAD draws the object alone, as RECTANG draws its rectangle.
- Typed
Gets or sets the text typed so far at a prompt for a line of text, which a window sets before it asks for the preview: the answer previewed is then that text, so that TEXT at "Enter text" previews the words typed where the line will stand. Null or empty previews nothing there.
Methods
- Items(GeoPoint2)
Gets the display items of the entities the command would make were a point picked at the cursor, drawn as they will be once made: their layer, colour and linetype the current ones. Empty where the point makes nothing, as a second corner in line with the first makes no rectangle.
- Moves(GeoPoint2)
Gets the transformations the copies of Handles are drawn under were a point picked at the cursor: one for ROTATE by a reference, one for each copy a rectangular array of 4 columns and 3 rows adds. Empty for none.