Draw ellipse with specify x,y,width, height
- From: Slickuser <slick.users@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 20:52:56 -0800 (PST)
I am trying to draw an ellipse with specify x,y,width, and height for
input argument in C# .net (Visual Studio 2005).
It seem it will not draw for me. What am I missing?
See the code below, thanks.
//CODE
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
draw(10, 20, 20, 50);
draw(50, 80, 50, 150);
}
private void draw(int x1, int y1, int w, int h)
{
Graphics g = this.CreateGraphics();
g.FillEllipse(Brushes.Blue, x1, y1, w, h);
}
}
}
.
- Follow-Ups:
- Re: Draw ellipse with specify x,y,width, height
- From: Slickuser
- Re: Draw ellipse with specify x,y,width, height
- Prev by Date: Re: The remote server returned an error: (407) Proxy Authentication Re
- Next by Date: Re: Needing info on passing data between applications. Win[C#]
- Previous by thread: Re: The remote server returned an error: (407) Proxy Authentication Re
- Next by thread: Re: Draw ellipse with specify x,y,width, height
- Index(es):
Relevant Pages
|