12 March 2011

PMing Python binding for libMing

Ming, a free open source SWF (Flash) creation library.

This is win32 binary of mingc (PMing) python binding (using ming-0.4.4dev). See shape.py for example, path creation is similar to cairo.

mingc-0.4.4.win32-py2.7.exe
mingc-0.4.4.win32-py2.6.exe
mingc-0.4.4.win32-py2.5.exe
License: LGPL 2.1

shape.py:

from ming import *

Ming_setScale(1.0)

s = SWFShape()
s.setLine(40, 0x7f, 0, 0)
s.setRightFill(s.addFill(0xff, 0, 0))
s.movePenTo(200, 200)
s.drawLineTo(6200, 200)
s.drawLineTo(6200, 4600)
s.drawCurveTo(200, 4600, 200, 200)

m = SWFMovie()
m.setDimension(6400, 4800)
m.setRate(12.0)
m.add(s)
m.nextFrame()

m.save("test.swf")

No comments:

Post a Comment