public void Visit(mEllipse ellipse) { ellipse.Width = width; ellipse.Height = height; ellipse.X = x; ellipse.Y = y; ellipse.Load(); }
/*private funcs*/ public void GenerateTransformRect() { selectionRect = new SelectionRectangle(); selectionRect.Padding = 9; int padding = selectionRect.Padding; int width = Width + (padding * 2); int height = Height + (padding * 2); mRectangle rect = new mRectangle(width, height, Color.Transparent); rect.X = X - padding; rect.Y = Y - padding; rect.BorderSize = 2; rect.DrawBorder = true; rect.Load(); int handleSize = 10; int correction = handleSize / 2;//\(handleSize + (handleSize/2)); mEllipse topleft = new mEllipse(handleSize, handleSize, Color.Black); topleft.X = rect.X - correction; topleft.Y = rect.Y - correction; topleft.Load(); selectionRect.TopLeft = topleft; mEllipse topright = new mEllipse(handleSize, handleSize, Color.Black); topright.X = rect.X + rect.Width - correction; topright.Y = rect.Y - correction; topright.Load(); selectionRect.TopRight = topright; mEllipse bottomleft = new mEllipse(handleSize, handleSize, Color.Black); bottomleft.X = rect.X - correction; bottomleft.Y = rect.Y + rect.Height - correction; bottomleft.Load(); selectionRect.BottomLeft = bottomleft; mEllipse bottomright = new mEllipse(handleSize, handleSize, Color.Black); bottomright.X = rect.X + rect.Width - correction; bottomright.Y = rect.Y + rect.Height - correction; bottomright.Load(); selectionRect.BottomRight = bottomright; selectionRect.SelectRect = rect; }