Hello fam.I tried to research some topic in the previous, but don’t find any better answer. If you have time to share or discuss how to exactly proportion an image sprite in a center of a canvas .
Thank you for those who can figure it out. Much love
Mika
June 21, 2019, 8:15am
#2
image sprite width = canvas width/2 - image sprite width/2
Or not?
thanks for the response @Mika . I also tried that blocks, but don’t exactly centered proportion.
Mika
June 21, 2019, 8:22am
#4
Here is a topic for fab center:
This topic will contain a table of contentsHello, I was going to sleep yesterday when I thought of a way to centralize the FAB (Floating Action Bar), so, mathematically, I thought the following way (Follow step-by-step).
Getting the Width of the Screen
To get the width of the canvas is easy, just add an object (I’ll use an arrangement) and set its width to fill all the available content, it is important that this object has no obstacles and that can fill the entire width of the screen:
[image] …
Use it as example for your calculation
3 Likes
Saezy
(Farhad Stanekzay)
June 21, 2019, 4:38pm
#5
I use the same method as Mika:
Image sprite x = (canvas width/2) - (image sprite width/2)
Image sprite y = (canvas height/2) - (image sprite height/2)
If you’re using the ball component then instead of (image sprite width/2), minus radius instead
1 Like