private void expandBounds(Vector2 pos) { if (pos.X - PathWidth < minX) { minX = pos.X - PathWidth; } if (pos.Y - PathWidth < minY) { minY = pos.Y - PathWidth; } if (pos.X + PathWidth > maxX) { maxX = pos.X + PathWidth; } if (pos.Y + PathWidth > maxY) { maxY = pos.Y + PathWidth; } RectangleF b = bounds; if (!RelativeSizeAxes.HasFlag(Axes.X)) { Width = b.Width; } if (!RelativeSizeAxes.HasFlag(Axes.Y)) { Height = b.Height; } }
public void ClearVertices() { if (positions.Count == 0) { return; } positions.Clear(); resetBounds(); if (!RelativeSizeAxes.HasFlag(Axes.X)) { Width = 0; } if (!RelativeSizeAxes.HasFlag(Axes.Y)) { Height = 0; } segmentsCache.Invalidate(); Invalidate(Invalidation.DrawNode); }