![]() |
|
FireMonkey Resimlerde Pan ve Zoom İşlemleri - Baskı Önizleme +- Delphi Can (https://www.delphican.com) +-- Forum: Delphi (https://www.delphican.com/forumdisplay.php?fid=3) +--- Forum: Eğitim (https://www.delphican.com/forumdisplay.php?fid=19) +---- Forum: Makale (https://www.delphican.com/forumdisplay.php?fid=20) +---- Konu Başlığı: FireMonkey Resimlerde Pan ve Zoom İşlemleri (/showthread.php?tid=532) Sayfalar:
1
2
|
Cvp: FireMonkey Resimlerde Pan ve Zoom İşlemleri - Fesih ARSLAN - 19-03-2018 (15-03-2018, Saat: 23:04)pro_imaj Adlı Kullanıcıdan Alıntı: Merhaba; Merhaba, Tahminimce o kısım (pan, zoom vb. interaktif etkileşimler) biz geliştiricilere bırakılmış. TGestureManager, Pan veya Zoom ile sınırlı olmayıp bir çok kullanıcı etkileşimi içerdiğinden ve TFMXObject sınıfı tarafından ortak kullanılan bir özellik olduğundan TImage için özelleştirilmiş değildir. İstediğiniz özellikler Quark Cube tarafından Image bileşenine entegre edilmiş hali açık kaynak kod olarak paylaşılmaktadır. Kaynak: FMX Image Layout Cvp: FireMonkey Resimlerde Pan ve Zoom İşlemleri - pro_imaj - 16-04-2018 Merhaba; Fesih bey'in örneğine göre birkaç işlem eksik şekilde aşağıdaki şekilde uygulanabilir. Image nesnesinin Zoom işlemleri için; 1- Forma bir adet Image nesnesi yerleştirin. 2- Image nesnesine herhangi bir resim ekleyin. 4- Object Inspector'dan Formun Touch>InteractiveGestures özelliğinin Zoom özelliğini True yapın. 5- Projenin aşağıdaki aşağıdaki tanımlamaları yapın; var FLastDistance: Integer; PinchZoom: TForm1; procedure TForm1.FormGesture(Sender: TObject;
const EventInfo: TGestureEventInfo; var Handled: Boolean);
var
LObj: IControl;
LImage: TImage;
LImageCenter: TPointF;
begin
if EventInfo.GestureID = igiZoom then
begin
LObj := Self.ObjectAtPoint(ClientToScreen(EventInfo.Location));
if LObj is TImage then
begin
if (not(TInteractiveGestureFlag.gfBegin in EventInfo.Flags)) and
(not(TInteractiveGestureFlag.gfEnd in EventInfo.Flags)) then
begin
{ zoom the image }
LImage := TImage(LObj.GetObject);
LImageCenter := LImage.Position.Point + PointF(LImage.Width / 2,
LImage.Height / 2);
LImage.Width := LImage.Width + (EventInfo.Distance - FLastDistance);
LImage.Height := LImage.Height + (EventInfo.Distance - FLastDistance);
LImage.Position.X := LImageCenter.X - LImage.Width / 2;
LImage.Position.Y := LImageCenter.Y - LImage.Height / 2;
end;
FLastDistance := EventInfo.Distance;
end;
end;
end;
İşlem tamamdır. Kaynak : Object Pascal\Mobile Snippets\InteractiveGestures\ImageZoom FireMonkey Resimlerde Pan ve Zoom İşlemleri - engerex - 24-09-2019 (10-01-2017, Saat: 15:59)Fesih ARSLAN Adlı Kullanıcıdan Alıntı: Merhaba;
|