Forums

OverviewV-Play 1 Support › PolygonItem

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5957

    Heini

    Hi,

    setting the PolygonItems texture property results in an empty space around the texture tiles, just like it would be set a border.

    Cheers,

    Heini

    #5963

    Alex
    V-Play Team

    Hi Heini,

    can you give me the Code you are using?

    I just ran the example from the documentation and it worked fine.

    Cheers,
    Alex

    #5965

    Heini

    Hi Alex,

    i don´t know the size of the texture in your example, but could it be possible, that the textures size is bigger than the polygons size, so that one tile fills out the whole polygon?
    In my case the polygon is much bigger than the texture, so that the texture has to be repeated to fill the whole polygon. Between these texture tiles i have always an empty space. Could you please try the following code with the polygon larger than the texture (my texture is 50×50 px):

    import VPlay 1.0
    import QtQuick 1.1
    
    GameWindow {
        activeScene: scene
        width: 960
        height: 640
        
        Scene {
            id: scene
            width: 960
            height: 640
    
    
            PolygonItem {
              x:1
              y:1
              texture: "texture.png"
              vertices: [
                Qt.point(250, 0),
                Qt.point(0, 250),
                Qt.point(0, 500),
                Qt.point(250, 500),
                Qt.point(500, 500),
                Qt.point(500, 250)
              ]
            }
    
        }
    }
    
    

    Today i switched to daily builds 1.5.1 what didn´t solve the problem.

    Thanks!

    Heini

    #5966

    Heini
    #5967

    Alex
    V-Play Team

    Hi Heini,

    the texture tiles of the PolygonItem need to have a power of 2 size (16×16, 32×32, 64×64, …), because this is very common for textures. I will have a look if we can add support for any sizes of textures.
    Until then, is it possible for you to scale your tiles to a POT size?

    Cheers,
    Alex

    #5968

    Heini

    Hi Alex,

    yes, after changing the texture size it´s working now! Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

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