Forums

OverviewV-Play 1 SupportRectangle with round corners › Reply To: Rectangle with round corners

OverviewV-Play 1 SupportRectangle with round corners › Reply To: Rectangle with round corners
#5114

Christian
V-Play Team

Hi Chrisu,

challenging question as always 😉

I have a question about your exact use-case: Is it really just rectangles with borders that you need, or would you also need sprites?

 

What you are looking for, could probably be done by adding tinting (dynamic change of colors of sprites) and 9-slice sprites aka 9-patch sprites. You could implement the 9-patch technique by yourself by placing images with a Grid element and scaling the inner part appropriately. But for the sprite tinting we would need to add support for it to V-Play.

If you rely on rectangles (which have a worse performance than batched sprites though, because they are not batched and each rectangle requires an own draw call) there is currently no way to get the rounded borders. We are working on an improved clipping item though, which also supports a texture and not only rectangular area. But you would still require a 9-patch texture then so the borders look sharp on each platform.

 

I would rather go for a 9-patch sprite with tinting as described above (which we both need to add to the engine first), but if you could describe your use-case more another solution might be better!

Cheers, Chris

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support