C# Class MapAround.UI.WinForms.GeometryEditor

Represents a geometry editor.
Afficher le fichier Open project: gkrsu/maparound.core

Private Properties

Свойство Type Description
drawActiveNode void
drawNodes void
insertNodeAt void
recalcActiveElements void
removeNodeAt void

Méthodes publiques

Méthode Description
ClearHistory ( ) : void

Clears the history of edit operations.

DrawEditingGeometry ( Graphics g, MapToClientDelegate mapToClient, int offsetX, int offsetY ) : void

Draws editing geometry.

GetSecondaryNodes ( ) : IEnumerable

Gets secondaty nodes of the editing feature. Secondary nodes are nodes placed at the middle points of the feature segments.

InsertPatch ( int patchIndex, IEnumerable coordinates ) : void

Inserts a new coordinate patch into the editing geometry.

Redo ( ) : void

Redo edit action.

RemoveActiveNode ( ) : void

Removes the active node.

RemoveActivePatch ( ) : void

Removes the active patch.

RemovePatch ( int patchIndex ) : void

Removes specified coordinate patch.

ReplaceGeometry ( IGeometry newGeometry ) : void

Replaces currently editing geometry with the other one.

TryActivateNodeAt ( ICoordinate coordinate, double nodeSize ) : bool

Tries to activate a node at the specified position.

TryAddNode ( ICoordinate coordinate ) : bool

Tries to add a new node into editing geometry.

Undo ( ) : void

Undo edit action.

UpdateActiveNodePosition ( ICoordinate coordinate, bool commitIntoUndoList ) : bool

Updates the position of the active node with the specified value

Private Methods

Méthode Description
drawActiveNode ( Graphics g, MapToClientDelegate MapToClient, Color color, int offsetX, int offsetY ) : void
drawNodes ( IEnumerable nodes, Graphics g, MapToClientDelegate MapToClient, Color color, int offsetX, int offsetY ) : void
insertNodeAt ( int patchIndex, int coordinateIndex, ICoordinate coordinate ) : void
recalcActiveElements ( ) : void
removeNodeAt ( int patchIndex, int coordinateIndex ) : void

Method Details

ClearHistory() public méthode

Clears the history of edit operations.
public ClearHistory ( ) : void
Résultat void

DrawEditingGeometry() public méthode

Draws editing geometry.
public DrawEditingGeometry ( Graphics g, MapToClientDelegate mapToClient, int offsetX, int offsetY ) : void
g System.Drawing.Graphics A System.Drawing.Graphics instance where to draw the geometry
mapToClient MapToClientDelegate A method performing map-to-screen conversion
offsetX int An X offset of geometry in pixels
offsetY int A Y offset of geometry in pixels
Résultat void

GetSecondaryNodes() public méthode

Gets secondaty nodes of the editing feature. Secondary nodes are nodes placed at the middle points of the feature segments.
public GetSecondaryNodes ( ) : IEnumerable
Résultat IEnumerable

InsertPatch() public méthode

Inserts a new coordinate patch into the editing geometry.
public InsertPatch ( int patchIndex, IEnumerable coordinates ) : void
patchIndex int A zero-based index of patch
coordinates IEnumerable A coordinates of inserted patch
Résultat void

Redo() public méthode

Redo edit action.
public Redo ( ) : void
Résultat void

RemoveActiveNode() public méthode

Removes the active node.
public RemoveActiveNode ( ) : void
Résultat void

RemoveActivePatch() public méthode

Removes the active patch.
public RemoveActivePatch ( ) : void
Résultat void

RemovePatch() public méthode

Removes specified coordinate patch.
public RemovePatch ( int patchIndex ) : void
patchIndex int An zero-based index of patch
Résultat void

ReplaceGeometry() public méthode

Replaces currently editing geometry with the other one.
public ReplaceGeometry ( IGeometry newGeometry ) : void
newGeometry IGeometry A new instance of IGeometry
Résultat void

TryActivateNodeAt() public méthode

Tries to activate a node at the specified position.
public TryActivateNodeAt ( ICoordinate coordinate, double nodeSize ) : bool
coordinate ICoordinate A coordinate of node to be activated
nodeSize double A size of node
Résultat bool

TryAddNode() public méthode

Tries to add a new node into editing geometry.
public TryAddNode ( ICoordinate coordinate ) : bool
coordinate ICoordinate An instance of the ICoordinate to add
Résultat bool

Undo() public méthode

Undo edit action.
public Undo ( ) : void
Résultat void

UpdateActiveNodePosition() public méthode

Updates the position of the active node with the specified value
public UpdateActiveNodePosition ( ICoordinate coordinate, bool commitIntoUndoList ) : bool
coordinate ICoordinate New position of the active node
commitIntoUndoList bool A value indicating whether current update should be commited into undo list
Résultat bool