This is a port of a subset of the DrawBot API to Pythonista.
If anyone has better installation instructions, please let me know.
You need to put the "drawbotista.py" in "Python-Modules/site-packages-3" inside of Pythonista.
I've seen lots of references to installing modules with StaSH and pip
. That works for fully released packages. However, at this point I'm not ready to make this an official release. There's a way to install modules from git via pip
but I can't get it to work in Pythonista.
- linearGradient
- radialGradient
- shadow
- drawing commands that go directly to the canvas
- BezierPath.arc
- BezierPath.arcTo
- BezierPath.qCurveTo
- clipPath
- text
- text align
- return overflow text in textBox
- support BezierPath in textBox
- textSize
- textOverflow
- textBoxBaselines
- installedFonts
- hyphenation
- lineHeight
- tracking
- baselineShift
- openTypeFeatures
- tabs
- image
- imageSize
- imagePixelColor
- imageResolution
- FormattedString
- ImageObject
- PDF export
The API is currently focused on compatibility with DrawBot's static 2D image drawing capabilities. PRs for more of the API are welcome!
A couple of drawbotista specific functions have been added:
Display the generated image on screen. The display modes are:
"fullscreen"
"sheet"
"popover"
"panel"
"sidebar"
Returns image data. "PNG"
is the only supported format.
Refer to the DrawBot documentation for details on these. Not all functionality for some of these is supported.
size
width
height
save
restore
savedState
fill
stroke
rect
oval
polygon
line
strokeWidth
miterLimit
lineJoin
lineCap
font
fontSize
textBox
transform
translate
rotate
scale
skew
BezierPath
moveTo
lineTo
curveTo
closePath
endPath
rect
oval
line
polygon
pointInside
bounds
copy
appendPath
translate
rotate
scale
skew
transform