DXFReaderNETControlDrawEntities Method
|
Draws a collection of entities to the control using a specified pen.
Namespace:
DXFReaderNET
Assembly:
DXFReaderNET (in DXFReaderNET.dll) Version: 20.12.2
Syntaxpublic void DrawEntities(
Pen Pen,
List<EntityObject> Entities,
bool Store = false
)
Public Sub DrawEntities (
Pen As Pen,
Entities As List(Of EntityObject),
Optional Store As Boolean = false
)
public:
void DrawEntities(
Pen^ Pen,
List<EntityObject^>^ Entities,
bool Store = false
)
member DrawEntities :
Pen : Pen *
Entities : List<EntityObject> *
?Store : bool
(* Defaults:
let _Store = defaultArg Store false
*)
-> unit
METHOD DrawEntities(
Pen AS Pen,
Entities AS List<EntityObject>,
Store AS LOGIC := FALSE
) AS VOID
Parameters
- Pen
- Type: System.DrawingPen
The pen to use for drawing all entities (defines color, width, and style). - Entities
- Type: System.Collections.GenericListEntityObject
The collection of entities to draw. - Store (Optional)
- Type: SystemBoolean
If true, stores the drawn elements in internal lists for later redrawing or manipulation.
If false, draws transiently (useful for temporary visualizations like rubber band operations).
Remarks
This method provides a way to draw multiple entities with consistent styling in a single call without modifying the drawing database.
It's commonly used for:
- Previewing entity collections before adding to the drawing
- Temporary visualization during interactive operations
- Highlighting or emphasizing specific entity groups
- Custom rendering with pen styles that differ from entity properties
When Store=true, the drawn elements can be cleared later using ClearDrawnElements().
When Store=false, elements are cleared on the next control refresh/repaint.
Note: This method uses the pen's properties regardless of the entities' own color/linetype settings.
Examples
using (Pen redPen = new Pen(Color.Red, 2))
{
List<EntityObject> entities = dxfControl.GetEntities(startPoint, endPoint);
dxfControl.DrawEntities(redPen, entities, false);
}
using (Pen bluePen = new Pen(Color.Blue, 1))
{
dxfControl.DrawEntities(bluePen, selectedEntities, true);
}
See Also