Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. jansindl3r
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    jansindl3r

    @jansindl3r

    0
    Reputation
    12
    Posts
    63
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    jansindl3r Follow

    Best posts made by jansindl3r

    This user hasn't posted anything yet.

    Latest posts made by jansindl3r

    • RE: conditional control UI

      on the end I did my own UI and it worked fantastic, thanks for the great work!

      posted in General Discussion
      jansindl3r
      jansindl3r
    • Copy Page Data

      Hi, is it possible to copy page data to another drawing? I am doing an animation where background stays and foreground refreshes. Just thought to save some computation to reusing the background drawing. Thanks!

      posted in General Discussion
      jansindl3r
      jansindl3r
    • RE: conditional control UI

      @monomonnik thanks for the idea! It seems like too much custom work for the given budget. I think I will just split it into individual files then. But good to know it might be possible to do, hopefully will use that in some other project

      posted in General Discussion
      jansindl3r
      jansindl3r
    • conditional control UI

      Hello,

      I am want to provide a drawbot script to a client that allows them to execute and choose from a variety of image filters to apply to the canvas. Each image filter comes with distinct settings, and I've encountered difficulty in implementing a dropdown/radio input mechanism that dynamically updates the inputs within the drawbot control UI. Let's say I have filter A and B, filter A has settings M N O and filter B has just settings X Y. If it's not possible, I would just split the image filters into individual files.

      Thanks, Jan

      posted in General Discussion
      jansindl3r
      jansindl3r
    • Find out whether a point is placed within an area

      Hi, is there a function that finds out whether a point is placed on a path? Let's say we have a square and we want to know if a and b are on that square or outside.. like this ->

      |--------|
      |        |  b
      |        |
      | a      |
      |        |
      |--------|
      

      a is on/in a square, b is not

      posted in General Discussion
      jansindl3r
      jansindl3r
    • RE: How can I split a path into multiple segments?

      Hi @gferreira such distribution is not very even. I am sending result using svg.path, I will try to have a look on it. It seems like an interesting excercise for my drawBot class.

      testje_2.png

      Thanks, Jan

      posted in General Discussion
      jansindl3r
      jansindl3r
    • RE: How can I split a path into multiple segments?

      Thanks @gferreira !
      I see that this is not ideal, you can only have one segment for this formula. Though in this result some of the segments seem a bit off.

      I am sharing result that works fine with use of svg.path, code is included. It is used outside of DrawBot IDE, because I didn't want to bother finding out how to install it there... sorry for that quick dirty parse of the SVG path from string...

      testje.png

      import cmath
      import drawBot as db
      from svg.path import parse_path
      path = parse_path('M 300 100 C 100 100 200 200 200 300 L 250 350 L100 950')
      
      def points():
          for i in range(10 + 1):
              i = i * 0.1
              num = complex(path.point(i))
              x, y = num.real, num.imag
              yield (x, y)
      
      db.newDrawing()
      x, y = [1000] * 2
      db.newPage(x, y)
      db.fill(1)
      db.rect(0,0,x,y)
      
      db.fill(None)
      db.stroke(0)
      bezier = db.BezierPath()
      bezier.moveTo((300, 100))
      bezier.curveTo((100, 100), (200, 200), (200, 300))
      bezier.lineTo((250, 350))
      bezier.lineTo((100, 950))
      db.drawPath(bezier)
      db.fill(0)
      
      _points = points()
      
      for order, point in enumerate(_points):
          db.oval(*[val - 5 for val in point], 10, 10)
      
      db.saveImage('testje.png')
      
      posted in General Discussion
      jansindl3r
      jansindl3r
    • How can I split a path into multiple segments?

      Hello,
      please, as title questions.. How can I distribute points along a path? Let's say I have a path with two points and I need to equally place 20 points on it, how can I achieve it? Thanks, Jan!!

      posted in General Discussion
      jansindl3r
      jansindl3r
    • RE: How to get width of text, including metrics?

      @gferreira I also believe that you meant
      textSize('string')

      posted in General Discussion
      jansindl3r
      jansindl3r
    • RE: How to get width of text, including metrics?

      Hi @gferreira thanks a lot! Perfect..
      Jan

      posted in General Discussion
      jansindl3r
      jansindl3r