From:             sybrendijkstra at gmail dot com
Operating system: Windows 98 se
PHP version:      5.0.1
PHP Bug Type:     ClibPDF related
Bug description:  Function cpdf_fill_stroke() only fills

Description:
------------
I experienced some unexpected results with the CLibPDF function:
cpdf_fill_stroke() ->
http://www.php.net/manual/en/function.cpdf-fill-stroke.php

According to the manual the function is able to fill the current path and
then strokes the same path. As far is i am able to produce that function
only fills and there is no stroking at all to see.

The code below is a convert from a C example from FastI/O
(http://www.fastio.com/example/Arcs.c.txt)

Reproduce code:
---------------
$rbump = 0.1*100;
$xorig = 2.5*100;
$greenblue = 1.0;
$yorig = 7.5*10;
$radius= 2.2*100;

cpdf_setrgbcolor_stroke($cpdf, 0.7, 0.7, 0.0);

for($i=11; $i>=0; $i--) {
$radius -= $rbump;
$greenblue = $i/12.0;
cpdf_setrgbcolor_fill($cpdf, 1.0, $greenblue, $greenblue);
$eangle = ($i+1)*30.0;          /* end angle */
$sangle = 0.0;
cpdf_moveto($cpdf, $xorig, $yorig);
cpdf_arc($cpdf, $xorig, $yorig, $radius, $sangle, $eangle, 0);
cpdf_closepath($cpdf);
cpdf_fill_stroke($cpdf);        /* fill and stroke */
}

Expected result:
----------------
I expect to see: http://www.fastio.com/example/arctest.pdf

And then the "Color filled pie shapes" image. A red/white background with
a green/yellow lines as pie pieces.

Actual result:
--------------
I actually see only the red/white background. No stroke lines are visable.
I see the same result as when I only use cpdf_fill() function.

When I saw the source of the .pdf file generated by PHP there where some
minor differences between a file which had cpdf_fill_stroke() and a file
that used only cpdf_fill(). cpdf_fill_stroke() does add something to the
.pdf file, but it's not visable in my PDF viewer (Adobe Acrobat 5.0).

To be short:
cpdf_fill_stroke() -> only fills (and does not stroke)
cpdf_fill() -> only fills
cpdf_stroke() -> only strokes

-- 
Edit bug report at http://bugs.php.net/?id=31376&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31376&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31376&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31376&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31376&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31376&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31376&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31376&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31376&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31376&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31376&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31376&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31376&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31376&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31376&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31376&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31376&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31376&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31376&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31376&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31376&r=mysqlcfg

Reply via email to