LCL: TPostScriptCanvas after fix r23928 cannot produce 2 consecutive LineTo() after single Moveto()
Original Reporter info from Mantis: AntonK
-
Reporter name: Anton Kavalenka
Original Reporter info from Mantis: AntonK
- Reporter name: Anton Kavalenka
Description:
Invalid postscript created with attached sample program
Unconditional 'stroke' after each lineto is wrong.
GhostScript says:
Error: /nocurrentpoint in --lineto--
Steps to reproduce:
Run the attached application. Produced post-script is erroneous.
%%Page: 1 1
%DoMoveTo(100,100)
6.00 835.98 moveto
%DoLineTo(100,400)
0.612 0.612 0.612 setrgbcolor % clBtnShadow
0.060 setlinewidth
6.00 817.98 lineto stroke
%DoLineTo(200,110)
0.875 0.875 0.875 setrgbcolor % clBtnFace
12.00 835.38 lineto stroke
%DoLineTo(200,410)
12.00 817.38 lineto stroke
stroke
showpage
%%EOF
Additional information:
'stroke' after lineto have to appear if canvas state changed (line style, color, fill color etc).
Consecutive lineto's have to be called without stroke if no changes in line drawing mode.
Obviously I can change 2 lineto with 1 polyline, but other scenarios may exist.
Mantis conversion info:
- Mantis ID: 16112
- OS: Debian GNU/Linux
- OS Build: squeeze
- Platform: x86_64
- Version: 0.9.29 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 24213 (#4ddf5a3e)
- Target version: 0.9.30