How do I rotate the text so that the center of the rotated text is at the center of the background layer?
You can do it as follows:
procedure Tfmain.Button7Click(Sender: TObject);
var
iLayer: Integer;
begin
with ImageEnView1 do
begin
iLayer := LayersCreateFromText('E X A M P L E', 'Arial Black', 42, clBlue, [fsBold], False, 0, 0, 0, False);
Layers[ iLayer ].PosY := Layers[ 0 ].PosY + Layers[ 0 ].Height div 2 - Layers[ iLayer ].Height div 2;
Layers[ iLayer ].PosX := Layers[ 0 ].PosX + Layers[ 0 ].Width div 2 - Layers[ iLayer ].Width div 2;
Layers[iLayer].Rotate := 30;
LayersRotationAntialias := True;
LayersRotationFilter := ierBilinear;
LayersFixRotations( iLayer );
end;
end;
Nigel
Xequte Software
www.xequte.com
nigel@xequte.com