void TheDefaultObjectDecorator(Microsoft.Msagl.Drawing.IViewerObject obj) { this.viewer.InvalidateBeforeTheChange(obj); IViewerNode node = obj as IViewerNode; if (node != null) { Node drawingNode = node.Node; double w = drawingNode.Attr.LineWidth; decoratorRemovalsDict[node] = (delegate() { drawingNode.Attr.LineWidth = (int)w; }); drawingNode.Attr.LineWidth = (int)Math.Max(viewer.LineThicknessForEditing, w * 2); } else { IViewerEdge edge = obj as IViewerEdge; if (edge != null) { Edge drawingEdge = edge.Edge; double w = drawingEdge.Attr.LineWidth; decoratorRemovalsDict[edge] = (delegate() { drawingEdge.Attr.LineWidth = (int)w; }); drawingEdge.Attr.LineWidth = (int)Math.Max(viewer.LineThicknessForEditing, w * 2); } } this.viewer.Invalidate(obj); }
void TheDefaultObjectDecoratorRemover(Microsoft.Msagl.Drawing.IViewerObject obj) { this.viewer.InvalidateBeforeTheChange(obj); DelegateReturningVoid v; if (decoratorRemovalsDict.TryGetValue(obj, out v)) { decoratorRemovalsDict[obj](); //call the delegate decoratorRemovalsDict.Remove(obj); this.viewer.Invalidate(obj); } }
void RemoveNodeDragDecorations(Microsoft.Msagl.Drawing.IViewerObject obj) { (obj as SelectableShape).Highlighted = false; }
void DecorateNodeForDrag(Microsoft.Msagl.Drawing.IViewerObject obj) { //NodeShape nodeShape = node as NodeShape; //if (nodeShape != null) // nodeShape.Fill = Common.BrushFromMsaglColor( .SelectedNodeAttribute.FillColor); }
void TheDefaultEdgeLabelDecoratorStub(Microsoft.Msagl.Drawing.IViewerObject label) { }