pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/typemytype/drawbot

GitHub - typemytype/drawbot · GitHub
Skip to content

typemytype/drawbot

Repository files navigation

DrawBot Test Bench DrawBot App Builder codecov

DrawBot

DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics. The built-in graphics primitives support rectangles, ovals, (bezier) paths, polygons, text objects, colors, transparency and much more. You can program multi-page documents and stop-motion animations. Export formats include PDF, SVG, PNG, JPEG, TIFF, animated GIF and MP4 video.

To download the latest version of the app, go to http://www.drawbot.com/content/download.html


Using DrawBot as a Python module

DrawBot can also be installed as a Python module, the app is not required. It works on Python3.11+.

Install

The easiest way is to use pip:

pip install git+https://github.com/typemytype/drawbot

To install it manually, follow these instructions:

download: https://github.com/typemytype/drawbot/archive/master.zip

run cd <path/where/you/have/downloaded/and/unzipped/drawBot> run python setup.py install

Usage

import drawBot

with drawBot.drawing():
    drawBot.newPage(1000, 1000)
    drawBot.rect(10, 10, 100, 100)
    drawBot.saveImage("~/Desktop/aRect.png")

It is adviced to wrap your drawing instructions into a with drawbot.drawing() statement, to clear the instruction stack and remove installed fonts.


Compile DrawBot from source

compile drawBot.app (with UI)

Required packages:

(Most of these are available through pip.)

Compile:

DrawBot is compiled with py2app into an application package.

cd path/To/drawBot
python setupApp.py py2app

compile drawBot Python module only

This module only works on Mac OS as it requires PyObjC, AppKit, CoreText Quartz and more.

Required packages:

Compile:

cd path/To/drawBot
python setup.py install

About

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy