## how to draw a circle

### how to draw a circle

All,

I've a short question. How do I draw a circle on my form?

I know that a circle is a special type of ellipse, but when trying to
draw one I set the the circle's center to let's say (100, 100).

Anyone have an example of doing this ?

Ronan van Riet

### how to draw a circle

> All,

> I've a short question. How do I draw a circle on my form?

> I know that a circle is a special type of ellipse, but when trying to
> draw one I set the the circle's center to let's say (100, 100).

> Anyone have an example of doing this ?

> Ronan van Riet

Hi Ronan,

it depends of the way you want to draw the circle. Here is an example
for the case you have a special radius:

procedure TForm1.DrawTheCircle(Canvas: TCanvas; radius: Integer; P:
TPoint);
begin
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
DrawTheCircle(Canvas, 30, Point(100, 100));
end;

or if you want to use the OnMouseUp event to set the center of the
circle you can doit like this:

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
DrawTheCircle(Canvas, 30, Point(x, y));
end;

Good luck!

Kerstin

### how to draw a circle

Try

> All,

> I've a short question. How do I draw a circle on my form?

> I know that a circle is a special type of ellipse, but when trying to

"Special"... It's just a 'square' ellipse, meaning it has the same
height and width.

> draw one I set the the circle's center to let's say (100, 100).

> Anyone have an example of doing this ?

> Ronan van Riet

--
Josef Garvi
Eden Foundation, Skreav. 45B, S-311 72 Falkenberg, Sweden
Tel: +46 346-53157, Fax: +46 346-53171

WWW: http://www.eden-foundation.org/

The subject says it all.
How do I draw a circle with the PS curveto operator ?
This is the way Adobe Illustrator draws circles, but when I try do do it
the same way, I obtain circles which seem slightly distorted.

Thanks,
Jean

--
Jean Thioulouse - Laboratoire de Biometrie - Universite Lyon 1
69622 Villeurbanne CEDEX - France        Fax: (33) 78 89 27 19