function InvertS(const s: string): string;var I, L: Integer;begin L := Length(s); SetLength(Result, L); for i := 0 to L do Result[i] := s[L-i];end;Label1.Caption := InvertS(Label1.Caption);
procedure TForm1.Button1Click(Sender: TObject);var bmp, bmp2: TBitmap; Col, Row: integer;begin bmp := TBitmap.Create; try bmp.Width := Edit1.Width; bmp.Height := Edit1.Height; bmp.Canvas.Font := Edit1.Font; bmp.Canvas.TextOut(0, 0, Edit1.Text); bmp2 := TBitmap.Create; try bmp2.Width := bmp.Width; bmp2.Height := bmp.Height; for Col := 0 to bmp.Width - 1 do for Row := 0 to bmp.Height - 1 do bmp2.Canvas.Pixels [Col, Row] := bmp.Canvas.Pixels [bmp.Width - Col - 1, Row]; Image1.Picture.Bitmap.Assign (bmp2); finally bmp2.Free; end; finally bmp.Free; end;end;