public override void Initialize() { base.Initialize(); if (presenter.selections.Count > 0) { foreach (Selection sel in presenter.selections) { Entity entity = database.GetObject(sel.objectId) as Entity; if (entity != null) { _entities.Add(entity); } } } if (_entities.Count > 0) { this.Pointer.mode = PointerModes.Locate; _step = Step.Step2_SpecifyMirrorLinePoint1st; } else { presenter.selections.Clear(); _step = Step.Step1_SelectObject; this.Pointer.mode = PointerModes.Select; } _mirrorLine = presenter.CreateTempVisual(); }
public override void Initialize() { base.Initialize(); presenter.AppendEntity(_entityCopy, DBObjectState.Unconfirmed); tmpLine = presenter.CreateTempVisual(); this.Pointer.isShowAnchor = true; this.Pointer.mode = PointerModes.Locate; }
public override void Draw(IDrawingVisual gd) { if (gd == null) { return; } gd.Open(); gd.DrawArc(_center, _radius, _startAngle, _endAngle); gd.Close(); }
public override void Draw(IDrawingVisual gd) { if (gd == null) { return; } gd.Open(); gd.DrawCircle(_center, _radius); gd.Close(); }
public override void Draw(IDrawingVisual gd) { if (gd == null) { return; } gd.Open(); gd.DrawEllipse(_center, RadiusX, RadiusY); gd.Close(); }
public void ClearVisualGrips(IDrawingVisual associatedVisual) { var toRemove = m_grips.Where(e => e.AssociatedVisual == associatedVisual).ToList(); foreach (CADGripVisual g in toRemove) { RemoveVisualChild(g); RemoveLogicalChild(g); m_grips.Remove(g); } }
public override void Draw(IDrawingVisual gd) { if (gd == null) { return; } gd.Open(); gd.DrawLine(_startPoint, _endPoint); gd.Close(); }
public override void Draw(IDrawingVisual gd) { if (gd == null) { return; } gd.Open(); gd.DrawXLine(_basePoint, _direction); gd.Close(); }
public void RemoveVisual(IDrawingVisual dv) { RemoveVisualChild((Visual)dv); RemoveLogicalChild((Visual)dv); if (dv is ICADEnitiyVisual) { Geometries.Remove((ICADEnitiyVisual)dv); } else { _tempVisuals.Remove(dv); } }
public void AddVisual(IDrawingVisual dv) { if (dv is ICADEnitiyVisual) { Geometries.Add((ICADEnitiyVisual)dv); } else { _tempVisuals.Add(dv); } AddVisualChild((Visual)dv); AddLogicalChild((Visual)dv); }
public override void Draw(IDrawingVisual gd) { if (gd == null) { return; } gd.Open(); int numOfVertices = NumberOfVertices; for (int i = 0; i < numOfVertices - 1; ++i) { gd.DrawLine(GetPointAt(i), GetPointAt(i + 1)); } if (closed && numOfVertices > 2) { gd.DrawLine(GetPointAt(numOfVertices - 1), GetPointAt(0)); } gd.Close(); }
public virtual void Draw(IDrawingVisual gd) { }
public CADGripVisual(IDrawing drawing, GripPoint gripPoint, IDrawingVisual associatedVisual) : base(drawing) { _gripPoint = gripPoint; AssociatedVisual = associatedVisual; }