Navigation

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

    benkiel

    @benkiel

    1
    Reputation
    5
    Posts
    6
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    benkiel Follow

    Best posts made by benkiel

    • RE: draw character from glyph name

      FormattedString is your best friend here, as you can add a glyph name to the string and get the glyph with the appendGlyph method.

      so for your code:

      newPage('A4Landscape')
      font('SFMono-Regular')
      fontSize(60)
      txt = listFontGlyphNames()
      t = FormattedString()
      t.appendGlyph(txt[60])
      text(t, (30, 30))
      
      posted in General Discussion
      benkiel
      benkiel

    Latest posts made by benkiel

    • RE: draw character from glyph name

      FormattedString is your best friend here, as you can add a glyph name to the string and get the glyph with the appendGlyph method.

      so for your code:

      newPage('A4Landscape')
      font('SFMono-Regular')
      fontSize(60)
      txt = listFontGlyphNames()
      t = FormattedString()
      t.appendGlyph(txt[60])
      text(t, (30, 30))
      
      posted in General Discussion
      benkiel
      benkiel
    • RE: Pen Plotter

      I think it'll be a bit interesting to use, as Chiplotle is py2, and drawbot is py3, but it seems from the sample scripts that it can work. I've not tested, though I have a pen plotter sitting waiting to be used....

      posted in General Discussion
      benkiel
      benkiel
    • RE: Pen Plotter

      Don't forget that there is also this: https://github.com/jenskutilek/DrawBotPlotter

      posted in General Discussion
      benkiel
      benkiel
    • RE: New line characters causing issues?

      Testing that line in drawbot, it works. It seems your doing it with imported drawbot. Wonder if it might work with textBox rather than text?

      posted in General Discussion
      benkiel
      benkiel
    • Getting RGBA values from a Variables Colorwell

      This came up in a class today, and thanks to Just van Rossum, we were able to solve it.

      We all love being able to pick from the colorwell variable, but sometimes you need to know the RGBA value of the picked color, but the color you get from a colorwell is a NSColor object.

      This will give you the RGBA of that color

      Variable([
          dict(name="color", ui="ColorWell")
          ], globals())
      
      color = color.colorUsingColorSpaceName_("NSCalibratedRGBColorSpace")
      r,g,b,a = color.redComponent(), color.greenComponent(), color.blueComponent(), color.alphaComponent()
      
      print(r,g,b,a)
      

      (now in a year I'll be able to find the answer again!)

      posted in Tutorials
      benkiel
      benkiel