Source

python-fu-matrix-transform / matrix-transform.py

from gimpfu import *
from math import *
import gtk
from pprint import pprint, pformat

def matrix_transform(img, drawable, a,b,c,d,e,f,g,h,i):
        pdb.gimp_item_transform_matrix(drawable, a,b,c,d,e,f,g,h,i)
	return None

register(
        #name
        "matrix-transform",
        #blurb
        "<blurb>",
        #help
        "<help text>",
        #author
        "<author>",
        #copyright
        "<copyright>",
        #date
        "<date>",
        #menu path
        "<Image>/Image/Transform/Matrix",
        #image types
        "*",
        #params
        [(PF_FLOAT, "a", "a:", 1.0),(PF_FLOAT, "b", "b:", 0.0),(PF_FLOAT, "c", "c:", 0.0),\
        (PF_FLOAT, "d", "d:", 0.0),(PF_FLOAT, "e", "e:", 1.0),(PF_FLOAT, "f", "f:", 0.0),\
        (PF_FLOAT, "g", "g:", 0.0),(PF_FLOAT, "h", "h:", 0.0),(PF_FLOAT, "i", "i:", 1.0)],
        #results
        [],
        #function
        matrix_transform
)

main()