procedure EllipseAngle(Canvas: TCanvas; CX, CY, A, B: Integer; Angle: Double);
const
DXY = 0.55228475;
var
X, Y: array[0..12] of Single;
DX, DY: Single;
CF, SF: Single;
Pts: array[0..12] of TPoint;
i: Integer;
begin
DX := A * DXY;
DY := B * DXY;
X[0] := A; Y[0] := 0;
X[1] := A; Y[1] := DY;
X[2] := DX; Y[2] := B;
X[3] := 0; Y[3] := B;
X[4] := -DX; Y[4] := B;
X[5] := -A; Y[5] := DY;
X[6] := -A; Y[6] := 0;
X[7] := -A; Y[7] := -DY;
X[8] := -DX; Y[8] := -B;
X[9] := 0; Y[9] := -B;
X[10] := DX; Y[10] := -B;
X[11] := A; Y[11] := -DY;
X[12] := A; Y[12] := 0;
CF := Cos(Angle);
SF := Sin(Angle);
for i := 0 to 12 do begin
Pts[i].X := Round(X[i] * CF - Y[i] * SF + CX);
Pts[i].Y := Round(X[i] * SF + Y[i] * CF + CY);
end;
Canvas.PolyBezier(Pts);
end;
procedure TForm2.Button23Click(Sender: TObject);
begin
EllipseAngle(Canvas, 200, 200, 200, 100, - Pi/4);
end;