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.


    List of CGPoints

    Pythonista
    3
    7
    2715
    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.
    • mikael
      mikael last edited by mikael

      The following crashes on the last line and in objc_util.py on line 897. Any ideas how to get this working?

      from objc_util import *
      load_framework('SpriteKit')
      SKShapeNode = ObjCClass('SKShapeNode')
      
      cg_points = [CGPoint(0,0), CGPoint(10,5), CGPoint(5,0)]
      
      node = SKShapeNode.shapeNodeWithSplinePoints_count_(cg_points, len(cg_points))
      
      cvp 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @mikael last edited by cvp

        @mikael try this, I found something similar here

        from objc_util import *
        
        load_framework('SpriteKit')
        SKShapeNode = ObjCClass('SKShapeNode')
        
        cg_points = [CGPoint(0,0), CGPoint(10,5), CGPoint(5,0)]
        cg_points_array = (CGPoint * len(cg_points))(*cg_points)
        node = SKShapeNode.shapeNodeWithSplinePoints_count_(cg_points_array, len(cg_points), restype=c_void_p,argtypes=[POINTER(CGPoint), c_ulong])
        
        mikael 1 Reply Last reply Reply Quote 2
        • mikael
          mikael @cvp last edited by

          @cvp, works splendidly, thank you! No way I would have gotten there on my own.

          cvp 1 Reply Last reply Reply Quote 0
          • cvp
            cvp @mikael last edited by

            @mikael Obviously, but forum friends are there for that, isn't? Not always easy to search something, better if you (remember that you) got the same kind of problem.

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

              🥰 I fully agree. But the „you“ is valid for you both.

              cvp 1 Reply Last reply Reply Quote 0
              • cvp
                cvp @mithrendal last edited by

                @mithrendal Sure! That was obvious for me, perhaps due to my poor English.
                When I speak about "remember", it is always a reference to my bad and old memory 😇

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

                  Vous etes super 😍 👍🏻 Je tellement aimes votre messages. That was my school french sorry it is poor too. 😌

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