[reportlab-users] diagonal ShadedRect and Clipping ?

Robin Becker reportlab-users@reportlab.com
Sun, 11 Aug 2002 14:24:37 +0100


In article <3D565741.1DE5F36E@rasselstein-hoesch.de>, Dirk Datzert
<dirk.datzert@tks-rasselstein.thyssenkrupp.com> writes
>Hi Robin,
>> >
>> I have added an experimental grids.ShadedPolygon class. It works, but
>> clearly shows problems with the libart intersector with thin rectangles
>> 'leaking' through the clipPath.
>
>are you going to put circle shading and logarithm color shading and
>multicolor shading into CSV tomorrow ? ;-))))
>I looked into the ShadedPolygon and saw that it is much more general
>than my class.
>
>Regards,
>Dirk
The SVP's that leak out when intersected look like

art_svp_intersect svp1 svp:
seg  0: n_points=3 dir=dn box=(10,35.999999999999993) (110,37)
    (110,35.999999999999993) (10,36) (10,37)
seg  1: n_points=3 dir=up box=(10,35.999999999999993) (110,37)
    (110,35.999999999999993) (110,36.999999999999993) (10,37)
art_svp_intersect svp2 svp:
seg  0: n_points=2 dir=dn box=(10,10) (60,60)
    (10,10) (60,60)
seg  1: n_points=3 dir=up box=(10,10) (110,60)
    (10,10) (110,10) (60,60)
art_svp_intersect svp_new svp:
seg  0: n_points=2 dir=dn box=(36,36) (37,37)
    (36,36) (37,37)
seg  1: n_points=2 dir=up box=(36,36) (84,36)
    (36,36) (84,36)
seg  2: n_points=2 dir=up box=(84,36) (110,36.999999999999993)
    (84,36) (110,36.999999999999993)
seg  3: n_points=2 dir=up box=(37,36.999999999999993) (110,37)
    (110,36.999999999999993) (37,37)

whilst the previous stripe (which works) looks like
art_svp_intersect svp1 svp:
seg  0: n_points=3 dir=dn box=(10,34.999999999999993) (110,36)
    (110,34.999999999999993) (10,35) (10,36)
seg  1: n_points=3 dir=up box=(10,34.999999999999993) (110,36)
    (110,34.999999999999993) (110,35.999999999999993) (10,36)
art_svp_intersect svp2 svp:
seg  0: n_points=2 dir=dn box=(10,10) (60,60)
    (10,10) (60,60)
seg  1: n_points=3 dir=up box=(10,10) (110,60)
    (10,10) (110,10) (60,60)
art_svp_intersect svp_new svp:
seg  0: n_points=2 dir=dn box=(35,34.999999999999993) (85,35)
    (85,34.999999999999993) (35,35)
seg  1: n_points=2 dir=up box=(84,34.999999999999993) (85,36)
    (85,34.999999999999993) (84,36)
seg  2: n_points=2 dir=dn box=(35,35) (36,36)
    (35,35) (36,36)
seg  3: n_points=2 dir=dn box=(36,36) (84,36)
    (36,36) (84,36)

the libart list almost never responds so I'll need to do some serious
debugging to find out what's going on here. The two input svps svp1
above look very similar (the heights change by 1) whilst the clip svp2
is the same triangle. The outputs look very different.
-- 
Robin Becker