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.


    Gradient view

    Pythonista
    2
    2
    864
    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

      @shinyformica, thanks (again) for all the ObjC heavy lifting you did back in this thread.

      I had a dire need for some gradients, so I packaged your code into a class and added the radial option (here).

      Some usage examples:

      Linear gradient, left to right, adjusting the location of the color shift for best effect:

      Gradient(['grey', 'black'], locations=[0.0, 0.6])
      

      Radial gradient from center:

      Gradient(['white', 'transparent'], radial=True, width=200, height=200)
      

      Finer control available with the additional parameters, I can detail those if someone has a need - too late now for serious documentation.

      1 Reply Last reply Reply Quote 1
      • shinyformica
        shinyformica last edited by

        Rock on!

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