public void AddEllipse(float x, float y, float width, float height, DashStyle dashStyle, bool temporary = false, int transparency = 255) { Shape ellipse = new EllipseShape(new PointF(x, y + height), new PointF(x, y), new PointF(x + width, y), new PointF(x + width, y + height), Color.Black, Color.FromArgb(transparency, Color.White), dashStyle, temporary); ShapeList[CurrentTab].Add(ellipse); }
public override BaseShape copySelf() { EllipseShape copyEllipseShape = new EllipseShape(); copyEllipseShape.setP1(this.getP1()); copyEllipseShape.setP2(this.getP2()); copyEllipseShape.penColor = this.penColor; copyEllipseShape.penWidth = this.penWidth; return(copyEllipseShape); }
public void AddRandomFilledElipse(Color fillColor) { GetRandomDimensions(out var location, out var size); var ellipse = new EllipseShape(location, size) { FillColor = fillColor, BorderColor = Color.Transparent, }; ShapeList.Add(ellipse); }
public void AddRandomEllipse() { Random rnd = new Random(); int x = rnd.Next(100, 1000); int y = rnd.Next(100, 600); EllipseShape elipse = new EllipseShape(new Rectangle(x, y, 200, 100)); elipse.FillColor = Color.White; ShapeList.Add(elipse); }
public void AddRandomEllipse() { Random rnd = new Random(); int x = rnd.Next(100, 500); int y = rnd.Next(100, 300); EllipseShape rect = new EllipseShape(new Rectangle(x, y, 50, 100)); rect.FillColor = Color.White; ShapeList.Add(rect); }
public void AddRandomEllispe() { Random rnd = new Random(); int x = rnd.Next(100, 1000); int y = rnd.Next(100, 600); EllipseShape ellipse = new EllipseShape(new Rectangle(x, y, 100, 300)); ellipse.BorderColor = Color.Black; ellipse.FillColor = Color.White; ellipse.BorderWidth = 5; ShapeList.Add(ellipse); }
public void AddRandomEllipse() { Random rnd = new Random(); int x = rnd.Next(100, 1000); int y = rnd.Next(100, 600); EllipseShape ellipse = new EllipseShape(new Rectangle(x, y, 200, 200)); ellipse.FillColor = ColorFill; ellipse.Rotation = Rotation; ellipse.BorderColor = ColorBorder; ShapeList.Add(ellipse); }
public void addRndomEllipse() { Random rnd = new Random(); int x = rnd.Next(100, 1000); int y = rnd.Next(100, 600); //EllipseShape ellipse = new EllipseShape(new RectangleF(x, y, 100, 100)); EllipseShape ellipse = new EllipseShape(new RectangleF(x, y, 100, 200)); ShapeList.Add(ellipse); }
internal void AddEllipse(bool isRandom = false, int x = 0, int y = 0) { if (isRandom) { Random rnd = new Random(); x = rnd.Next(100, 1000); y = rnd.Next(100, 600); } EllipseShape rect = new EllipseShape(new Rectangle(x, y, 200, 100)); rect.FillColor = Color.White; rect.BoarderColor = Color.Black; rect.BoarderWidth = BoarderWidth; ShapeList.Add(rect); }
public void AddRandomEllipse(SizeF size) { Random rnd = new Random(); int x = rnd.Next(100, 1000); int y = rnd.Next(100, 600); EllipseShape ellipse = new EllipseShape(new Rectangle(x, y, 200, 200)); ellipse.FillColor = ColorFill; ellipse.Rotation = Rotation; ellipse.BorderColor = ColorBorder; ShapeList.Add(ellipse); if (size.Width != 0 || size.Height != 0) { ellipse.Size = size; } }
public EllipseShape(EllipseShape ellipese) : base(ellipese) { }
public void Paste() { foreach (var item in CopyData.ToList()) { if (item.GetType() == typeof(RectangleShape)) { RectangleShape rect = new RectangleShape(new Rectangle((int)item.Location.X + 200, (int)item.Location.Y, 100, 200)) { BorderColor = item.BorderColor, FillColor = item.FillColor, Height = item.Height, Width = item.Width, Rotation = item.Rotation }; ShapeList.Add(rect); } else if (item.GetType() == typeof(EllipseShape)) { EllipseShape ellipse = new EllipseShape(new Rectangle((int)item.Location.X + 200, (int)item.Location.Y, 100, 200)) { BorderColor = item.BorderColor, FillColor = item.FillColor, Height = item.Height, Width = item.Width, Rotation = item.Rotation }; ShapeList.Add(ellipse); } else if (item.GetType() == typeof(TriangleShape)) { TriangleShape triangle = new TriangleShape(new Rectangle((int)item.Location.X + 200, (int)item.Location.Y, 100, 200)) { PercentX = item.PercentX, PercentY = item.PercentY, IsBeingResized = item.IsBeingResized, Point1 = item.Point1, Point2 = item.Point2, x1 = item.x1, x2 = item.x2, x3 = item.x3, y1 = item.y1, y2 = item.y2, y3 = item.y3, Polygon = item.Polygon, TriangleSize = item.TriangleSize, BorderColor = item.BorderColor, FillColor = item.FillColor, Height = item.Height, Width = item.Width, Rotation = item.Rotation }; ShapeList.Add(triangle); } else if (item.GetType() == typeof(LineShape)) { LineShape line = new LineShape(new Rectangle((int)item.Location.X + 200, (int)item.Location.Y, 100, 200)) { x1 = item.x2, x2 = item.x2, y1 = item.y1, y2 = item.y2, LineSize = item.LineSize, Point1 = item.Point1, Point2 = item.Point2, IsBeingResized = item.IsBeingResized, Polygon = item.Polygon, TriangleSize = item.TriangleSize, BorderColor = item.BorderColor, FillColor = item.FillColor, Height = item.Height, Width = item.Width, Rotation = item.Rotation }; ShapeList.Add(line); } else if (item.GetType() == typeof(TrapezoidShape)) { TrapezoidShape trape = new TrapezoidShape(new Rectangle((int)item.Location.X + 200, (int)item.Location.Y, 100, 200)) { LineSize = item.LineSize, Polygon = item.Polygon, TriangleSize = item.TriangleSize, BorderColor = item.BorderColor, FillColor = item.FillColor, Height = item.Height, Width = item.Width, Rotation = item.Rotation }; ShapeList.Add(trape); } } }
private void ellipseToolStripMenuItem_Click(object sender, EventArgs e) { ShapeToDraw = new EllipseShape(); shapeButton.Image = ellipseButton.Image; }
public EllipseShape(EllipseShape rectangle) : base(rectangle) { }
public EllipseShape(EllipseShape ellipese) : base(ellipese) { }