Image_sprite - percentage - need


i need percent for my “image_sprites”.
I have a canvas background what is normaly 1000x700px
and i have little images what can only show right when i can use phone width and height “percentage”.

Why do I need it?
Here’s an example:
Original Background = 1000x700px
Original Image (image_sprite) = 472x287px
472px / 1000px * 100% = 47,2%
287px / 700px * 100% = 41%
Therefore, the image_sprite needs 47.2 x 41 percent to be displayed correctly.
The Canvas is set to w: fill parent and h: fill parent.

Please help me.
What can i do?

1 Like

i want this also

Why don’t you set width and height to the logic you posted not the result the logic

You can do that with very basic and simple math.