ItsMe
asked on
TCanvas.Circle
Hi,
I need a procedure which draws a circle. The Code should be
procedure circle (x,y,r : Integer) x,y = Middle r = radius.
I need a procedure which draws a circle. The Code should be
procedure circle (x,y,r : Integer) x,y = Middle r = radius.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Which comment answer helped you solve your problem?? I'm just curious...
ASKER
No one. I took a cheat of paper, draw a rectangle with a circle and thought that I only have to find out the radius to solve my problem. I knew the mouse up point and from this point i ad to go radius left and radius right and up and down the same.
(:-)
(:-)
That would take quite a long time to accomplish... You need to change the Xs and Ys in order to be able to do it that way, and it really is a cheap way of doin' it...
Merry Christmas!
Take care o' ya
-Viktor
--Ivanov
Merry Christmas!
Take care o' ya
-Viktor
--Ivanov
procedure Circle(x,y, r : Integer; Where : TCanvas);
var
a : integer;
begin
for a := 0 to 359 do
Where.Pixels[round(x+cos(a
end;
Example call:
Circle(Form1.Width shr 1, Form1.Height shr 1, 50, Form1.Canvas);
Hope this helps...
-Viktor
--Ivanov