API suggestion:

API suggestion:

Now I’m playing with items and zoom. I realized that take the ‘bounding box’ of an item is easy with the getPosition and the getHeight/Width…but:

If the scale is different you need to multiply by it.

If the rotation is different you need to do some trigonometric operations.

If the skew is different…

So my suggestion is, since the launcher already know the values (in edit mode you can see the box)

What about:

Rect item.getBoundingBox()

Like the container, but with items.

]]>

3 Commentsto API suggestion:

  1. Anonymous says:

    < ![CDATA[

    Indeed this would be much more simple 😉


    There are two styles of bounding box though. The launcher uses the screen bounding box (takes cares of the item transformation and the container transformation) whereas you may be interested in knowing the area of an item in its container ?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    To zoom the maximum possible so you can see it in the middle of the screen. I can share a video of my new script: ‘zoom and launch’, it works well with normal items, but fails with rotated,skewed ones.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    ok, I understand

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *