Claro, Si simplemente has copiado el código, te faltan algunas cosas.
Debes definir una unidad completa con sus cabeceras...
Prueba a compilar este código tal cual, pero guardado en un archivo llamado Rotar.pas. Lo añades a tu proyecto....
Código Delphi
[-]
unit Rotar;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
function Rotate(Canvas: TCanvas; Width, Height, iAngle: Integer; Back: LongBool): TBitmap;
implementation
function Rotate(Canvas: TCanvas; Width, Height, iAngle: Integer; Back: LongBool): TBitmap;
var
Points: array [0..2] of TPoint;
Radio, Angle, _Angle: Real;
begin
Points[0] := Point(-Width, Height);
Points[1] := Point(Width, Height);
Points[2] := Point(-Width, -Height);
Radio := Sqrt(Sqr(Width / 2) + Sqr(Height / 2));
_Angle := (360 - (iAngle mod 360)) * pi / 180;
iAngle := 3;
repeat Dec(iAngle);
Angle := ArcTan(Points[iAngle].Y / Points[iAngle].X) + _Angle;
if Points[iAngle].X < 0 then
Angle := Angle + Pi;
Points[iAngle] := Point(Round((Cos(Angle) * Radio) + Radio), Round(Radio - (Sin(Angle) * Radio)));
until not LongBool(iAngle);
Result := TBitmap.Create;
Result.TransparentColor := clFuchsia;
Result.Canvas.Brush.Color := clFuchsia;
iAngle := Round(Radio * 2);
Result.Height := iAngle;
Result.Width := iAngle;
plgblt(Result.Canvas.Handle, Points, Canvas.Handle, 0, 0, Width, Height, 0, 0, 0);
if Back then Result.Canvas.CopyRect(Rect(0, 0, iAngle, iAngle), Result.Canvas, Rect(iAngle-1, 0, 0, iAngle));
end;
end.
De esta forma seguro que compila
Saludos.
EDITO:
Tambien te compliará si en la linea uses colocas sólamente:
Código Delphi
[-]uses
Windows, SysUtils, Classes, Graphics;