public override void DrawShape(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (State.HasFlag(ShapeStateFlags.Visible)) { renderer?.DrawRectangle(dc, this, Style); } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (_topLeft is null || _bottomRight is null) { return; } if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { _topLeft.DrawShape(dc, renderer, selection); _bottomRight.DrawShape(dc, renderer, selection); } else { if (selection.SelectedShapes.Contains(_topLeft)) { _topLeft.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_bottomRight)) { _bottomRight.DrawShape(dc, renderer, selection); } } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { foreach (var point in GetPathPoints()) { point.DrawShape(dc, renderer, selection); } } else { foreach (var point in GetPathPoints()) { if (selection.SelectedShapes.Contains(point)) { point.DrawShape(dc, renderer, selection); } } } }
public override void DrawShape(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (!State.HasFlag(ShapeStateFlags.Visible)) { return; } var isSelected = selection?.SelectedShapes is not null && selection.SelectedShapes.Count > 0 && selection.SelectedShapes.Contains(this); if (renderer?.State is not { } state) { return; } var style = isSelected ? state.SelectedPointStyle : state.PointStyle; if (style is null) { return; } var size = state.PointSize; if (size <= 0.0) { return; } renderer.DrawPoint(dc, this, style); }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (_start is null || _end is null) { return; } if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { _start.DrawShape(dc, renderer, selection); _end.DrawShape(dc, renderer, selection); } else { if (selection.SelectedShapes.Contains(_start)) { _start.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_end)) { _end.DrawShape(dc, renderer, selection); } } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { foreach (var connector in _connectors) { connector.DrawShape(dc, renderer, selection); } } else { foreach (var connector in _connectors) { if (selection.SelectedShapes.Contains(connector)) { connector.DrawShape(dc, renderer, selection); } } } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (State.HasFlag(ShapeStateFlags.Visible)) { foreach (var shape in _shapes) { shape.DrawPoints(dc, renderer, selection); } } base.DrawPoints(dc, renderer, selection); }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { if (_point1 is null || _point2 is null || _point3 is null || _point4 is null) { return; } if (selection?.SelectedShapes is null) { return; } if (selection.SelectedShapes.Contains(this)) { _point1.DrawShape(dc, renderer, selection); _point2.DrawShape(dc, renderer, selection); _point3.DrawShape(dc, renderer, selection); _point4.DrawShape(dc, renderer, selection); } else { if (selection.SelectedShapes.Contains(_point1)) { _point1.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_point2)) { _point2.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_point3)) { _point3.DrawShape(dc, renderer, selection); } if (selection.SelectedShapes.Contains(_point4)) { _point4.DrawShape(dc, renderer, selection); } } }
public override void DrawPoints(object?dc, IShapeRenderer?renderer, ISelection?selection) { }