[gl2ps] typo in gl2psRescaleAndOffset

Alexander Danilov danilov at lanl.gov
Wed Aug 30 17:24:23 CEST 2006


Hello,

I tried to use GL2PS_POLYGON_OFFSET_FILL feature, but the picture was
very ugly. I went through gl2ps.c and find some strange thing in
gl2psRescaleAndOffset function:
dZdX is supposed to be (a*d-b*c)/area, but it is only a*d - b*c/area,
the same thing goes with dZdY. I am not sure if the formula is correct,
but when I fixed this, pictures became much better :)

I attached the patch to explain what I fixed.

Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: offset.patch
Type: text/x-patch
Size: 1131 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20060830/766fbd30/attachment.patch>