Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. General Discussion
    Log in to post

    General Discussion

    • Patricia

      SOLVED Making a book
      animation book • • Patricia  

      5
      0
      Votes
      5
      Posts
      1214
      Views

      Patricia

      @gferreira Thanks so much!
    • MauriceMeilleur

      SOLVED arcTo documentation?
      bezierpath • • MauriceMeilleur  

      8
      0
      Votes
      8
      Posts
      1488
      Views

      frederik

      see https://github.com/typemytype/drawbot/commit/d989e8bd0db35489d3eaeca453366d70a8877a1e
    • jens

      SOLVED Detect if a module is imported from a DrawBot script?
      modules drawbot as module • • jens  

      4
      0
      Votes
      4
      Posts
      804
      Views

      frederik

      DrawBot could be installed as module, so the import could be available. check: import AppKit appName = AppKit.NSBundle.mainBundle().infoDictionary().get("CFBundleDisplayName") print(appName) appName will be DrawBot, RoboFont or None (in terminal) good luck!
    • snaders

      SOLVED Draw a letter within a viewbox
      bezierpath transformations • • snaders  

      5
      0
      Votes
      5
      Posts
      1088
      Views

      snaders

      @frederik Thanks. Will have a look which type gives the best result. To use the actual font sounds like a good choice though. In Processing (where I made this animation first) I used SVG, but mainly because it's almost impossible to work with type in Processing. Curious which one is faster also.
    • snaders

      UNSOLVED How to load and draw SVG files?
      svg • • snaders  

      5
      0
      Votes
      5
      Posts
      1292
      Views

      gferreira

      @snaders in DrawBot you don’t really resize an image, you change the scale at which it is drawn. (same logic as in Draw a letter within a viewbox) imgPath = 'https://i.ytimg.com/vi/oHg5SJYRHA0/hqdefault.jpg' # get image width & height imgWidth, imgHeight = imageSize(imgPath) # define box width & height boxWidth, boxHeight = 640, 640 # calculate scaling factors factorHeight = boxHeight / imgHeight factorWidth = boxWidth / imgWidth # draw scaled image with savedState(): scale(factorWidth, factorHeight) image(imgPath, (0, 0)) # draw box fill(None) stroke(1, 0, 0) strokeWidth(5) rect(0, 0, boxWidth, boxHeight)
    • snaders

      This topic is deleted!
      • snaders  

      1
      0
      Votes
      1
      Posts
      3
      Views

      No one has replied

    • RafalBuchner

      UNSOLVED Installing Packages
      modules • • RafalBuchner  

      3
      0
      Votes
      3
      Posts
      1017
      Views

      RafalBuchner

      @jo Yes, right now I'm working like that, but I would try to avoid this solution in particular, since I consider it as not Pythonic and "proper"
    • RafalBuchner

      SOLVED Drawing glyphs from ufo file.
      bezierpath pens ufo • • RafalBuchner  

      4
      0
      Votes
      4
      Posts
      1854
      Views

      RafalBuchner

      Delayed, but still: thanks guys !!!
    • Tim

      UNSOLVED Code crashing when using multiprocessing.Pool
      drawbot as module performance • • Tim  

      11
      0
      Votes
      11
      Posts
      3465
      Views

      Tim

      @frederik Sorry for the late reply, I've been on vacation for a while. It's a little rusty after so many days The main focus lays on "main_pool()" "multiprocessing.Pool()" creates, in my 8core case, 8 separate processes (ignore the -1 in the code) Then "p.map()" runs function "run()" 120 times (12 fps times 10 sec. from the settings) but only 8 at one time. As soon as one process is finished it runs the next one. it saves the images separately and can be stitched together into one gif with "exportGif()" More in depth info can be found on: https://docs.python.org/3.4/library/multiprocessing.html My example is only useful if the processes don't have to talk to each other. But on the ref page above should be other examples as well. I'll post the result of my script in a few hours. Well the result in which I've used this method.
    • agyei

      SOLVED Can't import geocoder
      modules • • agyei  

      2
      0
      Votes
      2
      Posts
      980
      Views

      agyei

      I figured out the problem: I was using the wrong version of Python when installing the package. Just so this isn't useless, I used this to help me check if the module was installed and accessible in Drawbot: help("modules")
    • dyb

      SOLVED How to get image DPI?
      image object resolution • • dyb  

      2
      0
      Votes
      2
      Posts
      1013
      Views

      frederik

      good question in drawBot there is not a api for this. I could consider imageResoltion(path) returning the dpi opening an issue: https://github.com/typemytype/drawbot/issues/215
    • MauriceMeilleur

      SOLVED Generate animated .gifs, .pdfs similar to generateMP4()?
      animation animated gif • • MauriceMeilleur  

      5
      0
      Votes
      5
      Posts
      1337
      Views

      frederik

      not really... but this is not so hard with a PDFDocument
    • MauriceMeilleur

      SOLVED A deeper bevel on lineJoin()?
      recreations trigonometry stroke outline • • MauriceMeilleur  

      17
      0
      Votes
      17
      Posts
      3311
      Views

      MauriceMeilleur

      The last thing will be to provide for the case where the points are in a continuous chain, like the <o>. I'm pretty sure I know what to do, and it shouldn't be that hard, but I have some other problems with the Crouwel code to fix first (all to do with graphing and finding valid paths—this whole project is forcing me to teach myself the basics of computer science as I go). I'll post the revised and extended code here when it's done.
    • sinanatra

      SOLVED lines - open path intersection with paths
      bezierpath pens • • sinanatra  

      5
      0
      Votes
      5
      Posts
      1397
      Views

      gferreira

      @sinanatra MarginPen used to live in roboFab.pens. with the retirement of roboFab, some pens were moved to a new library called fontPens. RoboFab vs. FontParts APIs: Pens Pen objects Using pens
    • MauriceMeilleur

      SOLVED qCurve
      bezierpath pens qcurve quadratic • • MauriceMeilleur  

      10
      0
      Votes
      10
      Posts
      1952
      Views

      MauriceMeilleur

      @justvanrossum Ah. That explains a lot, going all the way to some stuff I was trying in January. Thanks!
    • jo

      SOLVED setPixelColor() image Object?
      image object • • jo  

      2
      0
      Votes
      2
      Posts
      841
      Views

      frederik

      not directly... you can load the image as an ImageObject and use it as a context to draw something, a pixel at a specific place. im = ImageObject("http://f.cl.ly/items/1T3x1y372J371p0v1F2Z/drawBot.jpg") with im: fill(1, 0, 1) rect(0, 0, 10, 10) image(im, (10, 10))
    • guidoferreyra

      This topic is deleted!
      • guidoferreyra  

      1
      0
      Votes
      1
      Posts
      3
      Views

      No one has replied

    • walkingfearless

      UNSOLVED linearGradient in stroke?
      • walkingfearless  

      3
      0
      Votes
      3
      Posts
      961
      Views

      walkingfearless

      I see... I guess I'll have to take a different approach. Thanks @frederik !
    • dyb

      UNSOLVED Generating A LOT of images. 1M+
      drawbot as module performance saving • • dyb  

      1
      0
      Votes
      1
      Posts
      703
      Views

      No one has replied

    • ricardov

      UNSOLVED How to run Drawbot on a server: Does it is possible?
      • ricardov  

      6
      0
      Votes
      6
      Posts
      1925
      Views

      ricardov

      oh great. So far I was trying with processing but I wanted to experiment with Drawbot capabilities.
    Drawing With Python