[reportlab-users] diagonal ShadedRect and Clipping ?

Dirk Datzert reportlab-users@reportlab.com
Tue, 06 Aug 2002 19:30:11 +0200


Hi,

from renderPM/_renderPM.c/test_renderPM.py I think clipping is possible ?

 if flagged(6):
                        c = renderPM.PMCanvas(25, 25, bg=0xffffff)
                        doCPath6(c,doStroke=1)
                        print 'Clip',c.path
                        c.clipPathSet()
                        doCTest(doCPath4, c, 0, 0, c0=0x8000, c1=0xff0000)
                        print 'Draw',c.path
                        c.clipPathClear()
                        do_save(c,6)

There is a clipPathSet() and a clipPathClear() .

Is the Problem that PMCanvas has no method of calling both functions ?

What is about the following solution:

Path.isClipPath = 1 with points in Path calls clipPathSet()
Path.isClipPath = 1 with no points in Path calls clipPathClear ()

Regards,
Dirk