Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] Image zoom , panning.. like a PRO #367

Open
maurobotta opened this issue Dec 9, 2024 · 3 comments
Open

[REQ] Image zoom , panning.. like a PRO #367

maurobotta opened this issue Dec 9, 2024 · 3 comments

Comments

@maurobotta
Copy link

Hi @Zeus64

I'm using Alcinoe+Skia for my VIP FMX app, and I need a function to display images on Android/iOS with modern, high-quality rendering (similar to what Apple or Flutter offers). I've been looking for examples, but I haven't found anything that achieves this level of quality.

Currently, I'm using a WebBrowser to enable smooth zoom functionality.

Do you have any tips or examples on how to use TALImage like a pro?

Thank you!

Mauro

@Zeus64
Copy link
Collaborator

Zeus64 commented Dec 9, 2024

What exactly you want to achieve ? I not understand what you mean by "I need a function to display images on Android/iOS with modern, high-quality rendering (similar to what Apple or Flutter offers)", can you show me some screenshot ?

@maurobotta
Copy link
Author

New form, drop a image component, set it
Full screen, add any code for support zoom and panning, compile for Android, Run...

At runtime che the zoom quality .. is terrible.

If you use a TWebbrowser for view image the zoom is good.

@Zeus64
Copy link
Collaborator

Zeus64 commented Dec 9, 2024

Ah, I see! In this approach, you can handle it manually. Start by creating a texture of the image using a function like ALLoadFromStreamToDrawable, specifying the maximum size you want to achieve. Then, in the FormPaint event, use ALDrawDrawable with the appropriate ADstRect to paint the image onto the form. When panning, simply adjust and increase the ADstRect. Since the texture is already large, you won't lose quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants