Buenas tardes, estoy intentando hacer un zoom en un formulario o en una imagen con delphi 12, el código es el siguiente:
Código Delphi
[-]Procedure TF_Foto.Image1Gesture(Sender: TObject;
const EventInfo: TGestureEventInfo; var Handled: Boolean);
var
ZoomFactor: Single;
begin
if EventInfo.GestureID = sgiZoom then
begin
ZoomFactor := EventInfo.Distance / 100;
Image1.Width := Round(Image1.Width * ZoomFactor);
Image1.Height := Round(Image1.Height * ZoomFactor);
Image1.Position.X := Image1.Position.X - (Image1.Width * (ZoomFactor - 1)) / 2;
Image1.Position.Y := Image1.Position.Y - (Image1.Height * (ZoomFactor - 1)) / 2;
Handled := True; end;
end;
En la instrucción
Código Delphi
[-]EventInfo.GestureID = sgiZoom
que es la que se supone identifica la realizacion del zoom, sgiZoom me dice identificador no declarado
La propiedad Touch esta bien configurada asignándole un TGestureManager y habilitando el zoom.
Alguna idea de porque no reconoce el sgiZoom?
Gracias, un saludo.