public void DrawPoints(System.Drawing.Graphics Graphic) { foreach (var p in Points) { Graphic.DrawEllipse(MyPens[ColourIdx], (float)p.X, (float)p.Y, 4, 4); } }
public override System.Drawing.Bitmap Render(System.Drawing.Graphics g, System.Drawing.Bitmap b, params int[] options) { System.Drawing.Color bc = DrawingBackColor; System.Drawing.Color fc = DrawingForeColor; System.Drawing.Rectangle r = System.Drawing.Rectangle.Empty; System.Drawing.Size o = InnerSize; bool vm = (AccountType)options[0] == AccountType.VendingMachine; System.Drawing.Size sz = vm ? new System.Drawing.Size(o.Width - 1, o.Width * 2 / 3) : new System.Drawing.Size(o.Height * 2 / 3, o.Height - 1); int w = (vm ? (o.Height - o.Width / 3) : (o.Width - o.Height / 3)) / options[3]; for (int i = 0; i < (options[2] > options[3] ? options[3] : options[2]); i++) { r = vm ? new System.Drawing.Rectangle(0, i * w, sz.Width, sz.Height) : new System.Drawing.Rectangle(i * w, 0, sz.Width, sz.Height); g.FillEllipse(new System.Drawing.SolidBrush(bc), r); g.DrawEllipse(new System.Drawing.Pen(new System.Drawing.SolidBrush(fc)), r); } if (!r.IsEmpty) { string s = options[1].ToString(); if (vm) { r.Inflate(s.Length > 1 ? -3 : -11, -2); } else { r.Inflate(s.Length > 1 ? 4 : -4, -8); } System.Drawing.Font fnt = new System.Drawing.Font("Microsoft Sans Serif", 12, System.Drawing.FontStyle.Bold); g.DrawString(s, fnt, new System.Drawing.SolidBrush(fc), r); } return(b); }
public void Draw(Grid inGrid, System.Drawing.Graphics inGraphics, bool bPrintAgeType) { double boundRectX = inGrid.GetTopLeftX() + inGrid.GetSectionWidth() * (GetX() - GetRadius()); int maxY = inGrid.GetTopLeftY() + inGrid.GetHeight(); double boundRectY = maxY - inGrid.GetSectionHeight() * (GetY() + GetRadius()); float plantDiameter = (float)GetDiameter(); float rectHeight = plantDiameter * inGrid.GetSectionHeight(); float rectiWidth = plantDiameter * inGrid.GetSectionWidth(); System.Drawing.RectangleF boundingRect = new System.Drawing.RectangleF((float)boundRectX, (float)boundRectY, rectHeight, rectiWidth); System.Drawing.Color EllipseBorderColor = System.Drawing.Color.Red; System.Drawing.Pen ellipseBorderPen = new System.Drawing.Pen(EllipseBorderColor); inGraphics.DrawEllipse(ellipseBorderPen, boundingRect); System.Drawing.SolidBrush ellipseFillBrush = new System.Drawing.SolidBrush(GetFillColor()); inGraphics.FillEllipse(ellipseFillBrush, boundingRect); if (bPrintAgeType) { System.Drawing.Font textFont = new System.Drawing.Font("Arial", 16); System.Drawing.SolidBrush textBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); float textX = (float)(inGrid.GetTopLeftX() + inGrid.GetSectionWidth() * (GetX() - GetRadius())); float textY = (float)(maxY - inGrid.GetSectionHeight() * (GetY() + GetRadius())); inGraphics.DrawString(GetAgeType().ToString(), textFont, textBrush, textX, textY); } ellipseBorderPen.Dispose(); }
public override void DrawCircle(CommonGui.Drawing.Pen pen, Vector2f center, float radius) { using (System.Drawing.Pen pen2 = CreatePen(pen)) { InternalGraphics.DrawEllipse(pen2, center.X - radius, center.Y - radius, radius * 2, radius * 2); } }
public override void Draw(System.Drawing.Graphics g) { if (g == null) { throw new System.ArgumentNullException("g"); } if (base.Dragging) { System.Drawing.Rectangle rectangle = GetViewportRectangle(); if (base.Brush != null) { System.Drawing.Drawing2D.Matrix prevBrushMatrix = PathVObjectCreateDesigner.AdaptBrushToViewport(base.Brush, this.VObjectHost.HostViewer); try { g.FillEllipse(base.Brush, rectangle); } finally { if (prevBrushMatrix != null) { VObjectsUtils.SetBrushMatrix(base.Brush, prevBrushMatrix); } } } if (base.Pen != null) { using (System.Drawing.Pen pen = CreateViewportPen()) g.DrawEllipse(pen, rectangle); } } }
protected static void drawBuffer(System.Drawing.Graphics g) { //base.OnPaint(e); g.Clear(System.Drawing.Color.Black); //System.Console.WriteLine(i+ " " + x); g.DrawLine(new System.Drawing.Pen(System.Drawing.Color.White), 50, 0, i + 50, 100); wuerfel.punkte = Matrix.multiplizieren(wuerfel.punkte, drehmatrix1grad); //System.Console.WriteLine(i+ " " + y); g.DrawLine(new System.Drawing.Pen(System.Drawing.Color.White), 150, 0, j + 150, 150); for (int k = 0; k < 8; k++) { g.DrawEllipse(new System.Drawing.Pen(System.Drawing.Color.Blue), center[0] - 2 + (int)wuerfel.punkte[k][0] + (int)(wuerfel.punkte[k][2] * 0.1), (int)center[1] - 2 + (int)(wuerfel.punkte[k][1] + wuerfel.punkte[k][2] * 0.1), 5, 5); } for (int l = 0; l < wuerfel.W.Length; l++) { wuerfel.W[l] = Matrix.multiplizieren(wuerfel.W[l], drehmatrix1grad); g.DrawLine(new System.Drawing.Pen(System.Drawing.Color.Blue), (float)(center[0] + wuerfel.W[l][0][0] + wuerfel.W[l][0][2] * 0.1), (float)(center[1] + wuerfel.W[l][0][1] + wuerfel.W[l][0][2] * 0.1), (float)(center[0] + wuerfel.W[l][1][0] + wuerfel.W[l][1][2] * 0.1), (float)(center[1] + wuerfel.W[l][1][1] + wuerfel.W[l][1][2] * 0.1)); } g.DrawLine(new System.Drawing.Pen(System.Drawing.Color.White), i + 50, 100, j + 150, 150); }
private void draw_cursor_ring(System.Drawing.Graphics gfx, float cpx, float cpy) { float radius = 7; float outer_width = 3.0f; float inner_width = 1.5f; var outer_color = System.Drawing.Color.Black; var inner_color = System.Drawing.Color.White; var cursor_rect = new System.Drawing.RectangleF(cpx - radius, cpy - radius, radius * 2, radius * 2); using (var inner_pen = new System.Drawing.Pen(inner_color, inner_width)) using (var outer_pen = new System.Drawing.Pen(outer_color, outer_width)) { gfx.DrawEllipse(outer_pen, cursor_rect); gfx.DrawEllipse(inner_pen, cursor_rect); } }
public virtual void paintTemp(System.Drawing.Graphics g) { if (m_Mode == 1) { SupportClass.GraphicsManager.Manager.SetColor(g, m_Color); g.DrawEllipse(SupportClass.GraphicsManager.Manager.GetPen(g), m_Startpunkt.X, m_Startpunkt.Y, m_xRadius, m_yRadius); } }
private void Draw_Point(System.Windows.Forms.PictureBox pictureBox, System.Drawing.Graphics g, System.Windows.Point pa) { float x1, y1; WorldToStreen(pictureBox, pa.X, pa.Y, out x1, out y1); g.DrawEllipse(RedPen, (float)(x1 - PiexlPoint * 0.5), (float)(y1 - PiexlPoint * 0.5), PiexlPoint, PiexlPoint); g.FillEllipse(RedBrush, (float)(x1 - PiexlPoint * 0.5), (float)(y1 - PiexlPoint * 0.5), PiexlPoint, PiexlPoint); }
public void Draw(System.Drawing.Bitmap bitmap, List <System.Drawing.Point> points) { System.Drawing.Point startPoint = points[0], endPoint = points[1]; System.Drawing.Pen pen = new System.Drawing.Pen(System.Drawing.Brushes.Blue, 3); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bitmap); g.DrawEllipse(pen, startPoint.X, startPoint.Y, endPoint.X, endPoint.Y); pen.Dispose(); g.Dispose(); }
private void Representation_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { System.Drawing.Graphics g = e.Graphics; g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; System.Drawing.Pen p = new System.Drawing.Pen(System.Drawing.Color.Tomato, 2); System.Drawing.SolidBrush myb = new System.Drawing.SolidBrush(System.Drawing.Color.White); g.DrawEllipse(p, 1, 1, 17, 17); g.FillEllipse(myb, 1, 1, 17, 17); p.Dispose(); }
public override void Draw(System.Drawing.Graphics drawArea) { System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Yellow); drawArea.FillEllipse(myBrush, posX, posY, radius * 2, radius * 2); myBrush.Dispose(); System.Drawing.Pen myPen = new System.Drawing.Pen(System.Drawing.Color.DarkOrange); myPen.Width = 5; drawArea.DrawEllipse(myPen, posX, posY, radius * 2, radius * 2); myPen.Dispose(); }
internal void Paint(object sender, System.Windows.Forms.PaintEventArgs e) { System.Drawing.Graphics g = e.Graphics; g.Flush(System.Drawing.Drawing2D.FlushIntention.Sync); float xMod = g.VisibleClipBounds.Width / 100; float yMod = g.VisibleClipBounds.Height / 60; float playerSize = ServerParam.Instance.Player_size * 2 * 5; float ballSize = ServerParam.Instance.Ball_size * 2 * 10; System.Drawing.Pen pen = new System.Drawing.Pen(System.Drawing.Brushes.White, xMod); System.Drawing.Pen pen2 = new System.Drawing.Pen(System.Drawing.Brushes.LightBlue, xMod); //added g.DrawLine(pen, xMod * 50, 0, xMod * 50, yMod * 60); g.DrawRectangle(pen, new System.Drawing.Rectangle((int)(xMod * 92), (int)(yMod * 23), (int)(xMod * 14), (int)(yMod * 14))); g.DrawRectangle(pen, new System.Drawing.Rectangle((int)(xMod * -5), (int)(yMod * 23), (int)(xMod * 14), (int)(yMod * 14))); g.DrawRectangle(pen2, new System.Drawing.Rectangle((int)(xMod * 43), (int)(yMod * 23), (int)(xMod * 14), (int)(yMod * 14)));//added g.DrawEllipse(pen, new System.Drawing.Rectangle((int)(xMod * 43), (int)(yMod * 23), (int)(xMod * 14), (int)(yMod * 14))); RoboCup.Geometry.Vector pos1 = new Vector(0, 0); RoboCup.Geometry.Vector pos2 = new Vector(0, 0); System.Drawing.Pen linePen = new System.Drawing.Pen(System.Drawing.Brushes.Black, xMod); for (int i = 0; i < DrawPlayerList.Count; i++) { Player p = DrawPlayerList[i]; pos1.X = (p.Position.X + 50) * xMod; pos2.X = (p.Position.X + 50) * xMod; pos1.Y = (p.Position.Y + 30) * yMod; pos2.Y = (p.Position.Y + 30) * yMod; pos1.X += (float)(Math.Cos(p.AngleBodyCommitted) * xMod * playerSize / 2); pos1.Y += (float)(Math.Sin(p.AngleBodyCommitted) * yMod * playerSize / 2); pos2.X -= (float)(Math.Cos(p.AngleBodyCommitted) * xMod * playerSize / 2); pos2.Y -= (float)(Math.Sin(p.AngleBodyCommitted) * yMod * playerSize / 2); g.FillEllipse(p.Side == "l"?System.Drawing.Brushes.Blue:p.Side == "r"?System.Drawing.Brushes.Red:System.Drawing.Brushes.Yellow, new System.Drawing.Rectangle(new System.Drawing.Point((int)Math.Round((p.Position.X + 50 - playerSize / 2) * xMod, (int)MidpointRounding.AwayFromZero), (int)Math.Round((p.Position.Y + 30 - playerSize / 2) * yMod, MidpointRounding.AwayFromZero)), new System.Drawing.Size((int)(playerSize * xMod), (int)(playerSize * yMod)))); g.DrawLine(linePen, pos1.X, pos1.Y, pos2.X, pos2.Y); } foreach (var b in Balls) { if (b != null) { g.FillEllipse(System.Drawing.Brushes.Gray, new System.Drawing.Rectangle(new System.Drawing.Point((int)Math.Round((b.Position.X + 50 - ballSize / 2) * xMod, (int)MidpointRounding.AwayFromZero), (int)Math.Round((b.Position.Y + 30 - ballSize / 2) * yMod, MidpointRounding.AwayFromZero)), new System.Drawing.Size((int)(ballSize * xMod), (int)(ballSize * yMod)))); } } foreach (Referee r in Referees) { r.doPaint(sender, e); } }
/// <summary> /// 绘制坐标系 /// </summary> /// <param name="g"></param> private void Draw_CoordinateSystem(System.Windows.Forms.PictureBox pictureBox, System.Drawing.Graphics g) { float x1, y1; var pa = new System.Drawing.PointF(); var pb = new System.Drawing.PointF(); // 绘制原点 { WorldToStreen(pictureBox, 0, 0, out x1, out y1); g.DrawEllipse(RedPen, (float)(x1 - PiexlPoint * 0.5), (float)(y1 - PiexlPoint * 0.5), PiexlPoint, PiexlPoint); g.FillEllipse(RedBrush, (float)(x1 - PiexlPoint * 0.5), (float)(y1 - PiexlPoint * 0.5), PiexlPoint, PiexlPoint); } // 绘制 X 轴 { pa.X = 0; pa.Y = 0; WorldToStreen(pictureBox, pa.X, pa.Y, out x1, out y1); pa.X = x1; pa.Y = y1; pb.X = 30; pb.Y = 0; WorldToStreen(pictureBox, pb.X, pb.Y, out x1, out y1); pb.X = x1; pb.Y = y1; g.DrawLine(RedPen, pa, pb); } // 绘制 Y 轴 { pa.X = 0; pa.Y = 0; WorldToStreen(pictureBox, pa.X, pa.Y, out x1, out y1); pa.X = x1; pa.Y = y1; pb.X = 0; pb.Y = 30; WorldToStreen(pictureBox, pb.X, pb.Y, out x1, out y1); pb.X = x1; pb.Y = y1; g.DrawLine(BluePen, pa, pb); } }
public void Draw(System.Drawing.Graphics g) { Editor.Analysis(oval.points, out x, out y, out width, out height); if (oval is Circle) { if (width > height) { width = height; } else { height = width; } } g.DrawEllipse(this.oval.pen, this.x, this.y, this.width, this.height); }
// implement Draw() (step 5) public void Draw(System.Drawing.Graphics image) { System.Drawing.Brush brush = new System.Drawing.SolidBrush(color); System.Drawing.Pen pen = new System.Drawing.Pen(color); // Determine if circle, since use [upperLeft, width, height, !vertices] only if (name.Equals("Circle")) { image.DrawEllipse(pen, UpperLeft.X, UpperLeft.Y, Height, Width); image.FillEllipse(brush, new System.Drawing.Rectangle(UpperLeft.X, UpperLeft.Y, Width, Height)); } else { image.DrawPolygon(pen, Vertices); image.FillPolygon(brush, Vertices); } brush.Dispose(); pen.Dispose(); }
public override System.Drawing.Bitmap Render(System.Drawing.Graphics g, System.Drawing.Bitmap b, params int[] options) { System.Drawing.Color bc = DrawingBackColor; System.Drawing.Color fc = DrawingForeColor; System.Drawing.Rectangle r = new System.Drawing.Rectangle() { Height = b.Height, Width = b.Width }; r.Inflate(-1, -1); g.Clear(System.Drawing.Color.White); g.FillEllipse(new System.Drawing.SolidBrush(bc), r); g.DrawEllipse(new System.Drawing.Pen(fc), r); string s = options[0].ToString(); r.Inflate(s.Length > 1 ? 4 : -4, -2); System.Drawing.Font fnt = new System.Drawing.Font("Microsoft Sans Serif", 12, System.Drawing.FontStyle.Bold); g.DrawString(s, fnt, new System.Drawing.SolidBrush(fc), r); b.MakeTransparent(System.Drawing.Color.White); return(b); }
internal void Draw(Transformation trans, System.Drawing.Graphics g) { if (!IsVisible) { return; } if (Location.X == 0 && Location.Y == 0) { DrawTrack(trans, g); return; } System.Drawing.Point p = trans.CalculatePixel(Location); int size = 5; if (IsHighlighted) { size = StyleManager.PassengerHightlightSize; } else { size = StyleManager.PassengerSize; } System.Drawing.RectangleF rect = new System.Drawing.RectangleF(p.X - size, p.Y - size, size * 2, size * 2); g.FillEllipse(new System.Drawing.SolidBrush(StyleManager.GetPassengerColor(Status, IsHighlighted)), rect); if (IsHighlighted) { g.DrawEllipse(new System.Drawing.Pen(new System.Drawing.SolidBrush(System.Drawing.Color.White), 2), rect); } DrawID(trans, g); DrawTrack(trans, g); }
public override void DrawEllipse(double left, double bottom, double right, double top) { _gfx.DrawEllipse(_currentPen, new System.Drawing.RectangleF((float)left, (float)top, (float)(right - left), (float)(bottom - top))); }
public static void Draw_circle(int x, int y, int r, System.Drawing.Pen pen) { canvas.DrawEllipse(pen, x - r, y - r, r * 2, r * 2); }
private void DrawGraph() { using (DrawingContext dc = this.drawingGroup.Open()) { long maxTime = long.MinValue; long minTime = long.MaxValue; // The maximum distance between two anchor points is the diagonal distance across the drawable screen double windowDistHeight = Math.Sqrt(Math.Pow(owningWindow.myImageBox.ActualHeight, 2) + Math.Pow(owningWindow.myImageBox.ActualWidth, 2)); // We want our graph size to be bounded by the largest window size ever seen MaxWindowDistSeen = Math.Max(windowDistHeight, MaxWindowDistSeen); // If we have exactly TargetNumPointsToDisplay many points to display, then they should fill the graph area, // and use that point size for every other scenario //double pointRadius = Math.Min(GraphImageBox.ActualWidth, GraphImageBox.ActualHeight) / TargetNumPointsToDisplay; double pointRadius = Math.Min(GraphImageBox.Width, GraphImageBox.Height) / TargetNumPointsToDisplay; foreach (DistanceTimeTuple point in currentPointBuffer) { maxTime = Math.Max(point.Time, maxTime); minTime = Math.Min(point.Time, minTime); } long totalWidth = maxTime - minTime; // since we're scrolling to the right in a sense, we only care about the value at the right edge and back track from there // however, if our entire set of points would not fill the graph window horizontally, then we consider from the left if (maxTime - minTime >= WindowTimeWidth) { minTime = maxTime - WindowTimeWidth; } if (MaxWindowDistSeen > 0 && WindowTimeWidth > 0) { System.Drawing.Bitmap bmp = new System.Drawing.Bitmap((int)GraphImageBox.Width, (int)GraphImageBox.Height); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(bmp); foreach (DistanceTimeTuple point in currentPointBuffer) { if (point.Time >= minTime) { System.Windows.Point centerPoint = new System.Windows.Point(getTimePixelPosition(point.Time, minTime), getDistPixelPosition(point.Distance, MaxWindowDistSeen)); //dc.DrawEllipse(Brushes.Red, null, centerPoint, pointRadius, pointRadius); int xPos = (int)(centerPoint.X - pointRadius); int yPos = (int)(GraphImageBox.Height - (centerPoint.Y - pointRadius)); g.DrawEllipse(new System.Drawing.Pen(System.Drawing.Color.Red, 2), xPos, yPos, (int)(pointRadius * 2), (int)(pointRadius * 2)); //dc.DrawRoundedRectangle(Brushes.Red, null, new Rect(centerPoint.X - pointRadius, centerPoint.Y - pointRadius, pointRadius * 2, pointRadius * 2), null, pointRadius, null, pointRadius, null); } } GraphImageBox.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( bmp.GetHbitmap(), IntPtr.Zero, System.Windows.Int32Rect.Empty, BitmapSizeOptions.FromWidthAndHeight((int)GraphImageBox.Width, (int)GraphImageBox.Height)); } } }
public void DrawCircle(Point c, double r, UInt32?edgeColor = null, UInt32?fillColor = null) { System.Drawing.Graphics g = this; System.Drawing.Point scrCenter = viewportToScreen(c); Point scrRadii = scaleToScreen(new Point(r, r)); System.Drawing.Rectangle boundingRec = new System.Drawing.Rectangle( (int)Math.Round(scrCenter.X - scrRadii.X), (int)Math.Round(scrCenter.Y - scrRadii.Y), (int)Math.Round(2 * scrRadii.X), (int)Math.Round(2 * scrRadii.Y)); System.Drawing.Pen p = CurrentPen as System.Drawing.Pen; if (edgeColor != null) { p = new System.Drawing.Pen(ToSysColor(edgeColor)); } g.DrawEllipse(p, boundingRec); if (fillColor != null) { System.Drawing.Brush b = new System.Drawing.SolidBrush(ToSysColor(fillColor)); g.FillEllipse(b, boundingRec); } // Point[] circle = new Point[circularTessellation]; // Point[] quarterCircle = new Point[circularTessellation/4]; // double deltaAngle = (2 * Math.PI) / circularTessellation; // // first half quadrent // for (int idx = 0; idx < circularTessellation / 8; idx++) // { // double angle = (deltaAngle * idx) + (deltaAngle/2); // double x = Math.Sin(angle) * r; // double y = Math.Cos(angle) * r; // quarterCircle[idx] = new Point(x, y); // circle[idx] = quarterCircle[idx].Translate(c); // } // //DrawPolygon(g, circle); // // second half quadrent // for (int idx = 0; idx < circularTessellation / 8; idx++) // { // quarterCircle[idx + circularTessellation / 8] = // new Point(quarterCircle[(circularTessellation / 8) - idx - 1].Y, // quarterCircle[(circularTessellation / 8) - idx - 1].X); // circle[idx + circularTessellation / 8] = quarterCircle[idx + circularTessellation / 8].Translate(c); // } // //DrawPolygon(g, circle); // // second quadrant // for (int idx = 0; idx < circularTessellation / 4; idx++) // { // circle[idx + circularTessellation / 4] = quarterCircle[circularTessellation / 4 - idx - 1].Scale(1, -1).Translate(c); // } // //DrawPolygon(g, circle); // // third quadrent // for (int idx = 0; idx < circularTessellation / 4; idx++) // { // circle[idx + circularTessellation / 2] = quarterCircle[idx].Scale(-1, -1).Translate(c); // } // //DrawPolygon(g, circle); //// fourth quadrent // for (int idx = 0; idx < circularTessellation / 4; idx++) // { // circle[idx + ((circularTessellation * 3) / 4)] = quarterCircle[circularTessellation / 4 - idx - 1].Scale(-1, 1).Translate(c); // } // DrawPolygon(g, circle); }
public void drawOval(int x, int y, int width, int height) { System.Drawing.Pen pen = new System.Drawing.Pen(col); graph.DrawEllipse(pen, x, y, width, height); }
public override void Draw(System.Drawing.Graphics gc, System.Drawing.Pen pc) { gc.DrawEllipse(pc, C1.X, C1.Y, C2.X, C2.Y); }
public override void Draw(System.Drawing.Graphics g, System.Drawing.Pen p) { g.DrawEllipse(p, A1.Nx, A1.Ny, B1.Nx, B1.Ny); }
public void drawOval(int x, int y, int width, int height) { nativeGraphics.DrawEllipse(stroke.pen, x, y, width, height); }
public void DrawOval(float x, float y, float width, float height, float w) { g.DrawEllipse(color.GetPen(w), new System.Drawing.RectangleF(x, y, width, height)); }
public override void Draw(System.Drawing.Graphics formgraphics, System.Drawing.Pen pen) { formgraphics.DrawEllipse(pen, this.x, this.y, this.r * 2, this.r * 2); }
static void DrawDDD(this System.Drawing.Graphics g) { g.DrawEllipse(System.Drawing.Pens.AliceBlue, 0, 0, 100, 100); }
public override void NoFill(System.Drawing.Graphics g, double px, double py, int tmp) { g.DrawEllipse(new System.Drawing.Pen(new System.Drawing.SolidBrush(System.Drawing.Color.Black)), Convert.ToInt32(System.Math.Round((_x - _r) * px)), Convert.ToInt32(System.Math.Round((_y - _r) * py)), Convert.ToInt32(System.Math.Round(2 * _r * px)), Convert.ToInt32(System.Math.Round(2 * _r * py))); }