Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. Recent
    Log in to post
    • All categories
    • Announcements
    • General Discussion
    • Tutorials
    • Code snippets
    • Feature Requests
    • Bugs
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • shespoke2me

      UI questions
      General Discussion • • shespoke2me  

      5
      0
      Votes
      5
      Posts
      23
      Views

      monomonnik

      @crackheroine I have little experience with creating UI for DrawBot, and no experience with Vanilla or tkinter. So, I would love to see your results here, if you are willing to share.
    • Maarten Idema

      Running Drawbot as a module in environments that aren't Mac OS X
      Bugs • • Maarten Idema  

      4
      0
      Votes
      4
      Posts
      16
      Views

      Maarten Idema

      Great thanks gang. I'll look into Just's Skia stuff.
    • Hugo Jourdan

      Mute DrawBot warning ?
      General Discussion • • Hugo Jourdan  

      4
      0
      Votes
      4
      Posts
      14
      Views

      Hugo Jourdan

      I'm looking to not print : *** DrawBot warning: [...] ***
    • Hugo Jourdan

      BezierPath offset problem.
      General Discussion • • Hugo Jourdan  

      4
      0
      Votes
      4
      Posts
      20
      Views

      Hugo Jourdan

      @frederik Thanks for this clarification !
    • Hugo Jourdan

      DrawBot Auto-completion Snippet
      Code snippets • • Hugo Jourdan  

      3
      0
      Votes
      3
      Posts
      14
      Views

      Hugo Jourdan

      I just updated the repo with separated snippets for SublimeText.
    • shespoke2me

      Need help: Dynamic text animation
      Tutorials • • shespoke2me  

      4
      0
      Votes
      4
      Posts
      14
      Views

      shespoke2me

      @monomonnik said in Need help: Dynamic text animation: Thank you man! Helped a lot
    • Feenix33

      Upside down text assistance request
      General Discussion • • Feenix33  

      3
      0
      Votes
      3
      Posts
      18
      Views

      Feenix33

      @monomonnik Thank you very much. You are correct, I'm scaling outside the page and I can probably use something similar to put one word on a line upside down, but it will be a little harder than a whole text box.
    • Hugo Jourdan

      Python Update ?
      General Discussion • • Hugo Jourdan  

      2
      0
      Votes
      2
      Posts
      19
      Views

      frederik

      no, you can not.. but DrawBot exists also as a module where you can use your own python. see https://github.com/typemytype/drawbot#using-drawbot-as-a-python-module
    • andeecollard

      Beginner Question
      General Discussion • • andeecollard  

      13
      0
      Votes
      13
      Posts
      31
      Views

      monomonnik

      y2 = y1 + row_height Yes, I should have seen that. So much clearer. x_positions = [random.random() * row_width for _ in range(d)] I understand what’s happening here, but I don’t think I’m experienced enough to think this is more readable than the while loop. I agree it is the better solution as it obviates the while loop. Thanks @frederik
    • Christine

      How to get values from UI elements?
      General Discussion • • Christine  

      3
      1
      Votes
      3
      Posts
      19
      Views

      Christine

      Thanks! I didn’t see that one.
    • chrisjansky

      Rewind rect() x position for endless movement
      General Discussion • • chrisjansky  

      3
      0
      Votes
      3
      Posts
      15
      Views

      chrisjansky

      Hello @frederik, thanks so much for your input. Wow, works just as I described. The problem is I failed to mention I will want to use those rect() as a clipMask() for text, creating a sort of a parallax effect – something like https://dailydrawbot.tumblr.com/post/135907707375/how-now-brown-cow-references-in-this-thread-on. Thus I need rect() to maintaint its order/index. Here‘s my (faulty) code that I made initially but gave up and thought I will try to fix the endless move across X axis first: The "optical" effect is more of less how I want it, but the loop breaks as before. import math Variable([ dict(name="progress", ui="Slider", args=dict( value=0, minValue=0, maxValue=1, )), ], globals()) pageW, pageH = 500, 500 steps = 5 stepW = int(pageW/steps) # Canvas with one step more extendedW = pageW + stepW textString = "O" oneside = math.floor(steps/2) fs = 300 pushX = progress * pageW newPage(pageW, pageH) text(str(pushX), (5, 5)) # Draw one extra step for i, stepStartX in enumerate(range(0, extendedW, stepW)): elapsed = (stepStartX+pushX)//(pageW+stepW) if elapsed: stepStartX -= (elapsed * pageW) + stepW x1 = stepStartX + pushX x2 = x1 + stepW mask = BezierPath() mask.moveTo((x1, 0)) mask.lineTo((x2, 0)) mask.lineTo((x2, pageH)) mask.lineTo((x1, pageH)) mask.closePath() stroke(None) fill(0) fontSize(fs) textW, textH = textSize(textString) stepCenter = x1+(stepW-textW)/2 offset = (x1-(oneside*stepW))*-0.5 # Draw mask with savedState(): fill(None) stroke(random()) drawPath(mask) with savedState(): fontSize(8) text(f'{i}\nStepStartX: {stepStartX}\nx1: {x1}\nelapsed: {elapsed}', (x1, pageH-10)) with savedState(): clipPath(mask) translate(offset, 0) textBox(textString, (stepCenter, (pageH-textH)/2, textW, textH)) Any chance you could tell me what I am doing wrong please? Thanks for your time :—)
    • Christine

      Messed-up font metrics in Drawbot
      Bugs • • Christine  

      2
      0
      Votes
      2
      Posts
      9
      Views

      frederik

      lets continue here: https://github.com/typemytype/drawbot/issues/481
    • chrisjansky

      Clip off text in textBox
      General Discussion • • chrisjansky  

      5
      0
      Votes
      5
      Posts
      30
      Views

      chrisjansky

      @frederik Works beautifully, thank you!
    • MauriceMeilleur

      The promise and perils of expandStroke()
      General Discussion • • MauriceMeilleur  

      3
      0
      Votes
      3
      Posts
      17
      Views

      frederik

      yes, this is the postScript interpretation of expanding a path... this is visually the 'best' solution but from a curve standpoint horrible Take a look at my Outliner for outlining strokes, there is a pen and multiple options!
    • franciscotorres

      Help combining ideas
      General Discussion • • franciscotorres  

      6
      0
      Votes
      6
      Posts
      18
      Views

      frederik

      Thanks @jo!
    • nadobnikm

      Local modules don’t update
      Bugs • • nadobnikm  

      3
      0
      Votes
      3
      Posts
      17
      Views

      jo

      reload is python 2 afaik in python 3.4 and newer you are supposed to use: import importlib importlib.reload(module) good luck!
    • rduritsa

      PIL or Pillow installation issues and PNG metadata
      General Discussion • • rduritsa  

      4
      0
      Votes
      4
      Posts
      16
      Views

      monomonnik

      @rduritsa said in PIL or Pillow installation issues and PNG metadata: from PIL import image Shouldn’t that be Image instead of image?
    • Calder

      Writing code across multiple files
      General Discussion • • Calder  

      4
      0
      Votes
      4
      Posts
      11
      Views

      monomonnik

      You can reload the module by using reload(). See an example in this post of @gferreira in this (highly relevant) topic Import python file.
    • rduritsa

      How to stop (Kill) an accidental infinite loop without force quitting?
      General Discussion • • rduritsa  

      3
      0
      Votes
      3
      Posts
      22
      Views

      rduritsa

      @frederik awesome, thank you!
    • MauriceMeilleur

      Am I missing something from expandStroke() documentation?
      General Discussion • • MauriceMeilleur  

      3
      0
      Votes
      3
      Posts
      15
      Views

      MauriceMeilleur

      @monomonnik Oh, I see—I was treating it like a method. Thanks.