File: bezier.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 (12 lines) | stat: -rw-r--r-- 360 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
from pgmagick import Image, Geometry, Color, Coordinate, CoordinateList, \
                     DrawableBezier

im = Image(Geometry(300, 200), Color("white"))
cdl = CoordinateList()
cdl.append(Coordinate(20, 20))
cdl.append(Coordinate(100, 50))
cdl.append(Coordinate(50, 100))
cdl.append(Coordinate(160, 160))
db = DrawableBezier(cdl)
im.draw(db)
im.display()