简体   繁体   中英

How do I expand a Libgdx image from 2 rectangles

I am working on a game using LibGDX, and right now, I am working on the menu screen. What I want to do, is have a small image, set a bounding box, and expand however large I need it. What I think would be optimal, would be to set 2 rectangles. One for width and one for height. If it needs to get bigger or smaller, it would take that rectangle, and duplicate it beside, or beneath the current one, depending if it is for the width or height. I believe there is a builtin class for this, but I cannot seem to find it.

You might want to take a look at NinePatch if I'm not misunderstanding your question. Link here: https://github.com/libgdx/libgdx/wiki/Ninepatches

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM