File: draw.py

package info (click to toggle)
python-pgmagick 0.7.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,132 kB
  • sloc: cpp: 3,672; python: 2,082; makefile: 160; sh: 40
file content (13 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
from pgmagick import Image, Geometry, Color, \
                     DrawableCircle, DrawableText

im = Image(Geometry(300, 300), Color("yellow"))

circle = DrawableCircle(100.0, 100.0, 20.0, 20.0)
im.draw(circle)

im.fontPointsize(65)
im.font("/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType/UnBatang.ttf")
text = DrawableText(30, 250, "hello gm")
im.draw(text)
im.write('circle-text.png')