Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Scene scaleMode doesnt work

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #7732

    Vlad

    Got this log message when trying to set scaleMode in Scene

    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:444 (onSceneGameWindowChanged): qml: scaleMode is defined!
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:328 (calculateXScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:381 (calculateYScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:328 (calculateXScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:449 (onSceneGameWindowChanged): qml: Scene: onSceneGameWindowChanged: xScaleForScene( 0 ) is different than from GameWindow ( undefined )
    
    W/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:450 ((null)): qrc:///qml/VPlay/core/Scene.qml:450: Error: Cannot assign to non-existent property "xScaleForActiveScene"
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:328 (calculateXScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
    D/Qt (24630): qrc:///qml/VPlay/core/Scene.qml:381 (calculateYScaleForScaleMode): qml: ERROR: unknown scaleMode: zoomToBiggerSide
    
     

     

    btw, any other way to scale scene to full device resolution?

     

    • This topic was modified 9 years, 10 months ago by  vladest.
    • This topic was modified 9 years, 10 months ago by  Christian.
    #7735

    Christian
    Felgo Team

    Hi Vlad,

    thanks for reporting that issue! The internal name for the zoomToBiggerSide scaleMode is currently “zoomEven” which has the same effect as “zoomToBiggerSide”, so please use that one until the release of the next Felgo update. After the next update, you can then also use “zoomToBiggerSide”.

    Cheers, Chris

    #7762

    Vlad

    can you tell me the rest of the changed scaleMode variants? It seems only letterbox still works

    Thanks

    #7763

    Christian
    Felgo Team

    Hi Vlad,

    sure: it’s letterbox, zoomEven (the new zoomToBiggerSide), zoomStretch (the new zoomNonUniform) and none.

    However, I would not recommend using anything else than letterbox. Why would you like to use a different scaleMode?

    Cheers, Chris

    #7765

    Vlad

    Hi Chris

     

    the idea is to get scene on device edges for several type of screens: 4:3, 16:9, 16:10

    #7767

    Christian
    Felgo Team

    Hi Vlad,

    yes that’s reasonable, zoomToBiggerSide is valid for that, but mention that your background may be cropped on some devices. You could also use letterbox and use scene.gameWindowAnchorItem to achieve using the whole screen. See our demos how this property is used.

    Cheers, Chris

    #7783

    Vlad

    Hi Chris

     

    Can you please post code sample?

    So far I cannot use whole screen

     

    thanks

    #7788

    Christian
    Felgo Team

    Hi Vlad,

    all our demos use the letterbox mode, so you can have a look there.

    Also have a look at examples folder (contentScale/gameWindowDefault subfolder). This is what it contains:

     

    GameWindow {
    
      Scene {
        id: scene
    
        // to use the whole space of the screen, use gameWindowAnchorItem
        Rectangle {
          color: "green"
          anchors.fill: scene.gameWindowAnchorItem
        }
    
        Rectangle {
          anchors.fill: parent
          color: "blue"
        }
      }
    }

    Cheers, Chris

     

    #7794

    Vlad

    Hi Chris

     

    thanks for code snippet

    but

    may be I’ve describe it incorrectly, but what I want is to get Scene using whole screen, w/o any borders.

     

    Is it possible?

     

    Thanks,

    Vlad

    #7797

    Christian
    Felgo Team

    Yes it is, with the gameWindowAnchorItem.

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

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded