画个圆,里面再画个X,半径为3-100,该如何处理

画个圆,里面再画个X,半径为3-100
线条越平滑越好

------解决方案--------------------
取得左上角坐标,取得圆心坐标,取得2点斜率,再由斜率从圆心起取得半径长度的点,
然后画点, 其它 四个角 类似 ,
以前搞过,
晚上给出代码,不过半径太小,似乎就不太平滑,
估计5以上就没问题吧
------解决方案--------------------
uses math;

function NormalizeAngle(const Angle: Double): Double;
begin
Result := Angle;
while Result > Pi do
Result := Result - 2 * Pi;
while Result < -Pi do
Result := Result + 2 * Pi;
end;

function LineSlopeAngle(const LinePt1, LinePt2: TPoint): Double;
begin
if LinePt1.X <> LinePt2.X then
Result := ArcTan2(LinePt2.Y - LinePt1.Y, LinePt2.X - LinePt1.X)
else if LinePt1.Y > LinePt2.Y then
Result := -Pi / 2
else if LinePt1.Y < LinePt2.Y then
Result := +Pi / 2
else
Result := 0;
end;
function NextPointOfLine(const LineAngle: Double; const ThisPt: TPoint;
const DistanceFromThisPt: Double): TPoint;
var
X, Y, M: Double;
Angle: Double;
begin
Angle := NormalizeAngle(LineAngle);
if Abs(Angle) <> Pi / 2 then
begin
M := Tan(LineAngle);
if Abs(Angle) < Pi / 2 then
X := ThisPt.X - DistanceFromThisPt / Sqrt(1 + Sqr(M))
else
X := ThisPt.X + DistanceFromThisPt / Sqrt(1 + Sqr(M));
Y := ThisPt.Y + M * (X - ThisPt.X);
Result.X := Round(X);
Result.Y := Round(Y);
end
else
begin
Result.X := ThisPt.X;
if Angle > 0 then
Result.Y := ThisPt.Y - Round(DistanceFromThisPt)
else
Result.Y := ThisPt.Y + Round(DistanceFromThisPt);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
R: TRect;
cSize:integer;
c1,p1,p2:tpoint;
Angle:Double;
begin
cSize := strtoint(Edit1.Text);
R.Left :=200;
R.top :=200;
R.Right :=R.Left + cSize*2;
R.Bottom :=R.top + cSize*2;
c1.X := r.Left +cSize;
c1.Y := r.Top +cSize;
Canvas.Brush.Color := clWindow;
Canvas.Pen.Color := clWindow;
Canvas.Rectangle(R.Left, R.Top, R.Right+200, R.Bottom+200);
Canvas.Brush.Color := clWindow;
Canvas.Pen.Color := clBlack;
Canvas.Ellipse(R.Left, R.Top, R.Right, R.Bottom);

//半径太小,如3,4 直接画点好了
case csize of
3:
begin
InflateRect(R, -2, -2);
Canvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);
end;
4:
begin

Canvas.Pixels[r.Left+2,r.Top+2 ]:=clBlack;
Canvas.Pixels[r.right-3,r.Top +2]:=clBlack;
Canvas.Pixels[r.Left+2,r.Bottom -3]:=clBlack;
Canvas.Pixels[r.right-3,r.Bottom -3]:=clBlack;
InflateRect(R, -3, -3);
Canvas.Rectangle(R.Left, R.Top, R.Right, R.Bottom);

end;
else
begin

P1.X := r.Left;
p1.Y := r.Top;

Angle := LineSlopeAngle(P1, c1);
P2 := NextPointOfLine(Angle, c1, cSize);
Canvas.MoveTo(c1.X,c1.y);
Canvas.LineTo(p2.x,p2.y);

P1.X := r.Right;
p1.Y := r.top;

Angle := LineSlopeAngle(P1, c1);
P2 := NextPointOfLine(Angle, c1, cSize);
Canvas.MoveTo(c1.X,c1.y);
Canvas.LineTo(p2.x,p2.y);

P1.X := r.Left;
p1.Y := r.Bottom;

Angle := LineSlopeAngle(P1, c1);
P2 := NextPointOfLine(Angle, c1, cSize);
Canvas.MoveTo(c1.X,c1.y);
Canvas.LineTo(p2.x,p2.y);

P1.X := r.Right;
p1.Y := r.Bottom;

Angle := LineSlopeAngle(P1, c1);