Şu an için OnClick'le bir IMG zoom yapılabilmeyi atıyorum, projende kullanabilmen için,
var myForm: TclForm; GestureImg: TClImage; InfoLbl: TclLabel; IsZoomed: Boolean;
void BtnOnClick; { // resim şu an normal boyutunda if IsZoomed == False { // X ve Y ekseninde 2 kat büyüt GestureImg.Scale.X = 2.0; GestureImg.Scale.Y = 2.0; InfoLbl.Text = 'Durum: ZOOM YAPILDI'; // Artık zoom yapıldığını işaretle IsZoomed = True; } // Eğer resim zaten büyükse (Zoom yapılmışsa) else { // Ölçeği normale (1.0) döndür GestureImg.Scale.X = 1.0; GestureImg.Scale.Y = 1.0; InfoLbl.Text = 'Durum: Normal'; // Zoom durumunu kaldır IsZoomed = False; } }
{ myForm = TClForm.Create(Self); // Başlangıçta zoom yapılmamış IsZoomed = False; // Bilgi Etiketi InfoLbl = myForm.AddNewLabel(MyForm, 'InfoLbl', 'Durum: Normal (Büyütmek için tıkla)'); InfoLbl.Align = alTop; InfoLbl.Height = 30; InfoLbl.StyledSettings = ssFamily; InfoLbl.TextSettings.Font.Size = 16; InfoLbl.Margins.Top = 20;
GestureImg = myForm.AddNewImage(MyForm, 'GestureImg'); MyForm.setImage(GestureImg, ' https://clomosy.com/demos/bg.png" rel="nofollow - https://clomosy.com/demos/bg.png '); GestureImg.Align = alCenter; GestureImg.Height = 200; GestureImg.Width = 200; // Hem mobilde hem PC'de çalışır. MyForm.AddNewEvent(GestureImg, tbeOnClick, 'BtnOnClick'); myForm.Run; } https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" rel="nofollow - https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">
|