omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Scene problem when called with LANDSCAPE

    Pythonista
    4
    5
    2710
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • upwart
      upwart last edited by

      I have a program that calls Scene with the LANDSCAPE parameter.
      Strangely self.bounds returns (on my iPad) 0,0,1024,748 and not 0,0,1024,768 !
      If I call Scene without an orientation parameter, the height is correctly 768.

      Even when self.bounds[3] is 748, I am still able to draw up to 768!

      Is this a bug? If so, is there a workaround?

      1 Reply Last reply Reply Quote 0
      • Sebastian
        Sebastian last edited by

        I believe that the remaining 20 pixels is supposed to be the status bar.

        1 Reply Last reply Reply Quote 0
        • dgelessus
          dgelessus last edited by

          The missing 20 pixels are probably taken up by the top status bar with the clock, battery status, etc. It makes sense that you can still draw there, as it is transparent to allow apps to better use it in their design. Pythonista doesn't seem to provide a way to hide the status bar as far as I can tell, but you can launch the scene in portrait mode to make the status bar appear at one of the short screen sides. You can then also use the trick from the Piano example script, simply launch the scene in portrait mode, but draw everything rotated by 90 degrees, so it looks like it were landscape (but with the status bar at the side instead of the top of the screen).

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by

            http://omz-forums.appspot.com/pythonista/post/6256272701652992

            1 Reply Last reply Reply Quote 0
            • Sebastian
              Sebastian last edited by

              @ccc LOL, I didn't remember that XD

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors