![]() |
|
Sayfa Çevirme Efekti - Baskı Önizleme +- Delphi Can (https://www.delphican.com) +-- Forum: Delphi (https://www.delphican.com/forumdisplay.php?fid=3) +--- Forum: Mobil Platform - FireMonkey (FMX) (https://www.delphican.com/forumdisplay.php?fid=7) +--- Konu Başlığı: Sayfa Çevirme Efekti (/showthread.php?tid=561) |
Sayfa Çevirme Efekti - delphi-x - 16-01-2017 Androidde sayfa çevirme efekti yapmak istiyorum. https://www.youtube.com/watch?v=ssgK-cc5W40 Adresinde anlatılan şekilde uygulamayı hazırladım ancak tam olarak çalıştırmayı başaramadım. click olayı ile istenilen şey yapılabiliyor. Ancak benim istediğim parmak hareketi ile sayfayı çevirirken efekt vermek. Windowsta derlenen uygulamada kısmen istediğim şey oluyor ama androidde hiç çalışmıyor. İlgilenen arkadaşlara şimdiden teşekkür ederim.. Kodlar: var FGestureInProgress: Boolean; FAngle, FMouse: TPointF; procedure TForm2.Image1Click(Sender: TObject); begin PathAnimation1.Enabled := False; SelectionPoint1.Position.Point := PointF(0,0); SelectionPoint1.Opacity := 0; PathAnimation1.Parent := SelectionPoint1; PathAnimation1.Path.Clear; //// begin Path for mouse pointer PathAnimation1.Path.MoveTo(PointF(0,0)); PathAnimation1.Path.LineTo(PointF(Form2.Width/2,Form2.Height/2)); PathAnimation1.Path.LineTo(PointF(Form2.Width*2,0)); //// end Path for mouse pointer PathAnimation1.Duration := 2; PathAnimation1.Start; end; procedure TForm2.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single); begin FGestureInProgress:= True; FAngle:= PointF(X, Y); end; procedure TForm2.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); begin if FGestureInProgress then begin FMouse:= PointF(X,Y); SwipeTransitionEffect1.CornerPoint:= FAngle; SwipeTransitionEffect1.MousePoint:= FMouse; end; end; procedure TForm2.Image1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single); begin FGestureInProgress:= False; end; procedure TForm2.PathAnimation1Finish(Sender: TObject); var BitMap : TBitmap; begin BitMap := TBitmap.Create(0,0); BitMap.Assign(SwipeTransitionEffect1.Target); SwipeTransitionEffect1.Target := Image1.Bitmap; Image1.Bitmap.Assign(BitMap); SwipeTransitionEffect1.MousePoint := PointF(0,0); end; procedure TForm2.PathAnimation1Process(Sender: TObject); begin SwipeTransitionEffect1.MousePoint:=SelectionPoint1.Position.Point; end; Cvp: Sayfa Çevirme Efekti - Fesih ARSLAN - 17-01-2017 Merhaba, Daha önce yazmış olduğum FireMonkey Resimlerde Pan ve Zoom İşlemleri makalesinden örnekle bu ve benzeri işlemleri gerçekleştirebilirsiniz. (Ana formun OnGesture olayında EventInfo.GestureID tipi ile) |