S’abonner

Dimension et positionnement de bouton

Assets have the following attributes:

attribute

description

range

x

left position of the marker’s top-left corner

[-0.5:0.5]

y

top position of the marker’s top-left corner

[-0.5:0.5]

width

asset’s width

[0:1]

height

asset’s height

[0:1]

Assets size and position values are relative to marker’s longest size.

Meaning if we have a marker width=200px and height=400px all the assets’ attributes will be relative to marker’s height (400px in our case).

Here are some helpful formulas (W-markers width, H-marker’s height, w-asset’s width, h-asset’s height):

top left corner of the marker

x = -0.5 * min(W/H, 1)

y = 0.5 * min(H/W, 1)

top right corner of the marker

x = 0.5 * min(W/H, 1)

y = 0.5 * min(H/W, 1)

bottom left corner of the marker

x = -0.5 * min(W/H, 1)

y = -0.5 * min(H/W, 1)

bottom right corner of the marker

x = 0.5 * min(W/H, 1)

y = -0.5 * min(H/W, 1)

 

0 Commentaires

Veuillez vous connecter pour laisser un commentaire.