Tour Preview

Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 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
    Felgo 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
    Felgo 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.