File: test.py

package info (click to toggle)
libming 0.2a.cvs20020110-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,204 kB
  • ctags: 4,173
  • sloc: ansic: 19,467; yacc: 2,149; cpp: 1,518; java: 1,253; ruby: 516; perl: 462; python: 436; makefile: 295; sh: 4
file content (20 lines) | stat: -rw-r--r-- 432 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

from mingc import *

s = newSWFShape()
l = SWFShape_setLine(s, 40, 0x7f, 0, 0, 0xff)
f = SWFShape_addSolidFill(s, 0xff, 0, 0, 0xff)
SWFShape_setRightFill(s, f)
SWFShape_moveTo(s, 1000, 1000)
SWFShape_lineTo(s, 6000, 4000)
SWFShape_end(s)

m = newSWFMovie()
SWFMovie_setDimension(m, 6400, 4800)
SWFMovie_setBackground(m, 0xff, 0, 0)
SWFMovie_setRate(m, 12.0)
SWFMovie_add(m, s)
SWFMovie_nextFrame(m)

SWFMovie_save(m, "pippo.swf")