#31376 [Opn->Fbk]: Function cpdf_fill_stroke() only fills
ID: 31376
Updated by: sniper@php.net
Reported By: sybrendijkstra at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: ClibPDF related
Operating System: Windows 98 se
PHP Version: 5.0.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-01-01 21:35:41] sybrendijkstra at gmail dot com
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 this bug report at http://bugs.php.net/?id=31376&edit=1
Thread (6 messages)