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.


    Help with scene.image

    Pythonista
    2
    3
    1913
    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.
    • sashadkiselev125
      sashadkiselev125 last edited by

      How do I simply show a built in image in scene without layers with simple coordinates

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

        Just use the image() function.
        Call it like this inside the draw function:<pre>image("image_name", x, y, w, h)</pre>
        I've added a simple working example below.
        <pre>from scene import *

        class MyScene (Scene):
        def setup(self):
        pass

        def draw(self):
        	background(0, 0, 0)
        	image('Alien_Monster', 200, 200, 100, 100)
        

        run(MyScene())</pre>

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

          Thank you Sebastian I wa putting image('name',x=200,y=200)

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